5 #include "hebi_lookup.h" 36 static const long DEFAULT_TIMEOUT = 500;
41 HebiLookupPtr lookup_;
81 std::shared_ptr<Group>
getGroupFromNames(
const std::vector<std::string>& families,
const std::vector<std::string>& names,
long timeout_ms=DEFAULT_TIMEOUT);
97 std::shared_ptr<Group>
getGroupFromMacs(
const std::vector<MacAddress>& addresses,
long timeout_ms=DEFAULT_TIMEOUT);
113 std::shared_ptr<Group>
getGroupFromFamily(
const std::string& family,
long timeout_ms=DEFAULT_TIMEOUT);
133 std::shared_ptr<Group>
getConnectedGroupFromName(
const std::string& family,
const std::string& name,
long timeout_ms=DEFAULT_TIMEOUT);
154 typedef struct Entry final
165 HebiLookupEntryListPtr lookup_list_;
170 EntryList(HebiLookupEntryListPtr lookup_list) : lookup_list_(lookup_list) {}
EntryList(HebiLookupEntryListPtr lookup_list)
Definition: lookup.hpp:170
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.
Definition: lookup.cpp:17
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.
Definition: lookup.cpp:67
Lookup()
Creates a Lookup object which can create Module and Group references. Typically, only one Lookup obje...
Definition: lookup.cpp:7
A simple wrapper class for internal C-API HebiMacAddress objects to allow interfacing with API calls ...
Definition: mac_address.hpp:12
Definition: lookup.hpp:152
#define HEBI_DISABLE_COPY_MOVE(Class)
Definition: util.hpp:7
std::shared_ptr< EntryList > getEntryList()
Definition: lookup.cpp:110
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.
Definition: lookup.cpp:36
virtual ~EntryList() noexcept
Definition: lookup.cpp:76
int size()
Definition: lookup.cpp:105
virtual ~Lookup() noexcept
Destructor frees all resources created by Lookup object, and stops the background query thread...
Definition: lookup.cpp:12
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...
Definition: lookup.cpp:58
Maintains a registry of network-connected modules and returns Group objects to the user...
Definition: lookup.hpp:33
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.
Definition: lookup.cpp:49
Entry getEntry(int index)
Definition: lookup.cpp:82