/** * Returns the network associated with this XBee device. * * @return The XBee network of the device. * * @throws InterfaceNotOpenException if this device connection is not open. * * @see XBeeNetwork */ public XBeeNetwork getNetwork() { if (!isOpen()) throw new InterfaceNotOpenException(); if (network == null) network = new XBeeNetwork(this); return network; }