Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
HdbTdbArchivingServers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango controls archiving
HdbTdbArchivingServers
Commits
9c9f3161
Commit
9c9f3161
authored
Apr 4, 2011
by
Gwenaelle ABEILLE
Browse files
Options
Downloads
Patches
Plain Diff
add support for uchar & ulong64 (still missing char, long64, int. Not supported by ATK)
parent
7e95d2f4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/HdbArchiver/Collector/HdbCollectorFactory.java
+43
-22
43 additions, 22 deletions
src/main/java/HdbArchiver/Collector/HdbCollectorFactory.java
with
43 additions
and
22 deletions
src/main/java/HdbArchiver/Collector/HdbCollectorFactory.java
+
43
−
22
View file @
9c9f3161
...
...
@@ -167,8 +167,7 @@ public class HdbCollectorFactory {
*/
public
HdbCollector
get
(
final
AttributeLightMode
attributeLightMode
)
{
final
SuperMode
superMode
=
new
SuperMode
(
attributeLightMode
.
getData_format
(),
attributeLightMode
.
getData_type
(),
attributeLightMode
.
getWritable
(),
attributeLightMode
.
getMode
());
attributeLightMode
.
getData_type
(),
attributeLightMode
.
getWritable
(),
attributeLightMode
.
getMode
());
return
tableCollector
.
get
(
superMode
);
}
...
...
@@ -179,13 +178,12 @@ public class HdbCollectorFactory {
* @param attributeLightMode
* Attribute associated to the looked collector.
*/
public
void
createCollectorAndAddSource
(
final
AttributeLightMode
attributeLightMode
,
final
ILogger
logger
,
final
DbProxy
dbProxy
)
throws
ArchivingException
{
public
void
createCollectorAndAddSource
(
final
AttributeLightMode
attributeLightMode
,
final
ILogger
logger
,
final
DbProxy
dbProxy
)
throws
ArchivingException
{
logger
.
trace
(
ILogger
.
LEVEL_DEBUG
,
"createCollectorAndAddSource for "
+
attributeLightMode
);
final
SuperMode
superMode
=
new
SuperMode
(
attributeLightMode
.
getData_format
(),
attributeLightMode
.
getData_type
(),
attributeLightMode
.
getWritable
(),
attributeLightMode
.
getMode
());
attributeLightMode
.
getData_type
(),
attributeLightMode
.
getWritable
(),
attributeLightMode
.
getMode
());
HdbCollector
collector
=
tableCollector
.
get
(
superMode
);
if
(
collector
==
null
)
{
logger
.
trace
(
ILogger
.
LEVEL_DEBUG
,
"new collector "
);
...
...
@@ -230,8 +228,7 @@ public class HdbCollectorFactory {
* @return the instance of HdbCollector associated / associable to an
* attribute.
*/
public
HdbCollector
create
(
final
AttributeLightMode
attributeLightMode
)
throws
ArchivingException
{
public
HdbCollector
create
(
final
AttributeLightMode
attributeLightMode
)
throws
ArchivingException
{
// System.out.println("HdbCollectorFactory.create\r\n\t" +
// attributeLightMode.toString());
final
String
name
=
attributeLightMode
.
getAttribute_complete_name
();
...
...
@@ -254,6 +251,8 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_ULONG
:
case
TangoConst
.
Tango_DEV_DOUBLE
:
case
TangoConst
.
Tango_DEV_FLOAT
:
case
TangoConst
.
Tango_DEV_UCHAR
:
case
TangoConst
.
Tango_DEV_ULONG64
:
collector
=
new
NumberScalar_RO
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_BOOLEAN
:
...
...
@@ -266,7 +265,8 @@ public class HdbCollectorFactory {
collector
=
new
StringScalar_RO
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_CHAR
:
case
TangoConst
.
Tango_DEV_UCHAR
:
case
TangoConst
.
Tango_DEV_LONG64
:
case
TangoConst
.
Tango_DEV_INT
:
default
:
generateException
(
GlobalConst
.
DATA_TYPE_EXCEPTION
,
data_type
,
name
);
}
...
...
@@ -279,6 +279,8 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_ULONG
:
case
TangoConst
.
Tango_DEV_DOUBLE
:
case
TangoConst
.
Tango_DEV_FLOAT
:
case
TangoConst
.
Tango_DEV_UCHAR
:
case
TangoConst
.
Tango_DEV_ULONG64
:
collector
=
new
NumberScalar_RW
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_BOOLEAN
:
...
...
@@ -287,9 +289,10 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_STRING
:
collector
=
new
StringScalar_RW
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_CHAR
:
case
TangoConst
.
Tango_DEV_UCHAR
:
case
TangoConst
.
Tango_DEV_STATE
:
case
TangoConst
.
Tango_DEV_CHAR
:
case
TangoConst
.
Tango_DEV_LONG64
:
case
TangoConst
.
Tango_DEV_INT
:
default
:
generateException
(
GlobalConst
.
DATA_TYPE_EXCEPTION
,
data_type
,
name
);
}
...
...
@@ -302,6 +305,8 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_ULONG
:
case
TangoConst
.
Tango_DEV_DOUBLE
:
case
TangoConst
.
Tango_DEV_FLOAT
:
case
TangoConst
.
Tango_DEV_UCHAR
:
case
TangoConst
.
Tango_DEV_ULONG64
:
collector
=
new
NumberScalar_WO
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_BOOLEAN
:
...
...
@@ -310,6 +315,9 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_STRING
:
collector
=
new
StringScalar_WO
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_CHAR
:
case
TangoConst
.
Tango_DEV_LONG64
:
case
TangoConst
.
Tango_DEV_INT
:
default
:
generateException
(
GlobalConst
.
DATA_TYPE_EXCEPTION
,
data_type
,
name
);
}
...
...
@@ -322,6 +330,8 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_LONG
:
case
TangoConst
.
Tango_DEV_ULONG
:
case
TangoConst
.
Tango_DEV_DOUBLE
:
case
TangoConst
.
Tango_DEV_UCHAR
:
case
TangoConst
.
Tango_DEV_ULONG64
:
collector
=
new
NumberScalar_RW
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_BOOLEAN
:
...
...
@@ -330,6 +340,9 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_STRING
:
collector
=
new
StringScalar_RW
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_CHAR
:
case
TangoConst
.
Tango_DEV_LONG64
:
case
TangoConst
.
Tango_DEV_INT
:
default
:
generateException
(
GlobalConst
.
DATA_TYPE_EXCEPTION
,
data_type
,
name
);
}
...
...
@@ -351,8 +364,8 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_ULONG
:
case
TangoConst
.
Tango_DEV_DOUBLE
:
case
TangoConst
.
Tango_DEV_FLOAT
:
case
TangoConst
.
Tango_DEV_CHAR
:
case
TangoConst
.
Tango_DEV_UCHAR
:
case
TangoConst
.
Tango_DEV_ULONG64
:
collector
=
new
NumberSpectrum_RO
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_BOOLEAN
:
...
...
@@ -361,6 +374,9 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_STRING
:
collector
=
new
StringSpectrum_RO
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_CHAR
:
case
TangoConst
.
Tango_DEV_LONG64
:
case
TangoConst
.
Tango_DEV_INT
:
default
:
generateException
(
GlobalConst
.
DATA_TYPE_EXCEPTION
,
data_type
,
name
);
}
...
...
@@ -373,8 +389,8 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_ULONG
:
case
TangoConst
.
Tango_DEV_DOUBLE
:
case
TangoConst
.
Tango_DEV_FLOAT
:
case
TangoConst
.
Tango_DEV_CHAR
:
case
TangoConst
.
Tango_DEV_UCHAR
:
case
TangoConst
.
Tango_DEV_ULONG64
:
collector
=
new
NumberSpectrum_RO
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_BOOLEAN
:
...
...
@@ -383,6 +399,9 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_STRING
:
collector
=
new
StringSpectrum_RO
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_CHAR
:
case
TangoConst
.
Tango_DEV_LONG64
:
case
TangoConst
.
Tango_DEV_INT
:
default
:
generateException
(
GlobalConst
.
DATA_TYPE_EXCEPTION
,
data_type
,
name
);
}
...
...
@@ -397,8 +416,9 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_ULONG
:
case
TangoConst
.
Tango_DEV_DOUBLE
:
case
TangoConst
.
Tango_DEV_FLOAT
:
case
TangoConst
.
Tango_DEV_CHAR
:
case
TangoConst
.
Tango_DEV_UCHAR
:
case
TangoConst
.
Tango_DEV_ULONG64
:
case
TangoConst
.
Tango_DEV_STATE
:
collector
=
new
NumberSpectrum_RW
(
modeHandler
);
break
;
...
...
@@ -408,6 +428,9 @@ public class HdbCollectorFactory {
case
TangoConst
.
Tango_DEV_STRING
:
collector
=
new
StringSpectrum_RW
(
modeHandler
);
break
;
case
TangoConst
.
Tango_DEV_CHAR
:
case
TangoConst
.
Tango_DEV_LONG64
:
case
TangoConst
.
Tango_DEV_INT
:
default
:
generateException
(
GlobalConst
.
DATA_TYPE_EXCEPTION
,
data_type
,
name
);
}
...
...
@@ -427,8 +450,7 @@ public class HdbCollectorFactory {
public
void
destroy
(
final
AttributeLightMode
attributeLightMode
)
{
final
SuperMode
superMode
=
new
SuperMode
(
attributeLightMode
.
getData_format
(),
attributeLightMode
.
getData_type
(),
attributeLightMode
.
getWritable
(),
attributeLightMode
.
getMode
());
attributeLightMode
.
getData_type
(),
attributeLightMode
.
getWritable
(),
attributeLightMode
.
getMode
());
tableCollector
.
remove
(
superMode
);
}
...
...
@@ -450,12 +472,11 @@ public class HdbCollectorFactory {
}
// GIACOMO VERSION
public
void
removeAllForAttribute
(
final
AttributeLightMode
attributeLightMode
)
throws
ArchivingException
{
public
void
removeAllForAttribute
(
final
AttributeLightMode
attributeLightMode
)
throws
ArchivingException
{
SuperMode
superMode
;
final
HashSet
<
SuperMode
>
toRemove
=
new
HashSet
<
SuperMode
>();
superMode
=
new
SuperMode
(
attributeLightMode
.
getData_format
(),
attributeLightMode
.
getData_type
(),
attributeLightMode
.
getWritable
(),
attributeLightMode
.
getMode
());
superMode
=
new
SuperMode
(
attributeLightMode
.
getData_format
(),
attributeLightMode
.
getData_type
(),
attributeLightMode
.
getWritable
(),
attributeLightMode
.
getMode
());
final
HdbCollector
collector
=
tableCollector
.
get
(
superMode
);
if
(
collector
!=
null
)
{
...
...
@@ -513,8 +534,8 @@ public class HdbCollectorFactory {
return
ret
;
}
private
static
void
generateException
(
final
String
cause
,
final
int
cause_value
,
final
String
name
)
throws
ArchivingException
{
private
static
void
generateException
(
final
String
cause
,
final
int
cause_value
,
final
String
name
)
throws
ArchivingException
{
final
String
message
=
GlobalConst
.
ARCHIVING_ERROR_PREFIX
+
" : "
+
cause
;
final
String
reason
=
"Failed while executing HdbCollectorFactory.create() method..."
;
final
String
desc
=
cause
+
" ("
+
cause_value
+
") not supported !! ["
+
name
+
"]"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment