Viam C++ SDK current
|
Information about a registered model, including a constructor and config validator. More...
#include <registry.hpp>
Public Member Functions | |
ModelRegistration (API api, Model model, std::function< std::shared_ptr< Resource >(Dependencies, ResourceConfig)> constructor) | |
ModelRegistration (API api, Model model, std::function< std::shared_ptr< Resource >(Dependencies, ResourceConfig)> constructor, std::function< std::vector< std::string >(ResourceConfig)> validator) | |
const API & | api () const |
const Model & | model () const |
viam::robot::v1::Status | create_status (const std::shared_ptr< Resource > &resource) const |
Creates a Status object for a given resource. | |
Public Attributes | |
std::function< std::shared_ptr< Resource >(Dependencies, ResourceConfig)> | construct_resource |
Constructs a resource from a map of dependencies and a resource config. | |
std::function< std::vector< std::string >(ResourceConfig)> | validate |
Validates a resource config. | |
Information about a registered model, including a constructor and config validator.
std::function<std::vector<std::string>(ResourceConfig)> viam::sdk::ModelRegistration::validate |
Validates a resource config.
Can | throw exceptions, which will be returned to the parent via gRPC. |