public void AddConnectedDevice(AbstractDevice device) { bool reconnected = false; if (connectedDevicesByName.ContainsKey(device.GetDeviceName())) { connectedDevicesByName.Remove(device.GetDeviceName()); reconnected = true; } connectedDevicesByName.Add(device.GetDeviceName(), device); Debug.Log("Device " + device.GetDeviceName() + ((reconnected) ? " re" : " ") + "connected"); }
public void RemoveDevice(AbstractDevice device) { connectedDevicesByName.Remove(device.GetDeviceName()); }