Exposing Status Information

Status is a way for an application to provide information to the broader ecosystem (Edge Manager, PETC, etc.) that is automatically queried rather than triggered via user interaction. This is commonly used to relay information to the cloud for state such as which applications exist and are running, which analytics are running or stopped, or information about connectivity (Wi-Fi signal strength, cell signal strength, etc.). For certain capabilities there is a prescribed format the status requires in order to be consumable by Predix Edge, but custom capabilities can have their own status format that can be retrieved from Edge Manager or via the PETC.

The application provides status back to the Edge Ecosystem via a status topic provided in the mqtt_config.json file as the statusTopic. Status message payload expected for the AnalyticEngine is a json object that is a representation of the old protobuf-based status in the status section and the capabilityId of Predix.Edge.AnalyticsEngine and a version of 1.0.0.
[
   {
        "handler": "handler name",
        "capabilityId": " Predix.Edge.AnalyticEngine",
        "capabilityVersion": "1.0.0",
        "status": "…"
    } ...
]
Note: Status should be published with the retained flag. Edge Agent will not remove the status message after reading it.
Note: The status message is retrieved and sent to EdgeManager at each synch interval, it is not automatically sent when a new message arrives into the topic, nor is a status message guaranteed to be delivered if the synch interval is not triggered while the status message is the most recent.