public class BridgeModbusSerialImpl extends AbstractModbusBridge implements BridgeModbus, BridgeModbusSerial, OpenemsComponent, org.osgi.service.event.EventHandler
Modifier and Type | Class and Description |
---|---|
static class |
BridgeModbusSerialImpl.ChannelId |
DEFAULT_RETRIES, DEFAULT_TIMEOUT
Constructor and Description |
---|
BridgeModbusSerialImpl() |
Modifier and Type | Method and Description |
---|---|
void |
closeModbusConnection()
Closes the Modbus connection.
|
protected void |
deactivate()
Handles @Deactivate of implementations.
|
int |
getBaudrate()
Gets the Baudrate (e.g.
|
int |
getDatabits()
Gets the Databits (e.g.
|
com.ghgande.j2mod.modbus.io.ModbusTransaction |
getNewModbusTransaction()
Creates a new Modbus Transaction on an open Modbus connection.
|
Parity |
getParity()
Gets the Parity.
|
java.lang.String |
getPortName()
Gets the Port-Name (e.g.
|
Stopbit |
getStopbits()
Gets the Stopbits.
|
activate, addProtocol, getLogVerbosity, handleEvent, invalidateElementsAfterReadErrors, logError, logInfo, logWarn, removeProtocol
_channel, activate, addChannel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, modified, removeChannel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
_setCycleTimeIsTooShort, _setExecutionDuration, _setSlaveCommunicationFailed, addProtocol, getCycleTimeIsTooShort, getCycleTimeIsTooShortChannel, getExecutionDuration, getExecutionDurationChannel, getSlaveCommunicationFailed, getSlaveCommunicationFailedChannel, removeProtocol
_channel, _getChannelAs, alias, channel, channel, channels, debugLog, getComponentContext, getModbusSlaveNatureTable, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid, updateConfigurationProperty, updateReferenceFilter
protected void deactivate()
AbstractOpenemsComponent
deactivate
in class AbstractModbusBridge
public void closeModbusConnection()
AbstractModbusBridge
closeModbusConnection
in class AbstractModbusBridge
public com.ghgande.j2mod.modbus.io.ModbusTransaction getNewModbusTransaction() throws OpenemsException
AbstractModbusBridge
getNewModbusTransaction
in class AbstractModbusBridge
OpenemsException
- on errorpublic int getBaudrate()
BridgeModbusSerial
getBaudrate
in interface BridgeModbusSerial
public int getDatabits()
BridgeModbusSerial
getDatabits
in interface BridgeModbusSerial
public Parity getParity()
BridgeModbusSerial
getParity
in interface BridgeModbusSerial
public java.lang.String getPortName()
BridgeModbusSerial
getPortName
in interface BridgeModbusSerial
public Stopbit getStopbits()
BridgeModbusSerial
getStopbits
in interface BridgeModbusSerial