public void SendEvent(DeviceEventCode eventCode, Dictionary <byte, object> parameters) { EventData eventData = new EventData { Code = (byte)eventCode, Parameters = parameters }; peer.SendEvent(eventData, new SendParameters()); }
public bool Operate(DeviceEventCode eventCode, Dictionary <byte, object> parameters, out string errorMessage) { if (eventTable.ContainsKey(eventCode)) { if (eventTable[eventCode].Handle(eventCode, parameters, out errorMessage)) { return(true); } else { errorMessage = $"DeviceEvent Error: {eventCode} from Device: {device}\nErrorMessage: {errorMessage}"; return(false); } } else { errorMessage = $"Unknow DeviceEvent:{eventCode} from Device: {device}"; return(false); } }
public void SendEvent(DeviceEventCode eventCode, Dictionary <byte, object> parameters) { throw new NotImplementedException(); }
internal void SendEvent(DeviceEventCode eventCode, Dictionary <byte, object> parameters) { device.CommunicationInterface.SendEvent(eventCode, parameters); }