Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadCommandSystem
Commits
0df91acf
Commit
0df91acf
authored
Jan 05, 2016
by
Jerome Locatelli
Browse files
Merge of branch Instrument_RC_174
parent
aef132ea
Changes
28
Hide whitespace changes
Inline
Side-by-side
src/fr/ill/ics/core/property/array/Int64Array.java
View file @
0df91acf
...
...
@@ -124,6 +124,9 @@ public class Int64Array extends Array {
}
public
boolean
onlyContainsNegativeValues
()
{
if
(
array
==
null
)
{
return
false
;
}
for
(
int
i
=
0
;
i
<
array
.
length
;
i
++)
{
if
(
array
[
i
]
>
0
)
{
return
false
;
...
...
src/fr/ill/ics/core/property/array/Int8Array.java
View file @
0df91acf
...
...
@@ -123,6 +123,9 @@ public class Int8Array extends Array {
}
public
boolean
onlyContainsNegativeValues
()
{
if
(
array
==
null
)
{
return
false
;
}
for
(
int
i
=
0
;
i
<
array
.
length
;
i
++)
{
if
(
array
[
i
]
>
0
)
{
return
false
;
...
...
src/fr/ill/ics/core/property/parser/PropertyParser.java
View file @
0df91acf
...
...
@@ -60,11 +60,11 @@ public class PropertyParser extends GenericParser {
// ********************************************************************************
// ************************* Possible attributes **********************************
// ********************************************************************************
pr
ivate
final
static
String
ATTRIBUTE_CONTROLLER_TYPE
=
"type"
;
pr
otected
final
static
String
ATTRIBUTE_CONTROLLER_TYPE
=
"type"
;
private
final
static
String
ATTRIBUTE_PROPERTY_TYPE
=
"type"
;
pr
ivate
final
static
String
ATTRIBUTE_PROPERTY_NAME
=
"name"
;
pr
ivate
final
static
String
ATTRIBUTE_MAX_LENGTH
=
"max_length"
;
pr
ivate
final
static
String
ATTRIBUTE_IS_UNDOABLE
=
"is_undoable"
;
pr
otected
final
static
String
ATTRIBUTE_PROPERTY_NAME
=
"name"
;
pr
otected
final
static
String
ATTRIBUTE_MAX_LENGTH
=
"max_length"
;
pr
otected
final
static
String
ATTRIBUTE_IS_UNDOABLE
=
"is_undoable"
;
private
final
static
String
ATTRIBUTE_NB_DECIMAL_PLACES
=
"nb_decimal_places"
;
private
final
static
String
ATTRIBUTE_GREATER_THAN_VALUE
=
"value"
;
private
final
static
String
ATTRIBUTE_LOWER_THAN_VALUE
=
"value"
;
...
...
@@ -76,9 +76,9 @@ public class PropertyParser extends GenericParser {
private
final
static
String
ATTRIBUTE_MAX_PROPERTY
=
"max_property"
;
private
final
static
String
ATTRIBUTE_MAX_EXCLUDED
=
"max_excluded"
;
private
final
static
String
ATTRIBUTE_DECIMAL_FORMAT_PROPERTY_NAME
=
"property_name"
;
pr
ivate
final
static
String
ATTRIBUTE_SIZE_PROPERTY
=
"size_property"
;
pr
otected
final
static
String
ATTRIBUTE_SIZE_PROPERTY
=
"size_property"
;
pr
ivate
String
controllerType
;
pr
otected
String
controllerType
;
private
Map
properties
;
// KEY=property name VALUE=PropertyDescriptor instance
private
Map
propertyTypes
;
// KEY=property name VALUE=property type
...
...
src/fr/ill/ics/nscclient/dataprovider/DataAccessor.java
View file @
0df91acf
...
...
@@ -23,6 +23,7 @@ import java.util.Map;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
fr.ill.ics.bridge.command.CommandZoneWrapper
;
import
fr.ill.ics.nomadserver.core.DatabaseAccessor
;
import
fr.ill.ics.nomadserver.core.DatabaseAccessorHelper
;
import
fr.ill.ics.nomadserver.core.DatabaseAccessorPackage.BadPropertyTypeException
;
...
...
@@ -546,4 +547,11 @@ public class DataAccessor {
return
databaseAccessor
.
getWholeScannableProperties
(
databaseID
);
}
public
static
String
getServerId
(
int
databaseId
)
{
if
(
databaseId
==
0
)
{
return
CommandZoneWrapper
.
SERVER_ID
;
}
return
String
.
valueOf
(
databaseId
);
}
}
\ No newline at end of file
src/fr/ill/ics/nscclient/dataprovider/ServantDatabase.java
View file @
0df91acf
...
...
@@ -133,6 +133,16 @@ public class ServantDatabase {
}
public
Set
<
String
>
getControllerTypes
()
{
Set
<
String
>
controllerTypes
=
new
TreeSet
<
String
>();
Iterator
<
ClientServantDescriptor
>
it
=
controllers
.
values
().
iterator
();
while
(
it
.
hasNext
())
{
controllerTypes
.
add
(
it
.
next
().
getType
());
}
return
controllerTypes
;
}
public
boolean
controllerIsEnabled
(
String
controllerName
)
{
ClientServantDescriptor
descriptor
=
getControllerDescriptor
(
controllerName
);
if
(
descriptor
!=
null
)
{
...
...
src/fr/ill/ics/nscclient/notification/commandzone/CommandZoneEventClient.java
View file @
0df91acf
...
...
@@ -85,7 +85,7 @@ public class CommandZoneEventClient {
public
void
addCommandBoxListener
(
ICommandBoxEventListener
listener
)
{
CommandZoneBoxKey
key
=
new
CommandZoneBoxKey
(
listener
.
getDatabaseI
D
(),
listener
.
getCommandBoxID
());
CommandZoneBoxKey
key
=
new
CommandZoneBoxKey
(
listener
.
getDatabaseI
d
(),
listener
.
getCommandBoxID
());
synchronized
(
commandBoxListeners
)
{
if
(!
commandBoxListeners
.
containsKey
(
key
))
{
...
...
@@ -97,7 +97,7 @@ public class CommandZoneEventClient {
public
void
removeCommandBoxListener
(
ICommandBoxEventListener
listener
)
{
CommandZoneBoxKey
key
=
new
CommandZoneBoxKey
(
listener
.
getDatabaseI
D
(),
listener
.
getCommandBoxID
());
CommandZoneBoxKey
key
=
new
CommandZoneBoxKey
(
listener
.
getDatabaseI
d
(),
listener
.
getCommandBoxID
());
synchronized
(
commandBoxListeners
)
{
if
(
commandBoxListeners
.
containsKey
(
key
))
{
...
...
@@ -166,7 +166,7 @@ public class CommandZoneEventClient {
public
void
addForLoopListener
(
IForLoopEventListener
listener
)
{
CommandZoneBoxKey
key
=
new
CommandZoneBoxKey
(
listener
.
getDatabaseI
D
(),
listener
.
getForLoopCommandBoxID
());
CommandZoneBoxKey
key
=
new
CommandZoneBoxKey
(
listener
.
getDatabaseI
d
(),
listener
.
getForLoopCommandBoxID
());
synchronized
(
forLoopListeners
)
{
if
(!
forLoopListeners
.
containsKey
(
key
))
{
...
...
@@ -178,7 +178,7 @@ public class CommandZoneEventClient {
public
void
removeCommandBoxListener
(
IForLoopEventListener
listener
)
{
CommandZoneBoxKey
key
=
new
CommandZoneBoxKey
(
listener
.
getDatabaseI
D
(),
listener
.
getForLoopCommandBoxID
());
CommandZoneBoxKey
key
=
new
CommandZoneBoxKey
(
listener
.
getDatabaseI
d
(),
listener
.
getForLoopCommandBoxID
());
synchronized
(
forLoopListeners
)
{
if
(
forLoopListeners
.
containsKey
(
key
))
{
...
...
src/fr/ill/ics/nscclient/servant/CorbaControllerManager.java
View file @
0df91acf
...
...
@@ -101,6 +101,11 @@ public class CorbaControllerManager extends ControllerManager implements ServerC
public
Set
<
String
>
getControllersOfType
(
String
type
,
boolean
onlyVisibleOnes
)
{
return
ServantDatabase
.
getInstance
().
getControllersOfType
(
type
,
onlyVisibleOnes
);
}
public
Set
<
String
>
getControllerTypes
()
{
return
ServantDatabase
.
getInstance
().
getControllerTypes
();
}
public
boolean
controllerIsEnabled
(
String
controllerName
)
{
...
...
src/fr/ill/ics/nscclient/servant/CorbaServant.java
View file @
0df91acf
...
...
@@ -66,7 +66,8 @@ public class CorbaServant implements Controller {
int
commandId
=
CommandDatabase
.
getInstance
().
getCommandId
(
servantId
,
commandName
);
if
(
commandId
!=
-
1
)
{
return
DataAccessor
.
getInstance
(
"real"
).
getCommandState
(
databaseId
,
commandId
);
String
serverId
=
DataAccessor
.
getServerId
(
databaseId
);
return
DataAccessor
.
getInstance
(
serverId
).
getCommandState
(
0
,
commandId
);
}
throw
new
UnknownCommandException
();
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment