ifw-fgf 1.0.0-pre1
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
fgf::andor::Config Class Reference

Handles configuration of the Andor FrameGrabber application. More...

#include <config.hpp>

Public Member Functions

 Config ()
 
void LoadConfig (const std::string &filename="", bool reset=false)
 
template<typename T >
std::optional< T > GetCameraFeature (const char *param)
 : Get a camera feature configuration
 
template<typename T >
std::optional< T > GetServerConfiguration (const char *param)
 : Get a server configuration parameters
 
const std::string GetConfigAsString () const
 : Get configuration as string
 

Protected Attributes

YAML::Node m_config_node
 YAML node storing the actual configuration

 

Detailed Description

Handles configuration of the Andor FrameGrabber application.

Through a configuration file, it is possible to customize initial parameters for Andor Cameras.

The Config class provides the methods to load and get the configuration from the internal YAML node representation.

Constructor & Destructor Documentation

◆ Config()

fgf::andor::Config::Config ( )

Default constructor.

Initialize application configuration attributes by

  • first use the default constant values defined in the header
  • override the constant values with environment variables (if defined)

Member Function Documentation

◆ GetCameraFeature()

template<typename T >
std::optional< T > fgf::andor::Config::GetCameraFeature ( const char * param)

: Get a camera feature configuration

Parameters
param The parameter to get from the configuration.
Warning
: Please note this method assumes to find the parameter below the Camera node in the configuration, see the config structure below.

Camera: param1: ... param2: ... param3: ...

Returns
An C++ optional with the parameter value.

◆ GetConfigAsString()

const std::string fgf::andor::Config::GetConfigAsString ( ) const

: Get configuration as string

This method can be used for printing configuration to the standard output.

Returns
configuration as C++ string.

◆ GetServerConfiguration()

template<typename T >
std::optional< T > fgf::andor::Config::GetServerConfiguration ( const char * param)

: Get a server configuration parameters

Parameters
param The parameter to get from the configuration.
Warning
: Please note this method assumes to find the parameter below the Server node in the configuration, see the config structure below.

Server: param1: ... param2: ... param3: ...

Returns
An C++ optional with the parameter value.

◆ LoadConfig()

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

This method load from a configuration file the application configuration overriding the initialization done in the constructor and the command line options.

Parameters
[in]filenameApplication configuration filename.

Member Data Documentation

◆ m_config_node

YAML::Node fgf::andor::Config::m_config_node
protected

YAML node storing the actual configuration


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