BaseStation_Impl
BaseStation_Impl

Contains the implementation for a BaseStation object.

Functions
BaseStation_Impl
explicit BaseStation_Impl(
Connection connection,
uint64 baseTimeout
)

Creates a BaseStation_Impl object.  Note: This will communicate with the BaseStation to get device information, as well as start the data collection thread.

Parameters
connection

The Connection object used for communication.

baseTimeout
uint64

The timeout (in milliseconds) to use for base station commands.

Exceptions
See Also

Connection, SerialConnection

~BaseStation_Impl
~BaseStation_Impl()

Destroys the BaseStation object

Variables
m_connection
Connection m_connection

The Connection object used for communication

m_packetCollector
WirelessPacketCollector m_packetCollector

The wireless packet collector used to store wireless data packets

m_responseCollector
std::shared_ptr<ResponseCollector> m_responseCollector

The response collector used to find and store wireless command responses

m_parser
std::unique_ptr<WirelessParser> m_parser

The wireless parser in charge of parsing all incoming data to this base station

m_baseCommandsTimeout
uint64 m_baseCommandsTimeout

The timeout (in milliseconds) to use for base station commands.

m_nodeCommandsTimeout
uint64 m_nodeCommandsTimeout

The timeout (in milliseconds) to use for node commands.

m_frequency
mutable WirelessTypes::Frequency m_frequency

The last known radio frequency (WirelessTypes::Frequency) that the BaseStation was known to be on

m_eeprom
mutable std::unique_ptr<BaseStationEeprom> m_eeprom

The BaseStationEeprom that handles reading and writing eeprom values with the BaseStation and eeprom cache.

m_eepromHelper
mutable std::unique_ptr<BaseStationEepromHelper> m_eepromHelper

The BaseStationEepromHelper used for high level eeprom reads and writes on the BaseStation.

m_features
mutable std::unique_ptr<BaseStationFeatures> m_features

The BaseStationFeatures containing the features for this BaseStation.

m_protocol
std::unique_ptr<WirelessProtocol> m_protocol

The WirelessProtocol containing all of the protocol commands and info for this BaseStation.

m_lastCommTime
Timestamp m_lastCommTime

A Timestamp representing the last time communication was achieved with the BaseStation.

m_nodesLastCommTime
std::map<NodeAddress, Timestamp> m_nodesLastCommTime

A map of NodeAddress to Timestamp objects, holding the last communication time for nodes with this BaseStation.

Functions
getTimeForBeacon
static uint32 getTimeForBeacon()

Gets the system time in UTC seconds since Unix Epoch as close to 0 milliseconds as possible

Returns

The system time in UTC seconds since Unix Epoch to enable the beacon with

parseData
void parseData(
DataBuffer &data
)

Callback function that parses any bytes that are in the read buffer to find packets or command responses

Parameters
data

The DataBuffer containing all the data to be parsed

determineProtocol
std::unique_ptr<WirelessProtocol> determineProtocol()

Determines the WirelessProtocol to use based on the BaseStation's firmware version.

Returns

A unique_ptr containing the WirelessProtocol to use.

Exceptions
eeHelper
BaseStationEepromHelper& eeHelper() const

Gets a reference to the BaseStationEepromHelper for this BaseStation.

Returns

A reference to the BaseStationEepromHelper.

doCommand
bool doCommand(
ResponsePattern &response,
const ByteStream &cmdBytes,
uint64 timeout
)

Performs a custom command and waits for the response.

Parameters
response

A reference to a custom class that was inherited from the ResponsePattern base class.

cmdBytes
const ByteStream&

The ByteStream containing the command bytes to send.

timeout
uint64

The maximum timeout to use for waiting for the response.

Returns

true if the command was successful (response.success() is true), false otherwise.

connection
Connection& connection()

Gets the Connection object that this BaseStation is using.

features
virtual const BaseStationFeatures& features() const

Gets a reference to the BaseStationFeatures for this BaseStation.

Returns

BaseStationFeatures containing the features for this BaseStation.

Exceptions
protocol
virtual const WirelessProtocol& protocol()

Gets a reference to the WirelessProtocol for this BaseStation.  Note: This requires communicating to the BaseStation if creating the protocol for the first time.

Exceptions
lastCommunicationTime
const Timestamp& lastCommunicationTime() const

Gets the Timestamp for the last time we communicated with the BaseStation.

read
bool read(
uint16 eepromAddress,
uint16 &result
)

Reads the value from the BaseStation for a specified eeprom location.

