Detailed Description

Implements state estimates for the current status of the generator.

Definition at line 21 of file diag_attrdiagstate.h.

#include <diag_attrdiagstate.h>

Public Member Functions

 AttributeDiagnoserState (void)
 Default constructor. More...
 
 ~AttributeDiagnoserState (void)
 Destructor. More...
 
bool IsDefault (void) const
 Test for default value. More...
 
virtual void Clear (void)
 Delete the mDiagnoserStateMap. More...
 
const TaIndexSet< DiagLabelSet > & DiagnoserStateMap (void) const
 Get mDiagnoserStateMap. More...
 
const TaIndexSet< DiagLabelSet > * DiagnoserStateMapp (void) const
 Get pointer to mDiagnoserStateMap. More...
 
void DiagnoserStateMap (const TaIndexSet< DiagLabelSet > &newDiagStateMap)
 Set mDiagnoserStateMap. More...
 
void AddStateLabelMapping (Idx state, Idx label)
 Add single value of state estimate to mDiagnoserStateMap. More...
 
void AddStateLabelMap (Idx gstate, const DiagLabelSet &labels)
 Add state estimates to mDiagnoserStateMap. More...
 
std::string Str (void) const
 Pretty printable string of mDiagnoserStateMap. More...
 
bool ExistsState (Idx state) const
 Check whether state estimate exists in mDiagnoserStateMap. More...
 
- Public Member Functions inherited from faudes::AttributeFlags
 AttributeFlags (void)
 Default constructor. More...
 
 AttributeFlags (const AttributeFlags &rOther)
 Copy constructor. More...
 
virtual ~AttributeFlags (void)
 Destructor. More...
 
bool Test (fType mask) const
 Test a flag. More...
 
bool TestAll (fType mask) const
 Test multible flags, combine by "and". More...
 
bool TestSome (fType mask) const
 Test multible flags, combine by "or". More...
 
bool TestNone (fType mask) const
 Test multible flags, combine by "not or". More...
 
void Set (fType mask)
 Set multiple flags. More...
 
void Clr (fType mask)
 Clear multiple flags. More...
 
- Public Member Functions inherited from faudes::AttributeVoid
 AttributeVoid (void)
 Constructor. More...
 
 AttributeVoid (const AttributeVoid &rSrcAttr)
 Copy Constructor. More...
 
virtual ~AttributeVoid (void)
 Destructor. More...
 
virtual void SetDefault (void)
 Set to default value. More...
 
- Public Member Functions inherited from faudes::Type
 Type (void)
 Constructor. More...
 
 Type (const Type &rType)
 Copy constructor. More...
 
virtual ~Type (void)
 Destructor. More...
 
virtual TypeNew (void) const
 Construct on heap. More...
 
virtual TypeCopy (void) const
 Construct on heap. More...
 
virtual const TypeCast (const Type *pOther) const
 Cast other object to this type. More...
 
virtual TypeAssign (const Type &rSrc)
 Assign configuration data from other object. More...
 
