use of com.digi.xbee.api.packet.XBeeAPIPacket in project JMRI by JMRI.
the class PacketGenFrame method sendButtonActionPerformed.
@Override
public void sendButtonActionPerformed(java.awt.event.ActionEvent e) {
String packetString = packetTextField.getSelectedItem().toString();
byte[] packetByteArray = jmri.util.StringUtil.bytesFromHexString(packetString);
XBeeAPIPacket packet = GenericXBeePacket.createPacket(packetByteArray);
try {
tc.getXBee().sendPacketAsync(packet);
} catch (XBeeException xbe) {
log.error("Error Sending message to XBee: " + xbe);
}
}
Aggregations