BaseStationEepromHelper
BaseStationEepromHelper

A helper class for reading and writing to a BaseStation's Eeprom.  This class provides eeprom specific parsing so that high-level objects can be converted to their low-level eeprom value equivelent and vice-versa.

Functions
BaseStationEepromHelper
BaseStationEepromHelper(
BaseStation_Impl *basestation
)

Creates a BaseStationEepromHelper object with a BaseStation.

Parameters
basestation

The BaseStation that will be read from and written to.

checkAnalogPairingSupported
void checkAnalogPairingSupported() const

Checks that analog pairing is supported and throws an exception if it isn't.

Exceptions
Variables
m_baseStation
BaseStation_Impl* m_baseStation

The BaseStation_Impl used by this eeprom helper.

Functions
read_transmitPower
WirelessTypes::TransmitPower read_transmitPower() const

Reads the WirelessTypes::TransmitPower that is currently set on the BaseStation.

Returns

The WirelessTypes::TransmitPower that is currently set on the BaseStation.

Exceptions
write_transmitPower
void write_transmitPower(
WirelessTypes::TransmitPower power
)

Writes the WirelessTypes::TransmitPower to the BaseStation.

Parameters
power

The WirelessTypes::TransmitPower to write to the BaseStation.

Exceptions
read_button
BaseStationButton read_button(
uint8 buttonNumber,
BaseStationButton::UserAction action
) const

Reads the current settings for a particular button and action as a BaseStationButton.

Prameters
buttonNumber

The button number (1 = button 1) to read for.

action

The BaseStationButton::UserAction to read for.

Returns

The current settings for the button, as a BaseStationButton

Exceptions
write_button
void write_button(
uint8 buttonNumber,
BaseStationButton::UserAction action,
const BaseStationButton &btn
)

Writes the BaseStationButton to the BaseStation for a particular button and action.

Parameters
buttonNumber
uint8

The button number (1 = button 1) to write for.

action

The BaseStationButton::UserAction to write for.

button

The BaseStationButton to write.

Exceptions
read_analogPairingEnabled
bool read_analogPairingEnabled() const

Reads the setting for if analog pairing is enabled.

Returns

true if analog pairing is enabled, false otherwise.

Exceptions
write_analogPairingEnabled
void write_analogPairingEnabled(
bool enable
)

Writes the analog pairing enable setting to the BaseStation.

Parameters
enable
bool

Whether to enable analog pairing or not.

Exceptions
read_analogTimeoutTime
uint16 read_analogTimeoutTime() const

Reads the analog timeout time in seconds.

Returns

The time in seconds for analog timeout. If this is 0, timeout is disabled.

Exceptions
write_analogTimeoutTime
void write_analogTimeoutTime(
uint16 seconds
)

Writes the analog timeout time to the BaseStation.

Parameters
seconds
uint16

The analog timeout time in seconds. If this is 0, timeout will be disabled.

Exceptions
read_analogTimeoutVoltage
float read_analogTimeoutVoltage() const

Reads the analog timeout voltage.

Returns

The analog timeout voltage.

Exceptions
write_analogTimeoutVoltage
void write_analogTimeoutVoltage(
float voltage
)

Writes the analog timeout voltage to the BaseStation.

Parameters
voltage
float

The analog timeout voltage to write.

Exceptions
read_analogExceedanceEnabled
bool read_analogExceedanceEnabled() const

Reads the setting for if analog exceedance is enabled.

Returns

true if analog exceedance is enabled, false otherwise.

Exceptions
write_analogExceedanceEnabled
void write_analogExceedanceEnabled(
bool enable
)

Writes the analog exceedance enable setting to the BaseStation.

Parameters
enable
bool

Whether to enable analog exceedance or not.

Exceptions
read_analogPair
BaseStationAnalogPair read_analogPair(
uint8 portNumber
) const

Reads the current settings for a particular analog pairing as a BaseStationAnalogPair.

Prameters
portNumber

The port number (1 = port 1) to read for.

Returns

The current analog pairing settings for the port, as a BaseStationAnalogPair

Exceptions
write_analogPair
void write_analogPair(
uint8 portNumber,
const BaseStationAnalogPair &pair
)

Writes the BaseStationAnalogPair to the BaseStation for a particular port number.

Parameters
portNumber
uint8

The port number (1 = port 1) to write for.

pair

The BaseStationButton to write.

Exceptions
read_regionCode
WirelessTypes::RegionCode read_regionCode() const

Reads the region code from the BaseStation.

Returns

The WirelessTypes::RegionCode set on the BaseStation.

Exceptions