-
We have this field OperationalStatus as part of device metadata - the values of which are UP, DOWN, UNKNOWN. My question is how do we update it? Should device service/SDK be updating it based on whether it is able to collect data? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
In EdgeX, the OperationalStatus field in the device metadata represents the operational state of a device, indicating whether it is UP, DOWN, or UNKNOWN. The responsibility of updating this field typically lies with the device service or SDK that interacts with the physical device. The device service or SDK should regularly monitor the connectivity and functionality of the device it manages. Based on the device's availability and the ability to collect data, the device service or SDK can update the OperationalStatus field accordingly. Here's a general approach to updating the OperationalStatus field: Monitoring Device Connectivity: The device service or SDK should periodically check the connectivity status of the device. This can involve verifying network connectivity, device responsiveness, or any other relevant indicators. Collecting Data: If the device service or SDK is responsible for collecting data from the device, it should attempt to gather the necessary data during its regular operations. Updating OperationalStatus: Based on the results of the connectivity checks and data collection attempts, the device service or SDK can update the OperationalStatus field of the device accordingly. For example: If the device is responsive and data collection is successful, the OperationalStatus can be set to UP. It's important to note that the exact implementation details may depend on the specific device service or SDK being used, as well as the integration with EdgeX. The device service or SDK should provide the necessary mechanisms to update the OperationalStatus field as part of its functionality. |
Beta Was this translation helpful? Give feedback.
In EdgeX Foundry, the device SDK itself does not directly update the operational status of a device based on the success or failure of data collection or other checks. The responsibility of updating the operational status typically lies with the device service that interacts with the physical device.
The device SDK is a software development kit that provides a set of tools, libraries, and APIs to facilitate the development of device services in EdgeX. It helps in managing the communication and interaction with devices but does not handle the overall operational status of the device service or individual devices.
The device service, which is developed using the device SDK, is responsible f…