Exemple #1
0
        public bool SendPacket(XBeePacket packet)
        {
            byte[] bytes = packet.GetBytes();

            Console.Write("SendPacket from " + _serialPort.PortName + ": ");
            foreach (byte b in bytes)
            {
                Console.Write(b.ToString("X2") + "-");
            }
            Console.WriteLine();

            _serialPort.Write(bytes, 0, bytes.Length);

            return(true);
        }
Exemple #2
0
        public XBeePacket GetPacket()
        {
            XBeePacket packet = new XBeePacket(GetBytes());

            return(packet);
        }