tobicore  7.0.0
 All Classes Functions Variables Typedefs Enumerator Friends Groups Pages
ICMessage Class Reference

TOBI iC message. More...

#include <tobiic/ICMessage.hpp>

+ Inheritance diagram for ICMessage:
+ Collaboration diagram for ICMessage:

Public Member Functions

 ICMessage (void)
 Constructor.
 ICMessage (ICMessage *const other)
 Copy constructor.
virtual ~ICMessage (void)
 Destructor.
virtual ICClassifierGetClassifier (const std::string &name) const
 Classifier getter.
virtual ICClassGetClass (const std::string &name, const ICLabel label) const
 Class getter.
virtual ICValue GetValue (const std::string &name, const ICLabel label) const
 Class value getter.
virtual void SetValue (const std::string &name, const ICLabel label, const ICValue value)
 Class value setter.
virtual void Dump (void) const
 Prints internal data.
- Public Member Functions inherited from TCBlock
 TCBlock (void)
 Constructor.
virtual int SetBlockIdx (int fidx=TCBlock::BlockIdxUnset)
 Frame index setter.
virtual int GetBlockIdx (void) const
 Frame index getter.
virtual int IncBlockIdx (void)
 Increments frame index.
virtual void UnsetBlockIdx (void)
 Unsets (invalidates) frame index.
virtual bool IsSetBlockIdx (void) const
 Checks if frame index is set (valid)

Public Attributes

ICSetClassifier classifiers
 ICClassifier map.
- Public Attributes inherited from TCBlock
TCTimestamp absolute
 Absolute timestamp.
TCTimestamp relative
 Relative timestamp.

Additional Inherited Members

- Static Public Attributes inherited from TCBlock
static const int BlockIdxUnset = -1
 Unset frame index value.
- Protected Attributes inherited from TCBlock
int _blockidx
 Frame index.

Detailed Description

TOBI iC message.

An ICMessage is a set of ICClassifier objects stored in an ICSetClassifier map. Whithin the ICSetClassifier map, each ICClassifier is identified with its name (i.e. "mi_classifier", "errp_classifier"). ICClassifier objects are added/removed directly via ICSetClassifier.

Each ICClassifier is a set of ICClass objects, stored in an ICSetClass map. Whithin the ICSetClass map, each ICClass is identified with its label (i.e. 0x756, 0x562).

Certain methods return a pointer to a classifier or the value of a class belonging to a classifier.

An ICMessage can be serialized/deserialized for IPC. As today the only possible serialization is in XML format via the ICSerializerRapid class. Still, users might derive their own serializers from the ICSerializer interface.

See Also
classifiers, GetClassifier, GetClass, GetValue, SetValue
Examples:
icexample.cpp, icserializerrapid.cpp, tpicclient.cpp, and tpicserver.cpp.

Definition at line 54 of file ICMessage.hpp.

Constructor & Destructor Documentation

ICMessage::ICMessage ( ICMessage *const  other)

Copy constructor.

Uses serialization/deserialization to copy data structrues

Definition at line 31 of file ICMessage.cpp.

+ Here is the call graph for this function:

Member Function Documentation

ICClass * ICMessage::GetClass ( const std::string &  name,
const ICLabel  label 
) const
virtual

Class getter.

Raises an exception if the classifier or the class were not found

  • name ICClassifier name (i.e. "mi_classifier")
  • label ICLabel class label (i.e. 0x756)
    Returns
    Reference to ICClass
Examples:
icexample.cpp.

Definition at line 47 of file ICMessage.cpp.

ICClassifier * ICMessage::GetClassifier ( const std::string &  name) const
virtual

Classifier getter.

Raises an exception if the classifier was not found

Definition at line 43 of file ICMessage.cpp.

ICValue ICMessage::GetValue ( const std::string &  name,
const ICLabel  label 
) const
virtual

Class value getter.

Raises an exception if the classifier or the class were not found

  • name ICClassifier name (i.e. "mi_classifier")
  • label ICLabel class label (i.e. 0x756)
    Returns
    Value
Examples:
icexample.cpp.

Definition at line 51 of file ICMessage.cpp.

void ICMessage::SetValue ( const std::string &  name,
const ICLabel  label,
const ICValue  value 
)
virtual

Class value setter.

Raises an exception if the classifier or the class were not found

  • name ICClassifier name (i.e. "mi_classifier")
  • label ICLabel class label (i.e. 0x756)
  • value ICValue class value (i.e. 0.750)

Definition at line 55 of file ICMessage.cpp.

Member Data Documentation

ICSetClassifier ICMessage::classifiers

ICClassifier map.

Set of ICClassifier objects

Examples:
icexample.cpp, icserializerrapid.cpp, and tpicclient.cpp.

Definition at line 120 of file ICMessage.hpp.


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