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 asStringorNumberValueThe implementing device will convert the data to their Modbus format.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ValuegetVal(java.lang.String profileName, java.lang.String dataPointName)Read a value from the modbus device in its generic data point representation (seeValue).voidsetVal(java.lang.String profileName, java.lang.String dataPointName, Value value)Write a value to the modbus device using the generic data point representation (seeValue).-
Methods inherited from interface com.smartgridready.communicator.common.api.GenDeviceApi
canSubscribe, connect, disconnect, getDataPoint, getDataPoints, getDeviceConfigurationInfo, getDeviceInfo, getFunctionalProfile, getFunctionalProfiles, getVal, getValues, isConnected, subscribe, unsubscribe
-
-
-
-
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 (seeValue).- Specified by:
getValin interfaceGenDeviceApi- 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.GenDriverModbusExceptionWrite a value to the modbus device using the generic data point representation (seeValue). The value is converted from the format given within thevalueparameter to the value required by the modbus device (as defined within the external interface XML of the device).- Specified by:
setValin interfaceGenDeviceApi- Parameters:
profileName- The name of the functional profile.dataPointName- The name of the data point.value- The value asValue- 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
-
-