Beispiel #1
0
 private void ConnectionError(EnumConnectError TypeError, byte address, byte command)
 {
     if (TypeError == EnumConnectError.INTERPRET)
     {
         if (UserErrorEvent != null)                 //TODO. revisar error
         {
             UserErrorEvent(UUID, new Cerror(Cerror.cErrorCodes.COMMUNICATION_ERROR, "Communication error in station.", new byte[] {}));
         }
     }
     else if (TypeError == EnumConnectError.TIME_OUT)
     {
         if (address == m_StationNumDevice)
         {
             if (UserErrorEvent != null)                     //TODO. revisar error
             {
                 UserErrorEvent(UUID, new Cerror(Cerror.cErrorCodes.COMMUNICATION_ERROR, "Communication timeout in station. Command:" + command.ToString("X"), new byte[] {}));
             }
             if (StationDisconnectedEvent != null)
             {
                 StationDisconnectedEvent(UUID);
             }
         }
     }
     else
     {
         if (StationDisconnectedEvent != null)
         {
             StationDisconnectedEvent(UUID);
         }
     }
 }
 public void ComChannelConnectionError(EnumConnectError ErrorType, byte address, byte command)
 {
     if (ConnectionErrorEvent != null)
     {
         ConnectionErrorEvent(ErrorType, address, command);
     }
 }