コード例 #1
0
        public int GetPowerInfo(int channelIndex, out float[][] voltageInfo, out float[][] currentInfo)
        {
            TagPGVCParam PGVCParam = new TagPGVCParam();

            voltageInfo = new float[PGVCParam.wData.Length][];
            currentInfo = new float[PGVCParam.wData.Length][];

            int Res = SCPGCtrl.SCPGCommReadVCParam(Handle, out PGVCParam);

            for (int i = 0; i < PGVCParam.wData.Length; i++)
            {
                voltageInfo[i][0] = PGVCParam.wData[i].wVCh1;
                voltageInfo[i][1] = PGVCParam.wData[i].wVCh2;
                voltageInfo[i][2] = PGVCParam.wData[i].wVCh3;
                voltageInfo[i][3] = PGVCParam.wData[i].wVCh4;
                voltageInfo[i][4] = PGVCParam.wData[i].wVCh5;
                voltageInfo[i][5] = PGVCParam.wData[i].wVCh6;
                voltageInfo[i][6] = PGVCParam.wData[i].wVCh7;
                voltageInfo[i][7] = PGVCParam.wData[i].wVCh8;
                currentInfo[i][0] = PGVCParam.wData[i].wCCh1;
                currentInfo[i][1] = PGVCParam.wData[i].wCCh2;
                currentInfo[i][2] = PGVCParam.wData[i].wCCh3;
                currentInfo[i][3] = PGVCParam.wData[i].wCCh4;
                currentInfo[i][4] = PGVCParam.wData[i].wCCh5;
                currentInfo[i][5] = PGVCParam.wData[i].wCCh6;
                currentInfo[i][6] = PGVCParam.wData[i].wCCh7;
                currentInfo[i][7] = PGVCParam.wData[i].wCCh8;
            }
            return(Res);
        }
コード例 #2
0
        public int ReadFlashID(out int flashID)
        {
            flashID = 0;
            int Res = (int)SCPGCtrl.SCPGCommReadFlashID(Handle, ref flashID);

            return(Res);
        }
コード例 #3
0
        public int ReadPGRegValue(int addr, int offset, int length, out int[] data)
        {
            data = new int[1024];
            int Res = SCPGCtrl.SCPGCommReadPGRegData(Handle, (short)addr, (short)offset, ref data, length);

            return(Res);
        }
コード例 #4
0
        public int ReadICRegVal(int nAddre, int nLen, out byte[] regVal)
        {
            regVal = new byte[1024];
            int Res = SCPGCtrl.SCPGCommReadRegData(Handle, nAddre, out regVal, nLen);

            return(Res);
        }
コード例 #5
0
        public int GetResolution(ref int width, ref int height)
        {
            int Res = (int)SCPGCtrl.SCPGCommReadPixel(Handle, ref height, ref width);

            //ShowLog($"获取到屏幕的高:{height},宽:{width}");

            return(Res);
        }
コード例 #6
0
        public int Exit()
        {
            int Res = 0;

            if (Handle != null && Handle != IntPtr.Zero)
            {
                SCPGCtrl.SCPGCommExit(Handle);
            }
            else
            {
                Res = 1;
            }
            return(Res);
        }
コード例 #7
0
        public bool Init()
        {
            bool Res = SCPGCtrl.SCPGCommInit(ref Handle, IP);

            if (Res && Handle != null)
            {
                //ShowLog($"PG IP为:{IP}初始化成功!",Color.Green,font);
            }
            else
            {
                //ShowLog($"PG IP为:{IP}初始化失败!",Color.Red,font);
            }
            return(Res);
        }
コード例 #8
0
        public int ReadCheckSum(ref ushort nCheckSum)
        {
            int Res = (int)SCPGCtrl.SCPGCommReadFlashChecksum(Handle, ref nCheckSum);

            return(Res);
        }
コード例 #9
0
        public int ChangeModule(string Filename, int nLen)
        {
            int Res = (int)SCPGCtrl.SCPGCommChangeModule(Handle, Filename, nLen);

            return(Res);
        }
コード例 #10
0
        public int DmrDataTransfer(string pDataPath)
        {
            int Res = (int)SCPGCtrl.SCPGCommDemuraDataTransfer(Handle, pDataPath);

            return(Res);
        }
コード例 #11
0
        public int DeMuraFunctionSwitch(bool bOn)
        {
            int Res = (int)SCPGCtrl.SCPGCommDemuraFunctionCtrl(Handle, bOn);

            return(Res);
        }
コード例 #12
0
        public int WritePGRegValue(int addr, int offset, int length, int[] data)
        {
            int Res = SCPGCtrl.SCPGCommWritePGRegData(Handle, (short)addr, (short)offset, ref data, length);

            return(Res);
        }
コード例 #13
0
        public int ShowText(int posX, int posY, int FontSize, string Msg, Color color)
        {
            int Res = SCPGCtrl.SCPGCommShowText(Handle, posX, posY, FontSize, Msg, Msg.Length, (uint)ColorTranslator.ToWin32(color));

            return(Res);
        }
コード例 #14
0
        public int SetRaster(byte r, byte g, byte b)
        {
            int Res = (int)SCPGCtrl.SCPGCommSetLevel(Handle, r, g, b);

            return(Res);
        }
コード例 #15
0
        public int SetPattern(int index)
        {
            int Res = (int)SCPGCtrl.SCPGCommSetPattern(Handle, (byte)index);

            return(Res);
        }
コード例 #16
0
        public int PowerOff()
        {
            int Res = (int)SCPGCtrl.SCPGCommPowerOff(Handle);

            return(Res);
        }
コード例 #17
0
        public int DmrEffectCtrl(bool bOn)
        {
            int Res = (int)SCPGCtrl.SCPGCommDemuraFunctionCtrl(Handle, bOn);

            return(Res);
        }