Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="msg"></param>
        ///
        public void NoteCEMConfigMsg(Msg_UICEMConfigInfoADU msg)
        {
            if (msg == null)
            {
                throw new ArgumentNullException("msg");
            }

            if (!inConnectSequence_)
            {
                return;                  // EARLY RETURN!
            }
            GotCEMConfig    = true;
            DeviceIsPresent = true;

            // In case the CEM has an "old" (pre-Hello) firmware version, we'll establish an initial
            // Config version that can be replaced should a CEMHello come in. This version will be:
            //
            // 1.0: if the CEM supports 4-char vehicle names (>= v. 2.9.0)
            // 0.5: if the CEM doesn't support 4-char vehicle names

            ConfigVersion = (((msg.Config.Caps) & AURACaps.FourCharName) != 0)
                          ? new TwoPartVersion(1, 0)
                          : new TwoPartVersion(0, 5);

            //MainWindow.Log.WriteToLog(LogConfigAURA.ADUConnect, "CONNECT: Got CEMConfig msg.");
        }
Exemple #2
0
 private void HandleUICEMConfigInfoADUMsg(Msg_UICEMConfigInfoADU msg)
 {
     isDeviceConnected = true;
     //cemConfig = msg.Config;
     //try
     //{
     //	cemConfig.NamePrefix = machineConfig.MachineName.Substring(0, machineConfig.MachineName.IndexOf(" "));
     //	cemConfig.NameNumber = Convert.ToUInt32(machineConfig.MachineName.Substring(machineConfig.MachineName.LastIndexOf(" ") + 1));
     //}
     //catch { }
     //SendMgmtMsg(new Msg_UISetCEMConfigADU(cemConfig));
 }