Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        public int ReadFlashID(out int flashID)
        {
            flashID = 0;
            int Res = (int)SCPGCtrl.SCPGCommReadFlashID(Handle, ref flashID);

            return(Res);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 6
0
        public int Exit()
        {
            int Res = 0;

            if (Handle != null && Handle != IntPtr.Zero)
            {
                SCPGCtrl.SCPGCommExit(Handle);
            }
            else
            {
                Res = 1;
            }
            return(Res);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 8
0
        public int ReadCheckSum(ref ushort nCheckSum)
        {
            int Res = (int)SCPGCtrl.SCPGCommReadFlashChecksum(Handle, ref nCheckSum);

            return(Res);
        }
Ejemplo n.º 9
0
        public int ChangeModule(string Filename, int nLen)
        {
            int Res = (int)SCPGCtrl.SCPGCommChangeModule(Handle, Filename, nLen);

            return(Res);
        }
Ejemplo n.º 10
0
        public int DmrDataTransfer(string pDataPath)
        {
            int Res = (int)SCPGCtrl.SCPGCommDemuraDataTransfer(Handle, pDataPath);

            return(Res);
        }
Ejemplo n.º 11
0
        public int DeMuraFunctionSwitch(bool bOn)
        {
            int Res = (int)SCPGCtrl.SCPGCommDemuraFunctionCtrl(Handle, bOn);

            return(Res);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 14
0
        public int SetRaster(byte r, byte g, byte b)
        {
            int Res = (int)SCPGCtrl.SCPGCommSetLevel(Handle, r, g, b);

            return(Res);
        }
Ejemplo n.º 15
0
        public int SetPattern(int index)
        {
            int Res = (int)SCPGCtrl.SCPGCommSetPattern(Handle, (byte)index);

            return(Res);
        }
Ejemplo n.º 16
0
        public int PowerOff()
        {
            int Res = (int)SCPGCtrl.SCPGCommPowerOff(Handle);

            return(Res);
        }
Ejemplo n.º 17
0
        public int DmrEffectCtrl(bool bOn)
        {
            int Res = (int)SCPGCtrl.SCPGCommDemuraFunctionCtrl(Handle, bOn);

            return(Res);
        }