/** * Sets the digital value (high or low) to the provided IO line of this * XBee device. * * @param ioLine The IO line to set its value. * @param ioValue The IOValue to set to the IO line ({@code HIGH} or * {@code LOW}). * * @throws InterfaceNotOpenException if this device connection is not open. * @throws ArgumentNullException if {@code ioLine == null} or * if {@code ioValue == null}. * @throws TimeoutException if there is a timeout sending the set DIO * command. * @throws XBeeException if there is any other XBee related exception. * * @see #getIOConfiguration(IOLine) * @see #setIOConfiguration(IOLine, IOMode) * @see com.digi.xbee.api.io.IOLine * @see com.digi.xbee.api.io.IOValue * @see com.digi.xbee.api.io.IOMode#DIGITAL_OUT_HIGH * @see com.digi.xbee.api.io.IOMode#DIGITAL_OUT_LOW */ public void setDIOValue(IOLine ioLine, IOValue ioValue)/*throws TimeoutException, XBeeException */{ // Check IO line. if (ioLine == null) throw new ArgumentNullException("IO line cannot be null."); // Check IO value. if (ioValue == null) throw new ArgumentNullException("IO value cannot be null."); // Check connection. if (!connectionInterface.SerialPort.IsOpen) throw new InterfaceNotOpenException(); SetParameter(ioLine.GetConfigurationATCommand(), new byte[] { (byte)ioValue.GetID() }); }