![]() |
BakeoutController-Basic
0.1
A Controller for the Omicron vacuum chamber
|
Public Member Functions | |
ModbusPortConfiguration | getPortConfiguration () |
void | setPortConfiguration (ModbusPortConfiguration configuration) |
Boolean | isPortOpen () |
ModbusTransaction | getTransactionForRequest (ModbusRequest request) throws WrappedModbusException, IllegalStateException |
Float | parseFloatFromResponse (ModbusMessage response) throws ClassCastException, IOException |
String | parseStringFromResponse (ModbusMessage response) throws ClassCastException, IOException |
void | close () |
Contains methods for working with MODBUS over RS232
Definition at line 12 of file ModbusConnector.java.
void kernel.modbus.ModbusConnector.close | ( | ) |
Close the connection
Implemented in kernel.modbus.ModBusConnectionManager.
ModbusPortConfiguration kernel.modbus.ModbusConnector.getPortConfiguration | ( | ) |
Implemented in kernel.modbus.ModBusConnectionManager.
ModbusTransaction kernel.modbus.ModbusConnector.getTransactionForRequest | ( | ModbusRequest | request | ) | throws WrappedModbusException, IllegalStateException |
request | The request for which a transaction is required |
WrappedModbusException | If the transaction cannot be created due to a MODBUS error |
IllegalStateException | If the transaction cannot be created due to a condition not being met. For instance, this should be thrown if the transaction is attempted to be created without a valid connection |
Implemented in kernel.modbus.ModBusConnectionManager.
Boolean kernel.modbus.ModbusConnector.isPortOpen | ( | ) |
Implemented in kernel.modbus.ModBusConnectionManager.
Float kernel.modbus.ModbusConnector.parseFloatFromResponse | ( | ModbusMessage | response | ) | throws ClassCastException, IOException |
With a response consisting of two 16-bit words, parse this response into an IEEE 754 single-precision floating-point number
response | The response received from the transaction |
ClassCastException | If the ModbusMessage cannot be cast to a com.ghgande.j2mod.modbus.msg.ModbusResponse. This is a required step in order to get the response's output stream |
IOException | If the output stream from the response cannot be parsed into a float |
Implemented in kernel.modbus.ModBusConnectionManager.
String kernel.modbus.ModbusConnector.parseStringFromResponse | ( | ModbusMessage | response | ) | throws ClassCastException, IOException |
Take a com.ghgande.j2mod.modbus.msg.ModbusResponse, retrieve a string from its data package, and return the string
response | The response from which a string is to be parsed |
ClassCastException | If the argument of type ModbusMessage cannot be cast to a com.ghgande.j2mod.modbus.msg.ModbusResponse |
IOException | If a string cannot be retrieved from the response |
Implemented in kernel.modbus.ModBusConnectionManager.
void kernel.modbus.ModbusConnector.setPortConfiguration | ( | ModbusPortConfiguration | configuration | ) |
configuration | The desired port configuration |
Implemented in kernel.modbus.ModBusConnectionManager.
Git Repo |