Azure / opendigitaltwins-dtdl

Digital Twins Definition Language
Creative Commons Attribution 4.0 International
470 stars 160 forks source link

Is it possible to specify if data is sent together across interfaces #57

Closed reginbald closed 4 years ago

reginbald commented 4 years ago

Does/will the standard allow us specify whether data is sent together across interfaces? Such as if we have two interfaces for a device, a conveyor interfaces that has a speed telemetry and thermostat interface that has a temperature telemetry. Both of these would be sent together in the same message from the device.

briancr-ms commented 4 years ago

The DTDL interface does not describe how the telemetry data is packaged--that's up to the DTDL to protocol binding in use. When using Azure IoT Hub, telemetry data from the same component can be packaged in the same telemetry message. Each top-level JSON key in the telemetry message maps to one of the telemetry definitions in the component's interface. If your device is made up of multiple components, Azure IoT Hub does not currently support a single telemetry message that contains telemetry from multiple components. This documentation contains some additional information: https://docs.microsoft.com/en-us/azure/iot-pnp/concepts-convention#telemetry.