Class used for setting the configuration of BaseStations. Set all the configuration values that you want to change, then verify and apply them to a BaseStation.
See also: BaseStation::applyConfig
Creates a blank BaseStationConfig.
The WirelessTypes::TransmitPower to set.
The <ButtonMap> for long press actions.
The <ButtonMap> for short press actions.
The <AnalogPairMap> holding all analog pairs to set
The analog pairing enable master option to set.
The analog timeout time (in seconds) to set.
The analog timeout voltage to set.
The analog exceedance enable option to set.
template<typename T> void checkValue( |
| ) const |
Throws an exception if an optional value isn't set.
opt const boost::optional<T>& | The boost::optional value to check if it is set. |
valueName const std::string& | The name of the value being checked. This will be included in the exception description if not set. |
Error_NoData | The requested value has not been set. |
template<typename T> bool isSet( |
| ) const |
Checks whether the optional value is set.
opt const boost::optional<T>& | The boost::optional value to check if it is set. |
true if the value is set, false if it is not set.
bool verify( |
| ) const |
Checks whether the current settings are ok to be written to a given BaseStation.
features const BaseStationFeatures& | The BaseStationFeatures of the BaseStation to verify the configuration for. |
eeprom const BaseStationEepromHelper& | The BaseStationEepromHelper of the BaseStation to use for communication. |
outIssues ConfigIssues& | The ConfigIssues holding any resulting issues that are found with the configuration. |
true if the configuration is valid. false if the configuration is invalid and outIssues should be checked for more information.
Error_Communication: Failed to communicate with the BaseStation.
Error_Connection: A connection error has occurred.
void apply( |
| ) const |
Writes all of the configuration values that are set to a WirelessNode.
features const BaseStationFeatures& | The BaseStationFeatures of the BaseStation to write the config to. |
eeprom | The BaseStationEepromHelper of the BaseStation to write the config to. |
Error_InvalidConfig: Invalid Configuration for the BaseStation. Check the exception for specific details.
Error_Communication: Failed to communicate with the BaseStation.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the WirelessTypes::TransmitPower value in the Config, if set.
Error_NoData | The requested value has not been set. |
void transmitPower( |
| ) |
Sets the WirelessTypes::TransmitPower value in the Config.
BaseStationButton buttonLongPress( |
| ) const |
Gets the BaseStationButton value in the Config for performing a long press on a specific button, if set.
buttonNumber uint8 | The button number (1 = button 1) to get the value for. |
Error_NoData | The requested button number for long press has not been set. |
void buttonLongPress( |
| ) |
Sets the BaseStationButton value in the Config for performing a short press on a specific button.
buttonNumber uint8 | The button number (1 = button 1) to set. |
button const BaseStationButton& | The BaseStationButton to set. |
BaseStationButton buttonShortPress( |
| ) const |
Gets the BaseStationButton value in the Config for performing a short press on a specific button, if set.
buttonNumber uint8 | The button number (1 = button 1) to get the value for. |
Error_NoData | The requested button number for short press has not been set. |
void buttonShortPress( |
| ) |
Sets the BaseStationButton value in the Config for performing a long press on a specific button.
buttonNumber uint8 | The button number (1 = button 1) to set. |
button const BaseStationButton& | The BaseStationButton to set. |
Gets the Analog Pairing Enabled value in the Config, if set.
Error_NoData | The requested button number for short press has not been set. |
void analogPairingEnable( |
| ) |
Sets the Analog Pairing Enabled value in the Config. This controls whether all of the other analog pairing settings have any affect.
enable bool | Whether to enable or disable analog pairing in the Config. |
Gets the Analog Timeout Time value (in seconds) in the Config, if set. If this is 0, Analog Timeout is disabled.
Error_NoData | The requested button number for short press has not been set. |
void analogTimeoutTime( |
| ) |
Sets the Analog Timeout Time value (in seconds) in the Config. If this is 0, Analog Timeout is disabled.
seconds uint16 | The analog timeout time in seconds to set. |
Gets the Analog Timeout Voltage in the Config, if set.
Error_NoData | The requested button number for short press has not been set. |
void analogTimeoutVoltage( |
| ) |
Sets the Analog Timeout Voltage in the Config. If this is 0, Analog Timeout is disabled.
voltage float | The voltage to set. |
Gets the Analog Exceedance Enabled value in the Config, if set.
Error_NoData | The requested button number for short press has not been set. |
void analogExceedanceEnable( |
| ) |
Sets the Analog Exceedance Enabled value in the Config.
enable bool | Whether to enable or disable analog exceedance in the Config. |
BaseStationAnalogPair analogPairing( |
| ) const |
Gets the BaseStationAnalogPair value in the Config for the specified port number, if set.
portNumber uint8 | The port number (1 = port 1) to get the pairing for. |
Error_NoData | The requested port number has not been set. |
Sets the BaseStationAnalogPair value in the Config for the specified port number.
portNumber | The port number (1 = port 1) to set. |
pair | The BaseStationAnalogPair to set. |