Viam C++ SDK current
|
A registry of known resources. More...
#include <registry.hpp>
Static Public Member Functions | |
static void | register_model (std::shared_ptr< const ModelRegistration > resource) |
Registers a resource with the Registry. | |
static std::shared_ptr< const ModelRegistration > | lookup_model (const std::string &name) |
Lookup a given registered resource. | |
static std::shared_ptr< const ModelRegistration > | lookup_model (const API &api, const Model &model) |
Lookup a given registered resource. | |
template<typename ResourceClientT > | |
static void | register_resource_client () |
Register a resource client constructor. | |
template<typename ResourceServerT > | |
static void | register_resource_server () |
Register a resource server constructor. | |
template<typename ResourceClientT , typename ResourceServerT > | |
static void | register_resource () |
Register resource client and server constructors. | |
static std::shared_ptr< const ResourceServerRegistration > | lookup_resource_server (const API &api) |
Lookup a registered server api. | |
static std::shared_ptr< const ResourceClientRegistration > | lookup_resource_client (const API &api) |
Lookup a registered client api. | |
static const std::unordered_map< std::string, std::shared_ptr< const ModelRegistration > > & | registered_models () |
Provide information on registered resource models. | |
static const std::unordered_map< API, std::shared_ptr< const ResourceServerRegistration > > & | registered_resource_servers () |
Provide access to registered resources. | |
static void | initialize () |
Initialized the Viam registry. No-op if it has already been called. | |
A registry of known resources.
|
static |
Lookup a given registered resource.
api | The api of the resource to lookup. |
model | The model of the resource to lookup. |
shared_ptr
to the resource's registration data.
|
static |
Lookup a given registered resource.
name | The name of the resource to lookup. |
shared_ptr
to the resource's registration data.
|
static |
Lookup a registered client api.
api | The api to lookup. |
shared_ptr
to the registered api's ResourceClientRegistration
.
|
static |
Lookup a registered server api.
api | The api to lookup. |
shared_ptr
to the registered api's ResourceServerRegistration
.
|
static |
Registers a resource with the Registry.
resource | An object containing resource registration information. |
`Exception` | if the resource has already been registered. |
|
static |
Provide information on registered resource models.
ModelRegistration
of all registered resource models.
|
static |
Provide access to registered resources.
API
to ResourceServerRegistration
of all registered resources.