Ejemplo n.º 1
0
        bool IExMonServer4CommsServerCallback.ProcessH2GMessage(MonMsg_H2G request)
        {
            using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "ProcessH2GMessage"))
            {
                bool result = default(bool);

                try
                {
                    if (request == null)
                    {
                        method.Info("Invalid method received from monitor server");
                        return(false);
                    }

                    FFMsg_H2G h2gMessage = MonitorEntityFactory.CreateEntity(request);
                    if (h2gMessage == null)
                    {
                        method.Info("Unable to convert the freeform message from monitor message");
                        return(false);
                    }

                    method.Info("Processing H2G Message for : " + h2gMessage.IpAddress);
                    ExCommsExecutorFactory.ProcessMessage(h2gMessage);
                    result = true;
                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                }

                return(result);
            }
        }
 void OnTransceiver_Receive(UdpFreeformEntity item)
 {
     using (ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "ff_trans_Receive"))
     {
         Log.Info(PROC, "Processing G2H Message ...");
         ExCommsExecutorFactory.ProcessMessage(item.EntityData as FFMsg_G2H);
     }
 }