alarms/short_name
The alarms/short_name URI manipulates a web services alarm record.
URI path
alarms/short_name
Alarm configuration records
Alarm configuration records include:
- uri: The URI of the element to test for alarms
Note In the initial release, only vehicle data URIs support alarms. The interface is defined such that other URIs can be added to alarms without changing the registration methods.
- type: The type of alarm, which can include:
- above: Triggered if a detected value exceeds the threshold.
- below: Triggered if a detected value is below the threshold.
- change: Triggered if the detected value is different from the most recent value recorded. The expected frequency of updates is limited by the internal implementation associated with the supported URIs. For example, the frequency of a vehicle data alarm is limited by the frequency with which the ECUs in the system push the requested items are pushed into the vehicle bus.
- delta: Triggered if the newest detected value is different from the previous value reported in an event by more than the configured threshold. When the alarm is added or modified, the current value becomes the previous value. If no current value is available, the next change triggers the alarm, regardless of threshold.
- buffer: The buffering policy for the alarm, which can include:
- queue: If the Event Channel is closed, an alarm indication is placed in the Event Channel delivery queue. See Event Channel buffering policy.
- discard: If the event channel is closed, messages are discarded.
- threshold: For scalar elements, the threshold value to be tested based on the alarm type.
- interval: The minimum number of seconds that must pass before another indication of the same alarm should be delivered. This value is an integer and must be greater than or equal to 0.
Supported request methods
GET
Queries the system for the record associated with the specified short name. The short name was supplied by the user when the record was first stored in the device.
PUT
If the requested record does not yet exist, a new record (with the requested URI) is added to the system. If the requested record already exists in the system, the existing record is modified to match the supplied record data.
DELETE
Removes the specified record from the system.
Supported content types
XML
The GET and PUT forms use an alarm record. For example:
<alarm> <uri>vehicle/data/EngineSpeed</uri> <type>above</type> <buffer>discard</buffer> <threshold>8000.0</threshold> <interval>60</interval> </alarm>
JSON
The GET and PUT forms create an object assigned to an alarm field. In PUT requests, numeric fields need not be quoted, but GET responses will feature all fields and values as quoted strings, regardless of type. For example:
{ “alarm” : { “uri” : “vehicle/data/EngineSpeed”, “type” : “above”, “buffer” : “discard”, “threshold” : “8000.0”, “interval” : “60” } }