fesa-core  4.3.1
fesa::LogicalEventImpl Class Reference

Implementation of the LogicalEvent. More...

#include <LogicalEventImpl.h>

Inheritance diagram for fesa::LogicalEventImpl:
fesa::LogicalEvent fesa::HasMetrics

Public Member Functions

 LogicalEventImpl (const std::string &className, const std::string &logicalEventName)
 Constructor. More...
 
virtual ~LogicalEventImpl ()
 Destructor.
 
virtual void enable ()
 Enables this logical event.
 
virtual void disable ()
 Disables this logical event (It will not trigger any RT-Actions any more)
 
virtual bool isEnabled () const
 Check the enable-state of this logical-event. More...
 
virtual std::string getName () const
 Return the name of this logical-event. More...
 
virtual uint32_t getID () const
 Return the unique ID of this logical-event. More...
 
virtual void addScheduler (RTScheduler *scheduler)
 Adds a scheduler to this logical-event. More...
 
virtual void postEventToSchedulers (boost::shared_ptr< RTEvent > &event, AtomicSizeTPtr &nSchedulers) const
 This method will post the given RTEvent to all schedulers which have registered to this logical-event. More...
 
bool operator== (const LogicalEvent &rhs) const
 Compares two logical-events by the use of the unique id. More...
 
bool operator!= (const LogicalEvent &rhs) const
 Compares two logical-events by the use of the unique id. More...
 
- Public Member Functions inherited from fesa::LogicalEvent
virtual ~LogicalEvent ()
 We need to define a virtual destructor to prevent a compiler-warning.
 
- Public Member Functions inherited from fesa::HasMetrics
 HasMetrics (const std::string &componentName)
 

Additional Inherited Members

- Protected Member Functions inherited from fesa::HasMetrics
template<typename T >
void registerMetric (const std::string &name, T &value)
 
template<typename T >
void registerMetric (const std::string &name, boost::atomic< T > &value)
 

Detailed Description

Implementation of the LogicalEvent.

Constructor & Destructor Documentation

fesa::LogicalEventImpl::LogicalEventImpl ( const std::string &  className,
const std::string &  logicalEventName 
)

Constructor.

Parameters
classNamename of the class this event belongs to
logicalEventNamename of the logical-event

Member Function Documentation

void fesa::LogicalEventImpl::addScheduler ( RTScheduler scheduler)
virtual

Adds a scheduler to this logical-event.

Parameters
schedulerThe scheduler to register

Implements fesa::LogicalEvent.

uint32_t fesa::LogicalEventImpl::getID ( ) const
virtual

Return the unique ID of this logical-event.

Returns
unique ID of this logical-event

Implements fesa::LogicalEvent.

std::string fesa::LogicalEventImpl::getName ( ) const
virtual

Return the name of this logical-event.

Returns
name of this logical-event

Implements fesa::LogicalEvent.

bool fesa::LogicalEventImpl::isEnabled ( ) const
virtual

Check the enable-state of this logical-event.

Returns
enable-state of this logical event

Implements fesa::LogicalEvent.

bool fesa::LogicalEventImpl::operator!= ( const LogicalEvent rhs) const
virtual

Compares two logical-events by the use of the unique id.

Parameters
rhsThe rightHandSide, the object after the !=
Returns
true, if the objects differ from each other

Implements fesa::LogicalEvent.

bool fesa::LogicalEventImpl::operator== ( const LogicalEvent rhs) const
virtual

Compares two logical-events by the use of the unique id.

Parameters
rhsThe rightHandSide, the object after the ==
Returns
true, if the objects are equal

Implements fesa::LogicalEvent.

void fesa::LogicalEventImpl::postEventToSchedulers ( boost::shared_ptr< RTEvent > &  event,
AtomicSizeTPtr &  nSchedulers 
) const
virtual

This method will post the given RTEvent to all schedulers which have registered to this logical-event.

Parameters
eventThe RTEvent to fire
nSchedulersinitial number of schedulers scheduling this event, assuming one scheduler per logical-event; to be adjusted if needed.

Implements fesa::LogicalEvent.


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