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__ )
61#if OTRTSDEBUG != DEBUG_NONE
152#if RTS_COMPATIBLE <= 520
153 typedef Error rtsErrors;
168 RTS_INLINE Error
getError(
void )
const;
183#if OTRTSDEBUG == DEBUG_NONE
198 const void * detail);
200#if OTRTSDEBUG < DEBUG_VERBOSE
203 void trace( Primitive,
const void *,
const void * );
206 void evtMsgQueue(
void );
218 virtual const char *
name(
void )
const override;
224 virtual void kill(
void )
override;
258 void requeueMsg(
RTMessage *,
int front );
273#if OTRTSDEBUG != DEBUG_NONE
279 int dispatch(
int priorityLimit );
280 void awaitResponse(
void );
281 virtual void waitForEvents(
void ) = 0;
283 virtual void wakeup(
void );
287 RTSyncObject * _sync;
291 static const unsigned char topPriority[ 1 << OTRTS_NUMPRIO ];
305 unsigned freeListSize;
308 unsigned freeTimerListSize;
319 void acceptIncoming(
void );
325 RTS_INLINE
RTMessage * getReplyBuffer(
void );
327 RTS_INLINE
void restoreReplyBuffer(
RTMessage * );
330 void countActorDestroy (
void );
331 void countActorIncarnate (
void );
332 void countMessageTransfer(
RTMessage * );
333 void countPortDestroy (
int );
334 void countPortIncarnate (
int );
335 void countTimerCancel (
void );
336 void countTimerExpire (
void );
337 void countTimerStart (
void );
342 RTS_INLINE
void countActorDestroy (
void );
343 RTS_INLINE
void countActorIncarnate (
void );
344 RTS_INLINE
void countMessageTransfer(
RTMessage * );
345 RTS_INLINE
void countPortDestroy (
int );
346 RTS_INLINE
void countPortIncarnate (
int );
347 RTS_INLINE
void countTimerCancel (
void );
348 RTS_INLINE
void countTimerExpire (
void );
349 RTS_INLINE
void countTimerStart (
void );
359#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:54
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 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