示例#1
0
        public object[] GetProperties()
        {
            List <object>       temp          = new List <object>();
            MainDevDataContains mainContainer = new MainDevDataContains();
            Type mainContainerType            = mainContainer.GetType();

            foreach (System.Reflection.PropertyInfo p in mainContainerType.GetProperties())
            {
                temp.Add(p.Name);
            }
            return(temp.ToArray());
        }
示例#2
0
        public static void speedSensorErrorMain(ref MainDevDataContains mainDevDataContains, Byte[] recvData)
        {
            switch (recvData[2] & 0x0f)
            {
            case 0x00:
                mainDevDataContains.SpeedSensorError_1 = MainDevDataContains.NORMAL;
                break;

            case 0x01:
                mainDevDataContains.SpeedSensorError_1 = MainDevDataContains.OPEN_CIRCUIT;
                break;

            case 0x02:
                mainDevDataContains.SpeedSensorError_1 = MainDevDataContains.SHORT_CIRCUIT;
                break;

            case 0x04:
                mainDevDataContains.SpeedSensorError_1 = MainDevDataContains.MUTATION;
                break;

            case 0x08:
                mainDevDataContains.SpeedSensorError_1 = MainDevDataContains.OVER_DIFF_VALUE;
                break;
            }
            switch ((recvData[2] & 0xf0) >> 4)
            {
            case 0x00:
                mainDevDataContains.SpeedSensorError_2 = MainDevDataContains.NORMAL;
                break;

            case 0x01:
                mainDevDataContains.SpeedSensorError_2 = MainDevDataContains.OPEN_CIRCUIT;
                break;

            case 0x02:
                mainDevDataContains.SpeedSensorError_2 = MainDevDataContains.SHORT_CIRCUIT;
                break;

            case 0x04:
                mainDevDataContains.SpeedSensorError_2 = MainDevDataContains.MUTATION;
                break;

            case 0x08:
                mainDevDataContains.SpeedSensorError_2 = MainDevDataContains.OVER_DIFF_VALUE;
                break;
            }
        }