32 static ParameterCategory
const ParamCateg(
"General Options");
37#ifdef JEVOIS_LDEBUG_ENABLE
47 LogLevel::info, LogLevel_Values, ParamCateg);
55 "JeVois cameras are connected to a same USB bus",
"jevois", ParamCateg);
73 public Parameter<manager::help, manager::loglevel, manager::tracelevel, manager::nickname>
84 Manager(std::string
const & instance =
"TheManager");
88 Manager(
int argc,
char const* argv[], std::string
const & instance =
"TheManager");
106 template <
class Comp,
typename... Args>
110 template <
class Comp,
typename... Args>
117 template <
class Comp>
121 template <
class Comp>
137 template <
class Comp = jevois::Component>
141 template <
class Comp>
151 using Component::init;
155 using Component::uninit;
167 void onParamChange(manager::loglevel
const & param, manager::LogLevel
const & newval)
override;
170 void onParamChange(manager::tracelevel
const & param,
unsigned int const & newval)
override;
187 void doParseCommandLine();
191 std::vector<std::string>
const parseCommandLine(std::vector<std::string>
const & commandLineArgs);
194 std::vector<std::string> itsCommandLineArgs;
200 std::vector<std::string> itsRemainingArgs;
205#include <jevois/Component/details/ManagerImpl.H>
A component of a model hierarchy.
std::string const & instanceName() const
The instance name of this component.
Manager of a hierarchy of Component objects.
JEVOIS_DEFINE_ENUM_CLASS(LogLevel,(fatal)(error)(info)(debug))
Enum for Parameter.
void removeSubComponent(std::string const &instanceName, bool warnIfNotFound)=delete
Use removeComponent() on the Manager as opposed to jevois::Component::removeSubComponent()
std::shared_ptr< Comp > addComponent(std::string const &instanceName, Args &&...args)
Pseudo-constructor: construct a top-level Component.
void setCommandLineArgs(int argc, char const *argv[])
Set the command-line arguments, call this before start() if args were not passed at construction.
void removeComponent(std::shared_ptr< Comp > &component)
Remove a top-level Component from the Manager, by shared_ptr.
std::shared_ptr< Comp > getSubComponent(std::string const &instanceName) const =delete
Use getComponent() on the Manager as opposed to jevois::Component::getSubComponent()
void onParamChange(manager::loglevel const ¶m, manager::LogLevel const &newval) override
Parameter callback.
void postInit() override
Checks for the –help flag.
std::shared_ptr< Comp > addSubComponent(std::string const &instanceName, Args &&...args)=delete
Use addComponent() on the Manager as opposed to jevois::Component::addSubComponent()
JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK(tracelevel, unsigned int, "Set the minimum trace level to display", 0, ParamCateg)
Parameter.
virtual ~Manager()
Destructor.
JEVOIS_DECLARE_PARAMETER(nickname, std::string, "Nickname associated with this camera, useful when multiple " "JeVois cameras are connected to a same USB bus", "jevois", ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(help, bool, "Print this help message", false, ParamCateg)
Parameter.
void onParamChange(manager::tracelevel const ¶m, unsigned int const &newval) override
Parameter callback.
void constructHelpMessage(std::ostream &out) const
Constructs a help message from all parameters in the model, and outputs it to 'out'.
std::vector< std::string > const & remainingArgs() const
Get the remaining arguments that were not parsed by the command line.
JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK(loglevel, LogLevel, "Set the minimum log level to display", LogLevel::info, LogLevel_Values, ParamCateg)
Parameter.
std::shared_ptr< Comp > getComponent(std::string const &instanceName) const
Get a top-level component by instance name.
void printHelpMessage() const
Constructs a help message and tries to send it to /usr/bin/less.
void preInit() override
Calls parseCommandLine()
void removeSubComponent(std::shared_ptr< Comp > &component)=delete
Use removeComponent() on the Manager as opposed to jevois::Component::removeSubComponent()
JEVOIS_DEFINE_ENUM_CLASS(CameraSensor,(any)(imx290)(os08a10)(ar0234))
Enum for different sensor models.
Main namespace for all JeVois classes and functions.