Interface GenDeviceApi4Modbus

  • All Superinterfaces:
    GenDeviceApi
    All Known Implementing Classes:
    SGrModbusDevice

    public interface GenDeviceApi4Modbus
    extends GenDeviceApi
    The API defines read and write operations for SmartGridReady devices. The values can be provided as String or NumberValue The implementing device will convert the data to their modbus format.
    • Method Detail

      • getVal

        Value getVal​(java.lang.String profileName,
                     java.lang.String dataPointName)
              throws com.smartgridready.driver.api.common.GenDriverException,
                     com.smartgridready.driver.api.modbus.GenDriverSocketException,
                     com.smartgridready.driver.api.modbus.GenDriverModbusException
        Read a value from the modbus device in its generic data point representation (see Value).
        Specified by:
        getVal in interface GenDeviceApi
        Parameters:
        profileName - The name of the functional profile.
        dataPointName - The name of the data point.
        Returns:
        The value converted to String
        Throws:
        com.smartgridready.driver.api.common.GenDriverException - If a general exception occurred.
        com.smartgridready.driver.api.modbus.GenDriverSocketException - In case of communication errors with the modbus device.
        com.smartgridready.driver.api.modbus.GenDriverModbusException - If the modbus command could not be interpreted/executed on the device.
        See Also:
        Value
      • setVal

        void setVal​(java.lang.String profileName,
                    java.lang.String dataPointName,
                    Value value)
             throws com.smartgridready.driver.api.common.GenDriverException,
                    com.smartgridready.driver.api.modbus.GenDriverSocketException,
                    com.smartgridready.driver.api.modbus.GenDriverModbusException
        Write a value to the modbus device using the generic data point representation (see Value). The value is converted from the format given within the value parameter to the value required by the modbus device (as defined within the external interface XML of the device).
        Specified by:
        setVal in interface GenDeviceApi
        Parameters:
        profileName - The name of the functional profile.
        dataPointName - The name of the data point.
        value - The value as Value
        Throws:
        com.smartgridready.driver.api.common.GenDriverException - If a general exception occurred.
        com.smartgridready.driver.api.modbus.GenDriverSocketException - In case of communication errors with the modbus device.
        com.smartgridready.driver.api.modbus.GenDriverModbusException - If the modbus command could not be interpreted/executed on the device.
        See Also:
        Value