Expand description

Device Adapter for bridging and transformig messages from device to the messages to cloud IoT.

Objectives:

  • events filtering
  • standardizing the event to cloudevents.io format

Workflow:

  1. maps the topic according to the dictionary (HashMap) in DeviceState got via DeviceShadow
  2. checks if the event is whitlisted and if true
  3. retrieves the subject from the dictionary (whitelist)
  4. calls the create_device_iot_message which maps the device message to standardized format
  5. sends the message to the IoT Connector for publishing to AWS IoT Core

Structs

DeviceState is a structure holding parameters for device specific processing in DeviceStateConfig as structured in the Device Shadow. The DeviceState defines the sub-structure to correspond to the node configin the Device Shadow.

DeviceStateConfig is a structure holding parameters for device specific processing. In this DeviceAdapter it is data for event mapping, event filtering and source id transformation.

EventFilter is a structure storing the parameters and rules for filtering of messages.

Enums

Device topics filter strategy type

Device identifier type

Functions

The on_device_event is called when a PUBLISH message is received from the device broker.