Parameters
eepromAddress
uint16

The Eeprom address to get the value for.

result
uint16&

The value that was read from Eeprom if successful.

Returns

true if the read was successful, false otherwise.

Exceptions
write
bool write(
uint16 eepromAddress,
uint16 value
)

Writes a value to the BaseStation at a specified eeprom location.

Parameters
eepromAddress
uint16

The Eeprom address to set the value for.

value
uint16

The value to write to the Eeprom.

Returns

true if the write was successful, false otherwise.

Exceptions
readWriteRetries
void readWriteRetries(
uint8 numRetries
)

Sets the number of retry attempts for reading and writing with the BaseStation.

Parameters
numRetries
uint8

The number of retries to set for all reading and writing with the BaseStation.

useEepromCache
void useEepromCache(
bool useCache
)

Sets whether or not to utilize the eeprom cache when configuring this BaseStation (default of enabled). This can be enabled/disabled at any time.  Note:  The eeprom cache stores the last known value that was written to / read from the BaseStation for each eeprom location. If this is enabled, any reads will get the last known value from the cache if it exists, and any writes will not write to the BaseStation if the value attempting to be written is the same as that stored in the cache. Caching of these values will still be performed if this is disabled, however, read and write operations will then always reach out to the actual device.

Parameters
useCache
bool

whether the eeprom cache should be used (true) or not (false).

clearEepromCache
void clearEepromCache()

Clears the eeprom cache for this BaseStation.

frequency
WirelessTypes::Frequency frequency() const

Gets the WirelessTypes::Frequency representing the radio frequency of this BaseStation.  If the frequency is unknown, it will be read from the BaseStation.

Returns

The WirelessTypes::Frequency that this BaseStation is on.

Exceptions
regionCode
WirelessTypes::RegionCode regionCode() const

Gets the WirelessTypes::RegionCode representing the region of this BaseStation.

Returns

The WirelessTypes::RegionCode of this BaseStation.

Exceptions
firmwareVersion
Version firmwareVersion() const

Gets the firmware version of the BaseStation.

Returns

A Version representing the firmware version of the BaseStation.

Exceptions
model
WirelessModels::BaseModel model() const

Gets the model of the BaseStation.

Returns

A WirelessModels::BaseModel representing the model of the BaseStation.

Exceptions
serial
std::string serial() const

Gets the serial number of the BaseStation.

Returns

A string representing the serial number of the BaseStation.

Exceptions
microcontroller
WirelessTypes::MicroControllerType microcontroller() const

Gets the microcontroller of the BaseStation.

Returns

A WirelessTypes::MicroControllerType representing the microcontroller of the BaseStation.

Exceptions
getData
void getData(
std::vector<DataSweep&sweeps,
uint32 timeout 0,
uint32 maxSweeps 0
)

Gets up to the requested amount of DataSweeps of sampled data that was collected by this BaseStation.

Parameters
sweeps
std::vector<DataSweep>&

The vector of DataSweep to hold the result.

timeout
uint32

The timeout, in milliseconds, to wait for data if necessary (default of 0).

maxSweeps
uint32

The maximum number of sweeps to return. If this is 0 (default), all sweeps will be returned.

Exceptions
totalData
uint32 totalData()

Gets the number of DataSweeps that are currently in the data buffer.

Returns

The number of DataSweeps that are currently in the data buffer.

getNodeDiscoveries
NodeDiscoveries getNodeDiscoveries()

Gets the group of Node Discoveries that were collected by this base station.  Calling this function clears out the Node Discovery buffer, so repeatedly calling this will give you any new Node Discoveries.

Returns

A NodeDiscoveries container, holding all the Node Discoveries that were collected by this base station.

Exceptions
timeout
void timeout(
uint64 timeout
)

Sets the timeout to use when waiting for responses from commands.

Parameters
timeout
uint64

The timeout (in milliseconds) to set.

timeout
uint64 timeout() const

Gets the current timeout to use when waiting for responses from commands.

Returns

The timeout (in milliseconds) set.

nodeCommandsTimeout
uint64 nodeCommandsTimeout() const

Gets the current timeout to use when waiting for responses from node commands

Returns

A TimeSpan representing the timeout set for node commands

ping
virtual bool ping()

Pings the base station

Returns

true if successfully pinged the base station, false otherwise

Exceptions
readEeprom
virtual uint16 readEeprom(
uint16 eepromAddress
) const

Reads a specific EEPROM address on the BaseStation.  If the value stored in the eeprom cache is still valid, this will be returned instead.

