中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁 > 模擬技術(shù) > 設(shè)計應(yīng)用 > 什么是上位機_上位機軟件介紹

        什么是上位機_上位機軟件介紹

        作者: 時間:2012-09-05 來源:網(wǎng)絡(luò) 收藏

        {
        byte[] frame = new byte[5];
        frame[0] = 0x05;
        Array.Copy(Zuohao, 0, frame, 1, 2);
        frame[3] = mingling;
        byte temp = 0;
        foreach (byte item in frame)
        temp += item;
        frame[4] = (byte)(0 - temp);
        byte[] frametosend = PPP.Encode(frame);
        Console.WriteLine(BitConverter.ToString(frametosend));
        try { stream.Write(frametosend, 0, frametosend.Length); }
        catch (Exception ex) { }
        }
        }
        /// summary>
        /// 向ARM發(fā)送
        /// /summary>
        /// param name=Zuohao>座號 2字節(jié)/param>
        /// param name=mingling>命令字加ASC碼 n字節(jié)/param>
        public void WriteToArm(byte[] Zuohao, byte[] minglingandASC)
        {
        if (connection == Indicator.Connected)//在與ARM保持連接的情況下可寫
        {
        byte[] frame = new byte[4+minglingandASC.Length];
        frame[0] = (byte)frame.Length;
        Array.Copy(Zuohao, 0, frame, 1, 2);
        Array.Copy(minglingandASC,0,frame,3,minglingandASC.Length);
        byte temp = 0;
        foreach (byte item in frame)
        temp += item;
        frame[frame.Length-1] = (byte)(0 - temp);
        byte[] frametosend = PPP.Encode(frame);
        Console.WriteLine(BitConverter.ToString(frametosend));
        try { stream.Write(frametosend, 0, frametosend.Length); }
        catch (Exception ex) { }
        }
        }

        本文引用地址:http://www.antipu.com.cn/article/185790.htm

        另外數(shù)據(jù)收發(fā)還需要協(xié)議,和嵌入式網(wǎng)關(guān)通信的指令和協(xié)議定制如下:



        因此數(shù)據(jù)量較少,協(xié)議也就比較簡單,此協(xié)議在發(fā)送接收時用PPP封裝。顯示部分使用C#編寫的運行于Windows .Net Framework 上的窗體應(yīng)用程序,根據(jù)實際需求,對每個實驗臺狀態(tài)的顯示使用ListView控件實現(xiàn),當出現(xiàn)異常情況,或?qū)嶒炁_出現(xiàn)警告、求助信號時,ListView的相應(yīng)字段文字會通過改變顏色來提醒監(jiān)視人員,監(jiān)視人員還可以通過一個文字發(fā)送窗體來向LED屏發(fā)送要顯示的文字??傊缑媲逦庇^,簡便易用。



        上一頁 1 2 下一頁

        關(guān)鍵詞: 上位機 軟件介紹

        評論


        相關(guān)推薦

        技術(shù)專區(qū)

        關(guān)閉