|
jamod at SF | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.wimpi.modbus.net.SerialConnection
Class that implements a serial connection which can be used for master and slave implementations.
Constructor Summary | |
SerialConnection(SerialParameters parameters)
Creates a SerialConnection object and initilizes variables passed in as params. |
Method Summary | |
void |
close()
Close the port and clean up associated elements. |
ModbusTransport |
getModbusTransport()
Returns the ModbusTransport instance to be used for receiving and sending messages. |
boolean |
isOpen()
Reports the open status of the port. |
void |
open()
Opens the communication port. |
void |
serialEvent(javax.comm.SerialPortEvent e)
|
void |
setConnectionParameters()
Sets the connection parameters to the setting in the parameters object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SerialConnection(SerialParameters parameters)
parameters
- A SerialParameters object.Method Detail |
public ModbusTransport getModbusTransport()
public void open() throws java.lang.Exception
java.lang.Exception
- if an error occurs.public void setConnectionParameters() throws java.lang.Exception
java.lang.Exception
- if the configured parameters cannot be set properly
on the port.public void close()
public boolean isOpen()
public void serialEvent(javax.comm.SerialPortEvent e)
serialEvent
in interface javax.comm.SerialPortEventListener
|
jamod at SF | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |