Alarm Service

This service provides an HTTP interface to interact with alarm server.

Creation of Alarm Service

Pre-requisite

In order to use Alarm Service API:

  1. The Location Service
  2. The Alarm Service
  3. Gateway Server needs to be running in the network

To create a client for Alarm Service

Typescript
sourceconst alarmService = await AlarmService()
Async-Await

Note that the examples are using async/await which makes handling of promises more readable.

Usages of Alarm Service

Setting alarm Severity

Alarm service allows you to update the severity of alarms belonging to components.

Type Definitions of setSeverity method can be found here

Typescript
sourcelet alarmKey = new AlarmKey(new Prefix('ESW', 'assemblyComponent'), 'temperature')
const response: Done = await alarmService.setSeverity(alarmKey, 'Critical')