virtual Typeoperator= (const Type &rSrc)
 Assign configurationdata from other object. More...
 
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual bool operator== (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual bool operator!= (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual void Name (const std::string &rName)
 Set the objects's name. More...
 
virtual const std::string & Name (void) const
 Get objects's name. More...
 
virtual const std::string & TypeName (void) const
 Get objects's type name. More...
 
void Write (const Type *pContext=0) const
 Write configuration data to console. More...
 
void Write (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 Write configuration data to a file. More...
 
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 Write configuration data to a file. More...
 
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to TokenWriter. More...
 
virtual void XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to an XML file. More...
 
void XWrite (const Type *pContext=0) const
 Write configuration data in XML format to concole Note: this write function uses the virtual function DoXWrite(), to be reimplemented by derived classes. More...
 
void XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in XML format to TokenWriter. More...
 
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a string. More...
 
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a formated string. More...
 
void DWrite (const Type *pContext=0) const
 Write configuration data to console, debugging format. More...
 
void DWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 Write configuration data to a file, debugging format. More...
 
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in debug format to TokenWriter. More...
 
void SWrite (TokenWriter &rTw) const
 Write statistics comment to TokenWriter. More...
 
void SWrite (void) const
 Write statistics comment to console. More...
 
std::string ToSText (void) const
 Write statistics to a string. More...
 
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from file with label specified. More...
 
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from a string. More...
 
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from TokenReader with label sepcified. More...
 

Protected Member Functions

void DoAssign (const AttributeDiagnoserState &rSrc)
 Copy attribute members. More...
 
bool DoEqual (const AttributeDiagnoserState &rOther) const
 Test equality. More...
 
void DoWrite (TokenWriter &rTw, const std::string &rLabel, const Type *pContext) const
 Write mDiagnoserStateMap to TokenWriter. More...
 
void DoXWrite (TokenWriter &rTw, const std::string &rLabel, const Type *pContext) const
 Write mDiagnoserStateMap to TokenWriter. More...
 
void DoRead (TokenReader &rTr, const std::string &rLabel, const Type *pContext)
 Read mDiagnoserStateMap from TokenReader. More...
 
- Protected Member Functions inherited from faudes::AttributeFlags
void DoAssign (const AttributeFlags &rSrcAttr)
 Assignment method. More...
 
bool DoEqual (const AttributeFlags &rOther) const
 Test equality of configuration data. More...
 
- Protected Member Functions inherited from faudes::AttributeVoid
void DoAssign (const AttributeVoid &rSrcAttr)
 Assign attribute members. More...
 
bool DoEqual (const AttributeVoid &rOther) const
 Test equality of configuration data. More...
 
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Actual write method to write the attribute to a TokenWriter. More...
 
- Protected Member Functions inherited from faudes::Type
void DoAssign (const Type &rSrc)
 Assign configuration data from other object. More...
 
bool DoEqual (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual void DoSWrite (TokenWriter &rTw) const
 Write statistical data as a comment to TokenWriter. More...
 
virtual const TypeDefinitionTypeDefinitionp (void) const
 Get objects's type definition. More...
 
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const
 

Private Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from faudes::AttributeVoid
static void Skip (TokenReader &rTr)
 Skip attribute tokens. More...
 
- Public Attributes inherited from faudes::AttributeFlags
fType mFlags
 Flags (public access for convenience)
More...
 
- Static Public Attributes inherited from faudes::AttributeFlags
static const fType mDefFlags =0x0
 

Constructor & Destructor Documentation

◆ AttributeDiagnoserState()

faudes::AttributeDiagnoserState::AttributeDiagnoserState ( void  )

Default constructor.

Definition at line 15 of file diag_attrdiagstate.cpp.

◆ ~AttributeDiagnoserState()

faudes::AttributeDiagnoserState::~AttributeDiagnoserState ( void  )

Destructor.

Definition at line 23 of file diag_attrdiagstate.cpp.

Member Function Documentation

◆ AddStateLabelMap()

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

Add state estimates to mDiagnoserStateMap.

Parameters
gstateIndex of generator state estimate.
labelsIndex of associated failure labels.

Definition at line 71 of file diag_attrdiagstate.cpp.

◆ AddStateLabelMapping()

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

Add single value of state estimate to mDiagnoserStateMap.

Parameters
stateIndex of generator state estimate.
labelIndex of associated failure label.

Definition at line 58 of file diag_attrdiagstate.cpp.

◆ Clear()

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

Delete the mDiagnoserStateMap.

Reimplemented from faudes::AttributeVoid.

Definition at line 38 of file diag_attrdiagstate.cpp.

◆ DiagnoserStateMap() [1/2]

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

Set mDiagnoserStateMap.

Parameters
newDiagStateMapNew DiagnoserStateMap

Definition at line 53 of file diag_attrdiagstate.cpp.

◆ DiagnoserStateMap() [2/2]

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

Get mDiagnoserStateMap.

Returns
mDiagnoserStateMap

Definition at line 43 of file diag_attrdiagstate.cpp.

◆ DiagnoserStateMapp()

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

Get pointer to mDiagnoserStateMap.

Returns
Pointer to mDiagnoserStateMap

Definition at line 48 of file diag_attrdiagstate.cpp.

◆ DoAssign()

void faudes::AttributeDiagnoserState::DoAssign ( const AttributeDiagnoserState rSrc)
protected

Copy attribute members.

Parameters
rSrcSource to copy from

Definition at line 27 of file diag_attrdiagstate.cpp.

◆ DoEqual()

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

Test equality.

Parameters
rOtherAttribute to compare with

Definition at line 136 of file diag_attrdiagstate.cpp.

◆ DoRead()

void faudes::AttributeDiagnoserState::DoRead ( TokenReader rTr,
const std::string &  rLabel,
const Type pContext 
)
protectedvirtual

Read mDiagnoserStateMap from TokenReader.

Parameters
rTrReference to TokenReader
rLabelIs ignored. Label of the section is "StateEstimates".
pContextRead context to provide contextual information

Reimplemented from faudes::AttributeFlags.

Definition at line 123 of file diag_attrdiagstate.cpp.

◆ DoWrite()

void faudes::AttributeDiagnoserState::DoWrite ( TokenWriter rTw,
const std::string &  rLabel,
const Type pContext 
) const
protectedvirtual

Write mDiagnoserStateMap to TokenWriter.

Parameters
rTwReference to TokenWriter
rLabelIs ignored. Label of the section is "StateEstimates".
pContextWrite context to provide contextual information

Reimplemented from faudes::AttributeFlags.

Definition at line 111 of file diag_attrdiagstate.cpp.

◆ DoXWrite()

void faudes::AttributeDiagnoserState::DoXWrite ( TokenWriter rTw,
const std::string &  rLabel,
const Type pContext 
) const
protectedvirtual

Write mDiagnoserStateMap to TokenWriter.

Parameters
rTwReference to TokenWriter
rLabelIs ignored. Label of the section is "StateEstimates".
pContextWrite context to provide contextual information

Reimplemented from faudes::AttributeFlags.

Definition at line 117 of file diag_attrdiagstate.cpp.

◆ ExistsState()

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

Check whether state estimate exists in mDiagnoserStateMap.

Parameters
stateIndex of state to check.
Returns
True if state exists.

Definition at line 106 of file diag_attrdiagstate.cpp.

◆ IsDefault()

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

Test for default value.

Returns
True for default value.

Reimplemented from faudes::AttributeFlags.

Definition at line 33 of file diag_attrdiagstate.cpp.

◆ Str()

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

Pretty printable string of mDiagnoserStateMap.

Returns
String representation of mDiagnoserStateMap.

Definition at line 88 of file diag_attrdiagstate.cpp.

Member Data Documentation

◆ mDiagnoserStateMap

TaIndexSet<DiagLabelSet> faudes::AttributeDiagnoserState::mDiagnoserStateMap
private

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.32b --- 2024.03.01 --- c++ api documentaion by doxygen