Parameters
eepromAddress
uint16

The EEPROM address to be read.

Returns

The uint16 value read from the specified EEPROM location.

Exceptions
readEeprom
virtual Value readEeprom(
const EepromLocation &location
) const

Reads a value from the given EepromLocation of the BaseStation.  If the value stored in the eeprom cache is still valid, this will be returned instead.

Parameters
location

The EepromLocation to read from.

Returns

The value read from the specified EEPROM location as a Value object.

Exceptions
writeEeprom
virtual void writeEeprom(
uint16 eepromAddress,
uint16 value
)

Writes the specified uint16 value to a specific EEPROM address on the BaseStation.  If successful, the cache will be updated with the changed value as well.

Parameters
eepromAddress
uint16

The EEPROM address to write to.

value
uint16

The value to write to the EEPROM address.

Exceptions
writeEeprom
virtual void writeEeprom(
const EepromLocation &location,
const Value &val
)

Writes a value to the given EepromLocation of the BaseStation.  If successful, the cache will be updated with the changed value as well.

Parameters
location

The specific EepromLocation to write to.

value

The value to write to the eeprom location, as a Value.

Exceptions
enableBeacon
virtual Timestamp enableBeacon()

Enables the beacon on the base station using the system time (UTC) as its starting timestamp.

Returns

A Timestamp representing the initial time that was sent to start the beacon

Exceptions
enableBeacon
virtual Timestamp enableBeacon(
uint32 utcTime
)

Enables the beacon on the base station using the given UTC timestamp.

Parameters
utcTime
uint32

The start time for the beacon in UTC seconds from the Unix Epoch (01/01/1970)

Returns

A Timestamp representing the initial time that was sent to start the beacon

Exceptions
disableBeacon
virtual void disableBeacon()

Disables the beacon on the base station.

Exceptions
beaconStatus
virtual BeaconStatus beaconStatus()

Gets the BeaconStatus of the beacon on the BaseStation.

Exceptions
startRfSweepMode
virtual void startRfSweepMode(
uint32 minFreq,
uint32 maxFreq,
uint32 interval,
uint16 options
)

Starts the BaseStation in RF Sweep Mode.

Exceptions
cyclePower
void cyclePower()

Cycles the power on the base station.

Exceptions
resetRadio
void resetRadio()

Resets the radio on the base station.

Exceptions
changeFrequency
void changeFrequency(
WirelessTypes::Frequency frequency
)

Changes the radio frequency of the base station.

Parameters
frequency

The WirelessTypes::Frequency to change the base station to.

Exceptions
verifyConfig
bool verifyConfig(
const BaseStationConfig &config,
ConfigIssues &outIssues
) const

Checks whether the settings in the given BaseStationConfig are ok to be written to the BaseStation.  Options that are set will also be validated against each other. If an option that needs to be validated isn't currently set, it will be read from the BaseStation.

Parameters
config

The BaseStationConfig to verify.

outIssues
ConfigIssues&

The ConfigIssues that will hold any resulting issues that are found with the configuration.

Returns

true if the configuration is valid. false if the configuration is invalid and outIssues should be checked for more information.

Exceptions
applyConfig
void applyConfig(
const BaseStationConfig &config
)

Applies a BaseStationConfig to the Node.

Parameters
config

The BaseStationConfig to apply to the Node.

Exceptions
getTransmitPower
WirelessTypes::TransmitPower getTransmitPower() const

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

Exceptions
getButtonLongPress
BaseStationButton getButtonLongPress(
uint8 buttonNumber
) const

Gets the current button settings for a long press action, as a BaseStationButton.

Parameters
buttonNumber
uint8

The button number (1 = button 1) to get the value for.

Exceptions
- Error_NotSupported

The BaseStation does not support the requested button.  - Error_Communication: Failed to read from the BaseStation.  - Error_Connection: A connection error has occurred with the BaseStation.

getButtonShortPress
BaseStationButton getButtonShortPress(
uint8 buttonNumber
) const

Gets the current button settings for a short press action, as a BaseStationButton.

Parameters
buttonNumber
uint8

The button number (1 = button 1) to get the value for.

Exceptions
- Error_NotSupported

The BaseStation does not support the requested button.  - Error_Communication: Failed to read from the BaseStation.  - Error_Connection: A connection error has occurred with the BaseStation.

getAnalogPairingEnabled
bool getAnalogPairingEnabled() const

Gets the current setting for if Analog Pairing is enabled or not.

Exceptions
getAnalogTimeoutTime
uint16 getAnalogTimeoutTime() const

