Skip to content
Snippets Groups Projects
Commit cedbdb81 authored by Gwenaelle ABEILLE's avatar Gwenaelle ABEILLE
Browse files

report CVS modifications

parent 7151cb6a
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
......@@ -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.StateMachine;
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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment