public bool Equals(DeviceId otherId) { if ((object)otherId == null) { return(false); } return(otherId.ToString() == this.ToString()); }
public bool Equals(DeviceId otherId) { if ((object)otherId == null) return false; return otherId.ToString() == this.ToString(); }
internal byte[] waitForStandardMessageFrom(DeviceId peerAddress) { byte[] result = null; int tryCounter = 0; DeviceId originator; do { result = this.serialPortController.GetIncomingMessageOfType(MSG_TYPE_RECV_STANDARD); originator = DeviceMessage.DeviceMessageOriginator(result); if (originator != peerAddress) { queueReceivedMessage(result); result = null; tryCounter++; if (tryCounter > 3) { throw new TimeoutException("Timed out waiting for response from " + peerAddress.ToString()); } } } while (result == null); return result; }
internal byte[] waitForStandardMessageFrom(DeviceId peerAddress) { byte[] result = null; int tryCounter = 0; DeviceId originator; do { result = this.serialPortController.GetIncomingMessageOfType(MSG_TYPE_RECV_STANDARD); originator = DeviceMessage.DeviceMessageOriginator(result); if (originator != peerAddress) { queueReceivedMessage(result); result = null; tryCounter++; if (tryCounter > 3) { throw new TimeoutException("Timed out waiting for response from " + peerAddress.ToString()); } } } while (result == null); return(result); }