Exemplo n.º 1
0
        private void OnNewComponentManagerEvent(ComponentManagerEventArgs e)
        {
            Logger.LogInfo(this, "OnNewComponentManagerEvent()");
            string machineIp = MachineInfo.GetIP(false);

            Logger.LogDebug(this, "machineIp:{0}", machineIp);
            CommMessage msg = new CommMessage(machineIp,
                                              e.Component.GetCommandCode(),
                                              e.ComponentArgs.IsBinary,
                                              e.Component.GetName(),
                                              e.ComponentArgs.Timestamp,
                                              e.ComponentArgs.Size,
                                              e.ComponentArgs.Data);

            CommManager.AppendMessage(msg);
        }