Processing Recipe base class. All recipes shall be derived from this class.
More...
#include <recipeBase.hpp>
|
| static const std::string & | GenId (const std::string &proc_thread_name, const std::string &recipe_name) |
| | Generate the ID for this recipe from the Processing Thread and Recipe number. More...
|
| |
| template<class TYPE > |
| static void | AddRecipeFactoryObj (TYPE &recipe_factory_obj) |
| | Static method to register a Data Publisher factory object in the internal registry. More...
|
| |
| static const std::map< std::string, std::shared_ptr< RecipeBase > > & | GetRecipeFactoryObjs () |
| | Statis method to retrieve references to the Recipe Factory Objects. More...
|
| |
| static void | CreateRecipeObj (const std::string &class_name, const std::string &proc_thread_name, const std::string &recipe_name, std::shared_ptr< RecipeBase > &new_obj) |
| |
| static void | GetRecipeObj (const std::string &class_name, const std::string &proc_thread_name, std::shared_ptr< RecipeBase > &recipe_obj, const bool initialise=true) |
| |
| static const std::map< std::string, std::shared_ptr< RecipeBase > > & | GetRecipeObjs () |
| | Get reference to all Processing Recipe objects registered. More...
|
| |
| static bool | HasRecipeObj (const std::string &class_name, const std::string &proc_thread_name, std::shared_ptr< RecipeBase > &recipe_obj) |
| | Check if a Proc Recipe object is defined. More...
|
| |
| static ccf::mptk::Manager & | Mptk () |
| | 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...
|
| |
|
| void | SetEnabled (const bool enabled) |
| | Set the enabled status flag of the recipe object. More...
|
| |
| void | DisableRecipe () |
| | Disable the recipe so that it will not be invoked. More...
|
| |
| 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...
|
| |
Processing Recipe base class. All recipes shall be derived from this class.
◆ RecipeBase() [1/2]
| ccf::common::RecipeBase::RecipeBase |
( |
const std::string & |
proc_thread_name, |
|
|
const std::string & |
recipe_name |
|
) |
| |
Free the allocated recipe objects. Used internally by CCF. Free the allocated recipe factory objects. Used internally by CCF. Constructor instantiating a recipe object with the given Processing Thread and Recipe number and recipe name.
◆ RecipeBase() [2/2]
| ccf::common::RecipeBase::RecipeBase |
( |
| ) |
|
◆ ~RecipeBase()
| ccf::common::RecipeBase::~RecipeBase |
( |
| ) |
|
|
virtual |
◆ AddRecipeFactoryObj()
template<class TYPE >
| static void ccf::common::RecipeBase::AddRecipeFactoryObj |
( |
TYPE & |
recipe_factory_obj | ) |
|
|
inlinestatic |
Static method to register a Data Publisher factory object in the internal registry.
◆ CreateObjectUser()
| void ccf::common::RecipeBase::CreateObjectUser |
( |
const std::string & |
proc_thread_name, |
|
|
const std::string & |
recipe_name, |
|
|
std::shared_ptr< RecipeBase > & |
new_object |
|
) |
| |
|
virtual |
Instantiate a specific instance of the object.
◆ CreateRecipeObj()
| void ccf::common::RecipeBase::CreateRecipeObj |
( |
const std::string & |
class_name, |
|
|
const std::string & |
proc_thread_name, |
|
|
const std::string & |
recipe_name, |
|
|
std::shared_ptr< RecipeBase > & |
new_obj |
|
) |
| |
|
static |
Static method to allocate and register a Processing Recipe factory object of the given type. A factory object of the given type (classname) shall be defined in the factory object registry (see ccf::common::RecipeBase::AddRecipeFactoryObj()). Each Processing Recipe object instance shall be allocated before entering operations (data acquisition).
◆ Disable()
| void ccf::common::RecipeBase::Disable |
( |
| ) |
|
Disable the recipe so that it will no longer be invoked by the Processing Thread to which it belongs.
◆ DisableRecipe()
| void ccf::common::RecipeBase::DisableRecipe |
( |
| ) |
|
|
protected |
Disable the recipe so that it will not be invoked.
◆ DisableUser()
| void ccf::common::RecipeBase::DisableUser |
( |
| ) |
|
|
virtual |
◆ Enable()
| void ccf::common::RecipeBase::Enable |
( |
| ) |
|
Enable the recipe so that it will be invoked by the Processing Thread to which it belongs.
◆ EnableUser()
| void ccf::common::RecipeBase::EnableUser |
( |
| ) |
|
|
virtual |
◆ GenId()
| const std::string & ccf::common::RecipeBase::GenId |
( |
const std::string & |
proc_thread_name, |
|
|
const std::string & |
recipe_name |
|
) |
| |
|
static |
Generate the ID for this recipe from the Processing Thread and Recipe number.
◆ GetDbPath()
| const std::string & ccf::common::RecipeBase::GetDbPath |
( |
| ) |
const |
Generate DB path for this recipe.
◆ GetEnabled()
| bool ccf::common::RecipeBase::GetEnabled |
( |
| ) |
const |
Return the enabled status of the recipe.
◆ GetInitialised()
| bool ccf::common::RecipeBase::GetInitialised |
( |
| ) |
const |
Return flag indicating if the recipe object has been initialised.
◆ GetProcThreadName()
| const std::string & ccf::common::RecipeBase::GetProcThreadName |
( |
| ) |
const |
Get the name of the Processing Thread, hosting the Recipe instance.
◆ GetRecipeFactoryObjs()
| const std::map< std::string, std::shared_ptr< RecipeBase > > & ccf::common::RecipeBase::GetRecipeFactoryObjs |
( |
| ) |
|
|
static |
Statis method to retrieve references to the Recipe Factory Objects.
◆ GetRecipeId()
| const std::string & ccf::common::RecipeBase::GetRecipeId |
( |
| ) |
const |
Get the ID of the recipe.
◆ GetRecipeName()
| const std::string & ccf::common::RecipeBase::GetRecipeName |
( |
| ) |
const |
Get the name of the recipe.
◆ GetRecipeObj()
| void ccf::common::RecipeBase::GetRecipeObj |
( |
const std::string & |
class_name, |
|
|
const std::string & |
proc_thread_name, |
|
|
std::shared_ptr< RecipeBase > & |
recipe_obj, |
|
|
const bool |
initialise = true |
|
) |
| |
|
static |
Static method to get the address of a Processing Recipe object with the given name and ID. If an object with this name/ID does not exist, it is automatically created. If "initialise" is true (default value), the object is initialised, i.e., the configuration reloaded.
◆ GetRecipeObjs()
| const std::map< std::string, std::shared_ptr< RecipeBase > > & ccf::common::RecipeBase::GetRecipeObjs |
( |
| ) |
|
|
static |
Get reference to all Processing Recipe objects registered.
◆ GetStatus()
| ProcStatus ccf::common::RecipeBase::GetStatus |
( |
| ) |
const |
Get status of the recipe object.
◆ HasRecipeObj()
| bool ccf::common::RecipeBase::HasRecipeObj |
( |
const std::string & |
class_name, |
|
|
const std::string & |
proc_thread_name, |
|
|
std::shared_ptr< RecipeBase > & |
recipe_obj |
|
) |
| |
|
static |
Check if a Proc Recipe object is defined.
◆ Initialise()
| void ccf::common::RecipeBase::Initialise |
( |
| ) |
|
Initalise the object. Invoked after creating a new object from the factory object.
◆ InitialiseUser()
| void ccf::common::RecipeBase::InitialiseUser |
( |
| ) |
|
|
virtual |
◆ Process()
| void ccf::common::RecipeBase::Process |
( |
DataFrame & |
frame | ) |
|
Execute the processing of the given frame.
◆ ProcessUser()
| void ccf::common::RecipeBase::ProcessUser |
( |
DataFrame & |
frame | ) |
|
|
virtual |
◆ SetEnabled()
| void ccf::common::RecipeBase::SetEnabled |
( |
const bool |
enabled | ) |
|
|
protected |
Set the enabled status flag of the recipe object.
◆ SetStatus()
| void ccf::common::RecipeBase::SetStatus |
( |
const ProcStatus |
status | ) |
|
Update status for a given Publisher Thread in the OLDB.
The documentation for this class was generated from the following files: