示例#1
0
 static void Main(string[] args)
 {
     byte[] data = { 0x16, 0x12, 0x85, 0x09, 0xD4, 0x0D, 0x00, 0x00, 0x01, 0x55, 0x55, 0xAA, 0x1D, 0x04, 0xAB, 0x02, 0xEC, 0x02, 0x85, 0x09, 0x01, 0xAA, 0xAA };
     DataLink frame = new DataLink(100);
     frame.frame_received = frame_received;
     frame.rx_ready();
     foreach(byte b in data)
     {
         frame.receive(b);
     }
     Console.ReadKey();
 }
示例#2
0
        static void Main(string[] args)
        {
            byte[]   data  = { 0x16, 0x12, 0x85, 0x09, 0xD4, 0x0D, 0x00, 0x00, 0x01, 0x55, 0x55, 0xAA, 0x1D, 0x04, 0xAB, 0x02, 0xEC, 0x02, 0x85, 0x09, 0x01, 0xAA, 0xAA };
            DataLink frame = new DataLink(100);

            frame.frame_received = frame_received;
            frame.rx_ready();
            foreach (byte b in data)
            {
                frame.receive(b);
            }
            Console.ReadKey();
        }