#include <ProcessFramework.h>
Inheritance diagram for ProcessBase:
Public Member Functions | |
void | getAntInformation (int *&listenContSelector, int *&sendContSelector, int *&receiveContSelector, int *&closeContSelector, int *&connectContSelector) |
OID * | getOID () |
ProcessBase () | |
Constructor. | |
void | stop () |
The function marks the process as stopped. | |
bool | isRunning () |
The function returns whether the process is still running. | |
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. | |
int | getEventMask () |
Returns the event mask. | |
void | resetEventMask () |
Resets the event mask. | |
Static Public Attributes | |
ProcessBase * | theInstance = 0 |
A pointer to the only instance of this class. | |
Protected Member Functions | |
void | init () |
The function initializes the object and should immediately be called after the construction of an object. | |
virtual void | processNextFrame ()=0 |
The function is called once for each frame. | |
virtual PlatformProcess * | getProcess ()=0 |
The function returns the address of the associated process. | |
Static Private Member Functions | |
void | aperiosInit (OReasonMessage *reasonMsg) |
A global Aperios event handler that calls OObject::Init(). | |
void | aperiosStart (OReasonMessage *reasonMsg) |
A global Aperios event handler that calls OObject::Start(). | |
void | aperiosStop (OReasonMessage *reasonMsg) |
A global Aperios event handler that calls OObject::Stop(). | |
void | aperiosDestroy (OReasonMessage *reasonMsg) |
A global Aperios event handler that calls OObject::Destroy(). | |
void | awakeOnTimer (OReasonMessage *reasonMsg) |
A global event handler for timer events. | |
void | antConnectCont (antEnvMsg *msg) |
Global event handlers for IP-networking. | |
void | antReceiveCont (antEnvMsg *msg) |
void | antSendCont (antEnvMsg *msg) |
void | antListenCont (antEnvMsg *msg) |
void | antCloseCont (antEnvMsg *msg) |
void | nextFrame () |
The function calls the member ProcessNextFrame() of the only instance of this class. | |
Private Attributes | |
bool | running |
The flag states whether the process is still running. | |
int | antConnectContSelector |
int | antReceiveContSelector |
int | antSendContSelector |
int | antListenContSelector |
int | antCloseContSelector |
Static Private Attributes | |
int | blockMask |
A mask with bits set for all blocking senders and receivers. | |
int | eventMask |
A mask with bits set for all senders and receivers that received an event. |
ProcessBase contains the parts that need not to be implemented as a template. It will only be used by the macro MAKE_PROCESS and should never be used directly.
Definition at line 84 of file ProcessFramework.h.
|
Constructor.
Definition at line 180 of file ProcessFramework.h. References running, and theInstance. |
|
Definition at line 131 of file ProcessFramework.cpp. References antCloseContSelector, antConnectContSelector, antListenContSelector, antReceiveContSelector, and antSendContSelector. |
|
Definition at line 91 of file ProcessFramework.h. Referenced by IPEndpoint::IPEndpoint(). |
|
A global Aperios event handler that calls OObject::Init().
Definition at line 57 of file ProcessFramework.cpp. References theInstance. Referenced by init(). |
|
A global Aperios event handler that calls OObject::Start().
Definition at line 63 of file ProcessFramework.cpp. References theInstance. Referenced by init(). |
|
A global Aperios event handler that calls OObject::Stop().
Definition at line 69 of file ProcessFramework.cpp. References theInstance. Referenced by init(). |
|
A global Aperios event handler that calls OObject::Destroy().
Definition at line 75 of file ProcessFramework.cpp. References theInstance. Referenced by init(). |
|
A global event handler for timer events. It is automatically called after a certain time if Process::main() returned a nonzero value. It will note that the timer event occurred, and will start a new frame if there are no other pending event, i.e. waiting receivers.
Definition at line 81 of file ProcessFramework.cpp. References setEventId(). Referenced by init(). |
Here is the call graph for this function:
|
Global event handlers for IP-networking.
Definition at line 99 of file ProcessFramework.cpp. Referenced by init(). |
|
Definition at line 107 of file ProcessFramework.cpp. Referenced by init(). |
|
Definition at line 115 of file ProcessFramework.cpp. Referenced by init(). |
|
Definition at line 88 of file ProcessFramework.cpp. Referenced by init(). |
|
Definition at line 123 of file ProcessFramework.cpp. Referenced by init(). |
|
The function calls the member ProcessNextFrame() of the only instance of this class.
Definition at line 199 of file ProcessFramework.cpp. References isRunning(), processNextFrame(), and theInstance. Referenced by setEventId(). |
Here is the call graph for this function:
|
The function initializes the object and should immediately be called after the construction of an object.
Definition at line 142 of file ProcessFramework.cpp. References antCloseCont(), antCloseContSelector, antConnectCont(), antConnectContSelector, antListenCont(), antListenContSelector, antReceiveCont(), antReceiveContSelector, antSendCont(), antSendContSelector, aperiosDestroy(), aperiosInit(), aperiosStart(), aperiosStop(), ASSERT, awakeOnTimer(), SenderList::fillEntryTable(), ReceiverList::fillEntryTable(), PlatformProcess::getFirstReceiver(), PlatformProcess::getFirstSender(), SenderList::getNext(), ReceiverList::getNext(), getProcess(), and ObjectEntryTable. Referenced by ProcessCreator< T >::ProcessCreator(). |
Here is the call graph for this function:
|
The function is called once for each frame.
Implemented in ProcessCreator< T >. Referenced by nextFrame(). |
|
The function returns the address of the associated process.
Implemented in ProcessCreator< T >. Referenced by init(). |
|
The function marks the process as stopped.
Definition at line 188 of file ProcessFramework.h. References running. Referenced by ProcessCreator< T >::DoStop(). |
|
The function returns whether the process is still running.
Definition at line 194 of file ProcessFramework.h. References running. Referenced by nextFrame(). |
|
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.
Definition at line 205 of file ProcessFramework.cpp. References blockMask. Referenced by ProcessCreator< T >::DoInit(), ReceiverList::finishFrame(), ProcessCreator< T >::processNextFrame(), SenderList::setBlockingId(), and ReceiverList::setBlockingId(). |
|
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.
Definition at line 213 of file ProcessFramework.cpp. References blockMask, eventMask, and nextFrame(). Referenced by awakeOnTimer(), ProcessCreator< T >::DoStart(), SenderList::setEventId(), and ReceiverList::setEventId(). |
Here is the call graph for this function:
|
Returns the event mask.
Definition at line 218 of file ProcessFramework.h. References eventMask. Referenced by ReceiverList::receivedNew(). |
|
Resets the event mask.
Definition at line 223 of file ProcessFramework.h. References eventMask. Referenced by ProcessCreator< T >::processNextFrame(). |
|
A pointer to the only instance of this class.
Definition at line 53 of file ProcessFramework.cpp. Referenced by aperiosDestroy(), aperiosInit(), aperiosStart(), aperiosStop(), nextFrame(), and ProcessBase(). |
|
Initial value: 0 ProcessBase::eventMask = 0
Definition at line 51 of file ProcessFramework.cpp. Referenced by setBlockingId(), and setEventId(). |
|
A mask with bits set for all senders and receivers that received an event.
Definition at line 96 of file ProcessFramework.h. Referenced by getEventMask(), resetEventMask(), and setEventId(). |
|
The flag states whether the process is still running.
Definition at line 98 of file ProcessFramework.h. Referenced by isRunning(), ProcessBase(), and stop(). |
|
Definition at line 139 of file ProcessFramework.h. Referenced by getAntInformation(), and init(). |
|
Definition at line 142 of file ProcessFramework.h. Referenced by getAntInformation(), and init(). |
|
Definition at line 145 of file ProcessFramework.h. Referenced by getAntInformation(), and init(). |
|
Definition at line 148 of file ProcessFramework.h. Referenced by getAntInformation(), and init(). |
|
Definition at line 151 of file ProcessFramework.h. Referenced by getAntInformation(), and init(). |