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>
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 |
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.
fesa::FaultField< DataType >::FaultField | ( | const std::string & | name, | |
bool | multiplexed, | |||
DataStore * | pDataStore, | |||
const std::string & | description, | |||
FaultSeverity | severity | |||
) | [inline] |
fesa::FaultField< DataType >::~FaultField | ( | ) | [inline] |
destructor
Definition at line 127 of file FaultField.h.
int64_t fesa::FaultField< DataType >::getActualTime | ( | ) | [inline, private, virtual] |
Implements fesa::AbstractFaultField.
Definition at line 202 of file FaultField.h.
Referenced by fesa::FaultField< DataType >::lower(), and fesa::FaultField< DataType >::raise().
std::string fesa::FaultField< DataType >::getDescription | ( | ) | [inline] |
Definition at line 210 of file FaultField.h.
References fesa::FaultField< DataType >::description_.
Referenced by fesa::AbstractServerAction::checkInvalidatingFields().
FaultSeverity fesa::FaultField< DataType >::getSeverity | ( | ) | [inline, virtual] |
Retrieves the fault severity.
Implements fesa::AbstractFaultField.
Definition at line 188 of file FaultField.h.
References fesa::FaultField< DataType >::severity_.
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.
pCtxt | the multiplexing context. |
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().
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.
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().
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
pCtx | multiplexing context. |
Implements fesa::AbstractFaultField.
Definition at line 173 of file FaultField.h.
References fesa::FaultField< DataType >::getActualTime(), and fesa::FaultField< DataType >::lower().
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
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().
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.
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().
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.
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_.
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().
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().