|
HEBI C++ API
1.0.0-rc1
|
Maintains a registry of network-connected modules and returns Group objects to the user. More...
#include <lookup.hpp>
Classes | |
| class | EntryList |
Public Member Functions | |
| Lookup () | |
| Creates a Lookup object which can create Module and Group references. Typically, only one Lookup object should exist at a time. More... | |
| virtual | ~Lookup () noexcept |
| Destructor frees all resources created by Lookup object, and stops the background query thread. More... | |
| std::shared_ptr< Group > | getGroupFromNames (const std::vector< std::string > &families, const std::vector< std::string > &names, long timeout_ms=DEFAULT_TIMEOUT) |
| Get a group from modules with the given names and families. More... | |
| std::shared_ptr< Group > | getGroupFromMacs (const std::vector< MacAddress > &addresses, long timeout_ms=DEFAULT_TIMEOUT) |
| Get a group from modules with the given mac addresses. More... | |
| std::shared_ptr< Group > | getGroupFromFamily (const std::string &family, long timeout_ms=DEFAULT_TIMEOUT) |
| Get a group from all known modules with the given family. More... | |
| std::shared_ptr< Group > | getConnectedGroupFromName (const std::string &family, const std::string &name, long timeout_ms=DEFAULT_TIMEOUT) |
| Get a group from all modules known to connect to a module with the given name and family. More... | |
| std::shared_ptr< Group > | getConnectedGroupFromMac (const MacAddress &address, long timeout_ms=DEFAULT_TIMEOUT) |
| Get a group from all modules known to connect to a module with the given mac address. More... | |
| std::shared_ptr< EntryList > | getEntryList () |
Maintains a registry of network-connected modules and returns Group objects to the user.
Only one Lookup object is needed per application.
| hebi::Lookup::Lookup | ( | ) |
|
virtualnoexcept |
Destructor frees all resources created by Lookup object, and stops the background query thread.
| std::shared_ptr< Group > hebi::Lookup::getGroupFromNames | ( | const std::vector< std::string > & | families, |
| const std::vector< std::string > & | names, | ||
| long | timeout_ms = DEFAULT_TIMEOUT |
||
| ) |
Get a group from modules with the given names and families.
If one of the input vectors is of length one, then that element is assumed to pair with each item in the other input vector.
Blocking call which returns a reference to a Group object with the given parameters. Times out after timeout_msec milliseconds.
| families | A list of families of desired group modules, as viewable in the HEBI GUI. If of length one, this family is paried with each given name. |
| names | A list of names of desired group modules, as viewable in the HEBI GUI. If of length one, this name is paired with each given family |
| timeout_ms | Timeout in milliseconds. A value of -1 blocks until a group is found, and a value of 0 returns immediately if no group with that address is currently known by the Lookup class. |
| std::shared_ptr< Group > hebi::Lookup::getGroupFromMacs | ( | const std::vector< MacAddress > & | addresses, |
| long | timeout_ms = DEFAULT_TIMEOUT |
||
| ) |
Get a group from modules with the given mac addresses.
Blocking call which returns a reference to a Group object with the given parameters. Times out after timeout_msec milliseconds.
| addresses | List of physical mac addresses for desired group modules. |
| timeout_ms | Timeout in milliseconds. A value of -1 blocks until a group is found, and a value of 0 returns immediately if no group with that address is currently known by the Lookup class. |
| std::shared_ptr< Group > hebi::Lookup::getGroupFromFamily | ( | const std::string & | family, |
| long | timeout_ms = DEFAULT_TIMEOUT |
||
| ) |
Get a group from all known modules with the given family.
Blocking call which returns a reference to a Group object with the given parameters. Times out after timeout_msec milliseconds.
| family | The family of each of the desired group modules. |
| timeout_ms | Timeout in milliseconds. A value of -1 blocks until a group is found, and a value of 0 returns immediately if no group with that address is currently known by the Lookup class. |
| std::shared_ptr< Group > hebi::Lookup::getConnectedGroupFromName | ( | const std::string & | family, |
| const std::string & | name, | ||
| long | timeout_ms = DEFAULT_TIMEOUT |
||
| ) |
Get a group from all modules known to connect to a module with the given name and family.
Blocking call which returns a reference to a Group object with the given parameters. Times out after timeout_msec milliseconds.
| family | The given family of the module, as viewable in the HEBI GUI, to form the group from. |
| name | The given name of the module, as viewable in the HEBI GUI, to form the group from. |
| timeout_ms | Timeout in milliseconds. A value of -1 blocks until a group is found, and a value of 0 returns immediately if no group with that address is currently known by the Lookup class. |
| std::shared_ptr< Group > hebi::Lookup::getConnectedGroupFromMac | ( | const MacAddress & | address, |
| long | timeout_ms = DEFAULT_TIMEOUT |
||
| ) |
Get a group from all modules known to connect to a module with the given mac address.
Blocking call which returns a reference to a Group object with the given parameters. Times out after timeout_msec milliseconds.
| address | Physical mac address of the module to form the group from. |
| timeout_ms | Timeout in milliseconds. A value of -1 blocks until a group is found, and a value of 0 returns immediately if no group with that address is currently known by the Lookup class. |
| std::shared_ptr< Lookup::EntryList > hebi::Lookup::getEntryList | ( | ) |