Class DeviceWriteCallable<T>
- java.lang.Object
-
- com.smartgridready.communicator.async.callable.BaseCallable<T>
-
- com.smartgridready.communicator.async.callable.DeviceWriteCallable<T>
-
- Type Parameters:
T- The type of the value written to the device.
- All Implemented Interfaces:
java.util.concurrent.Callable<AsyncResult<T>>
public class DeviceWriteCallable<T> extends BaseCallable<T>
Callable that wraps a device write command.
-
-
Field Summary
-
Fields inherited from class com.smartgridready.communicator.async.callable.BaseCallable
dataPointName, profileName, result
-
-
Constructor Summary
Constructors Constructor Description DeviceWriteCallable(WriteFunction<T> writeFunction, java.lang.String profileName, java.lang.String dataPointName)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoFunctionCall()voidsetWriteValue(T writeValue)Updates the value to write.java.lang.StringtoString()-
Methods inherited from class com.smartgridready.communicator.async.callable.BaseCallable
call, getDataPointName, getProfileName, getResult
-
-
-
-
Constructor Detail
-
DeviceWriteCallable
public DeviceWriteCallable(WriteFunction<T> writeFunction, java.lang.String profileName, java.lang.String dataPointName)
Constructs a new instance.- Parameters:
writeFunction- the write function to executeprofileName- the functional profile namedataPointName- the data point name
-
-
Method Detail
-
doFunctionCall
protected void doFunctionCall() throws com.smartgridready.driver.api.common.GenDriverException, RestApiResponseParseException, com.smartgridready.driver.api.modbus.GenDriverModbusException, RestApiServiceCallException, RestApiAuthenticationException, com.smartgridready.driver.api.modbus.GenDriverSocketException, java.io.IOException- Throws:
com.smartgridready.driver.api.common.GenDriverExceptionRestApiResponseParseExceptioncom.smartgridready.driver.api.modbus.GenDriverModbusExceptionRestApiServiceCallExceptionRestApiAuthenticationExceptioncom.smartgridready.driver.api.modbus.GenDriverSocketExceptionjava.io.IOException
-
setWriteValue
public void setWriteValue(T writeValue)
Updates the value to write.- Parameters:
writeValue- the value to write
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-