Stopping the Open Edge Device Kit¶
Docker Version¶
The docker version of Open Edge Device Kit is stopped using the following command:
docker-compose stop
Executable version¶
The executable version of Open Edge Device Kit is stopped using the following command:
agentruntime/controlling/command/stop
This topic should also be subscribed to by all data readers and trigger them to stop all operations. After the Open Edge Device Kit has stopped all of its operations, it publishes a success message via agentruntime/monitoring/opresult/stop
.
Code Example¶
-
Establish a connection to the MQTT broker where
<mqtt_host>
is the host name and<mqtt_port>
is the port:String broker = String.format("tcp://%s:%d", <mqtt_host>, <mqtt_port>); MqttClient mqttClient = new MqttClient(broker, "<mqtt_client_id>"); mqttClient.connect();
-
Publish the stop command to the Open Edge Device Kit:
String message = "STOP COMMAND"; String topic = "agentruntime/controlling/command/stop"; mqttClient.publish(topic, message.getBytes(StandardCharsets.ISO_8859_1));
-
Wait for 30 seconds or until the Open Edge Device Kit publishes the success message via
agentruntime/monitoring/opresult/stop
{ "value": 0, "status": "Stopped" }
-
After receiving the success message or if it has not arrived after 30 seconds, kill the Open Edge Device Kit process.
Restarting Open Edge Device Kit¶
After sending the stop command, the Open Edge Device Kit must be restarted as described in the Getting Started sections:
- Start the executable version of the Open Edge Device Kit
- Start the docker version of the Open Edge Device Kit
Except where otherwise noted, content on this site is licensed under the Development License Agreement.