Reads the Analog Timeout Time in seconds that is currently set on the BaseStation.

Exceptions
getAnalogTimeoutVoltage
float getAnalogTimeoutVoltage() const

Reads the Analog Timeout Voltage that is currently set on the BaseStation.

Exceptions
getAnalogExceedanceEnabled
bool getAnalogExceedanceEnabled() const

Reads the Analog Exceedance enabled/disabled setting that is currently set on the BaseStation.

Exceptions
getAnalogPair
BaseStationAnalogPair getAnalogPair(
uint8 portNumber
) const

Reads the BaseStationAnalogPair for the specified port number that is currently set on the BaseStation.

Parameters
portNumber
uint8

The port number (1 = port 1) to get the value for.

Exceptions
ping_v1
bool ping_v1()

Performs version 1 of the Ping BaseStation command.

Returns

true if successfully pinged the base station, false otherwise.

Exceptions
ping_v2
bool ping_v2()

Performs version 2 of the Ping BaseStation command.

Returns

true if successfully pinged the base station, false otherwise.

Exceptions
read_v1
bool read_v1(
uint16 eepromAddress,
uint16 &result
)

Performs version 1 of the Read BaseStation EEPROM command.

Parameters
eepromAddress
uint16

The Eeprom address to get the value for.

result
uint16&

The value that was read from Eeprom if successful.

Returns

true if the read was successful, false otherwise.

Exceptions
read_v2
bool read_v2(
uint16 eepromAddress,
uint16 &result
)

Performs version 2 of the Read BaseStation EEPROM command.

Parameters
eepromAddress
uint16

The Eeprom address to get the value for.

result
uint16&

The value that was read from Eeprom if successful.

Returns

true if the read was successful, false otherwise.

Exceptions
write_v1
bool write_v1(
uint16 eepromAddress,
uint16 value
)

Performs version 1 of the Write BaseStation EEPROM command.

Parameters
eepromAddress
uint16

The Eeprom address to set the value for.

value
uint16

The value to write to the Eeprom.

Returns

true if the write was successful, false otherwise.

Exceptions
write_v2
bool write_v2(
uint16 eepromAddress,
uint16 value
)

Performs version 2 of the Write BaseStation EEPROM command.

Parameters
eepromAddress
uint16

The Eeprom address to set the value for.

value
uint16

The value to write to the Eeprom.

Returns

true if the write was successful, false otherwise.

Exceptions
enableBeacon_v1
Timestamp enableBeacon_v1(
uint32 utcTime
)

Performs version 1 of the Enable Beacon command.

Parameters
utcTime
uint32

The start time for the beacon in UTC seconds from the Unix Epoch (01/01/1970).

Returns

A Timestamp representing the initial time that was sent to start the beacon.

Exceptions
enableBeacon_v2
Timestamp enableBeacon_v2(
uint32 utcTime
)

Performs version 2 of the Enable Beacon command.

Parameters
utcTime
uint32

The start time for the beacon in UTC seconds from the Unix Epoch (01/01/1970).

Returns

A Timestamp representing the initial time that was sent to start the beacon.

Exceptions
beaconStatus_v1
BeaconStatus beaconStatus_v1()

Performs version 1 of the Beacon Status command.

Returns

A BeaconStatus object containing status information of the beacon.

Exceptions
node_pageDownload_v1
bool node_pageDownload_v1(
NodeAddress nodeAddress,
uint16 pageIndex,
ByteStream &data
)

Performs Version 1 of the Node Page Download command.

Parameters
nodeAddress

The node address of the Node to download data from

pageIndex
uint16

The page index to download from the Node

data

Output parameter that contains the resulting data downloaded from the Node, if any

Returns

true if the page download command succeeded, false otherwise

Exceptions
node_shortPing_v1
bool node_shortPing_v1(
NodeAddress nodeAddress
)

Performs Version 1 of the Node Short Ping command.

Parameters
nodeAddress

The node address of the Node to short ping.

Returns

true if the short ping command succeeded, false otherwise.

Exceptions
node_shortPing_v2
bool node_shortPing_v2(
NodeAddress nodeAddress
)

Performs Version 2 of the Node Short Ping command.

Parameters
nodeAddress

The node address of the Node to short ping.

Returns

true if the short ping command succeeded, false otherwise.

Exceptions
node_readEeprom_v1
bool node_readEeprom_v1(
NodeAddress nodeAddress,
uint16 eepromAddress,
uint16 &eepromValue
)

