Interface GenDeviceApi4Rest

    • Method Detail

      • getVal

        Value getVal​(java.lang.String profileName,
                     java.lang.String dataPointName)
              throws java.io.IOException,
                     RestApiServiceCallException,
                     RestApiResponseParseException,
                     com.smartgridready.driver.api.common.GenDriverException
        Reads a value in its string representation from the REST API device.
        Specified by:
        getVal in interface GenDeviceApi
        Parameters:
        profileName - The name of the functional profile.
        dataPointName - The name of the data point within the functional profile.
        Returns:
        The value read from the device.
        Throws:
        java.io.IOException - If the communication with the server failed.
        RestApiServiceCallException - If the service call could not be executed on the remote side.
        RestApiResponseParseException - If parsing of the service response failed.
        com.smartgridready.driver.api.common.GenDriverException - If a common error occured.
      • getVal

        Value getVal​(java.lang.String profileName,
                     java.lang.String dataPointName,
                     java.util.Properties parameters)
              throws java.io.IOException,
                     RestApiServiceCallException,
                     RestApiResponseParseException,
                     com.smartgridready.driver.api.common.GenDriverException
        Reads a value in its string representation from the REST API device.
        Specified by:
        getVal in interface GenDeviceApi
        Parameters:
        profileName - The name of the functional profile.
        dataPointName - The name of the data point within the functional profile.
        parameters - Key value pairs with request parameters
        Returns:
        The value read from the device.
        Throws:
        java.io.IOException - If the communication with the server failed.
        RestApiServiceCallException - If the service call could not be executed on the remote side.
        RestApiResponseParseException - If parsing of the service response failed.
        com.smartgridready.driver.api.common.GenDriverException - If a common error occurred.
      • setVal

        void setVal​(java.lang.String profileName,
                    java.lang.String dataPointName,
                    Value value)
             throws java.io.IOException,
                    RestApiServiceCallException,
                    RestApiResponseParseException,
                    com.smartgridready.driver.api.common.GenDriverException
        Writes a value to the REST API device. The value may be provided as:
        • single string value
        • http request body on json or XML
        depending on the value parameter defined in the external interface XML.
        Specified by:
        setVal in interface GenDeviceApi
        Parameters:
        profileName - The name of the functional profile.
        dataPointName - The name of the data point within the functional profile.
        value - The value to be written. Will replace the value tagged with [[value]] within the external interface RestApiServiceCall element for the given data point.
        Throws:
        java.io.IOException - If the communication with the server failed.
        RestApiServiceCallException - If the service call could not be executed on the remote side.
        RestApiResponseParseException - If parsing of the service response failed.
        com.smartgridready.driver.api.common.GenDriverException - If a common error occurred.