Class SGrModbusGatewayRegistry
- java.lang.Object
-
- com.smartgridready.communicator.modbus.impl.SGrModbusGatewayRegistry
-
- All Implemented Interfaces:
ModbusGatewayRegistry
public class SGrModbusGatewayRegistry extends java.lang.Object implements ModbusGatewayRegistry
-
-
Constructor Summary
Constructors Constructor Description SGrModbusGatewayRegistry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ModbusGateway
attachGateway(com.smartgridready.ns.v0.ModbusInterfaceDescription interfaceDescription, com.smartgridready.driver.api.modbus.GenDriverAPI4ModbusFactory driverFactory, java.lang.String key)
Uses or creates a Modbus transport gateway for a given device.static ModbusGatewayRegistry
defaultInstance()
void
detachAllGateways()
void
detachGateway(com.smartgridready.ns.v0.ModbusInterfaceDescription interfaceDescription, java.lang.String key)
Disconnects the Modbus transport gateway of a given device.void
detachGateway(java.lang.String identifier, java.lang.String key)
Disconnects the Modbus transport gateway of a given device.java.util.List<java.lang.String>
getAllGatewayIdentifiers()
-
-
-
Method Detail
-
defaultInstance
public static ModbusGatewayRegistry defaultInstance()
-
attachGateway
public ModbusGateway attachGateway(com.smartgridready.ns.v0.ModbusInterfaceDescription interfaceDescription, com.smartgridready.driver.api.modbus.GenDriverAPI4ModbusFactory driverFactory, java.lang.String key) throws com.smartgridready.driver.api.common.GenDriverException
Description copied from interface:ModbusGatewayRegistry
Uses or creates a Modbus transport gateway for a given device.- Specified by:
attachGateway
in interfaceModbusGatewayRegistry
- Parameters:
interfaceDescription
- the device's Modbus interface descriptiondriverFactory
- the Modbus driver factorykey
- the unique device object key- Returns:
- a Modbus gateway instance
- Throws:
com.smartgridready.driver.api.common.GenDriverException
-
detachGateway
public void detachGateway(java.lang.String identifier, java.lang.String key) throws com.smartgridready.driver.api.common.GenDriverException
Description copied from interface:ModbusGatewayRegistry
Disconnects the Modbus transport gateway of a given device.- Specified by:
detachGateway
in interfaceModbusGatewayRegistry
- Parameters:
identifier
- the transport identifier- Throws:
com.smartgridready.driver.api.common.GenDriverException
-
detachGateway
public void detachGateway(com.smartgridready.ns.v0.ModbusInterfaceDescription interfaceDescription, java.lang.String key) throws com.smartgridready.driver.api.common.GenDriverException
Description copied from interface:ModbusGatewayRegistry
Disconnects the Modbus transport gateway of a given device.- Specified by:
detachGateway
in interfaceModbusGatewayRegistry
- Parameters:
interfaceDescription
- the device's Modbus interface descriptionkey
- the unique device object key- Throws:
com.smartgridready.driver.api.common.GenDriverException
-
detachAllGateways
public void detachAllGateways()
- Specified by:
detachAllGateways
in interfaceModbusGatewayRegistry
-
getAllGatewayIdentifiers
public java.util.List<java.lang.String> getAllGatewayIdentifiers()
- Specified by:
getAllGatewayIdentifiers
in interfaceModbusGatewayRegistry
-
-