Exemplo n.º 1
0
        public int SCREEN_ForceOnOff(byte control)
        {
            int result = -1;

            result = Led5kSDK.SCREEN_ForceOnOff(hand, control);
            return(result);
        }
Exemplo n.º 2
0
        public int SCREEN_DelDynamicArea(byte DeleteAreaId)
        {
            int result = -1;

            result = Led5kSDK.SCREEN_DelDynamicArea(hand, DeleteAreaId);
            return(result);
        }
Exemplo n.º 3
0
        public int setBrightness(byte BrigthnessTyp, byte CurrentBrigthn, byte[] BrigthnessValue)
        {
            int result = -1;

            Led5kSDK.SCREEN_SetBrightness(hand, BrigthnessTyp, CurrentBrigthn, BrigthnessValue);
            return(result);
        }
Exemplo n.º 4
0
        public int SendAreas(uint hand)
        {
            byte[] AreaText;
            int    TextLen;
            byte   AreaNum = 0;

            int sum = 0;

            foreach (LedstaticArea s in m_arealist)
            {
                sum += s.getAreaLen();
                AreaNum++;
            }
            AreaText = new byte[sum];
            int index = 0;

            foreach (LedstaticArea s in m_arealist)
            {
                byte[] bt = s.AreaToByteArray();
                bt.CopyTo(AreaText, index);
                index += bt.Length;
            }
            TextLen = sum;
            return(Led5kSDK.SCREEN_SendDynamicAreas(hand, AreaNum, (ushort)TextLen, AreaText));
        }
Exemplo n.º 5
0
        public int SendLedInfoTest()
        {
            int result = -1;

            if (hand <= 0 && CreateClient() > 0)
            {
                string  sendText = string.Format("任务类型:整盘入库\n托盘条码:P00010\n仓位:L-001-002-002-000\n物料:2001020401,10\n物料:2001020402,10\n物料:2001020403,100\n物料:2001020404,100");
                LedInfo ledinfo  = new LedInfo(sendText);
                result = Led5kSDK.SCREEN_SendDynamicArea(hand, ledinfo.bx_5k, (ushort)ledinfo.AreaText.Length, ledinfo.AreaText);
            }

            return(result);
        }
Exemplo n.º 6
0
        public int SendLedInfo(string sendText)
        {
            int result = 0;

            if (hand <= 0)
            {
                CreateClient();
            }
            LedInfo ledinfo = new LedInfo(sendText);

            result = Led5kSDK.SCREEN_SendDynamicArea(hand, ledinfo.bx_5k, (ushort)ledinfo.AreaText.Length, ledinfo.AreaText);
            return(result);
        }
Exemplo n.º 7
0
 public int CheckPing()
 {
     return(Led5kSDK.CON_PING(hand));
 }
Exemplo n.º 8
0
 public void CloseClient()
 {
     Led5kSDK.Destroy(hand);
 }
Exemplo n.º 9
0
 public uint CreateClient()
 {
     Led5kSDK.InitSdk(2, 2);
     hand = Led5kSDK.CreateClient(led_ip, led_port, (Led5kSDK.bx_5k_card_type) 0x53, timeout, mode, null);
     return(hand);
 }
Exemplo n.º 10
0
        public int SendProgram(uint hand)
        {
            byte[] ppFileName;
            byte[] ProgramLife;
            byte   PlayPeriodGrpNum;

            byte[] Period;
            byte[] AreaDataList;
            int    AreaDataListLen;

            int sum = 0;

            foreach (Led5kstaticArea s in m_arealist)
            {
                sum += s.getAreaLen();
            }
            AreaDataList = new byte[sum];
            int index = 0;

            foreach (Led5kstaticArea s in m_arealist)
            {
                byte[] bt = s.AreaToByteArray();
                bt.CopyTo(AreaDataList, index);
                index += bt.Length;
            }
            AreaDataListLen = sum;
            if (IsValidAlways == true)
            {
                ProgramLife    = new byte[8];
                ProgramLife[0] = 0xff;
                ProgramLife[1] = 0xff;
                ProgramLife[2] = 0xff;
                ProgramLife[3] = 0xff;
                ProgramLife[4] = 0xff;
                ProgramLife[5] = 0xff;
                ProgramLife[6] = 0xff;
                ProgramLife[7] = 0xff;
            }
            else
            {
                ProgramLife = new byte[8];
                byte[] tmp = Led5kProgram.short2bcd(StartYear);
                ProgramLife[0] = tmp[0];
                ProgramLife[1] = tmp[1];
                ProgramLife[2] = byte2bcd(StartMonth);
                ProgramLife[3] = byte2bcd(StartDay);

                byte[] tmp1 = Led5kProgram.short2bcd(EndYear);

                ProgramLife[4] = tmp1[0];
                ProgramLife[5] = tmp1[1];
                ProgramLife[6] = byte2bcd(EndMonth);
                ProgramLife[7] = byte2bcd(EndDay);
            }


            ppFileName = System.Text.Encoding.Default.GetBytes(name);

            if (IsPlayOnTime == true)
            {
                Period    = new byte[7];
                Period[0] = byte2bcd(StartHour);
                Period[1] = byte2bcd(StartMinute);
                Period[2] = byte2bcd(StartSecond);
                Period[3] = byte2bcd(EndHour);
                Period[4] = byte2bcd(EndMinute);
                Period[5] = byte2bcd(EndSecond);
                Period[6] = 0;
            }
            else
            {
                Period = null;
            }

            PlayPeriodGrpNum = Convert.ToByte(IsPlayOnTime ? 1 : 0);

            return(Led5kSDK.OFS_SendFileData(hand, 1, ppFileName, DisplayType, PlayTimes, ProgramLife,
                                             ProgramWeek, PlayPeriodGrpNum, Period, AreaNum, AreaDataList, AreaDataListLen));
        }