JeVois  1.5
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
manager1.C
Go to the documentation of this file.
1 namespace jevois
2 {
3  namespace manager
4  {
5  //! Parameter category \relates jevois::Manager
6  static ParameterCategory const ParamCateg("General Options");
7 
8  //! Parameter \relates jevois::Manager
9  JEVOIS_DECLARE_PARAMETER(help, bool, "Print this help message", false, ParamCateg);
10 
11 #ifdef JEVOIS_LDEBUG_ENABLE
12  //! Enum for Parameter \relates jevois::Manager
13  JEVOIS_DEFINE_ENUM_CLASS(LogLevel, (fatal) (error) (info) (debug));
14 #else
15  //! Enum for Parameter \relates jevois::Manager
16  JEVOIS_DEFINE_ENUM_CLASS(LogLevel, (fatal) (error) (info));
17 #endif
18 
19  //! Parameter \relates jevois::Manager
20  JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK(loglevel, LogLevel, "Set the minimum log level to display",
21  LogLevel::info, LogLevel_Values, ParamCateg);
22 
23  //! Parameter \relates jevois::Manager
24  JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK(tracelevel, unsigned int, "Set the minimum trace level to display",
25  0, ParamCateg);
26 
27  //! Parameter \relates jevois::Manager
28  JEVOIS_DECLARE_PARAMETER(nickname, std::string, "Nickname associated with this camera, useful when multiple "
29  "JeVois cameras are connected to a same USB bus", "jevois", ParamCateg);
30  }
31 
32  // ######################################################################
33  //! Manager of a hierarchy of Component objects
34  /*! A Manager should be the top-level Component of any hierarchy of Components. It is primarily responsible for
35  handling the setting of Parameter values via the command-line or otherwise.
36 
37  Users should only need to construct a Manager (including Engine, which derives from Manager), add any Component to
38  it, and then call init() on the Manager, which will parse all command line options, bind them to the relevant
39  Parameters, and call init() on all subComponents (which in turn calls init() on all of their subComponents,
40  etc.). See the documentation of Component for more information about the init() flow.
41 
42  The parameter \p nickname is not internally used by the Manager. It can be set, for example, in \b initscript.cfg
43  to a different value for each camera, in systems that use multiple JeVois cameras connected to a single USB bus.
44 
45  \ingroup component */
46  class Manager : public Component,
47  public Parameter<manager::help, manager::loglevel, manager::tracelevel, manager::nickname>
48  {
49  public:
JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK(l2grad, bool, "Use more accurate L2 gradient norm if true, L1 if false", false, ParamCateg)
JEVOIS_DECLARE_PARAMETER(thresh1, double, "First threshold for hysteresis", 50.0, ParamCateg)