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

Utility class to handle iD messages. More...

#include <tobiid/IDAsClient.hpp>

+ Inheritance diagram for IDAsClient:
+ Collaboration diagram for IDAsClient:

Public Types

enum  { BlockThis = 0, BlockPrev, BlockNext, BlockAll }
 Dequeue search direction (in time) More...

Public Member Functions

 IDAsClient (void)
 Constructor.
virtual ~IDAsClient (void)
 Destructor.
virtual void Enqueue (const IDMessage message, bool updatefidx=false)
 Add an IDMessage to the internal queue.
virtual bool Dequeue (IDMessage *message=NULL, const IDFtype type=IDMessage::FamilyUndef, const IDevent event=IDMessage::EventNull, const int direction=IDAsClient::BlockAll)
 Dequeues an IDMessage, removing it from the internal queue.
virtual unsigned int Size (void) const
 Queue size getter.
virtual unsigned int Clear (void)
 Queue cleaner.
virtual void Dump (void) const
 Queue cleaner.
- 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)

Additional Inherited Members

- Public Attributes inherited from TCBlock
TCTimestamp absolute
 Absolute timestamp.
TCTimestamp relative
 Relative timestamp.
- 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

Utility class to handle iD messages.

This class can be useful to:

  • handle large amounts of received IDMessage objects searching them by IDFtype, IDevent and direction
  • gather a deeper understanding on how IDMessage classes can be handled

Definition at line 38 of file IDAsClient.hpp.

Member Enumeration Documentation

anonymous enum

Dequeue search direction (in time)

Indentifies the messages generated and sent by BCI modules located before, after or at the same position of the current module. For further details: TOBI iD for dummies.

Enumerator:
BlockThis 

Messages from modules at the same position in the processing pipeline of the current module

BlockPrev 

Messages from modules at the same position in the processing pipeline of the current module

BlockNext 

Messages from modules at the same position in the processing pipeline of the current module

BlockAll 

Messages from all modules.

Definition at line 89 of file IDAsClient.hpp.

Member Function Documentation

unsigned int IDAsClient::Clear ( void  )
virtual

Queue cleaner.

Returns
The number of deleted IDMessage

Definition at line 119 of file IDAsClient.cpp.

+ Here is the call graph for this function:

bool IDAsClient::Dequeue ( IDMessage message = NULL,
const IDFtype  type = IDMessage::FamilyUndef,
const IDevent  event = IDMessage::EventNull,
const int  direction = IDAsClient::BlockAll 
)
virtual

Dequeues an IDMessage, removing it from the internal queue.

  • message Reference to an already allocated IDMessage
  • type Matching rule based on IDFtype
  • event Matching rule based on IDevent
  • direction Matching rule based on direction

Definition at line 36 of file IDAsClient.cpp.

+ Here is the call graph for this function:

void IDAsClient::Enqueue ( const IDMessage  message,
bool  updatefidx = false 
)
virtual

Add an IDMessage to the internal queue.

  • message IDMessage to enqueue
  • updatefidx Tic the frame timestamp if true

Definition at line 30 of file IDAsClient.cpp.

+ Here is the call graph for this function:

unsigned int IDAsClient::Size ( void  ) const
virtual

Queue size getter.

Returns
The number of queued IDMessage

Definition at line 115 of file IDAsClient.cpp.

+ Here is the caller graph for this function:


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