Performs Version 1 of the Node Read Eeprom command.

Parameters
nodeAddress

the node address of the node to read from.

eepromAddress
uint16

the EEPROM address to read the value from.

eepromValue
uint16&

holds the result value read from EEPROM if successful.

Returns

true if the command was successful, false otherwise.

Exceptions
node_readEeprom_v2
bool node_readEeprom_v2(
NodeAddress nodeAddress,
uint16 eepromAddress,
uint16 &eepromValue
)

Performs Version 2 of the Node Read Eeprom command.

Parameters
nodeAddress

the node address of the node to read from.

eepromAddress
uint16

the EEPROM address to read the value from.

eepromValue
uint16&

holds the result value read from EEPROM if successful.

Returns

true if the command was successful, false otherwise.

Exceptions
node_writeEeprom_v1
bool node_writeEeprom_v1(
NodeAddress nodeAddress,
uint16 eepromAddress,
uint16 value
)

Performs Version 1 of the Node Write Eeprom command.

Parameters
nodeAddress

the node address of the node to write to.

eepromAddress
uint16

the EEPROM address to write the value to.

value
uint16

the value to write to EEPROM.

Returns

true if the write eeprom command succeeded, false otherwise.

Exceptions
node_writeEeprom_v2
bool node_writeEeprom_v2(
NodeAddress nodeAddress,
uint16 eepromAddress,
uint16 value
)

Performs Version 2 of the Node Write Eeprom command.

Parameters
nodeAddress

the node address of the node to write to.

eepromAddress
uint16

the EEPROM address to write the value to.

value
uint16

the value to write to EEPROM.

Returns

true if the write eeprom command succeeded, false otherwise.

Exceptions
node_autoBalance_v1
bool node_autoBalance_v1(
NodeAddress nodeAddress,
uint8 channelNumber,
float targetPercent,
AutoBalanceResult &result
)

Performs Version 1 of the Node AutoBalance command.

Parameters
nodeAddress

The node address of the Node to send the command to.

channelNumber
uint8

The channel number (ch1 = 1, ch8 = 8) to balance.

targetPercent
float

The target percentage (0 - 100) to balance to.

result

The AutoBalanceResult of the command (empty in the case of v1).

Returns

true if the command succeeded, false if it failed.

Exceptions
node_autoBalance_v2
bool node_autoBalance_v2(
NodeAddress nodeAddress,
uint8 channelNumber,
float targetPercent,
AutoBalanceResult &result
)

Performs Version 2 of the Node AutoBalance command.

Parameters
nodeAddress

The node address of the Node to send the command to.

channelNumber
uint8

The channel number (ch1 = 1, ch8 = 8) to balance.

targetPercent
float

The target percentage (0 - 100) to balance to.

result

The AutoBalanceResult of the command.

Returns

true if the command succeeded, false if it failed.

Exceptions
node_lastCommunicationTime
const Timestamp& node_lastCommunicationTime(
NodeAddress nodeAddress
)

Gets the Timestamp for the last time MSCL communicated with the given node address.

Parameters
nodeAddress

The node address of the Node to check for.

node_ping
virtual PingResponse node_ping(
NodeAddress nodeAddress
)

Pings the specified Node.

Parameters
nodeAddress

the node address of the Node to ping.

Returns

A PingResponse object that can be queried to get details of the ping command's response.

Exceptions
node_sleep
virtual bool node_sleep(
NodeAddress nodeAddress
)

Puts the Node into a low power, sleep mode.  This command attempts to ping the node before sending the sleep command, to verify communication.

Parameters
nodeAddress

The node adderss of the Node to put to sleep.

Returns

true if the sleep command was successful, false otherwise.

Exceptions
node_setToIdle
virtual SetToIdleStatus node_setToIdle(
NodeAddress nodeAddress,
const BaseStation &base
)

Attempts to set the node to idle so that it can be communicated with.

Parameters
nodeAddress

the node address of the node to ping.

base

A reference to the BaseStation that will be used for setting the node to idle.

Returns

A SetToIdleStatus object that can be queried to get the status of the Set to Idle operation.

Exceptions
node_shortPing
bool node_shortPing(
NodeAddress nodeAddress
)

Pings a specific node.

Parameters
nodeAddress

the node address of the node to ping.

Returns

true if successfully pinged the node, false otherwise

Exceptions
node_readEeprom
virtual bool node_readEeprom(
const WirelessProtocol &nodeProtocol,
NodeAddress nodeAddress,
uint16 eepromAddress,
uint16 &eepromValue
)

Reads a value from EEPROM on the specified Node.

Parameters
nodeProtocol

the WirelessProtocol for the Node.

nodeAddress

the node address of the Node to read from.

eepromAddress
uint16

the EEPROM address to read the value from.

eepromValue
uint16&

holds the result value read from EEPROM if successful.

Returns

true if the command was successful, false otherwise.

Exceptions
node_writeEeprom
virtual bool node_writeEeprom(
const WirelessProtocol &nodeProtocol,
NodeAddress nodeAddress,
uint16 eepromAddress,
uint16 value
)

Writes a value to EEPROM on the specified Node.

Parameters
nodeProtocol

the WirelessProtocol for the Node.

nodeAddress

the node address of the node to write to.

eepromAddress
uint16

the EEPROM address to write the value to.

value
uint16

the value to write to EEPROM.

Returns

true if the write eeprom command succeeded, false otherwise.

Exceptions
node_pageDownload
virtual bool node_pageDownload(
const WirelessProtocol &nodeProtocol,
NodeAddress nodeAddress,
uint16 pageIndex,
ByteStream &data
)

Download a page of logged data from the Node

Parameters
nodeProtocol

The WirelessProtocol for the Node.

nodeAddress

The node address of the Node to download data from

pageIndex
uint16

The page index to download from the Node

data

Output parameter that contains the resulting data downloaded from the Node, if any

Returns

true if the page download command succeeded, false otherwise

Exceptions
node_startSyncSampling
virtual bool node_startSyncSampling(
NodeAddress nodeAddress
)

Sends the Start Synchronized Sampling command to a Node.

Parameters
nodeAddress

The node address of the Node to send the command to.

Returns

true if the Start Sync Sampling command succeeded, false otherwise.

Exceptions
node_startSyncSampling

Sends the Start Non-Synchronized Sampling command to a Node.

Parameters
nodeAddress

The node address of the Node to send the command to.

Exceptions
node_armForDatalogging
virtual bool node_armForDatalogging(
NodeAddress nodeAddress,
const std::string &message
)

Sends the Arm For Datalogging command to a Node.

Parameters
nodeAddress

The node address of the Node to send the command to.

message
const std::string&

A message, up to 50 characters, to send with the arm command. This message can be downloaded with the data. Will be trimmed to 50 chars if longer.

Returns

true if the Arm For Datalogging command succeeded, false otherwise.

Exceptions
node_triggerArmedDatalogging
virtual void node_triggerArmedDatalogging(
NodeAddress nodeAddress
)

Sends the Trigger Armed Datalogging command to a Node.

Parameters
nodeAddress

The node address of the Node to send the command to.

Exceptions
node_erase
virtual bool node_erase(
NodeAddress nodeAddress
)

Sends the Erase command to a Node.

Parameters
nodeAddress

The node address of the Node to send the command to.

Exceptions
node_autoBalance
virtual bool node_autoBalance(
const WirelessProtocol &nodeProtocol,
NodeAddress nodeAddress,
uint8 channelNumber,
float targetPercent,
AutoBalanceResult &result
)

Sends the AutoBalance command to a Node.

Parameters
nodeProtocol

The WirelessProtocol for the Node.

nodeAddress

The node address of the Node to send the command to.

channelNumber
uint8

The channel number (ch1 = 1, ch8 = 8) to balance.

targetPercent
float

The target percentage (0 - 100) to balance to.

result

The AutoBalanceResult of the command.

Returns

true if the command succeeded, false if it failed.

Exceptions
node_autocal
bool node_autocal(
NodeAddress nodeAddress,
WirelessModels::NodeModel model,
const Version &fwVersion,
AutoCalResult &result
)

Performs automatic calibration for a Wireless Node.

Parameters
nodeAddress

The node address of the Node to send the command to.

model

The WirelessModels::NodeModel of the Node.

fwVersion
const Version&

The firmware Version of the Node.

result

The AutoCalResult reference to hold the result.

Returns

true if the AutoCal command was successful, false otherwise.

Exceptions
node_readSingleSensor
bool node_readSingleSensor(
NodeAddress nodeAddress,
uint8 channelNumber,
uint16 &result
)

Reads the bits value for a single channel on a Wireless Node.

Parameters
nodeAddress

The node address of the Node to send the command to.

channelNumber
uint8

The channel number (ch1 = 1, ch8 = 8) to read.

result
uint16&

Holds the bits value result from the channel on the Node.

Returns

true if the Read Single Sensor command was successful, false otherwise.

Exceptions