fesa::FaultField< DataType > Class Template Reference

Specialized field for fault fields. This type of field is meant to indicate a fault or problem in the system. It is a template as it can accept FaultField_DataTypes or derived classes of that type as template parameter. More...

#include <FaultField.h>

Inheritance diagram for fesa::FaultField< DataType >:
fesa::GenericFieldStruct< DataType > fesa::AbstractFaultField fesa::Field< DataType > fesa::AbstractField

List of all members.

Public Member Functions

 FaultField (const std::string &name, bool multiplexed, DataStore *pDataStore, const std::string &description, FaultSeverity severity)
 Constructor.
 ~FaultField ()
 destructor
void raise (int64_t time, MultiplexingContext *pCtx, int32_t errorCode=0)
 method to raise a fault, explicitly supplying its time of occurrence If a fault-field is already raised, any "raise" call to this fault-field will be ignored until the fault-field is lower.
void raise (MultiplexingContext *pCtx, int32_t errorCode=0)
 method to raise a fault, supplying the errorCode If a fault-field is already raised, any "raise" call to this fault-field will be ignored until the fault-field is lower.
virtual void lower (int64_t time, MultiplexingContext *pCtx)
 method to lower a fault, The time of occurrence is passed as argument
virtual void lower (MultiplexingContext *pCtx)
 method to lower a fault. The registered time of occurrence will be taken at the time of invocation
bool isRaised (MultiplexingContext *pCtxt)
 FaultField state. Returns true if the fault field was raised, and false if the fault field is not active.
FaultSeverity getSeverity ()
 Retrieves the fault severity.
int64_t getTimestamp (MultiplexingContext *pCtxt)
 timestamp in nanoseconds of the last action done in the fault field: raise or lower.
std::string getDescription ()

Private Member Functions

int64_t getActualTime ()

Private Attributes

std::string description_
 description of the fault field
FaultSeverity severity_
 severity of the fault field

Detailed Description

template<typename DataType>
class fesa::FaultField< DataType >

Specialized field for fault fields. This type of field is meant to indicate a fault or problem in the system. It is a template as it can accept FaultField_DataTypes or derived classes of that type as template parameter.

Definition at line 24 of file FaultField.h.


Constructor & Destructor Documentation

template<typename DataType >
fesa::FaultField< DataType >::FaultField ( const std::string &  name,
bool  multiplexed,
DataStore pDataStore,
const std::string &  description,
FaultSeverity  severity 
) [inline]

Constructor.

Parameters:
 

Definition at line 117 of file FaultField.h.

template<typename DataType >
fesa::FaultField< DataType >::~FaultField (  )  [inline]

destructor

Definition at line 127 of file FaultField.h.


Member Function Documentation

template<typename DataType >
int64_t fesa::FaultField< DataType >::getActualTime (  )  [inline, private, virtual]
template<typename DataType >
std::string fesa::FaultField< DataType >::getDescription (  )  [inline]
template<typename DataType >
FaultSeverity fesa::FaultField< DataType >::getSeverity (  )  [inline, virtual]

Retrieves the fault severity.

Returns:
type of severity: OK, ERROR, WARNING

Implements fesa::AbstractFaultField.

Definition at line 188 of file FaultField.h.

References fesa::FaultField< DataType >::severity_.

template<typename DataType >
int64_t fesa::FaultField< DataType >::getTimestamp ( MultiplexingContext pCtxt  )  [inline, virtual]

timestamp in nanoseconds of the last action done in the fault field: raise or lower.

Parameters:
pCtxt the multiplexing context.
Returns:
timestamp in nanoseconds

Implements fesa::AbstractFaultField.

Definition at line 194 of file FaultField.h.

References fesa::FieldValue< T >::activeBuffer(), fesa::Field< DataType >::getFieldValue(), fesa::AbstractField::multiplexingManager_, and fesa::AbstractMultiplexingManager::requireSlot().

template<typename DataType >
bool fesa::FaultField< DataType >::isRaised ( MultiplexingContext pCtxt  )  [inline, virtual]

FaultField state. Returns true if the fault field was raised, and false if the fault field is not active.

Parameters:
pCtx multiplexing context.

Implements fesa::AbstractFaultField.

Definition at line 180 of file FaultField.h.

References fesa::FieldValue< T >::activeBuffer(), fesa::Field< DataType >::getFieldValue(), fesa::AbstractField::multiplexingManager_, and fesa::AbstractMultiplexingManager::requireSlot().

Referenced by fesa::AbstractServerAction::checkInvalidatingFields(), and fesa::FaultField< DataType >::raise().

template<typename DataType >
void fesa::FaultField< DataType >::lower ( MultiplexingContext pCtx  )  [inline, virtual]

method to lower a fault. The registered time of occurrence will be taken at the time of invocation

Parameters:
pCtx multiplexing context.

Implements fesa::AbstractFaultField.

Definition at line 173 of file FaultField.h.

References fesa::FaultField< DataType >::getActualTime(), and fesa::FaultField< DataType >::lower().

template<typename DataType >
void fesa::FaultField< DataType >::lower ( int64_t  time,
MultiplexingContext pCtx 
) [inline, virtual]

method to lower a fault, The time of occurrence is passed as argument

Parameters:
time time of occurrence in nanoseconds.
pCtx multiplexing context.

Implements fesa::AbstractFaultField.

Definition at line 161 of file FaultField.h.

References fesa::FieldValue< T >::activeBuffer(), fesa::AbstractField::commit(), fesa::Field< DataType >::getFieldValue(), fesa::AbstractField::multiplexingManager_, fesa::AbstractMultiplexingManager::requireSlot(), fesa::FaultField_DataType::state_, and fesa::FaultField_DataType::timestamp_.

Referenced by fesa::FaultField< DataType >::lower().

template<typename DataType >
void fesa::FaultField< DataType >::raise ( MultiplexingContext pCtx,
int32_t  errorCode = 0 
) [inline, virtual]

method to raise a fault, supplying the errorCode If a fault-field is already raised, any "raise" call to this fault-field will be ignored until the fault-field is lower.

Parameters:
pCtx multiplexing context.
errorCode this field let the equipment specialist to specify an errorCode for the fault field, this errorCode should be manage by the custom code and it is not taken into account by the framework. If error code is not provided by the user it is restarted to zero

Implements fesa::AbstractFaultField.

Definition at line 151 of file FaultField.h.

References fesa::FaultField< DataType >::getActualTime(), and fesa::FaultField< DataType >::isRaised().

template<typename DataType >
void fesa::FaultField< DataType >::raise ( int64_t  time,
MultiplexingContext pCtx,
int32_t  errorCode = 0 
) [inline, virtual]

method to raise a fault, explicitly supplying its time of occurrence If a fault-field is already raised, any "raise" call to this fault-field will be ignored until the fault-field is lower.

Parameters:
time time of occurrence in nanoseconds.
pCtx multiplexing context.
errorCode it's up to the developer to define the codification of the error code, if it's needed. This errorCode should be managed by the developer and it is not used by the framework. If error code is not provided by the user it is restarted to zero

Implements fesa::AbstractFaultField.

Definition at line 133 of file FaultField.h.

References fesa::FieldValue< T >::activeBuffer(), fesa::AbstractField::commit(), fesa::FaultField_DataType::errorCode_, fesa::Field< DataType >::getFieldValue(), fesa::FaultField< DataType >::isRaised(), fesa::AbstractField::multiplexingManager_, fesa::AbstractMultiplexingManager::requireSlot(), fesa::FaultField_DataType::state_, and fesa::FaultField_DataType::timestamp_.


Member Data Documentation

template<typename DataType>
std::string fesa::FaultField< DataType >::description_ [private]

description of the fault field

Definition at line 107 of file FaultField.h.

Referenced by fesa::FaultField< DataType >::getDescription().

template<typename DataType>
FaultSeverity fesa::FaultField< DataType >::severity_ [private]

severity of the fault field

Definition at line 112 of file FaultField.h.

Referenced by fesa::FaultField< DataType >::getSeverity().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1