FakeBacnetDevice constructor
FakeBacnetDevice(})
Creates a device with its Device object.
Implementation
FakeBacnetDevice(
this.deviceId, {
String? name,
this.vendorId = 0,
this.maxApdu = 1476,
this.segmentation = BacnetSegmentation.both,
String vendorName = 'bacnet_plugin',
String modelName = 'FakeBacnetDevice',
}) {
final device = addObject(
BacnetObjectType.device,
deviceId,
name: name ?? 'Device $deviceId',
);
device.properties.addAll({
BacnetPropertyId.vendorIdentifier: BacnetUnsigned(vendorId),
BacnetPropertyId.vendorName: BacnetCharacterString(vendorName),
BacnetPropertyId.modelName: BacnetCharacterString(modelName),
BacnetPropertyId.maxApduLengthAccepted: BacnetUnsigned(maxApdu),
BacnetPropertyId.segmentationSupported: BacnetEnumerated(segmentation),
BacnetPropertyId.protocolVersion: const BacnetUnsigned(1),
BacnetPropertyId.protocolRevision: const BacnetUnsigned(22),
});
}