Beispiel #1
0
 /**
  * Get state of RLSD line
  *
  * @return If line is active, method returns true, otherwise false
  * @throws SerialPortException
  */
 public boolean isRLSD() throws SerialPortException {
   checkPortOpened("isRLSD()");
   if (serialInterface.getLinesStatus(portHandle)[3] == 1) {
     return true;
   } else {
     return false;
   }
 }
Beispiel #2
0
 /**
  * Getting lines status. Lines status is sent as 0 – OFF and 1 - ON
  *
  * @return Method returns the array containing information about lines in following order: <br>
  *     <b>element 0</b> - <b>CTS</b> line state</br> <br>
  *     <b>element 1</b> - <b>DSR</b> line state</br> <br>
  *     <b>element 2</b> - <b>RING</b> line state</br> <br>
  *     <b>element 3</b> - <b>RLSD</b> line state</br>
  * @throws SerialPortException
  */
 public int[] getLinesStatus() throws SerialPortException {
   checkPortOpened("getLinesStatus()");
   return serialInterface.getLinesStatus(portHandle);
 }