libFAUDES

Sections

Index

faudes::AttributeDiagnoserState Class Reference
[Fault Diagnosis Plug-In]

#include <diag_attrdiagstate.h>

Inherits faudes::AttributeFlags.

List of all members.


Detailed Description

Implements state estimates for the current status of the generator.

Definition at line 21 of file diag_attrdiagstate.h.


Public Member Functions

virtual AttributeDiagnoserStateNew (void) const
 Construct on heap.
virtual AttributeDiagnoserStateCopy (void) const
 Construct on heap.
virtual const
AttributeDiagnoserState
Cast (const Type *pOther) const
 Cast other object to this type.
virtual AttributeDiagnoserStateAssign (const Type &rSrc)
 Assign configuration data from other object.
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data.
virtual AttributeDiagnoserStateoperator= (const AttributeDiagnoserState &rSrc)
virtual bool operator== (const AttributeDiagnoserState &rOther) const
virtual bool operator!= (const AttributeDiagnoserState &rOther) const
 AttributeDiagnoserState (void)
 Default constructor.
 ~AttributeDiagnoserState (void)
 Destructor.
bool IsDefault (void) const
 Test for default value.
virtual void Clear (void)
 Delete the mDiagnoserStateMap.
const TaIndexSet< DiagLabelSet > & DiagnoserStateMap (void) const
 Get mDiagnoserStateMap.
const TaIndexSet< DiagLabelSet > * DiagnoserStateMapp (void) const
 Get pointer to mDiagnoserStateMap.
void DiagnoserStateMap (const TaIndexSet< DiagLabelSet > &newDiagStateMap)
 Set mDiagnoserStateMap.
void AddStateLabelMapping (Idx state, Idx label)
 Add single value of state estimate to mDiagnoserStateMap.
void AddStateLabelMap (Idx gstate, const DiagLabelSet &labels)
 Add state estimates to mDiagnoserStateMap.
std::string Str (void) const
 Pretty printable string of mDiagnoserStateMap.
bool ExistsState (Idx state) const
 Check whether state estimate exists in mDiagnoserStateMap.

Protected Member Functions

AttributeDiagnoserStateDoAssign (const AttributeDiagnoserState &rSrc)
 Copy attribute members.
bool DoEqual (const AttributeDiagnoserState &rOther) const
 Test equality.
void DoWrite (TokenWriter &rTw, const std::string &rLabel, const Type *pContext) const
 Write mDiagnoserStateMap to TokenWriter.
void DoRead (TokenReader &rTr, const std::string &rLabel, const Type *pContext)
 Read mDiagnoserStateMap from TokenReader.

Private Attributes

TaIndexSet< DiagLabelSetmDiagnoserStateMap
 The diagnoser state attribute is a map of state indices of the original generator to their failure label sets.

Constructor & Destructor Documentation

faudes::AttributeDiagnoserState::AttributeDiagnoserState ( void   )  [inline]

Default constructor.

Definition at line 34 of file diag_attrdiagstate.h.

faudes::AttributeDiagnoserState::~AttributeDiagnoserState ( void   )  [inline]

Destructor.

Definition at line 37 of file diag_attrdiagstate.h.


Member Function Documentation

AttributeDiagnoserState * faudes::AttributeDiagnoserState::New ( void   )  const [virtual]

Construct on heap.

Technically not a constructor, this function creates an object with the same type Type. New() is defined as a virtual function and derived classes are meant to re-implement with the appropiate constructor. This can be done via the provided macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION. As with new, it is the callers reponsabilty to delete the object when no longer needed.

Returns:
Pointer to new Type object

Reimplemented from faudes::AttributeFlags.

Definition at line 12 of file diag_attrdiagstate.cpp.

AttributeDiagnoserState * faudes::AttributeDiagnoserState::Copy ( void   )  const [virtual]

Construct on heap.

Technically not a constructor, this function creates an object with the same type Type and the same configuration. Copy() is defined as a virtual function and derived classes are meant to re-implement with the appropiate copy constructor. This can be done via the provided macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION. As with new, it is the callers reponsabilty to delete the object when no longer needed.

Returns:
Pointer to new Type object

Reimplemented from faudes::AttributeFlags.

Definition at line 12 of file diag_attrdiagstate.cpp.

const AttributeDiagnoserState * faudes::AttributeDiagnoserState::Cast ( const Type pOther  )  const [virtual]

Cast other object to this type.

Enables the run-time interface to test whether pObject is derived from this object. This feature is used e.g. in the faudes container classes to test attributes. Derived classes must reimplement this function using the appropriate dynamic cast.

Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.

Returns:
Typed pointer object

Reimplemented from faudes::AttributeFlags.

Definition at line 12 of file diag_attrdiagstate.cpp.

AttributeDiagnoserState & faudes::AttributeDiagnoserState::Assign ( const Type rSrc  )  [virtual]

Assign configuration data from other object.

Derived classes should reimplement this method to first try to cast the source to the respective class. If successful, the protected function DoAssign is invoked to perform the actual assignment. If the cast fails, the Assign method of the parent class is called. Thus, faudes objects are up- and downcatsted for assignment, maintaining as much of the source data as digestable by the destination object. On the downside, there is no sensible typechecking at compile-time.

Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.

Parameters:
rSrc Source to copy from
Returns:
Reference to this object.

Reimplemented from faudes::AttributeFlags.

