C++ TargetRTS
|
A controller that allows a custom actor object to control the execution of a physical thread in a multi-threaded RT application. More...
#include <RTCustomController.h>
Public Member Functions | |
RTCustomController (RTDebugger *, const char *) | |
virtual void | mainLoop (void) override |
void | registerLayer (RTActor *newLayer, RTActorFunction waitFunc, RTActorFunction wakeupFunc, RTActorFunction processFunc) override |
Register a custom actor object with the controller. | |
![]() | |
RTPeerController (RTDebugger *, const char *name) | |
virtual void | mainLoop (void) override |
![]() | |
RTController (RTDebugger *debug, const char *name) | |
Error | canPlugIn (const RTActorClass *, const RTComponentDescriptor *) |
Error | getError (void) const |
Get the most recent error that occurred in the controller's thread. | |
const char * | strerror (void) const |
Get an error message for the most recent error that occurred in the controller's thread. | |
void | perror (const char *s="error") |
Print an error message to stderr. | |
void | setError (Error error, Primitive primitive, const void *info, const void *detail) |
Set the most recent error for the controller's thread. | |
void | trace (Primitive, const void *, const void *) |
void | breakPoint (RTActor *, RTEventInfo *) |
void | evtMsgQueue (void) |
void | getMessages (const RTDaemonInfo &daemonInfo) |
Report all incoming messages satisfying actorPath in daemonInfo. | |
virtual const char * | name (void) const override |
Get the name of the controller, which is the name of its physical thread (as defined in the transformation configuration). | |
virtual void | kill (void) override |
Kill this controller. | |
virtual void | printStats (void) const |
Print various statistics to stdout about what has happened in the RT application (e.g. | |
void | abort (void) |
Abort the application. | |
RTDebugger * | debugger (void) |
Get the debugger associated with this controller, if any. | |
void | destroy (RTActor *actor, RTActor *owner) |
int | send (RTActor *receiver, int controlSignal, const void *data, const RTObject_class *type, int priority) |
void | receive (RTMessage *, RTController *sender) |
int | receiveMsgCopy (const RTMessage *, RTController *sender) |
void | peer_receive (RTMessage *) |
void | requeueMsg (RTMessage *, int front) |
RTMessage * | newMsg (void) |
void | freeMsg (RTMessage *) |
RTTimerNode * | newTimerNode (void) |
void | freeTimerNode (RTTimerNode *node) |
RTMessage * | getReplyBuffer (void) |
RTMessage * | setReplyBuffer (RTMessage *) |
void | restoreReplyBuffer (RTMessage *) |
virtual void | registerLayer (RTActor *, RTActorFunction, RTActorFunction, RTActorFunction) |
Register a custom actor object (i.e. | |
void | countActorDestroy (void) |
void | countActorIncarnate (void) |
void | countMessageTransfer (RTMessage *) |
void | countPortDestroy (int) |
void | countPortIncarnate (int) |
void | countTimerCancel (void) |
void | countTimerExpire (void) |
void | countTimerStart (void) |
![]() | |
virtual const char * | name (void) const =0 |
Phase | phase (void) const |
virtual void | mainLoop (void)=0 |
virtual void | kill (void)=0 |
Protected Member Functions | |
virtual void | waitForEvents (void) override |
virtual void | wakeup (void) override |
![]() | |
virtual void | startup (void) |
virtual void | waitForEvents (void) override |
virtual void | shutdown (void) |
![]() | |
int | dispatch (int priorityLimit) |
void | awaitResponse (void) |
virtual void | waitForEvents (void)=0 |
virtual void | wakeup (void) |
![]() | |
void | enter (Phase) |
Additional Inherited Members | |
![]() | |
enum | Primitive { CommDefer , CommDeliver , CommInvoke , CommPurge , CommRecall , CommRecallAll , CommReply , CommSend , ExceptionRaise , FrameDeport , FrameDestroy , FrameImport , FrameIncarnate , LayerBind , LayerRegisterSAP , LayerDeregisterSAP , LayerRegisterSPP , LayerDeregisterSPP , LayerResize , LayerResizeSAP , LayerResizeSPP , RegisterLayer , TimerCancel , TimerInform , SystemService } |
enum | Error { ok , alreadyDeferred , badActor , badClass , badId , badIndex , badInterface , badOperation , badRef , badSignal , badValue , deferInvoke , dereg , imported , noConnect , noFreePorts , noMem , noReply , notImported , notOptional , notOwner , prio , protocolSignal , protocolType , recursiveInvoke , refFull , reg , replRef , smallInterface , tooManySAPs , xRtsInvoke } |
typedef Error | rtsErrors |
![]() | |
enum | Phase { created , running , finished } |
![]() | |
enum | { OneDelivered , PermissionDenied , NoneToDeliver } |
![]() | |
RTSyncObject * | _sync |
![]() | |
RTMutex * | _mutex |
A controller that allows a custom actor object to control the execution of a physical thread in a multi-threaded RT application.
A custom actor object may register its address, and the 'waitForEvents', 'wakeup' and 'processIPCData' functions to be called by the RTCustomController. This allows the custom actor object to implement its own mechanism for waiting for events (e.g. using an event loop provided by a GUI framework). The custom actor object may also call the RTCustomController's 'wakeup' function to interrupt the wait for events.
|
overridevirtual |
Reimplemented from RTPeerController.
|
overridevirtual |
Register a custom actor object with the controller.
The custom actor object must pass its 'waitForEvents', 'wakeup' and 'processIPCData' functions as arguments. This allows the custom actor object to implement its own mechanism for waiting for events (e.g. using an event loop provided by a GUI framework). The custom actor object may also call the RTCustomController 'wakeup' function to interrupt the wait for events.
newLayer | The custom actor object |
_wait | The address of the custom actor object's 'waitForEvents' function |
_wakeup | The address of the custom actor object's 'wakeup' function |
_process | The address of the custom actor object's 'processIPCData' function |
Reimplemented from RTController.
|
overrideprotectedvirtual |
Reimplemented from RTPeerController.
|
overrideprotectedvirtual |
Reimplemented from RTController.