Class that sets/matches expected responses, and stores all the wireless packets
The default constructor for the WirelessPacketCollector
The destructor for the WirelessPacketCollector
A circular buffer that holds NodeDiscovery objects
The current WirelessDataPacket in the buffer
A mutex used for thread safety when accessing/modifying the m_dataPackets buffer
A mutex used for thread safety when accessing/modifying the m_nodeDiscoveryPackets buffer
Allows the write to buffer thread to tell the reading thread when data is available
void addDataPacket( |
| ) |
Adds a data packet to the data packets circular buffer.
packet const WirelessPacket& | The WirelessPacket to be added to the buffer. |
void addNodeDiscoveryPacket( |
| ) |
Adds a Node Discovery packet to the circular buffer. The provided WirelessPacket must be a valid Node Discovery packet.
packet const WirelessPacket& | The WirelessPacket to be added to the buffer. |
void getDataSweeps( |
| ) |
Gets up to the requested amount of data sweeps that have been collected.
sweeps std::vector<DataSweep>& | A vector of DataSweep objects 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. |
Gets the total number of data sweeps that are currently in the buffer.
The total number of data sweeps that are currently in the buffer.
Gets a vector of NodeDiscovery objects that were collected
A NodeDiscoveries object contain all the NodeDiscovery objects that were collected
WirelessDataPacket getNextDataPacket( |
| ) |
Gets the next WirelessDataPacket in the buffer
timeout int | the timeout, in milliseconds, to wait for the next data packet if necessary |
The next WirelessDataPacket that was collected
Error_NoData: There are no more data packets to obtain