ifw-ccf  3.0.0-pre2
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ccf::control::Config Class Reference

Provides access to the command line options and the configuration parameters stored in the configuration file. More...

#include <config.hpp>

Inheritance diagram for ccf::control::Config:
ccf::common::Config ccf::Base

Public Member Functions

 Config ()
 
virtual ~Config ()
 
void LoadConfig (const std::string &filename="", bool reset=false)
 See utils::bat::Config. More...
 
int16_t GetNbOfProcThreads ()
 
std::string GetProcThreadName (const uint16_t nb)
 Get the Processing Thread name from the number. More...
 
const std::vector< std::string > & GetProcThreadNames ()
 Get the Processing Thread names. More...
 
const PipelineInfoGetPipelineInfo (const std::string &proc_thread_name)
 Get pipeline (processing thread) info. More...
 
const std::map< std::string, RecipeInfo > & GetRecipesForProcThread (const std::string &proc_thread_name)
 Get Recipes defined for a given Processing Trhead. More...
 
const std::map< std::string, PublisherInfo > & GetPubsForProcThread (const std::string &proc_thread_name)
 Get the Processing Thread names. More...
 
const PublisherInfoGetPubInfo (const std::string &proc_thread_name, const std::string &pub_thread_name)
 Get the info about the Publisher from the Processing and Publisher Thread numbers. More...
 
- Public Member Functions inherited from ccf::common::Config
 Config ()
 
 ~Config ()
 
bool ParseOptions (int argc, char *argv[])
 Parse command line options. More...
 
void SetLogProperties (const std::string &filename)
 Set the log properties file. More...
 
void LoadConfig (const std::string &filename="", bool reset=false)
 Load the configuration file. More...
 
elt::configng::CiiConfigInstanceNode & GetNode (const std::vector< std::string > &names)
 Get the reference to a specific node in the CII Cfg Service namespace. More...
 
bool HasNode (const std::vector< std::string > &names, elt::configng::CiiConfigInstanceNode &node)
 Probe if a given node is defined. If yes, return the reference to the node. More...
 
template<class TYPE >
bool HasPar (const std::vector< std::string > &names, TYPE &value)
 Probe if a given key is defined. Set the value variable if found and return true. More...
 
bool HasPar (const std::vector< std::string > &names)
 Probe if a given parameter is defined. Return true if found. More...
 
template<class TYPE >
TYPE Get (const std::vector< std::string > &names)
 Get a parameter value from the configuration. More...
 
template<class TYPE >
void Set (const std::vector< std::string > &names, TYPE &value)
 Set the value of a parameter in the CII Cfg Service namespace. More...
 
uint32_t GetMaxFrameSize (const std::string &device="")
 Return the maximum frame size in bytes with the associated camera/configuration. More...
 
virtual uint32_t GetMaxFrameSizeUser (const std::string &device="")
 
const DeviceInfoGetDeviceInfo (const std::string &device="") const
 Return reference to Device Info structure. More...
 
void GetDeviceProperties (std::map< std::string, DeviceProperty > &device_properties, const std::string &device="") const
 Get device properties. More...
 
template<class TYPE >
bool HasDeviceProperty (const std::string &name, TYPE &value, const std::string &device="")
 
const bpo::variables_map & GetOptions () const
 Return map with command line options. More...
 
std::string GetDeviceName (const std::string &device="") const
 Return name of a specific device. If "" is given the first (maybe only) device defined,. More...
 
- Public Member Functions inherited from ccf::Base
 Base ()
 
 ~Base ()
 
const std::string & GetClassName () const
 Return the allocated name of the class. More...
 
log4cplus::Logger & Loggger ()
 Return reference to logger used in this context. More...
 

Static Public Member Functions

static ConfigInstance ()
 Return reference to unique instance of the configuration class. More...
 
- Static Public Member Functions inherited from ccf::common::Config
static ConfigInstance ()
 Return reference to unique instance of the configuration class. More...
 
static utils::bat::Config & BatCfg ()
 Return reference to internal BAT configuration object. More...
 
static const elt::configng::CiiConfigInstanceNamespace & CiiCfg ()
 Return reference to internal CII Configuration namespace object. More...
 
- Static Public Member Functions inherited from ccf::Base
static ccf::mptk::ManagerMptk ()
 Return reference to internal MPTK instance (singleton). More...
 
static void SetLogLevel (const ccf::LogLevel log_level)
 Set the log level. More...
 
static ccf::LogLevel GetLogLevel ()
 Return the current CCF log level. More...
 

Static Public Attributes

static Configs_instance = nullptr
 
- Static Public Attributes inherited from ccf::common::Config
static Configs_instance = nullptr
 
static utils::bat::Config s_bat_cfg
 
static std::vector< std::string > s_devices
 
static std::map< std::string, DeviceInfos_device_info
 

Additional Inherited Members

- Protected Member Functions inherited from ccf::common::Config
bool _HasDeviceProperty (const std::string &name, DeviceProperty &property, const std::string &device)
 
- Protected Member Functions inherited from ccf::Base
void SetClassName (const std::string &class_name)
 Set the name of the class in question. More...
 
void SetLogger (log4cplus::Logger &logger)
 Set reference to logger used in this context. More...
 
- Protected Attributes inherited from ccf::Base
log4cplus::Logger m_logger
 

Detailed Description

Provides access to the command line options and the configuration parameters stored in the configuration file.

Constructor & Destructor Documentation

◆ Config()

ccf::control::Config::Config ( )

◆ ~Config()

ccf::control::Config::~Config ( )
virtual

Member Function Documentation

◆ GetNbOfProcThreads()

int16_t ccf::control::Config::GetNbOfProcThreads ( )
Returns
The number of Processing Threads.

◆ GetPipelineInfo()

const PipelineInfo & ccf::control::Config::GetPipelineInfo ( const std::string &  proc_thread_name)

Get pipeline (processing thread) info.

◆ GetProcThreadName()

std::string ccf::control::Config::GetProcThreadName ( const uint16_t  nb)

Get the Processing Thread name from the number.

◆ GetProcThreadNames()

const std::vector< std::string > & ccf::control::Config::GetProcThreadNames ( )

Get the Processing Thread names.

◆ GetPubInfo()

const PublisherInfo & ccf::control::Config::GetPubInfo ( const std::string &  proc_thread_name,
const std::string &  pub_thread_name 
)

Get the info about the Publisher from the Processing and Publisher Thread numbers.

◆ GetPubsForProcThread()

const std::map< std::string, PublisherInfo > & ccf::control::Config::GetPubsForProcThread ( const std::string &  proc_thread_name)

Get the Processing Thread names.

◆ GetRecipesForProcThread()

const std::map< std::string, RecipeInfo > & ccf::control::Config::GetRecipesForProcThread ( const std::string &  proc_thread_name)

Get Recipes defined for a given Processing Trhead.

◆ Instance()

Config & ccf::control::Config::Instance ( )
static

Return reference to unique instance of the configuration class.

◆ LoadConfig()

void ccf::control::Config::LoadConfig ( const std::string &  filename = "",
bool  reset = false 
)

See utils::bat::Config.

Member Data Documentation

◆ s_instance

Config * ccf::control::Config::s_instance = nullptr
static

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