Class ModbusControlConfig
java.lang.Object
net.solarnetwork.node.control.modbus.ModbusControlConfig
Overall configuration for a Modbus Control.
- Since:
- 3.1
- Version:
- 1.0
- Author:
- matt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKey()Get the instance key.Get the modbus network name.Get the property configurations.Get the sample cache milliseconds.Get the unit ID.net.solarnetwork.node.io.modbus.ModbusWordOrderGet the word order.charGet the word order as a key value.booleanpopulateFromSetting(net.solarnetwork.node.domain.Setting setting) Populate a setting as a configuration value, if possible.voidSet the instance ID.voidsetModbusNetworkName(String modbusNetworkName) Set the modbus network name.voidsetSampleCacheMs(Long sampleCacheMs) Set the sample cache milliseconds.voidSet the unit ID.voidsetWordOrder(net.solarnetwork.node.io.modbus.ModbusWordOrder wordOrder) Set the word order.voidsetWordOrderKey(char key) Set the word order as a key value.List<net.solarnetwork.node.settings.SettingValueBean>toSettingValues(String providerId) Generate a list of setting values from this instance.toString()
-
Constructor Details
-
ModbusControlConfig
public ModbusControlConfig()
-
-
Method Details
-
toSettingValues
Generate a list of setting values from this instance.- Parameters:
providerId- the setting provider key to use- Returns:
- the list of setting values, never null
-
populateFromSetting
public boolean populateFromSetting(net.solarnetwork.node.domain.Setting setting) Populate a setting as a configuration value, if possible.- Parameters:
setting- the setting to try to handle- Returns:
- true if the setting was handled as a configuration value
-
toString
-
getKey
Get the instance key.- Returns:
- the key
-
setKey
Set the instance ID.- Parameters:
key- the key to set
-
getModbusNetworkName
Get the modbus network name.- Returns:
- the modbusNetworkName
-
setModbusNetworkName
Set the modbus network name.- Parameters:
modbusNetworkName- the modbusNetworkName to set
-
getUnitId
Get the unit ID.- Returns:
- the unitId
-
setUnitId
Set the unit ID.- Parameters:
unitId- the unitId to set
-
getSampleCacheMs
Get the sample cache milliseconds.- Returns:
- the sampleCacheMs
-
setSampleCacheMs
Set the sample cache milliseconds.- Parameters:
sampleCacheMs- the sampleCacheMs to set
-
getWordOrderKey
public char getWordOrderKey()Get the word order as a key value.- Returns:
- the word order as a key; if
getWordOrder()is null thenModbusWordOrder.MostToLeastSignificantwill be returned
-
setWordOrderKey
public void setWordOrderKey(char key) Set the word order as a key value.- Parameters:
key- the word order key to set; ifkeyis not valid thenModbusWordOrder.MostToLeastSignificantwill be set
-
getWordOrder
public net.solarnetwork.node.io.modbus.ModbusWordOrder getWordOrder()Get the word order.- Returns:
- the wordOrder
-
setWordOrder
public void setWordOrder(net.solarnetwork.node.io.modbus.ModbusWordOrder wordOrder) Set the word order.- Parameters:
wordOrder- the wordOrder to set
-
getPropertyConfigs
Get the property configurations.- Returns:
- the configurations, never null
-