Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SenderList Class Reference

The class is the base class for senders. More...

#include <Sender.h>

Inheritance diagram for SenderList:

Inheritance graph
[legend]
Collaboration diagram for SenderList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SenderList (PlatformProcess *process, const char *senderName, bool blocking)
 The constructor.

SenderList *& getFirst ()
 Returns the begin of the list of all senders.

SenderListgetNext () const
 Returns the next sender in the list.

const char * getName () const
 Returns the Aperios connection name of the sender.

virtual int fillEntryTable (ObjectEntry *entryTable, int id)=0
 Fills the Aperios entry table for global functions.

void finishFrame ()
 The function must be called to finish the current frame.


Static Public Member Functions

void setBlockingId (int id, bool block=true)
 The functions sets or resets a bit in the blocking mask.

void setEventId (int id)
 The function is called when an event was received.


Protected Member Functions

virtual void sendPackage ()=0
 The function sends a package to all receivers that requested it.


Protected Attributes

int eventId
 The id of the current sender in the range [0..30].

bool blocking
 Stores whether this is a blocking sender.


Private Attributes

PlatformProcessprocess
 The process this sender is associated with.

SenderListnext
 The successor of the current sender.

char name [NAME_LENGTH_MAX]
 The name of a sender without the module's name.


Detailed Description

The class is the base class for senders.

A sender is an object that sends packages to an Aperios queue. The class manages a global list of all senders in an Aperios process.

Definition at line 23 of file Sender.h.


Constructor & Destructor Documentation

SenderList::SenderList PlatformProcess process,
const char *  senderName,
bool  blocking
 

The constructor.

Parameters:
process The process this sender is associated with.
senderName The Aperios connection name of the sender without the process name.
blocking Decides whether this sender blocks the execution of the next frame until all connected receivers have requested a new package.

Definition at line 8 of file Sender.cpp.

References getFirst(), and next.

Here is the call graph for this function:


Member Function Documentation

virtual void SenderList::sendPackage  )  [protected, pure virtual]
 

The function sends a package to all receivers that requested it.

Implemented in SenderBase< T >, SenderBase< SoundData >, SenderBase< MessageQueue >, and SenderBase< MotorCommands >.

Referenced by finishFrame().

SenderList *& SenderList::getFirst  ) 
 

Returns the begin of the list of all senders.

Returns:
The first sender in the list, or 0 if the list ist empty.

Definition at line 26 of file Sender.cpp.

References PlatformProcess::getFirstSender().

Referenced by finishFrame(), and SenderList().

Here is the call graph for this function:

SenderList* SenderList::getNext  )  const [inline]
 

Returns the next sender in the list.

Returns:
The next sender in the list, or 0 if this sender is the last one.

Definition at line 59 of file Sender.h.

Referenced by ProcessCreator< T >::DoInit(), finishFrame(), and ProcessBase::init().

const char* SenderList::getName  )  const [inline]
 

Returns the Aperios connection name of the sender.

Returns:
The Aperios connection name without the process name ("Sender.type.O")

Definition at line 65 of file Sender.h.

Referenced by ProcessCreator< T >::DoInit().

virtual int SenderList::fillEntryTable ObjectEntry *  entryTable,
int  id
[pure virtual]
 

Fills the Aperios entry table for global functions.

The function will write two entries into the table.

Parameters:
entryTable The Aperios entry table.
id The first empty id in the entry table.
Returns:
The new first empty id in the entry table.

Implemented in SenderBase< T >, SenderBase< SoundData >, SenderBase< MessageQueue >, and SenderBase< MotorCommands >.

Referenced by ProcessBase::init().

void SenderList::finishFrame  ) 
 

The function must be called to finish the current frame.

Definition at line 31 of file Sender.cpp.

References getFirst(), getNext(), and sendPackage().

Referenced by ProcessCreator< T >::processNextFrame().

Here is the call graph for this function:

void SenderList::setBlockingId int  id,
bool  block = true
[static]
 

The functions sets or resets a bit in the blocking mask.

After a bit is set in the blocking mask for a certain sender or receiver, a new frame will not be started before this sender or receiver received an event.

Parameters:
id The id of the sender or receiver.
block Should it block or not?

Definition at line 37 of file Sender.cpp.

References ProcessBase::setBlockingId().

Referenced by SenderBase< MotorCommands >::fillEntryTable(), and SenderBase< MotorCommands >::send().

Here is the call graph for this function:

void SenderList::setEventId int  id  )  [static]
 

The function is called when an event was received.

If this was the last event the process was waiting for, the next frame is started, i.e. NextFrame() is called.

Parameters:
id The id of the sender or receiver that received an event.

Definition at line 42 of file Sender.cpp.

References ProcessBase::setEventId().

Referenced by SenderBase< MotorCommands >::handleMessage().

Here is the call graph for this function:


Member Data Documentation

PlatformProcess* SenderList::process [private]
 

The process this sender is associated with.

Definition at line 26 of file Sender.h.

SenderList* SenderList::next [private]
 

The successor of the current sender.

Definition at line 27 of file Sender.h.

Referenced by SenderList().

char SenderList::name[NAME_LENGTH_MAX] [private]
 

The name of a sender without the module's name.

Definition at line 28 of file Sender.h.

int SenderList::eventId [protected]
 

The id of the current sender in the range [0..30].

Definition at line 31 of file Sender.h.

bool SenderList::blocking [protected]
 

Stores whether this is a blocking sender.

Definition at line 32 of file Sender.h.


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:11:40 2004 for GT2004 by doxygen 1.3.6