Exporting alarm records to the JsonAlarmRecipient

This component comes with a nested schema whose payload output depends on the alarms passed through from the parent recipient.
You may include queries, bound objects or arrays, and properties to return a station’s present value data in the payload. You may also include some specific alarm data types, notably the properties from the alarm record: BAlarmRecord.

Perform the following steps:
  1. Drag the JsonAlarmRecipient to the Wire Sheet.
  2. Connect the Alarm Class to the Route Alarm action on the recipient.
    Image

    Linking the alarm class to the route action of a JsonAlarmRecipient component triggers the generation of a new JSON payload each time the recipient receives an alarm from the alarm class.

  3. Add an AlarmRecordProperty component to the schema and select one or more properties.
    Image

    Each property you add to the schema can include selected alarm data in the output, such as the sourceState, uuid, alarmClass etc. As with other JSON schema properties, you can rename the property; for example “AlarmRecordProperty” can be renamed to “current value”, as shown above.

  4. To filter out unwanted alarms before sending data to the alarm recipient, add the AlarmExportMarkerFilter to the Wire Sheet and connect it as shown below.
    Image

    Normal filtering occurs on alarms passed from the alarm class to the recipient as the station generates the alarms.

    Image
    The Send Since action queries the alarm database and passes existing records to the filter (including the supplied timestamp). The system checks the records for a suitable ExportMarker, and passes them to the receiving JsonSchema to create a new record for each alarm. Since the timestamp is in the past, the filter should be able to identify when its mode was active.

     
    NOTE: To prevent accidental data deluge, Send Since does not function if the filter’s Mode is set to Pass All. You could use a bql query on the alarm database if this is a requirement.