#include <Sender.h>
Inheritance diagram for SenderBase< T >:
Public Member Functions | |
SenderBase (PlatformProcess *process, const char *senderName, bool blocking) | |
The constructor. | |
int | fillEntryTable (ObjectEntry *entryTable, int id) |
Fills the Aperios entry table for global functions. | |
bool | requestedNew () const |
Returns whether a new package was requested from the sender. | |
void | send () |
Marks the package for sending and transmits it to all receivers that already requested for it. | |
Protected Member Functions | |
virtual void | preparePackage () |
The function prepares a package. | |
virtual void | setPackage (const ObserverID &receiver) |
The functions sets a package for a receiver. | |
virtual void | freePackage () |
The function frees the package. | |
Private Member Functions | |
void | handleMessage (OReadyMessage &msg) |
The function is called when a receiver announces that it is ready to receive a package. | |
void | sendPackage () |
The function sends a package to all receivers that requested it. | |
Static Private Member Functions | |
void | aperiosControl (OControlMessage *msg) |
The Aperios control handler. | |
void | aperiosReady (OReadyMessage *msg) |
The Aperios handler that is called when a receiver announces that it is ready to receive a package. | |
Private Attributes | |
ObserverID | receiver [RECEIVERS_MAX] |
A list of all receivers that are ready to receive a package. | |
ObserverID | alreadyReceived [RECEIVERS_MAX] |
A list of all receivers that have already received the current package. | |
int | numOfReceivers |
The number of entries in the receiver list. | |
int | numOfAlreadyReceived |
The number of entries in the alreadyReceived list. | |
Static Private Attributes | |
SenderBase< T > * | theInstance = 0 |
The only instance of SenderBase<T>. |
A sender is an object that sends packages to an Aperios queue. Note that the template parameter is required to force a different instantiation of the static members for each package type.
Definition at line 106 of file Sender.h.
|
The constructor.
|
|
The function is called when a receiver announces that it is ready to receive a package.
|
|
The Aperios control handler.
|
|
The Aperios handler that is called when a receiver announces that it is ready to receive a package.
|
|
The function prepares a package. The function should be pure virtual, but GreenHills does not like that. Reimplemented in MotorCommandsSender, Sender< T >, SoundDataSender, and Sender< MessageQueue >. Definition at line 164 of file Sender.h. Referenced by SenderBase< MotorCommands >::sendPackage(). |
|
The functions sets a package for a receiver. The function should be pure virtual, but GreenHills does not like that.
Reimplemented in MotorCommandsSender, Sender< T >, SoundDataSender, and Sender< MessageQueue >. Definition at line 171 of file Sender.h. Referenced by SenderBase< MotorCommands >::sendPackage(). |
|
The function frees the package. The function should be pure virtual, but GreenHills does not like that. Reimplemented in MotorCommandsSender, Sender< T >, SoundDataSender, and Sender< MessageQueue >. Definition at line 177 of file Sender.h. Referenced by SenderBase< MotorCommands >::sendPackage(). |
|
The function sends a package to all receivers that requested it.
Implements SenderList. Definition at line 183 of file Sender.h. Referenced by SenderBase< MotorCommands >::send(). |
|
Fills the Aperios entry table for global functions. The function will write two entries into the table.
Implements SenderList. |
|
Returns whether a new package was requested from the sender. This is always true if this is a blocking sender.
Definition at line 268 of file Sender.h. Referenced by MultiDebugSender< MessageQueue >::send(). |
|
Marks the package for sending and transmits it to all receivers that already requested for it. All other receiver may get it later if they request for it before the package is changed. Reimplemented in MultiDebugSender< T >, and MultiDebugSender< MessageQueue >. Definition at line 274 of file Sender.h. Referenced by MultiDebugSender< MessageQueue >::send(). |
|
The only instance of SenderBase<T>.
|
|
A list of all receivers that are ready to receive a package.
|
|
A list of all receivers that have already received the current package.
|
|
The number of entries in the receiver list.
|
|
The number of entries in the alreadyReceived list.
|