Azure / opendigitaltwins-dtdl

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

Event semantic type missing #119

Closed pelikhan closed 2 years ago

pelikhan commented 3 years ago

In IoT central, it is possible to define a Telemetry capability with semantic type Event. However, it seems that

image

image

briancr-ms commented 3 years ago

Thanks for your feedback on this.

The Event semantic type is part of the IoT Central extension and is documented here: https://docs.microsoft.com/en-us/azure/iot-central/core/concepts-telemetry-properties-commands#event-and-state-types.

The VS Code DTDL extension behavior looks incorrect. I will follow up on this.

pelikhan commented 3 years ago

What is the semantic definition of "Event" and "State"? I tried to set the "State" semantic type on a Telemetry and got an error. image

pelikhan commented 3 years ago

image

riteshrao commented 3 years ago

Hello, IoT Central's "State" semantic type requires the schema of the "Telemetry" capability to be defined as an "Enum" type. The "State" semantic type describes discrete state transitions between the enum's values.

Did you get the error above with the Telemetry schema defined as an Enum?

pelikhan commented 3 years ago

Hello, IoT Central's "State" semantic type requires the schema of the "Telemetry" capability to be defined as an "Enum" type.

I see. That's good to know. It's not clear from the docs.

Did you get the error above with the Telemetry schema defined as an Enum?

No, it was a float i think.