Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
NomadCommandSystem
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Instrument Control
NomadCommandSystem
Commits
41f9245c
Commit
41f9245c
authored
Mar 18, 2019
by
legoc
Browse files
Options
Browse Files
Download
Plain Diff
Merged master
parents
aee0810d
a1735e52
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
1 deletion
+60
-1
ChangeLog
ChangeLog
+6
-1
src/main/java/fr/ill/ics/core/property/Int32Property.java
src/main/java/fr/ill/ics/core/property/Int32Property.java
+3
-0
src/main/java/fr/ill/ics/core/property/Property.java
src/main/java/fr/ill/ics/core/property/Property.java
+12
-0
src/main/java/fr/ill/ics/nscclient/command/CommandZoneAccessor.java
...ava/fr/ill/ics/nscclient/command/CommandZoneAccessor.java
+39
-0
No files found.
ChangeLog
View file @
41f9245c
3.
1.10
DD/MM/YYYY
3.
2.1
DD/MM/YYYY
------
* Overwritten equals method in Property class.
3.2.0 11/02/2019
------
* Implementation of expressions and variables.
3.1.9 12/10/2018
-----
...
...
src/main/java/fr/ill/ics/core/property/Int32Property.java
View file @
41f9245c
...
...
@@ -33,6 +33,9 @@ public class Int32Property extends IntegerProperty {
return
true
;
}
catch
(
NumberFormatException
e
)
{
if
(
getPropertyFormat
().
acceptsValue
(
value
))
{
// Case of hexadecimal integer value
return
true
;
}
return
false
;
}
}
...
...
src/main/java/fr/ill/ics/core/property/Property.java
View file @
41f9245c
...
...
@@ -902,6 +902,18 @@ public abstract class Property implements ServerPropertyChangeListener, ICommand
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
obj
.
getClass
())
{
return
false
;
}
final
Property
other
=
(
Property
)
obj
;
return
id
==
other
.
getPropertyID
();
}
public
abstract
String
getType
();
...
...
src/main/java/fr/ill/ics/nscclient/command/CommandZoneAccessor.java
View file @
41f9245c
...
...
@@ -2688,6 +2688,45 @@ public class CommandZoneAccessor {
return
1
;
}
public
String
[]
getVariableList
(
int
commandBoxID
)
{
// Create the message type.
CommandZoneRequests
.
Message
type
=
CommandZoneRequests
.
Message
.
newBuilder
()
.
setType
(
CommandZoneRequests
.
Message
.
Type
.
GetVariableList
)
.
build
();
// Create the request.
CommandZoneRequests
.
CommandBoxRequest
request
=
CommandZoneRequests
.
CommandBoxRequest
.
newBuilder
()
.
setCommandBoxID
(
commandBoxID
)
.
build
();
commandBoxRequester
.
sendTwoParts
(
type
.
toByteArray
(),
request
.
toByteArray
());
try
{
Common
.
StringArrayResponse
response
=
Common
.
StringArrayResponse
.
parseFrom
(
commandBoxRequester
.
receive
());
// Test the error.
if
(
response
.
hasError
())
{
processError
(
response
.
getError
(),
commandBoxID
);
}
else
{
int
size
=
response
.
getValueCount
();
String
[]
result
=
new
String
[
size
];
for
(
int
i
=
0
;
i
<
size
;
++
i
)
{
result
[
i
]
=
response
.
getValue
(
i
);
}
return
result
;
}
}
catch
(
InvalidProtocolBufferException
e
)
{
LOGGER
.
logp
(
Level
.
WARNING
,
this
.
getClass
().
getName
(),
"getVariableList"
,
"error in parsing response for command box "
+
commandBoxID
);
}
return
null
;
}
public
int
create
()
{
...
...
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