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); }
public XBeePacket GetPacket() { XBeePacket packet = new XBeePacket(GetBytes()); return(packet); }