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:
- The Location Service
- The Alarm Service
- Gateway Server needs to be running in the network
To create a client for Alarm Service
- Typescript
-
source
const 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
-
source
let alarmKey = new AlarmKey(new Prefix('ESW', 'assemblyComponent'), 'temperature') const response: Done = await alarmService.setSeverity(alarmKey, 'Critical')
0.4.1