ifw-ccf 5.0.2
|
Class for implementing CCF Data Publishers. More...
#include <pubBase.hpp>
Public Member Functions | |
PubBase (const std::string &proc_thread_name, const std::string &pub_thread_name) | |
PubBase () | |
virtual | ~PubBase () |
void | Initialise () |
bool | GetInitialised () const |
void | Dismantle () |
void | SetEnabled (const bool enabled) |
bool | GetEnabled () const |
const std::string & | GetProcThreadName () const |
const std::string & | GetPubId () const |
const std::string & | GetPubThreadName () const |
void | Publish (DataFrame &frame, const bool force) |
PubType | GetPublisherType () const |
void | Activate () |
virtual void | ActivateUser () |
void | Deactivate () |
virtual void | DeactivateUser () |
void | SetActivated (const bool activated) |
bool | GetActivated () const |
virtual void | CheckForDeactivationUser () |
PublisherStatus & | GetPubStatus () |
void | EstimateExecution (double &duration, int64_t &nb_of_frames) |
void | GetPubStatus (PublisherStatus &pub_stat) const |
Make a snapshot of the current Publisher Status object. | |
virtual void | InitialiseUser () |
virtual void | DismantleUser () |
virtual void | PublishUser (DataFrame &frame) |
virtual void | CreateObjectUser (const std::string &proc_thread_name, const std::string &pub_thread_name, PubBase **new_object) |
virtual void | EstimateExecutionUser (double &duration, int64_t &nb_of_frames) |
void | ResetDbStatus () const |
Update status for a given Publisher Thread in the OLDB. | |
void | UpdateDbStatus (const bool force_update=false) const |
std::string | ToString () const |
![]() | |
Base () | |
~Base () | |
const std::string & | GetClassName () const |
Return the allocated name of the class. | |
Static Public Member Functions | |
static const std::string & | GenId (const std::string &proc_thread_name, const std::string &pub_thread_name) |
Generate an ID for the Publisher. | |
template<class TYPE > | |
static void | AddPubFactoryObj (TYPE &pub_factory_obj) |
Static method to register a Data Publisher factory object in the internal registry. | |
static const std::map< std::string, std::shared_ptr< PubBase > > & | GetPubFactoryObjs () |
Generate vector with references to the Publisher Factory Objects registered. | |
static void | CreatePubObj (const std::string &class_name, const std::string &proc_thread_name, const std::string &pub_thread_name, PubBase **new_object) |
static void | GetPubObj (const std::string &proc_thread_name, const std::string &pub_thread_name, PubBase **pub_obj, const bool initialise=true) |
static void | GetPubObjs (std::vector< PubBase * > &pub_objs) |
Get reference to all Data Publisher Objects registered. | |
static bool | HasPubObj (const std::string &proc_thread_name, const std::string &pub_thread_name, PubBase **pub_obj) |
Check if a Publisher object is defined. | |
static void | SetRecTrigger (const double rec_trigger) |
Set the trigger for deferred recording. | |
static double | GetRecTrigger () |
Get the trigger for deferred recording. | |
static void | SetDeferredStart (const bool def_start_active) |
Set the deferred start mode. | |
static bool | GetDeferredStart () |
Get the deferred start mode. | |
![]() | |
static ifw::ccf::mptk::Manager & | Mptk () |
Return reference to internal MPTK instance (singleton). | |
Protected Attributes | |
PubType | m_publisher_type |
bool | m_initialised |
bool | m_setup_enabled |
bool | m_stat_active |
Additional Inherited Members | |
![]() | |
void | SetClassName (const std::string &class_name) |
Set the name of the class in question. | |
Class for implementing CCF Data Publishers.
ifw::ccf::common::PubBase::PubBase | ( | const std::string & | proc_thread_name, |
const std::string & | pub_thread_name ) |
ifw::ccf::common::PubBase::PubBase | ( | ) |
|
virtual |
void ifw::ccf::common::PubBase::Activate | ( | ) |
|
virtual |
Reimplemented in ifw::ccf::stdpub::PubFits.
|
inlinestatic |
Static method to register a Data Publisher factory object in the internal registry.
|
virtual |
Reimplemented in ifw::ccf::stdpub::PubFits.
|
virtual |
|
static |
Static method to allocate and register a Data Publisher of the given type. A factory object of the given type (classname) shall be defined in the factory object registry (see ifw::ccf::common::PubBase::AddPubFactoryObj()). Each Data Publisher object instance shall be allocated before entering operations (data acquisition).
void ifw::ccf::common::PubBase::Deactivate | ( | ) |
|
virtual |
Reimplemented in ifw::ccf::stdpub::PubFits.
void ifw::ccf::common::PubBase::Dismantle | ( | ) |
|
virtual |
Reimplemented in ifw::ccf::stdpub::PubDdt, and ifw::ccf::stdpub::PubRtms.
void ifw::ccf::common::PubBase::EstimateExecution | ( | double & | duration, |
int64_t & | nb_of_frames ) |
Provide an estimate for the duration and number of frames to be stored during a Recording Session according to the present setup.
|
virtual |
Reimplemented in ifw::ccf::stdpub::PubFits.
|
static |
Generate an ID for the Publisher.
bool ifw::ccf::common::PubBase::GetActivated | ( | ) | const |
|
static |
Get the deferred start mode.
bool ifw::ccf::common::PubBase::GetEnabled | ( | ) | const |
bool ifw::ccf::common::PubBase::GetInitialised | ( | ) | const |
const std::string & ifw::ccf::common::PubBase::GetProcThreadName | ( | ) | const |
|
static |
Generate vector with references to the Publisher Factory Objects registered.
const std::string & ifw::ccf::common::PubBase::GetPubId | ( | ) | const |
PubType ifw::ccf::common::PubBase::GetPublisherType | ( | ) | const |
|
static |
Static method to get the address of a Data Publisher 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.
|
static |
Get reference to all Data Publisher Objects registered.
PublisherStatus & ifw::ccf::common::PubBase::GetPubStatus | ( | ) |
Get reference to internal Publisher Status object. Although all set-methods are semaphore protected, it shall be used with care.
void ifw::ccf::common::PubBase::GetPubStatus | ( | PublisherStatus & | pub_stat | ) | const |
Make a snapshot of the current Publisher Status object.
const std::string & ifw::ccf::common::PubBase::GetPubThreadName | ( | ) | const |
|
static |
Get the trigger for deferred recording.
|
static |
Check if a Publisher object is defined.
void ifw::ccf::common::PubBase::Initialise | ( | ) |
|
virtual |
Reimplemented in ifw::ccf::stdpub::PubDdt, ifw::ccf::stdpub::PubFits, and ifw::ccf::stdpub::PubRtms.
void ifw::ccf::common::PubBase::Publish | ( | DataFrame & | frame, |
const bool | force ) |
|
virtual |
Reimplemented in ifw::ccf::stdpub::PubDdt, ifw::ccf::stdpub::PubFits, and ifw::ccf::stdpub::PubRtms.
void ifw::ccf::common::PubBase::ResetDbStatus | ( | ) | const |
Update status for a given Publisher Thread in the OLDB.
void ifw::ccf::common::PubBase::SetActivated | ( | const bool | activated | ) |
|
static |
Set the deferred start mode.
void ifw::ccf::common::PubBase::SetEnabled | ( | const bool | enabled | ) |
|
static |
Set the trigger for deferred recording.
std::string ifw::ccf::common::PubBase::ToString | ( | ) | const |
void ifw::ccf::common::PubBase::UpdateDbStatus | ( | const bool | force_update = false | ) | const |
|
protected |
|
protected |
|
protected |
|
protected |