addConnectedDevice method
bool
addConnectedDevice(
- DeviceConfiguration<
DeviceRegistration> device, - PrimaryDeviceConfiguration<
DeviceRegistration> primaryDevice
Add a device
which is connected to the primaryDevice
.
Its role name should be unique in the protocol.
Returns true if the device
has been added; false if it is already connected
to the specified primaryDevice
.
Implementation
bool addConnectedDevice(
DeviceConfiguration device,
PrimaryDeviceConfiguration primaryDevice,
) {
connections ??= [];
connections?.add(DeviceConnection(device.roleName, primaryDevice.roleName));
return connectedDevices!.add(device);
}