Interface ModbusGatewayRegistry
-
- All Known Implementing Classes:
SGrModbusGatewayRegistry
public interface ModbusGatewayRegistryAn interface for a Modbus gateway registry.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ModbusGatewayattachGateway(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.voiddetachAllGateways()Disconnects all Modbus transport gateways.voiddetachGateway(com.smartgridready.ns.v0.ModbusInterfaceDescription interfaceDescription, java.lang.String key)Disconnects the Modbus transport gateway of a given device.voiddetachGateway(java.lang.String identifier, java.lang.String key)Disconnects the Modbus transport gateway of a given device.java.util.List<java.lang.String>getAllGatewayIdentifiers()Gets all transport identifiers.
-
-
-
Method Detail
-
attachGateway
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
Uses or creates a Modbus transport gateway for a given device.- 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- when the gateway could not be attached
-
detachGateway
void detachGateway(com.smartgridready.ns.v0.ModbusInterfaceDescription interfaceDescription, java.lang.String key) throws com.smartgridready.driver.api.common.GenDriverExceptionDisconnects the Modbus transport gateway of a given device.- Parameters:
interfaceDescription- the device's Modbus interface descriptionkey- the unique device object key- Throws:
com.smartgridready.driver.api.common.GenDriverException- when no gateway could be detached
-
detachGateway
void detachGateway(java.lang.String identifier, java.lang.String key) throws com.smartgridready.driver.api.common.GenDriverExceptionDisconnects the Modbus transport gateway of a given device.- Parameters:
identifier- the transport identifierkey- the unique device object key- Throws:
com.smartgridready.driver.api.common.GenDriverException- when no gateway could be detached
-
detachAllGateways
void detachAllGateways()
Disconnects all Modbus transport gateways.
-
getAllGatewayIdentifiers
java.util.List<java.lang.String> getAllGatewayIdentifiers()
Gets all transport identifiers.- Returns:
- a list of strings
-
-