コード例 #1
0
        public int GetPowerInfo(int channelIndex, out float[][] voltageInfo, out float[][] currentInfo)
        {
            TagPGVCParam vcInfo = new TagPGVCParam();
            int          ret    = PGCtrlAPI.SCPGCommReadVCParam(_handle, out vcInfo);

            currentInfo = new float[4][];
            voltageInfo = new float[4][];
            if (ret != 0)
            {
                return(ret);
            }
            for (int i = 0; i < 4; i++)
            {
                TagPortVoltCurr portVCInfo = vcInfo.wData[i];
                voltageInfo[i][0] = portVCInfo.wVCh1;
                currentInfo[i][0] = portVCInfo.wCCh1;

                voltageInfo[i][1] = portVCInfo.wVCh2;
                currentInfo[i][1] = portVCInfo.wCCh2;

                voltageInfo[i][2] = portVCInfo.wVCh3;
                currentInfo[i][2] = portVCInfo.wCCh3;

                voltageInfo[i][3] = portVCInfo.wVCh4;
                currentInfo[i][3] = portVCInfo.wCCh4;

                currentInfo[i][4] = portVCInfo.wCCh5;
                voltageInfo[i][4] = portVCInfo.wVCh5;

                voltageInfo[i][5] = portVCInfo.wVCh6;
                currentInfo[i][5] = portVCInfo.wCCh6;

                voltageInfo[i][6] = portVCInfo.wVCh7;
                currentInfo[i][6] = portVCInfo.wCCh7;

                voltageInfo[i][7] = portVCInfo.wVCh8;
                currentInfo[i][7] = portVCInfo.wCCh8;
            }
            return(0);
        }
コード例 #2
0
 public bool Init()
 {
     _handle = new IntPtr();
     return(PGCtrlAPI.SCPGCommInit(ref _handle, this.IP, (uint)this.Port));
 }
コード例 #3
0
 public int DeMuraFunctionSwitch(bool bOn)
 {
     return((int)PGCtrlAPI.SCPGCommDemuraFunctionCtrl(_handle, bOn));
 }
コード例 #4
0
 public int DeMuraFlashWrite()
 {
     return((int)PGCtrlAPI.SCPGCommDemuraProgram(_handle));
 }
コード例 #5
0
 public int WriteFlash(string SPath)
 {
     return((int)PGCtrlAPI.SCPGCommDemuraDataTransfer(Handle, SPath));
 }
コード例 #6
0
 public int EraseFlash()
 {
     return((int)PGCtrlAPI.SCPGCommEraseFlash(Handle));
 }
コード例 #7
0
 public int DmrEffectCtrl(bool bOn)
 {
     return((int)PGCtrlAPI.SCPGCommDemuraFunctionCtrl(Handle, bOn));
 }
コード例 #8
0
 public int ReadFlashID(out int flashID)
 {
     flashID = 0;
     return((int)PGCtrlAPI.SCPGCommReadFlashID(_handle, ref flashID));
 }
コード例 #9
0
 public int ChangeModule(string Filename, int nLen)
 {
     return((int)PGCtrlAPI.SCPGCommChangeModule(Handle, Filename, nLen));
 }
コード例 #10
0
 public int WritePGRegValue(int addr, int offset, int length, int[] data)
 {
     return(PGCtrlAPI.SCPGCommWritePGRegData(_handle, (short)addr, (short)offset, ref data, length));
 }
コード例 #11
0
 public int ShowText(int posX, int posY, int FontSize, string Msg, Color color)
 {
     return((int)PGCtrlAPI.SCPGCommShowText(_handle, posX, posY, FontSize, Msg, Msg.Length, (uint)ColorTranslator.ToWin32(color)));
 }
コード例 #12
0
 public int SetRaster(byte r, byte g, byte b)
 {
     return((int)PGCtrlAPI.SCPGCommSetLevel(_handle, r, g, b));
 }
コード例 #13
0
 public int SetPattern(int index)
 {
     return((int)PGCtrlAPI.SCPGCommSetPattern(_handle, (byte)index));
 }
コード例 #14
0
        public int SendFileByFtp(string fileName)
        {
            string destFile = fileName.Substring(fileName.LastIndexOf("\\") + 1);

            return((int)PGCtrlAPI.SCPGCommSetFileToPG(_handle, fileName, destFile));
        }
コード例 #15
0
 public int ReadPGRegValue(int addr, int offset, int length, out int[] data)
 {
     data = new int[] { };
     return(PGCtrlAPI.SCPGCommReadPGRegData(_handle, (short)addr, (short)offset, ref data, length));
 }
コード例 #16
0
 public int Exit()
 {
     PGCtrlAPI.SCPGCommExit(_handle);
     return(0);
 }
コード例 #17
0
 public int ReadCheckSum(ref ushort nCheckSum)
 {
     return((int)PGCtrlAPI.SCPGCommReadFlashChecksum(Handle, ref nCheckSum));
 }
コード例 #18
0
 public int PowerOn()
 {
     return((int)PGCtrlAPI.SCPGCommPowerOn(_handle));
 }