/// <summary>
        /// Uninitialize_s the freeform executor.
        /// </summary>
        /// <returns></returns>
        private bool Uninitialize_FreeformExecutor()
        {
            bool result = true;

            ExCommsExecutorFactory.StopThreads();
            return(result);
        }
Exemplo n.º 2
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);
     }
 }
Exemplo n.º 4
0
 protected override void InitializeInternal()
 {
     base.InitializeInternal();
     ExCommsExecutorFactory.Register(this.Executor);
     FFMsgHandlerFactory.Initialize(this.Executor, FFTgtHandlerDeviceTypes.GMU, () =>
     {
         return(new FFMsgTransmitter());
     });
     this.Init_CallbackHelpers();
 }
        /// <summary>
        /// Initialize_s the freeform executor.
        /// </summary>
        /// <returns></returns>
        private bool Initialize_FreeformExecutor()
        {
            using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "Initialize_FreeformExecutor"))
            {
                bool result = false;

                try
                {
                    ExCommsExecutorFactory.StartThreads();
                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                }

                return(result);
            }
        }