Skip to content
Snippets Groups Projects
Commit e8515d7e authored by Antonin Hottois's avatar Antonin Hottois Committed by Antonin Hottois
Browse files

Status message changes

parent 6fa4a15d
Branches
Tags
No related merge requests found
......@@ -194,16 +194,17 @@ public class MessageTrigger implements StateUpdates {
@StateMachine(deniedStates = {DeviceState.FAULT, DeviceState.OFF, DeviceState.INIT})
public void Stop() {
// Stops the monitoring task
sendInfo("Stopping...!");
if (triggerTask != null) triggerTask.stop();
setStatus("Trigger service stopped!\nDevice standing by...");
setState(DeviceState.OFF);
sendInfo("Successfull stop!");
}
// Command Start
@Command(inTypeDesc = "Starts the monitoring service", displayLevel = 1)
@StateMachine(deniedStates = {DeviceState.FAULT, DeviceState.ALARM, DeviceState.ON, DeviceState.INIT})
public void Start() {
sendInfo("Starting...!");
// Get the list of monitored attributes to display their names in status
monitoredAttributesString = "Monitored attributes:\n";
for (int i = 0; i < monitoredAttributesList.size(); i++) {
......@@ -215,7 +216,6 @@ public class MessageTrigger implements StateUpdates {
triggerTask = new TriggerPulserTask(PollingPeriod, monitoredAttributesList, monitoredDevicesMap, textTalkerDevice, sentMessagesArray, this);
setStatus("Trigger service started!\n\n" + monitoredAttributesString);
setState(DeviceState.ON);
sendInfo("Successfull start!");
}
// Command ClearMessagesList
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment