WirelessNode( |
| ) |
Creates a WirelessNode object
nodeAddress uint16 | the node address of the node |
base | the node's parent Base Station |
Destroys a WirelessNode object
The WirelessNode_Impl class that contains all the implementation logic for the WirelessNode class.
static std::string deviceName( |
| ) |
Static function for creating the universal sensor name that should be used for SensorCloud.
nodeAddress uint16 | The node address of the wireless node. This should be identical to calling the nodeAddress function on a WirelessNode object. |
The universal sensor name.
Gets a reference to the NodeFeatures for this Node. Note: This will be invalid when the WirelessNode is destroyed.
A NodeFeatures reference containing the features for this Node.
Error_NotSupported: The Node model is not supported by MSCL.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the Timestamp for the last time MSCL communicated with the Node. Note: This is per BaseStation. If the parent BaseStation is changed, the last communication time will be reset. Note: EEPROM reads using the cache, and data collection, will not update this timestamp.
A Timestamp representing the last time MSCL communicated with the Node. This will be a Timestamp of 0 if never communicated with.
void setBaseStation( |
| ) |
Sets the node's parent Base Station, which will perform all communication with the node
base | the BaseStation object to be assigned to the node, which will perform all communication with the node |
Gets a reference to the BaseStation that is assigned to this Node.
A reference to the BaseStation that is assigned to this Node.
bool hasBaseStation( |
| ) const |
Checks whether the given BaseStation is the same BaseStation that is assigned to this Node.
basestation const BaseStation& | The BaseStation to check if it is the same as this Node's parent BaseStation. |
true if the basestation is the same as this Node's parent BaseStation, false if it is different.
void useGroupRead( |
| ) |
Enables or disables the use of group eeprom read when trying to read a single value (enabled by default). Note: In most cases, leaving this enabled will provide better performance, allowing the cache to be built quicker, requiring less communication to the actual device. However, in some cases such as with very high traffic, it may be beneficial to restrict reads to use the single commands, as the packets are smaller over the air.
useGroup bool | Whether the group eeprom read commands can be used (true) or whether to restrict to single eeprom reads (false). |
void readWriteRetries( |
| ) |
Sets the number of retry attempts for reading and writing with the Node. By default, the number of retries is 0. Note: The timeout that is set per command will be per read and write attempt, meaning this retry number is multiplied by the timeout for your overall timeout.
numRetries uint8 | The number of retries to set for all reading and writing with the Node. |
void useEepromCache( |
| ) |
Sets whether or not to utilize the eeprom cache when configuring this Node (enabled by default). This can be enabled/disabled at any time. It is highly recommended to have eeprom caching be enabled. Note: The eeprom cache stores the last known value that was written to / read from the Node 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 Node 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.
useCache bool | whether the eeprom cache should be used (true) or not (false). |
Clears the eeprom cache for this Node.
Gets the node address of the Node.
The node address of the Node
Gets the frequency that the Node is on.
A WirelessTypes::Frequency that the Node is on.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read the value from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the firmware version of the Node.
A Version representing the firmware version of the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read the value from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the model of the Node.
A WirelessModels::NodeModel representing the model of the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read the value from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the serial number of the Node.
A string representing the serial number of the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read the value from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the name of the Node. This is the universal sensor name that should be used for uploading to SensorCloud. This is the same as calling WirelessNode::deviceName.
The universal sensor name.
Gets the microcontroller of the Node.
A WirelessTypes::MicroControllerType representing the microcontroller of the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read the value from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the RadioFeatures of the Node.
The RadioFeatures of the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read the value from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the number of bytes available for data storage on the Node.
The number of bytes avaialbe
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read the value from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the region code currently set on the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Performs a Quick Ping (Short Ping) command on the Node. The Base Station itself responds with a quick success/fail on the Node. Note: Use the standard ping command instead of this if you want to obtain RSSI values.
true if the quick ping was successful, false otherwise.
Error_Communication: Failed to determine the protocol version of the BaseStation.
Error_Connection: A connection error has occurred with the parent BaseStation.
Performs a Long Ping command on the Node to check the communication between the Base Station and the Node. The response to this command contains the Node and BaseStation RSSI values. Note: You may want to use the quickPing command instead of this if RSSI values are not of importance.
A PingResponse object that can be queried to get details of the ping command's response, including RSSI values.
Error_Connection: A connection error has occurred with the parent BaseStation
Puts the Node into a low power, sleep mode. This command attempts to ping the node before sending the sleep command, to verify communication.
true if the sleep command was successful, false otherwise.
Error_Connection: A connection error has occurred with the BaseStation.
Cycles the power on the Node. Many configuration changes that are applied to the node do not take affect until the power is cycled.
Error_NotSupported: Attempted to write an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to write the value to the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Resets the radio on the Node.
Error_NotSupported: Attempted to write an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to write the value to the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
void changeFrequency( |
| ) |
Changes the radio frequency of the Node. Note: If successful, the Node will be put onto a different frequency than its parent base station. It is up to the user of MSCL to switch the base station to this frequency if you wish to communicate with it.
frequency | The WirelessTypes::Frequency to change the Node to. |
Error_NotSupported: Attempted to write an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to write the value to the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Attempts to set the Node to the Idle state. This will stop the node from sampling or sleeping, and put it into an idle state so that it may be communicated with (configured, started sampling, etc). This command may take up to 2 minutes. The returned SetToIdleStatus object may be used to determine the current status of the Set to Idle operation.
A SetToIdleStatus object which can be used to get the current status of the ongoing Set to Idle operation, as well as cancel the operation altogether.
Error_Connection: A connection error has occurred with the parent BaseStation.
Erases all logged data on the Node. Note: Erasing the data on the Node may take up to 30 seconds to complete for some devices. This command will return immediately while the Node is being erased. If you wish to check the status of the Erase operation, you can continuously ping the Node. A successful ping means the erase has completed.
Error_NodeCommunication: Failed to erase the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Starts the Node in Non-Synchronized Sampling Mode. This will immediately start the Node sampling, with the current Sampling settings that are applied to the Node. Note: To start the Node in Synchronized Sampling Mode, use the SyncSamplingNetwork class.
Error_Connection: A connection error has occurred with the parent BaseStation.
Error_InvalidNodeConfig: The Configuration of the Node is not set for Non-Sync Sampling Mode.
Clears the Histogram on the Node. See Also: NodeFeatures::supportsHistogramConfig
Error_NotSupported: Histogram configuration is not supported by the Node.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
AutoBalanceResult autoBalance( |
| ) |
Performs an Auto Balance command on a specified channel on the Node. This adjusts the sensor offset for differential channels to affect range.
See Also: getHardwareOffset, WirelessNodeConfig::hardwareOffset
mask const ChannelMask& | The ChannelMask to perform the auto balance command on. |
targetPercent float | The percentage (0.0 - 100.0) of the range to balance to (low = 25%, midscale = 50%, high = 75%). |
The AutoBalanceResult containing information from the auto balance command.
Error_NotSupported: Autobalance is not supported by the Node or channel mask specified.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Performs automatic calibration for the SHM-Link Wireless Node. See Also: NodeFeatures::supportsAutoCal
The AutoCalResult_shmLink containing the result of the auto cal operation.
Error_NotSupported: Autocal configuration is not supported by the Node or The node is an invalid model for this command.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
uint16 readEeprom( |
| ) const |
Reads a uint16 from the given eeprom location of the node. This may use a page download or a read eeprom command. If the value stored in the eeprom cache is still valid, this will be returned instead. Note: This is an advanced command. In most cases you should use the built in commands for reading a Node's configuration options.
location uint16 | The specific eeprom location to read from |
The uint16 value read from the specified EEPROM location
Error_NotSupported: Attempted to read an unsupported eeprom location.
Error_NodeCommunication: Failed to read the value from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
void writeEeprom( |
| ) |
Writes a uint16 to the given eeprom location of the node. If successful, the cache will be updated with the changed value as well. Note: This is an advanced command. In most cases you should use the built in commands for changing a Node's configuration options.
location uint16 | The specific eeprom location to write to |
value uint16 | The uint16 value to write to the eeprom location |
Error_NotSupported: Unsupported eeprom location or value.
Error_NodeCommunication: Failed to write the value to the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
bool verifyConfig( |
| ) const |
Checks whether the settings in the given WirelessNodeConfig are ok to be written to the Node. 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 Node. (ex. if sample rate is set, but sampling mode isn't, the sampling mode will be read from the Node for validating the sample rate)
config const WirelessNodeConfig& | The WirelessNodeConfig to verify. |
outIssues ConfigIssues& | The ConfigIssues that will hold 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_NotSupported: The Node model, or firmware version, is not supported by MSCL.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
void applyConfig( |
| ) |
Applies a WirelessNodeConfig to the Node. Note: This applies all options that have been set in the WirelessNodeConfig. Before applying, the options will be validated. It is recommended that you perform this validation yourself first by using verifyConfig.
config const WirelessNodeConfig& | The WirelessNodeConfig to apply to the Node. |
Error_NotSupported: The Node model, or firmware version, is not supported by MSCL.
Error_InvalidNodeConfig: Invalid Configuration. Check the exception for specific details.
Error_NodeCommunication: Failed to write to the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Reads the number of datalog sessions that are currently stored on the Node.
The number of datalog sessions that are stored on the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Reads the WirelessTypes::DefaultMode that is currently set on the Node.
The default mode that is currently set on the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Reads the user inactivity timeout that is currently set on the Node. This controls how many seconds before the Node goes to sleep when idle.
The user inactivity timeout (in seconds) that is currently set on the Node. Note: A value of 65535 (0xFFFF) disables the inactivity timeout so that the Node never goes to sleep.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Reads the check radio interval that is currently set on the Node. This controls how often the Node wakes up from sleep to check for commands.
The check radio interval (in seconds) that is currently set on the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Reads the WirelessTypes::TransmitPower that is currently set on the Node.
The WirelessTypes::TransmitPower that is currently set on the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the WirelessTypes::SamplingMode that is currently set on the Node.
The WirelessTypes::SamplingMode that is currently set on the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the ChannelMask currently set on the Node, representing which channels are enabled and disabled.
The ChannelMask currently set on the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the WirelessTypes::WirelessSampleRate currently set on the Node.
A WirelessTypes::WirelessSampleRate that is currently set on the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the number of sweeps currently set on the Node, which affects the duration of sampling if unlimited duration is disabled, or the duration of each burst if the sampling mode is Sync Sampling Burst.
The number of sweeps currently set on the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets whether or not unlimited sampling duration is enabled on the Node.
true if unlimited sampling duration is enabled on the Node, false if it is disabled.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the WirelessTypes::DataFormat that is currently set on the Node.
The WirelessTypes::DataFormat currently set on the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the WirelessTypes::DataCollectionMethod that is currently set on the Node, representing how the data will be collected. Note: this has no affect if the sampling mode is Armed Datalogging, as this mode only operates in "log only".
The WirelessTypes::DataCollectionMethod currently set on the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the amount of time between each burst currently set on the Node. This is only used if the sampling mode is Synchronized Sampling Burst.
A TimeSpan representing the amount of time between each burst currently set on the Node.
Error_NotSupported: Burst Sampling mode is not supported by the Node.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the lost beacon timeout, in minutes, currently set on the Node. If the Node is Sync Sampling and loses the beacon for a length of time greater than this value, then the node drops into a sleep mode. The Node will re-enter sync sampling within 2 minutes of the beacon reappearing. Note: A value of 0 means the lost beacon timeout is disabled. See Also: NodeFeatures::supportsLostBeaconTimeout
The lost beacon timeout, in minutes, currently set on the Node.
Error_NotSupported: Attempted to read an unsupported option. The device firmware is not compatible with this version of MSCL.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
double getHardwareGain( |
| ) const |
Reads the hardware gain of the specified ChannelMask currently set on the Node. See Also: NodeFeatures::channelGroups, NodeFeatures::supportsHardwareGain
mask const ChannelMask& | The ChannelMask of the hardware gain to read. |
The hardware gain currently set on the Node for the ChannelMask.
Error_NotSupported: Hardware gain is not supported for the provided ChannelMask.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
uint16 getHardwareOffset( |
| ) const |
Reads the hardware offset of the specified ChannelMask currently set on the Node. See Also: NodeFeatures::channelGroups, NodeFeatures::supportsHardwareOffset
mask const ChannelMask& | The ChannelMask of the hardware offset to read. |
The hardware offset currently set on the Node for the ChannelMask.
Error_NotSupported: Hardware offset is not supported for the provided ChannelMask.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
float getGaugeFactor( |
| ) const |
Reads the gauge factor of the specified ChannelMask currently set on the Node. See Also: NodeFeatures::channelGroups, NodeFeatures::supportsGaugeFactor
mask const ChannelMask& | The ChannelMask of the gauge factor to read. |
The gauge factor currently set on the Node for the ChannelMask.
Error_NotSupported: Gauge Factor is not supported for the provided ChannelMask.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
LinearEquation getLinearEquation( |
| ) const |
Gets the linear equation of the specified ChannelMask currently set on the Node.
mask const ChannelMask& | The ChannelMask of the linear equation to read. |
A LinearEquation object representing the linear equation that is applied to this ChannelMask.
Error_NotSupported: Linear Equation is not supported for the provided ChannelMask.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
WirelessTypes::CalCoef_Unit getUnit( |
| ) const |
Reads the unit of the specified ChannelMask currently set on the Node. Note: This unit is just used for reference (such as when downloading logged data) and does not affect the actual data value.
mask const ChannelMask& | The ChannelMask of the unit to read. |
The WirelessTypes::CalCoef_Unit that is applied to this ChannelMask
Error_NotSupported: Unit is not supported for the provided ChannelMask.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
WirelessTypes::CalCoef_EquationType getEquationType( |
| ) const |
Reads the WirelessTypes::CalCoef_EquationType of the specified ChannelMask currently set on the Node.
mask const ChannelMask& | The ChannelMask of the equation type to read. |
The WirelessTypes::CalCoef_EquationType currently set on the Node for this ChannelMask.
Error_NotSupported: The Equation Type setting is not supported for the provided ChannelMask.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
WirelessTypes::SettlingTime getFilterSettlingTime( |
| ) const |
Gets the filter settling time of the specified ChannelMask currently set on the Node. See Also: NodeFeatures::channelGroups
mask const ChannelMask& | The ChannelMask of the filter settling time to read. |
The WirelessTypes::SettlingTime currently set on the Node for the ChannelMask.
Error_NotSupported: Filter Settling Time is not supported for the provided ChannelMask.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
WirelessTypes::ThermocoupleType getThermocoupleType( |
| ) const |
Reads the WirelessTypes::ThermocoupleType of the specified ChannelMask currently set on the Node. See Also: NodeFeatures::channelGroups
mask const ChannelMask& | The ChannelMask of the thermocouple type to read. |
The WirelessTypes::ThermocoupleType currently set on the Node for the <ChannelMask.
Error_NotSupported: Thermocouple Type is not supported for the provided ChannelMask.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Reads the FatigueOptions currently set on the Node. See Also: NodeFeatures::supportsFatigueConfig
The FatigueOptions currently set on the Node.
Error_NotSupported: FatigueOptions configuration is not supported by this Node.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Reads the HistogramOptions currently set on the Node. See Also: NodeFeatures::supportsHistogramConfig
The HistogramOptions currently set on the Node.
Error_NotSupported: HistogramOptions configuration is not supported by this Node.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Reads the ActivitySense options currently set on the Node. See Also: NodeFeatures::supportsActivitySense
The ActivitySense options currently set on the Node.
Error_NotSupported: ActivitySense configuration is not supported by this Node.
Error_NodeCommunication: Failed to read from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.