mavtables
0.2.1
MAVLink router and firewall.
|
#include <AddressPool.hpp>
Public Member Functions | |
AddressPool (std::chrono::milliseconds timeout=std::chrono::milliseconds(120000)) | |
TEST_VIRTUAL | ~AddressPool ()=default |
TEST_VIRTUAL void | add (MAVAddress address) |
TEST_VIRTUAL std::vector< MAVAddress > | addresses () |
TEST_VIRTUAL bool | contains (const MAVAddress &address) |
A threadsafe container for addresses that expire after a given time.
Definition at line 34 of file AddressPool.hpp.
AddressPool< TC >::AddressPool | ( | std::chrono::milliseconds | timeout = std::chrono::milliseconds(120000) | ) |
Construct a new address pool.
timeout | The amount of time (in milliseconds) before a component will be considered offline and removed from the pool, unless its time is updated with add. |
Definition at line 60 of file AddressPool.hpp.
|
default |
void AddressPool< TC >::add | ( | MAVAddress | address | ) |
Add a MAVLink address to the pool.
address | The MAVLink address to add or update the timeout for. |
Definition at line 77 of file AddressPool.hpp.
std::vector< MAVAddress > AddressPool< TC >::addresses | ( | ) |
Get a vector of all the addresses in the pool.
Definition at line 94 of file AddressPool.hpp.
bool AddressPool< TC >::contains | ( | const MAVAddress & | address | ) |
Determine if the pool contains a given MAVLink address.
address | The MAVLink address to test for. |
true | If the pool contains address . |
false | If the pool does not contain address . |
Definition at line 129 of file AddressPool.hpp.