Package io.openems.edge.simulator.modbus
Class SimulatorModbusImpl
java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.simulator.modbus.SimulatorModbusImpl
- All Implemented Interfaces:
BridgeModbus
,BridgeModbusTcp
,OpenemsComponent
,SimulatorModbus
public class SimulatorModbusImpl
extends AbstractOpenemsComponent
implements SimulatorModbus, BridgeModbus, BridgeModbusTcp, OpenemsComponent
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.openems.edge.bridge.modbus.api.BridgeModbus
BridgeModbus.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.bridge.modbus.api.BridgeModbusTcp
BridgeModbusTcp.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.simulator.modbus.SimulatorModbus
SimulatorModbus.ChannelId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProtocol
(String sourceId, ModbusProtocol protocol) Adds a Protocol with a source identifier to this Modbus Bridge.protected void
Handles @Deactivate of implementations.Gets the IP address.void
removeProtocol
(String sourceId) Removes a Protocol from this Modbus Bridge.void
retryModbusCommunication
(String sourceId) The Modbus Bridge marks defective Components, e.g.Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, activate, activate, addChannel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, modified, removeChannel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.openems.edge.bridge.modbus.api.BridgeModbus
_setCycleDelay, _setCycleTimeIsTooShort, getCycleDelay, getCycleDelayChannel, getCycleTimeIsTooShort, getCycleTimeIsTooShortChannel
Methods inherited from interface io.openems.edge.common.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, debugLog, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
Constructor Details
-
SimulatorModbusImpl
public SimulatorModbusImpl()
-
-
Method Details
-
deactivate
protected void deactivate()Description copied from class:AbstractOpenemsComponent
Handles @Deactivate of implementations. Prints log output.- Overrides:
deactivate
in classAbstractOpenemsComponent
-
getIpAddress
Description copied from interface:BridgeModbusTcp
Gets the IP address.- Specified by:
getIpAddress
in interfaceBridgeModbusTcp
- Returns:
- the IP address
-
addProtocol
Description copied from interface:BridgeModbus
Adds a Protocol with a source identifier to this Modbus Bridge.- Specified by:
addProtocol
in interfaceBridgeModbus
- Parameters:
sourceId
- the unique source identifierprotocol
- the Modbus Protocol
-
removeProtocol
Description copied from interface:BridgeModbus
Removes a Protocol from this Modbus Bridge.- Specified by:
removeProtocol
in interfaceBridgeModbus
- Parameters:
sourceId
- the unique source identifier
-
retryModbusCommunication
Description copied from interface:BridgeModbus
The Modbus Bridge marks defective Components, e.g. if there are communication failures. If a component is marked as defective, reads and writes are paused for an increasing waiting time. This method resets the waiting time, causing the Modbus Bridge to retry if a Component is not anymore defective.Use this method if there is good reason that a Modbus Component should be available again 'now', e.g. because it was turned on manually.
- Specified by:
retryModbusCommunication
in interfaceBridgeModbus
- Parameters:
sourceId
- the unique source identifier
-