Package serialComms

Class SerialPortParameters

java.lang.Object
serialComms.SerialPortParameters
All Implemented Interfaces:
Serializable, Cloneable, ManagedParameters

public class SerialPortParameters extends Object implements Serializable, Cloneable, ManagedParameters
Author:
David McLaren, Paul Redmond
See Also:
  • Field Details

  • Constructor Details

    • SerialPortParameters

      public SerialPortParameters()
  • Method Details

    • connect

      public boolean connect(String port, int bitsPerSecond, int parity)
      Parameters:
      port -
      bitsPerSecond -
      parity -
      Returns:
      true if connection sucessful
    • disconnect

      public void disconnect()
    • sendChar

      public void sendChar(char charToSend)
      Parameters:
      charToSend -
    • sendString

      public void sendString(String stringToSend)
    • getChar

      public char getChar()
    • getString

      public String getString()
    • getPortList

      public ArrayList<String> getPortList()
    • getBitsPerSecond

      public int getBitsPerSecond()
    • setBitsPerSecond

      public void setBitsPerSecond(int bitsPerSecond)
    • getCommPortName

      public String getCommPortName()
    • setCommPortName

      public void setCommPortName(String commPortName)
    • getDataBits

      public int getDataBits()
    • setDataBits

      public void setDataBits(int dataBits)
    • getParity

      public int getParity()
    • setParity

      public void setParity(int parity)
    • getStopBits

      public int getStopBits()
    • setStopBits

      public void setStopBits(int stopBits)
    • clone

      public SerialPortParameters clone()
    • getFlowControl

      public int getFlowControl()
      Returns:
      the flowControl
    • setFlowControl

      public void setFlowControl(int flowControl)
      Parameters:
      flowControl - the flowControl to set
    • getParameterSet

      public PamParameterSet getParameterSet()
      Description copied from interface: ManagedParameters
      Get a set of data that describes all of the parameters in a class
      Specified by:
      getParameterSet in interface ManagedParameters
      Returns:
      description of the parameters in a class.