acknowledgeAlarm method
Future<void>
acknowledgeAlarm(
- int deviceId,
- BacnetObject object,
- BacnetEventState eventState,
- BacnetTimeStamp timeStamp, {
- required String source,
- int processId = 0,
- DateTime? time,
- Duration? timeout,
override
Acknowledges the transition of object into eventState that
happened at timeStamp (AcknowledgeAlarm).
source names who acknowledges, e.g. the operator; time is the time
of the acknowledgement (now by default). The device answers with an
error if eventState or timeStamp is not the current transition.
Implementation
@override
Future<void> acknowledgeAlarm(
int deviceId,
BacnetObject object,
BacnetEventState eventState,
BacnetTimeStamp timeStamp, {
required String source,
int processId = 0,
DateTime? time,
Duration? timeout,
}) {
requests.add(
FakeBacnetRequest(
'acknowledgeAlarm',
deviceId: deviceId,
object: object,
value: BacnetEnumerated(eventState),
time: time,
source: source,
),
);
return _request(BacnetConfirmedService.acknowledgeAlarm, deviceId, null, (
device,
) {
final target = device.object(object.type, object.instance);
if (target == null) {
throw device._error(
BacnetErrorClass.object,
BacnetErrorCode.unknownObject,
);
}
target._acknowledge(eventState, timeStamp);
});
}