Used to configure and start a Synchronized Sampling network of wireless nodes.
explicit SyncSamplingNetwork( |
| ) |
Creates a SyncSamplingNetwork object used to configure and start a Synchronized Sampling network.
networkBaseStation const BaseStation& | The master BaseStation that will be the parent base station for this network, performing all the communication with the Nodes. |
void addNode( |
| ) |
Adds a WirelessNode to the Sync Sampling network. If the Node already exists in the network, it will not be added. The Node's parent BaseStation should be the same as the network's master BaseStation. The Node should have its sampling configuration set to a Synchronized Sampling mode prior to adding to be successfully added.
node | The WirelessNode to add to the network. |
Error: The Node's parent BaseStation is different than the network's master BaseStation.
Error_InvalidNodeConfig: The configuration is not set for Synchronized Sampling mode.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Error_UnknownSampleRate: The sample rate value read from the Node is not a valid SampleRate.
void addNode( |
| ) |
Adds a WirelessNode to the Sync Sampling network. If the Node already exists in the network, it will not be added. The Node's parent BaseStation should be the same as the network's master BaseStation. The Node should have its sampling configuration set to a Synchronized Sampling mode prior to adding to be successfully added.
node | The WirelessNode to add to the network. |
pendingConfig const WirelessNodeConfig& | A pending WirelessNodeConfig to set for the node. This will be used in all network calculations. |
Error: The Node's parent BaseStation is different than the network's master BaseStation.
Error_InvalidNodeConfig: The configuration is not set for Synchronized Sampling mode.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Error_UnknownSampleRate: The sample rate value read from the Node is not a valid SampleRate.
void removeNode( |
| ) |
Removes a WirelessNode from the Sync Sampling network, if it exists in the network.
nodeAddress | The node address of the WirelessNode to be removed. |
Error_NodeCommunication: Failed to communicate with a Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Gets the total percent bandwidth for the Sync Sampling Network. This includes nodes that could not find TDMA slots, but does not include nodes who failed to communicate (status of <status_PoorCommunication>).
The percent of bandwidth for the entire Sync Sampling Network.
Gets whether the Sync Sampling Network is OK (true), or has problems such as exceeding bandwidth (false).
true if the network is OK (all nodes fit in the network, no communication issues, etc.), false if the network has a problem.
Refreshes the Sync Sampling Network. This function must be called when any WirelessNode has changed its configuration after being added to the network!
Error_NodeCommunication: Failed to communicate with a Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Error_UnknownSampleRate: The sample rate value read from a Node is not a valid SampleRate.
Gets whether the lossless option is enabled or not for the entire network (default of enabled). The lossless feature enables buffering and retransmissions in order to provide 100% packet success rate under most operating conditions. This does, however, have a possible increase in latency, especially in poor RF environments.
true if the lossless option is enabled, false if it is disabled.
void lossless( |
| ) |
Enables or Disables the lossless option for the entire network. If changed, refresh will be called. The lossless feature enables buffering and retransmissions in order to provide 100% packet success rate under most operating conditions. This can, however, cause a possible increase in latency, especially in poor RF environments.
enable bool | Whether the lossless option should be enabled (true) or disabled (false). |
Error_NodeCommunication: Failed to communicate with a Node.
Error_Connection: A connection error has occurred a BaseStation.
Error_UnknownSampleRate: The sample rate value read from a Node is not a valid SampleRate.
Gets whether the high capacity option is enabled or not for the entire network (default of false). The high capacity feature reduces transmit rates in order to optimize bandwidth and power savings among nodes with slower sample rates. This can, however, increase the transmit interval from 1 second to (1 to 16) seconds.
true if the high capacity option is enabled, false if it is disabled.
void highCapacity( |
| ) |
Enables or Disables the high capacity option for the entire network. If changed, refresh will be called. The high capacity feature reduces transmit rates in order to optimize bandwidth and power savings among nodes with slower sample rates. This can, however, increase the transmit interval from 1 second to (1 to 16) seconds.
enable bool | Whether the high capacity option should be enabled (true) or disabled (false). |
Error_NodeCommunication: Failed to communicate with a Node.
Error_Connection: A connection error has occurred with a BaseStation.
Error_UnknownSampleRate: The sample rate value read from a Node is not a valid SampleRate.
Applies the Sync Sampling network settings to all of the nodes in the network. This action is required before starting a Sync Sampling network. The network status must be OK before this can be called. Calling this function repeatedly will only affect the node's that haven't had their configuration applied successfully. This can be useful if some nodes successfully apply, while others fail to communicate. Note: This will clear any "pending" configurations that any nodes have in the network. You must manually apply those configuration templates to the nodes if you want them to actually be applied to the devices.
Error: The network status is not OK. Configuration cannot be applied.
Error_NodeCommunication: Failed to communicate with a Node.
Error_Connection: A connection error has occurred with a BaseStation.
Starts the network sampling by sending the start command to each node, and then starting the beacon on the master basestation with the current system time. applyConfiguration must be called before this function is called. Calling this function repeatedly will only start the node's that haven't been started already. This can be useful if some nodes successfully start, while others fail to communicate. The beacon will not be started until all nodes have started.
Error: The network configuration has not been applied. Cannot start sampling.
Error_Communication: The disable/enable beacon command has failed. The beacon has not been started.
Error_Connection: A connection error has occurred.
void startSampling( |
| ) |
Starts the network sampling by sending the start command to each node, and then starting the beacon on the master basestation with the given Timestamp. applyConfiguration must be called before this function is called. Calling this function repeatedly will only start the node's that haven't been started already. This can be useful if some nodes successfully start, while others fail to communicate. The beacon will not be started until all nodes have started.
startTime | The Timestamp to enable the beacon with, which ultimately determines the times for the nodes in the network. |
Error: The network configuration has not been applied. Cannot start sampling.
Error_Communication: The disable/enable beacon command has failed. The beacon has not been started.
Error_Connection: A connection error has occurred.
Sends the start command to each node in the network. The beacon is not started. Note: The nodes will not actually start sampling until they hear a beacon. applyConfiguration must be called before this function is called. Calling this function repeatedly will only start the node's that haven't been started already. This can be useful if some nodes successfully start, while others fail to communicate.
Error: The network configuration has not been applied. Cannot start sampling.
Error_Connection: A connection error has occurred.
SyncNetworkInfo& getNodeNetworkInfo( |
| ) |
Gets the SyncNetworkInfo object containing network information on the specified WirelessNode within the Sync Sampling network.
nodeAddress uint16 | The node address of the WirelessNode to find the network info of. This node must already be in the network. |
A constant reference to the SyncNetworkInfo containing the networking information for the specified node in the network.
Error: The node address was not found in the map.
void setPendingConfig( |
| ) |
Sets a pending configuration for a specific WirelessNode in the network. This is a configuration that is not actually applied to the Node, but used in all network calculations. In this way, you may see how some configuration changes affect the network bandwidth before applying the configuration. This function automatically calls refresh on the network.
nodeAddress uint16 | The node address of the WirelessNode to set the pending config for. |
config const WirelessNodeConfig& | The WirelessNodeConfig to set for the Node. |
Error: The node address was not found in the network. The configuration has not been set.
Error_InvalidNodeConfig: The configuration is not set for Synchronized Sampling mode.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
void clearPendingConfig( |
| ) |
Clears a pending config that is currently set for a specific WirelessNode in the network. By clearing the pending config, the network will recalculate using the configuration that is currently set on the Wireless Node. This function automatically calls refresh on the network.
nodeAddress uint16 | The node address of the WirelessNode to set the pending config for. |
Error: The node address was not found in the network. No changes have been made.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Clears all pending configurations that are currently set in the network. By clearing the pending configs, the network will recalculate using the configurations currently set on the Wireless Nodes. This function automatically calls refresh on the network if any pending configurations were cleared.
Error_NodeCommunication: Failed to communicate with a Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
void addNodeToNetwork( |
| ) |
Adds a WirelessNode to the Sync Sampling network, with or without a given pending WirelessNodeConfig. If the Node already exists in the network, it will not be added. The Node's parent BaseStation should be the same as the network's master BaseStation. The Node should have its sampling configuration, or the provided pending configuration, set to a Synchronized Sampling mode prior to adding to be successfully added.
node | The WirelessNode to add to the network. |
pendingConfig const WirelessNodeConfig* | The WirelessNodeConfig to add to the network (default of null). |
Error: The Node's parent BaseStation is different than the network's master BaseStation.
Error_InvalidNodeConfig: The configuration is not set for Synchronized Sampling mode.
Error_NodeCommunication: Failed to communicate with the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
Error_UnknownSampleRate: The sample rate value read from the Node is not a valid SampleRate.