Options
All
  • Public
  • Public/Protected
  • All
Menu

Static definition of a sensor for use in SensorController.

This is used in the options of the controller to register the sensors directly at creation. The sensors option of the SensorController should contain an array of SensorDefinitions.

Each definition should contain the Sensor object, the hardware pin that it is connected to, and the type of the IO communication that it has.

Hierarchy

  • SensorDefinition

Index

Properties

io

The type of the IO handling used for this sensor.

You can use predefined ones such as Aio, InputGpio, OuputGpio or define your own class. You can also use MockSensorIo if you don't have any actual hardware connection.

observationPublicationType

observationPublicationType: ObservationPublicationType

Defines whether and how the observations should be automatically published from the controller.

This is used together with the samplingInterval value. If it is not set to none, samplingInterval must be set to positive value.

Optional parameters

parameters?: any

Hardware-specific parameters necessary for the read and write methods.

Optional samplingInterval

samplingInterval?: number

The time interval in milliseconds with which the values of the sensor should be read and published.

This should only be used if the observationPublicationType is not set to none.

sensor

sensor: Sensor

The Sensor object.

This will be used for the main communication with other controllers and applications.

Generated using TypeDoc