コード例 #1
0
        private void HandleTtc(MsgOfResult msg)
        {
            if (msg.pcm == 0)
            {
                Pcm = "PCM:A通道";
            }
            else
            {
                Pcm = "PCM:A+B通道";
            }
            if (msg.bcr == 0)
            {
                Bcr = "BCR:A通道";
            }
            else
            {
                Bcr = "BCR:B通道";
            }

            Status0  = "0x" + Convert.ToString(msg.state0, 16);
            Status00 = ByteHelper.GetBit(msg.state0, 0, 0) == 1 ? "1" : string.Empty;
            Status01 = ByteHelper.GetBit(msg.state0, 1, 1) == 1 ? "1" : string.Empty;
            Status02 = ByteHelper.GetBit(msg.state0, 2, 2) == 1 ? "1" : string.Empty;
            Status03 = ByteHelper.GetBit(msg.state0, 3, 3) == 1 ? "1" : string.Empty;
            Status04 = ByteHelper.GetBit(msg.state0, 4, 4) == 1 ? "1" : string.Empty;
            Status05 = ByteHelper.GetBit(msg.state0, 5, 5) == 1 ? "1" : string.Empty;
            Status06 = ByteHelper.GetBit(msg.state0, 6, 6) == 1 ? "1" : string.Empty;
            Status07 = ByteHelper.GetBit(msg.state0, 7, 7) == 1 ? "1" : string.Empty;
            Status1  = "0x" + Convert.ToString(msg.state1, 16);
            Status10 = ByteHelper.GetBit(msg.state1, 0, 0) == 1 ? "1" : string.Empty;
            Status11 = ByteHelper.GetBit(msg.state1, 2, 2) == 1 ? "1" : string.Empty;
            Status12 = ByteHelper.GetBit(msg.state1, 5, 5) == 1 ? "1" : string.Empty;
            Status13 = ByteHelper.GetBit(msg.state1, 6, 6) == 1 ? "1" : string.Empty;
            Status14 = ByteHelper.GetBit(msg.state1, 7, 7) == 1 ? "1" : string.Empty;
            Status2  = "0x" + Convert.ToString(msg.state2, 16);
            Status20 = ByteHelper.GetBit(msg.state2, 0, 0) == 1 ? "1" : string.Empty;
            Status21 = ByteHelper.GetBit(msg.state2, 1, 1) == 1 ? "1" : string.Empty;
            Status22 = ByteHelper.GetBit(msg.state2, 2, 2) == 1 ? "1" : string.Empty;
            Status23 = ByteHelper.GetBit(msg.state2, 4, 4) == 1 ? "1" : string.Empty;
            Status24 = ByteHelper.GetBit(msg.state2, 5, 5) == 1 ? "1" : string.Empty;
            Status25 = ByteHelper.GetBit(msg.state2, 6, 6) == 1 ? "1" : string.Empty;
            Status3  = "0x" + Convert.ToString(msg.state3, 16);
            Status30 = ByteHelper.GetBit(msg.state3, 0, 0) == 1 ? "1" : string.Empty;
            Status31 = ByteHelper.GetBit(msg.state3, 1, 1) == 1 ? "1" : string.Empty;
            Status32 = ByteHelper.GetBit(msg.state3, 2, 2) == 1 ? "1" : string.Empty;
            Status33 = ByteHelper.GetBit(msg.state3, 4, 4) == 1 ? "1" : string.Empty;
            Status34 = ByteHelper.GetBit(msg.state3, 6, 6) == 1 ? "1" : string.Empty;

            byte digit = Convert.ToByte(msg.digit);  //数字量第1路

            Digit  = "0x" + Convert.ToString(digit, 16);
            Digit0 = ByteHelper.GetBit(digit, 1, 1) == 1 ? "1" : string.Empty;
            Digit1 = ByteHelper.GetBit(digit, 2, 2) == 1 ? "1" : string.Empty;
            Digit2 = ByteHelper.GetBit(digit, 3, 3) == 1 ? "1" : string.Empty;
            Digit3 = ByteHelper.GetBit(digit, 4, 4) == 1 ? "1" : string.Empty;
            Digit4 = ByteHelper.GetBit(digit, 6, 6) == 1 ? "1" : string.Empty;

            PanelVolt   = msg.panelVolt.val;   //帆板电压
            PanelCurrXP = msg.panelCurrXP.val; //帆板+X电流:mA
            PanelTempXP = msg.panelTempXP.val; //帆板+X温度:℃
            PanelCurrXN = msg.panelCurrXN.val; //帆板-X电流:mA
            PanelTempXN = msg.panelTempXN.val; //帆板-X温度:℃
            PanelCurrYP = msg.panelCurrYP.val; //帆板+Y电流:mA
            PanelTempYP = msg.panelTempYP.val; //帆板+Y温度:℃
            PanelCurrYN = msg.panelCurrYN.val; //帆板-Y电流:mA
            PanelTempYN = msg.panelTempYN.val; //帆板-Y温度:℃
            BatteryVolt = msg.batteryVolt.val; //电池组电压:V
            BatteryCurr = msg.batteryCurr.val; //电池组电流:mA
            BatteryTemp = msg.batteryTemp.val; //电池组温度:℃
            LineVolt14  = msg.lineVolt14.val;  //+14V母线电压:V
            LineCurr14  = msg.lineCurr14.val;  //+14V母线电流:mA
            LineVolt12P = msg.lineVolt12P.val; //+12V电压:V
            LineCurr12P = msg.lineCurr12P.val; //+12V电流:mA
            LineVolt12N = msg.lineVolt12N.val; //-12V电压:V
            LineCurr12N = msg.lineCurr12N.val; //-12V电流:A
            LineVolt5   = msg.lineVolt5.val;   //+5V电压:V
            LineCurr5   = msg.lineCurr5.val;   //+5V电流:mA
            SubCurrPcm  = msg.subCurrPcm.val;  //PCM电流:mA
            SubVoltBd2  = msg.subVoltBd2.val;  //BD2电压:V
            SubCurrObc  = msg.subCurrObc.val;  //OBC电流:A
            TempObc     = msg.tempObc.val;     //OBC温度:℃
            SubCurrTx   = msg.subCurrTx.val;   //TX电流:mA
            TempRf      = msg.tempRf.val;      //RF温度:℃
            RxAgc       = msg.rxAgc.val;       //RX AGC电平遥测:dB
            RxAfc       = msg.rxAfc.val;       //RX AFC电平遥测:Hz
            TxPower     = msg.txPower.val;     //TX功放输出功率:mW
        }
コード例 #2
0
 public void HandleGrid(MsgOfResult msg)
 {
 }
コード例 #3
0
 public void HandleCurve(MsgOfResult msg)
 {
 }