Definition at line 12 of file diag_attrdiagstate.cpp.

bool faudes::AttributeDiagnoserState::Equal ( const Type rOther  )  const [virtual]

Test equality of configuration data.

Derived classes should reimplement this method to return true if both actual types and configuration data match. The object name is not consired in the test.

This method calls the virtual method DoEqual(). Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.

Parameters:
rOther Other objevt to compare with.
Returns:
True on match.

Reimplemented from faudes::AttributeFlags.

Definition at line 12 of file diag_attrdiagstate.cpp.

AttributeDiagnoserState & faudes::AttributeDiagnoserState::operator= ( const AttributeDiagnoserState rSrc  )  [virtual]

Definition at line 12 of file diag_attrdiagstate.cpp.

bool faudes::AttributeDiagnoserState::operator== ( const AttributeDiagnoserState rOther  )  const [virtual]

Definition at line 12 of file diag_attrdiagstate.cpp.

bool faudes::AttributeDiagnoserState::operator!= ( const AttributeDiagnoserState rOther  )  const [virtual]

Definition at line 12 of file diag_attrdiagstate.cpp.

bool faudes::AttributeDiagnoserState::IsDefault ( void   )  const [virtual]

Test for default value.

Returns:
True for default value.

Reimplemented from faudes::AttributeFlags.

Definition at line 22 of file diag_attrdiagstate.cpp.

void faudes::AttributeDiagnoserState::Clear ( void   )  [virtual]

Delete the mDiagnoserStateMap.

Reimplemented from faudes::AttributeVoid.

Definition at line 27 of file diag_attrdiagstate.cpp.

const TaIndexSet< DiagLabelSet > & faudes::AttributeDiagnoserState::DiagnoserStateMap ( void   )  const

Get mDiagnoserStateMap.

Returns:
mDiagnoserStateMap

Definition at line 32 of file diag_attrdiagstate.cpp.

const TaIndexSet< DiagLabelSet > * faudes::AttributeDiagnoserState::DiagnoserStateMapp ( void   )  const

Get pointer to mDiagnoserStateMap.

Returns:
Pointer to mDiagnoserStateMap

Definition at line 37 of file diag_attrdiagstate.cpp.

void faudes::AttributeDiagnoserState::DiagnoserStateMap ( const TaIndexSet< DiagLabelSet > &  newDiagStateMap  ) 

Set mDiagnoserStateMap.

Parameters:
newDiagStateMap New DiagnoserStateMap

Definition at line 42 of file diag_attrdiagstate.cpp.

void faudes::AttributeDiagnoserState::AddStateLabelMapping ( Idx  state,
Idx  label 
)

Add single value of state estimate to mDiagnoserStateMap.

Parameters:
state Index of generator state estimate.
label Index of associated failure label.

Definition at line 47 of file diag_attrdiagstate.cpp.

void faudes::AttributeDiagnoserState::AddStateLabelMap ( Idx  gstate,
const DiagLabelSet labels 
)

Add state estimates to mDiagnoserStateMap.

Parameters:
gstate Index of generator state estimate.
labels Index of associated failure labels.

Definition at line 60 of file diag_attrdiagstate.cpp.

string faudes::AttributeDiagnoserState::Str ( void   )  const

Pretty printable string of mDiagnoserStateMap.

Returns:
String representation of mDiagnoserStateMap.

Definition at line 77 of file diag_attrdiagstate.cpp.

bool faudes::AttributeDiagnoserState::ExistsState ( Idx  state  )  const

Check whether state estimate exists in mDiagnoserStateMap.

Parameters:
state Index of state to check.
Returns:
True if state exists.

Definition at line 95 of file diag_attrdiagstate.cpp.

AttributeDiagnoserState & faudes::AttributeDiagnoserState::DoAssign ( const AttributeDiagnoserState rSrc  )  [protected]

Copy attribute members.

Parameters:
rSrc Source to copy from

Definition at line 15 of file diag_attrdiagstate.cpp.

bool faudes::AttributeDiagnoserState::DoEqual ( const AttributeDiagnoserState rOther  )  const [protected]

Test equality.

Parameters:
rOther Attribute to compare with

Definition at line 116 of file diag_attrdiagstate.cpp.

void faudes::AttributeDiagnoserState::DoWrite ( TokenWriter rTw,
const std::string &  rLabel,
const Type pContext 
) const [protected, virtual]

Write mDiagnoserStateMap to TokenWriter.

Parameters:
rTw Reference to TokenWriter
rLabel Is ignored. Label of the section is "StateEstimates".
pContext Write context to provide contextual information

Reimplemented from faudes::AttributeFlags.

Definition at line 100 of file diag_attrdiagstate.cpp.

void faudes::AttributeDiagnoserState::DoRead ( TokenReader rTr,
const std::string &  rLabel,
const Type pContext 
) [protected, virtual]

Read mDiagnoserStateMap from TokenReader.

Parameters:
rTr Reference to TokenReader
rLabel Is ignored. Label of the section is "StateEstimates".
pContext Read context to provide contextual information

Reimplemented from faudes::AttributeFlags.

Definition at line 106 of file diag_attrdiagstate.cpp.


Member Data Documentation

The diagnoser state attribute is a map of state indices of the original generator to their failure label sets.

The whole map represents one state label of one particular state.

Definition at line 30 of file diag_attrdiagstate.h.


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

libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6