Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 2.6 KB

validation.md

File metadata and controls

56 lines (40 loc) · 2.6 KB

UDMI / Docs / Specs / Onboarding

Validation

Streaming validation is a process where an agent receives messages from a device, process them for UDMI compliance, and then send a validation result message with the results. Additionally, the system periodically sends a validation report message that summarizes the state of discovery for that site (e.g. which devices have been seen, or never seen, etc...). This capability is an extension of the basic validator capability.

Message Types

The validation agent runs autonomously, consumes messages, and injects result or report messages as needed. All validation messages are defined by the validation event schema(🧬View). and validation state schema(🧬View). schema, and are instantiated in two flavors:

  • result: Validation results for an individual device example.
  • report: Validation report for an entire site example.

Message Channel

The message validator will automatically use the inverse channel it uses for receiving messages. So, if it received a message over PubSub, it will send one back accordingly. If it receives them over the Reflector, then it uses the reflector to send them back.

Messages sent from the validator will have the deviceId set to the ID of the device that was validated. In the case of a site-wide report, the deviceId will be set to _validator. Other message attributes should be the same as if the message were coming from the device itself (project, registry, etc...).

Reflector Setup

The reflector uses the same reflector channel as receiving messages, so no additional setup is required.

PubSub Setup

  • Make sure the system is working as per the basic validator setup.
  • Add an update_topic field to the site's cloud_iot_config.json file, indicating the PubSub topic for outgoing messages (e.g. udmi_reflect).

If this all worked, you should see a message like then on startup:

Sending validation updates to projects/bos-udmi-dev/topics/udmi_reflect

Verifying Output

If everything worked as intended, there should be periodic validation messages that show up on the udmi_target topic:

  attribute.subFolder = 'validation'
  attribute.subType = 'event' or 'state'
  attribute.deviceId = deviceId or '_validator'