Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TransmissionManager"/> class.
        /// </summary>
        private TransmissionManager(bool isBlueTooth)
        {
            if (isBlueTooth)
            {
            }
            else
            {
                manager = new CanbusManager();
            }
            this.CANBusPowerOnMSG     = CanbusManager.createMsg((int)NodeIdentityEnum.node_battery, ConstInfo.Command_battery_power, ConstInfo.SurfaceCanBusAddr, null, 0);
            this.CANBusPowerOnMSG.LEN = 3;
            if (ConstInfo.IsSoftwarePowerON)
            {
                this.CANBusPowerOnMSG.DATA[2] = 2;   // set power on time out time to 10 minutes.
            }
            else
            {
                this.CANBusPowerOnMSG.DATA[2] = 3;   // read power status.
            }

            this.SoftwarePowerControlStart();

            /* string powerFlag = ConfigurationManager.AppSettings["controlPoweron"];
             * if (powerFlag == "true")
             * {
             *   this.isControlPowerON = true;
             * }
             * else
             * {
             *   this.isControlPowerON = false;
             * }*/
        }
Beispiel #2
0
 private TransmissionManager(bool isBlueTooth, int baudrate)
 {
     if (isBlueTooth)
     {
     }
     else
     {
         manager = new CanbusManager(baudrate);
     }
 }