writeGroup method

  1. @override
Future<void> writeGroup(
  1. int groupNumber,
  2. List<BacnetGroupChannelValue> changes, {
  3. int writePriority = 16,
  4. bool? inhibitDelay,
  5. int? deviceId,
  6. int network = 0xFFFF,
})
override

Writes changes to the Channel objects of all devices whose Control_Groups contain groupNumber (WriteGroup, broadcast on network) at writePriority; inhibitDelay makes the channels skip their write delay.

// dim the lights of group 5 to 50 % and switch channel 3 off
await client.writeGroup(5, [
  BacnetGroupChannelValue(1, const BacnetReal(50)),
  BacnetGroupChannelValue(3, const BacnetUnsigned(0)),
]);

Implementation

@override
Future<void> writeGroup(
  int groupNumber,
  List<BacnetGroupChannelValue> changes, {
  int writePriority = 16,
  bool? inhibitDelay,
  int? deviceId,
  int network = 0xFFFF,
}) async {
  _checkStarted();
  encodeWriteGroup(
    groupNumber,
    changes,
    writePriority: writePriority,
    inhibitDelay: inhibitDelay,
  );
  requests.add(
    FakeBacnetRequest(
      'writeGroup',
      deviceId: deviceId,
      priority: writePriority,
      arguments: {
        'groupNumber': groupNumber,
        'changes': List<BacnetGroupChannelValue>.unmodifiable(changes),
        'inhibitDelay': ?inhibitDelay,
      },
    ),
  );
}