public void SendEvent(DeviceEventCode eventCode, Dictionary <byte, object> parameters)
        {
            EventData eventData = new EventData
            {
                Code       = (byte)eventCode,
                Parameters = parameters
            };

            peer.SendEvent(eventData, new SendParameters());
        }
示例#2
0
 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();
 }
示例#4
0
 internal void SendEvent(DeviceEventCode eventCode, Dictionary <byte, object> parameters)
 {
     device.CommunicationInterface.SendEvent(eventCode, parameters);
 }