Class 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SGrModbusGatewayRegistry

        public SGrModbusGatewayRegistry()
    • Method Detail

      • 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 interface ModbusGatewayRegistry
        Parameters:
        interfaceDescription - the device's Modbus interface description
        driverFactory - the Modbus driver factory
        key - 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 interface ModbusGatewayRegistry
        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 interface ModbusGatewayRegistry
        Parameters:
        interfaceDescription - the device's Modbus interface description
        key - the unique device object key
        Throws:
        com.smartgridready.driver.api.common.GenDriverException