10#ifndef __RTController_h__
11#define __RTController_h__ included
21#ifndef __RTMessageQ_h__
22#include <RTMessageQ.h>
25#ifndef __RTPriority_h__
26#include <RTPriority.h>
29#ifndef __RTResourceMgr_h__
30#include <RTResourceMgr.h>
33#if RTS_COUNT && ! defined( __RTCounts_h__ )
46typedef void (
RTActor:: * RTActorFunction )( void );
63#if OTRTSDEBUG != DEBUG_NONE
155#if RTS_COMPATIBLE <= 520
156 typedef Error rtsErrors;
171 RTS_INLINE Error
getError(
void )
const;
186#if OTRTSDEBUG == DEBUG_NONE
201 const void * detail);
203#if OTRTSDEBUG < DEBUG_VERBOSE
206 void trace( Primitive,
const void *,
const void * );
209 void evtMsgQueue(
void );
221 virtual const char *
name(
void )
const override;
227 virtual void kill(
void )
override;
261 void requeueMsg(
RTMessage *,
int front );
276#if OTRTSDEBUG != DEBUG_NONE
282 int dispatch(
int priorityLimit );
283 void awaitResponse(
void );
284 virtual void waitForEvents(
void ) = 0;
286 virtual void wakeup(
void );
290 RTSyncObject * _sync;
294 static const unsigned char topPriority[ 1 << OTRTS_NUMPRIO ];
308 unsigned freeListSize;
311 unsigned freeTimerListSize;
322 void acceptIncoming(
void );
328 RTS_INLINE
RTMessage * getReplyBuffer(
void );
330 RTS_INLINE
void restoreReplyBuffer(
RTMessage * );
336 RTActorFunction, RTActorFunction );
339 void countActorDestroy (
void );
340 void countActorIncarnate (
void );
341 void countMessageTransfer(
RTMessage * );
342 void countPortDestroy (
int );
343 void countPortIncarnate (
int );
344 void countTimerCancel (
void );
345 void countTimerExpire (
void );
346 void countTimerStart (
void );
351 RTS_INLINE
void countActorDestroy (
void );
352 RTS_INLINE
void countActorIncarnate (
void );
353 RTS_INLINE
void countMessageTransfer(
RTMessage * );
354 RTS_INLINE
void countPortDestroy (
int );
355 RTS_INLINE
void countPortIncarnate (
int );
356 RTS_INLINE
void countTimerCancel (
void );
357 RTS_INLINE
void countTimerExpire (
void );
358 RTS_INLINE
void countTimerStart (
void );
368#include <RTController.inl>
An instance of this class represents a capsule instance.
Definition: RTActor.h:44
A controller manages a group of capsule instances that all run in the same physical thread (i....
Definition: RTController.h:56
void setError(Error error, Primitive primitive, const void *info, const void *detail)
Set the most recent error for the controller's thread.
virtual void kill(void) override
Kill this controller.
void abort(void)
Abort the application.
virtual void registerLayer(RTActor *, RTActorFunction, RTActorFunction, RTActorFunction)
Register a custom actor object (i.e.
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 transform...
const char * strerror(void) const
Get an error message for the most recent error that occurred in the controller's thread.
virtual void printStats(void) const
Print various statistics to stdout about what has happened in the RT application (e....
RTDebugger * debugger(void)
Get the debugger associated with this controller, if any.
Definition: RTController.inl:50
void getMessages(const RTDaemonInfo &daemonInfo)
Report all incoming messages satisfying actorPath in daemonInfo.
Error getError(void) const
Get the most recent error that occurred in the controller's thread.
Definition: RTController.inl:29
void perror(const char *s="error")
Print an error message to stderr.
Definition: RTCounts.h:22
Definition: RTDaemonInfo.h:24
Definition: RTDebugger.h:58
Definition: RTEventInfo.h:26
An object associated with a thread which captures its current state and implements its behavior.
Definition: RTJob.h:43
Represents a message used for communication between capsule instances.
Definition: RTMessage.h:33
Represents a message queue.
Definition: RTMessageQ.h:27
Represents a general capsule port typed by a protocol which determines the set of events that can be ...
Definition: RTProtocol.h:50
Definition: RTQFilter.h:24
Definition: RTResourceMgr.h:28
Definition: RTTimerNode.h:47
A type descriptor providing information about the external characteristics of a capsule.
Definition: RTActorClass.h:36
This structure describes a capsule part (a.k.a.
Definition: RTComponentDescriptor.h:33
A type descriptor providing information about a type.
Definition: RTObject_class.h:64