Skip to main content

building a Temperature Sensor

In this example, we are going to create interactively Temperature Sensor Device.

It will be based on the "Device Integration (DI)" companion specification.

DeviceType

hierarchy TemperatureSensorType

TemperatureSensorType

# yaml-language-server: $schema=../schemas/nodeset2.schema.json
namespaceUri: http://acme.com/UA/TemperatureSensor
version: 1.0.0
publicationDate: 2019-01-01T00:00:00Z
namespaces:
- di
objectTypes:
- browseName: TemperatureSensor2Type
subtypeOf: di:DeviceType
description: |
The Temperature Sensor
### description
the temperature **sensor**
<img src="https://www.engineersgarage.com/wp-content/uploads/2019/10/lm35-pin-out_orig-1.png" />
components:
- browseName: di:ParameterSet
components:
- browseName: Temperature
typeDefinition: ua:AnalogItemType
dataType: ua:Double
engineeringUnits: "degree Celsius"
description: |
The actual temperature
- browseName: di:MethodSet
methods:
- browseName: Calibrate
nodeClass: Method
inputArguments:
- name: coefficentA
dataType: ua:Double
description: the B coefficient used to perform the linear interpolation `T = A*x + B`
- name: coefficentB
dataType: ua:Double
description: the B coefficient used to perform the linear interpolation `T = A*x + B`
outputArguments:
- name: previousCoefA
dataType: ua:Double
- name: previousCoefB
dataType: ua:Double

description: |
Initiate the calibration of the sensor.

The Calibrate method initiate the calibrationof the temperature sensor on the physical device.

This method takes two arguments that define the linear interpolation `T = A*x + B`.


instances:
- browseName: TemperatureSensor2
typeDefinition: TemperatureSensorType
organizedBy: /ua:Objects/di:DeviceSet

The Temperature Sensor

BrowseName:1:TemperatureSensor2Type
Base2:DeviceType
Description -The Temperature Sensor
ReferenceTypeNodeIdBrowseNameModellingRuleTypeDefinitionDataTypeValue
HasComponent Ⓞns=1;i=10082:ParameterSetMandatoryBaseObjectType
2:ParameterSet
HasComponent Ⓥns=1;i=10092:ParameterSet.1:TemperatureMandatoryAnalogItemTypeDoublenull
HasComponent Ⓞns=1;i=10122:MethodSetMandatoryBaseObjectType
2:MethodSet
HasComponent Ⓜns=1;i=10132:MethodSet.1:Calibrate