Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Publisher
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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 devices
Calculation
Publisher
Commits
cedbdb81
Commit
cedbdb81
authored
Jul 2, 2013
by
Gwenaelle ABEILLE
Browse files
Options
Downloads
Patches
Plain Diff
report CVS modifications
parent
7151cb6a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pom.xml
+2
-1
2 additions, 1 deletion
pom.xml
src/main/java/fr/soleil/tango/server/publisher/Publisher.java
+89
-72
89 additions, 72 deletions
...main/java/fr/soleil/tango/server/publisher/Publisher.java
with
91 additions
and
73 deletions
pom.xml
+
2
−
1
View file @
cedbdb81
...
...
@@ -9,7 +9,7 @@
</parent>
<groupId>
fr.soleil.deviceservers
</groupId>
<artifactId>
Publisher
</artifactId>
<version>
2.0.
5
</version>
<version>
2.0.
7
</version>
<name>
Publisher
</name>
<description>
Publisher Device Server
</description>
<scm>
...
...
@@ -68,6 +68,7 @@
<executions>
<execution>
<id>
install
</id>
<phase>
install
</phase>
<goals>
<goal>
generate
</goal>
</goals>
...
...
This diff is collapsed.
Click to expand it.
src/main/java/fr/soleil/tango/server/publisher/Publisher.java
+
89
−
72
View file @
cedbdb81
...
...
@@ -4,12 +4,13 @@ import java.util.Arrays;
import
org.tango.DeviceState
;
import
org.tango.server.ServerManager
;
import
org.tango.server.annotation.Command
;
import
org.tango.server.annotation.Delete
;
import
org.tango.server.annotation.Device
;
import
org.tango.server.annotation.DeviceProperty
;
import
org.tango.server.annotation.DynamicManagement
;
import
org.tango.server.annotation.Init
;
import
org.tango.server.annotation.State
Machine
;
import
org.tango.server.annotation.State
;
import
org.tango.server.annotation.Status
;
import
org.tango.server.dynamic.DynamicManager
;
import
org.tango.server.dynamic.attribute.PublisherAttribute
;
...
...
@@ -22,6 +23,9 @@ public final class Publisher {
@Status
private
String
status
;
@State
private
DeviceState
state
;
@DynamicManagement
private
DynamicManager
dynMngt
;
@DeviceProperty
...
...
@@ -32,7 +36,6 @@ public final class Publisher {
// String[] commandsList;
@Init
@StateMachine
(
endState
=
DeviceState
.
ON
)
public
void
init
()
throws
ClassNotFoundException
,
DevFailed
{
for
(
final
String
attribute
:
attributesList
)
{
final
String
[]
config
=
attribute
.
split
(
";"
);
...
...
@@ -43,6 +46,7 @@ public final class Publisher {
// dynMngt.addCommand(new DummyDynamicCommand(config));
// }
status
=
dynMngt
.
getDynamicAttributes
().
size
()
+
" attributes created"
;
state
=
DeviceState
.
ON
;
}
@Delete
...
...
@@ -54,6 +58,19 @@ public final class Publisher {
ServerManager
.
getInstance
().
start
(
args
,
Publisher
.
class
);
}
public
DeviceState
getState
()
{
return
state
;
}
@Command
(
inTypeDesc
=
"The state as a string (ON, OFF, RUNNING...)"
)
public
void
setState
(
String
state
)
{
this
.
state
=
DeviceState
.
valueOf
(
state
);
}
public
void
setState
(
DeviceState
state
)
{
this
.
state
=
state
;
}
public
String
getStatus
()
{
return
status
;
}
...
...
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