{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$schemaVersion": "0.1.0", "modelTags": "", "$id": "https://smart-data-models.github.io/dataModel.Device/DeviceMeasurement/schema.json", "title": "Smart Data models - Measurement schema,", "description": "Description of a generic measurement entity coming from a device or other data source.", "type": "object", "required": [ "id", "type" ], "allOf": [ { "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/GSMA-Commons" }, { "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Location-Commons" }, { "properties": { "type": { "type": "string", "description": "Property. NGSI Entity type. It has to be Measurement", "enum": [ "DeviceMeasurement" ] }, "numValue": { "type": "number", "description": "Property. Model:'https://schema.org/Number'. Numerical value of the measurement" }, "textValue": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. Textual value of the measurement" }, "controlledProperty": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. Property being measured by the device" }, "refDevice": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$", "description": "Property. Identifier format of any NGSI entity" }, { "type": "string", "format": "uri", "description": "Property. Identifier format of any NGSI entity" } ], "description": "Relationship. Device taking the measurement" }, "deviceType": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. Type of device taking the measurement" }, "measurementType": { "type": "string", "description": "Property. The type of measurement to be taken" }, "dateObserved": { "type": "string", "format": "date-time", "description": "Property. Model:'https://schema.org/Text'. The date and time of this observation in ISO8601 UTC format" }, "outlier": { "type": "boolean", "description": "Property. Model:'https://schema.org/Boolean'. Value for marking the measurement to be specially processed" }, "unit": { "type": "string", "description": "Property. Units of the measurement. In case of use of an acronym use units accepted in [CEFACT](https://www.unece.org/cefact.html) code" } } } ] }