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

# ReceiverList Class Reference

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

`#include <Receiver.h>`

Inheritance diagram for ReceiverList:

[legend]
Collaboration diagram for ReceiverList:

[legend]
List of all members.

## Public Member Functions
| ReceiverList (PlatformProcess *process, const char *receiverName, bool blocking)
| The constructor.
ReceiverList *& | getFirst ()
| Returns the begin of the list of all receivers.
ReceiverList * | getNext () const
| Returns the next receiver in the list.
const char * | getName () const
| Returns the Aperios connection name of the receiver.
virtual int | fillEntryTable (ObjectEntry *entryTable, int id)=0
| Fills the Aperios entry table for global functions.
bool | receivedNew () const
| Returns whether a new package was received in the current frame.
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 Attributes
int | eventId
| The id of the current receiver in the range [0..30].
bool | blocking
| Stores whether this is a blocking receiver.
## Private Attributes
PlatformProcess * | process
| The process this receiver is associated with.
ReceiverList * | next
| The successor of the current receiver.
char | name [NAME_LENGTH_MAX]
| The name of a receiver without the module's name.

## Detailed Description

The class is the base class for receivers.

A receiver is an object that reads packages from Aperios queues. The class manages a global list of all receivers in an Aperios process.

Definition at line 21 of file Receiver.h.

## Constructor & Destructor Documentation

ReceiverList::ReceiverList | ( | PlatformProcess * | process,
|  | const char * | receiverName,
|  | bool | blocking
| ) |

  | The constructor. Parameters:
  process | The process this receiver is associated with.
  receiverName | The Aperios connection name of the receiver without the process name.
  blocking | Decides whether this receiver blocks the execution of the next frame until it has received a package.
Definition at line 7 of file Receiver.cpp. References getFirst(), and next.

Here is the call graph for this function:

## Member Function Documentation

ReceiverList *& ReceiverList::getFirst | ( |  | ) |

| Returns the begin of the list of all receivers. Returns: The first receiver in the list, or 0 if the list ist empty. Definition at line 25 of file Receiver.cpp. References PlatformProcess::getFirstReceiver(). Referenced by finishFrame(), and ReceiverList().

Here is the call graph for this function:

ReceiverList* ReceiverList::getNext | ( |  | ) | const`[inline]`

| Returns the next receiver in the list. Returns: The next receiver in the list, or 0 if this receiver is the last one. Definition at line 52 of file Receiver.h. References next. Referenced by ProcessCreator< T >::DoInit(), ProcessCreator< T >::DoStart(), ProcessCreator< T >::DoStop(), finishFrame(), and ProcessBase::init().

const char* ReceiverList::getName | ( |  | ) | const`[inline]`

| Returns the Aperios connection name of the receiver. Returns: The Aperios connection name without the process name ("Receiver.type.O") Definition at line 58 of file Receiver.h. Referenced by ProcessCreator< T >::DoInit().

virtual int ReceiverList::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 Receiver< T >. Referenced by ProcessBase::init().

bool ReceiverList::receivedNew | ( |  | ) | const

| Returns whether a new package was received in the current frame. This is always true if this is a blocking receiver. Returns: Has a new package been received? Definition at line 30 of file Receiver.cpp. References eventId, and ProcessBase::getEventMask(). Referenced by finishFrame().

Here is the call graph for this function:

void ReceiverList::finishFrame | ( |  | ) |

| The function must be called to finish the current frame. Definition at line 35 of file Receiver.cpp. References blocking, eventId, getFirst(), getNext(), receivedNew(), and ProcessBase::setBlockingId().

Here is the call graph for this function:

void ReceiverList::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 45 of file Receiver.cpp. References ProcessBase::setBlockingId(). Referenced by Receiver< T >::fillEntryTable().

Here is the call graph for this function:

void ReceiverList::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 50 of file Receiver.cpp. References ProcessBase::setEventId(). Referenced by SharedReceiver< T >::handleMessage(), and Receiver< T >::handleMessage().

Here is the call graph for this function:

## Member Data Documentation

PlatformProcess* ReceiverList::process`[private]`

| The process this receiver is associated with. Definition at line 24 of file Receiver.h.

ReceiverList* ReceiverList::next`[private]`

| The successor of the current receiver. Definition at line 25 of file Receiver.h. Referenced by getNext(), and ReceiverList().

char ReceiverList::name[NAME_LENGTH_MAX]`[private]`

| The name of a receiver without the module's name. Definition at line 26 of file Receiver.h.

int ReceiverList::eventId`[protected]`

| The id of the current receiver in the range [0..30]. Definition at line 29 of file Receiver.h. Referenced by finishFrame(), and receivedNew().

bool ReceiverList::blocking`[protected]`

| Stores whether this is a blocking receiver. Definition at line 30 of file Receiver.h. Referenced by finishFrame().

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

- Platform/Aperios1.3.2/Receiver.h
- Platform/Aperios1.3.2/Receiver.cpp