Viam C++ SDK current
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
viam::sdk::ModelRegistration Class Reference

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 APIapi () const
 
const Modelmodel () 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.
 

Detailed Description

Information about a registered model, including a constructor and config validator.

Member Data Documentation

◆ validate

std::function<std::vector<std::string>(ResourceConfig)> viam::sdk::ModelRegistration::validate

Validates a resource config.

Returns
a list of the resource's implicit dependencies.
Exceptions
Canthrow exceptions, which will be returned to the parent via gRPC.

The documentation for this class was generated from the following file: