Azure / opendigitaltwins-smartcities

DTDL based ontology for Smart Cities
MIT License
68 stars 28 forks source link

Usage of Telemetry in models #29

Open JMayrbaeurl opened 3 years ago

JMayrbaeurl commented 3 years ago

A lot of models are using Telemetry attributes, even in cases where a Property attribute should be used. E.g. 'dtmi:digitaltwins:ngsi_ld:city:ParkingSpot;1' in 'Ontology\Parking\ParkingSpot\ParkingSpot.json'.

        {
            "@type": "Telemetry",
            "name": "status",
            "schema": {
                "@type": "Enum",
                "valueSchema": "string",
                "enumValues": [
                    {
                        "name": "occupied",
                        "displayName": "Occupied",
                        "enumValue": "occupied"
                    },
                    {
                        "name": "free",
                        "displayName": "Free",
                        "enumValue": "free"
                    },
                    {
                        "name": "closed",
                        "displayName": "Closed",
                        "enumValue": "closed"
                    },
                    {
                        "name": "unkown",
                        "displayName": "Unkown",
                        "enumValue": "unkown"
                    }
                ]
            }
        },

Why is 'status' a Telemetry attribute here? If used like this, you won't be able to query for free parking spots, since values of Telemetry attributes won't be stored.

JMayrbaeurl commented 3 years ago

@gdetant Just added a PR #48 to fix this for the ParkingSpot entity

JMayrbaeurl commented 3 years ago

See other usage of Telemetry in the ontology: Telemetry_Usage.txt

gdetant commented 3 years ago

I merged the PR 48