Versiones comparadas

Clave

  • Se ha añadido esta línea.
  • Se ha eliminado esta línea.
  • El formato se ha cambiado.

Introduction

TIC 4.0 uses the JSON format as default because it allows us to express an array of subjects (for several subsubjects) or observed properties (for different combinations of timestamps, pom, pomt, names, etc). JSON is also the default file format for many protocols such as REST and MQTT extensively used to share data or publish IoT data. These arrays give us a high flexibility thanks to the hierarchical structure. Other hierarchical structures are possible in TIC 4.0 like XML but we recommend using JSON as default.

...

A flat format is more suitable for low-level implementation like PLCs or software code. JSON is better for sharing extensive messages. Both are valid in TIC 4.0.

Message Validation

It is process to check if the message complies TIC4.0 schema. The validations are made based on a JSON Schema. The schema doesn't limit the content to TIC 4.0, but if the attribute is a TIC 4.0 attribute the Schema will check if the format is TIC 4.0.

JSON SCHEMA

Basic rules

  1. All subjects are arrays

  2. All concepts are not arrays

  3. All observed properties are arrays and contain at least the timestamp.

...

Expandir
titleJson Schema clic to expand

View file
nameschema.json

Custom validations

  1. Arrays of Subjects, with more than one array element in the message, need to have a unique “arrayid”.

  2. Arrays of “observed properties” need to have always a unique combination of name, pom, pomt, reference, unit and timestamp. These fields are optional but if exist it needs a unique combination.

  3. “pom” https://tic40.atlassian.net/wiki/spaces/TIC40Definitions/pages/8618041/TIC4.0+Semantic#Where-in-the-subject-(device-or-process) , “pomt” https://tic40.atlassian.net/wiki/spaces/TIC40Definitions/pages/8618041/TIC4.0+Semantic#Where%2FWhen-in-the-timeline-%E2%80%9Cpomt%E2%80%9D%3A, needs to have the expected values. pom: input, iinput, ioutput, output; pomt : schedule, proposal, request, estimated, planned, actual, performed, historic. For the observed properties the “name”, “reference” and “unit” values can have any value as they will be identfied by #name#, #reference# and #unit# in the flat name path.

...