示例#1
0
 /// <summary>
 /// The hook for the event dispatcher.
 /// </summary>
 /// <param name="rte"></param>
 public override void onRealTimeEvent(RealTimeEvent rte)
 {
     if(rte.GetType() == typeof(ReceiverSlice.RealTimeEvents.UnparsedMessage))
     {
         ReceiverSlice.RealTimeEvents.UnparsedMessage unparsedMessage = (ReceiverSlice.RealTimeEvents.UnparsedMessage)rte;
         Decode(unparsedMessage);
     }
 }
示例#2
0
 /// <summary>
 /// The hook for the event dispatcher. Determines the type of message, and if applicable, makes a database insertion.
 /// </summary>
 /// <param name="realTimeEvent"></param>
 public override void onRealTimeEvent(RealTimeEvent realTimeEvent)
 {
     int response = 0;
     if(realTimeEvent.GetType() == typeof(Decoder.RealTimeEvents.Decoded))
     {
         Decoder.RealTimeEvents.Decoded rte = (Decoder.RealTimeEvents.Decoded)realTimeEvent;
         string eventType = rte["messagetype"];
         if (eventType == "detection_event")
             response = detectionInsert(rte);
         else if (eventType == "status_response")
             response = statusInsert(rte);
         if (response > 1)
             response = 1;
     }
     //return response;
 }