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 asString
orNumberValue
The implementing device will convert the data to their modbus format.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Value
getVal(java.lang.String profileName, java.lang.String dataPointName)
Read a value from the modbus device in its generic data point representation (seeValue
).void
setVal(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:
getVal
in 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.GenDriverModbusException
Write a value to the modbus device using the generic data point representation (seeValue
). The value is converted from the format given within thevalue
parameter to the value required by the modbus device (as defined within the external interface XML of the device).- Specified by:
setVal
in 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
-
-