This section gives a short overview about the different parts of the sensidl language. A Tutorial with pictures and videos can be found here
The specification of your sensor starts with the keyword sensorInterface
followed by a name and an optional description which starts with /**
and ends with */ . After that there can be an optional
identifier marked by the keywords with identifier : and
followed by a String. The Sensor begins with an { and
ends with an }
Example:
sensorInterface
exampleInterface /**This is the Description for the Example
Interface*/ {
// This is a single line comment
/* This is a multi-
line comment*/
// The sensor
contains encoding settings and the data description
}
The sensor has to contain encoding settings and the data description .
The Encoding settings are declared in the following format:
encoding (SENSIDL_BINARY || SENSIDL_JSON) with
(BIG_ENDIAN || LITTLE_ENDIAN) alignment (1..N) BIT (with
identifier : "identifier"))
The identifier is optional. Keywords are bold.
The DataDescription starts with the keyword sensorData
and an optional identifier. After that the dataSets are declared. The
sensorData can contain any number of dataSets. A DataSet contains
NonMeasurementData and MeasurementData.
Example:
sensorData {
dataSet exampleDataSet with
identifier : "1" {
//The DataSet
contains MeasurementData and NonMeasurementData
}
}
The DataSet contains MeasurementData and NonMeasurementData.
The MeasurementData starts with a name and the declaration which datatype and which Unit the data has. There is also the option for an optional identifier and description. Furthermore the data can be adjusted, either by range by giving a specific interval or by conversion by scaling or mapping the data. For further information see Data Adjustment
The format of the MeasuremntDats is the following:
DataName as DataType in Unit (with identifier :
"identifier"")(adjusted by (with range 0.0;0.0 || with
scaling factor : 0.0 and offset: 0.0 || linear mapping
[0.0;0.0] => [0.0;0.0]))(/**optional
description*/)
Keywords are bold and brackets signalize optional arguments. DataName
can be any name given by the user and DataType is a type from the TypeSystem. Unit is a
Unit from the Unit System and "0.0"; can be replaced by
any number.
The NonMeasurementData has a name and a datatype. Also the data can be a constant and can have a value, an identifier and/or a description.
The format for the NonMeasurementData is the following:
DataName as DataType (constant)(value
= "value")(with identifier : "identifier")(/**
optional description*/)
Keywords are bold and brackets signalize optional arguments. DataName can be any name given by the user and DataType is a type from the TypeSystem.