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
156#if RTS_COMPATIBLE <= 520
157 typedef Error rtsErrors;
172 RTS_INLINE Error
getError(
void )
const;
187#if OTRTSDEBUG == DEBUG_NONE
202 const void * detail);
204#if OTRTSDEBUG < DEBUG_VERBOSE
207 void trace( Primitive,
const void *,
const void * );
210 void evtMsgQueue(
void );
222 virtual const char *
name(
void )
const override;
228 virtual void kill(
void )
override;
262 void requeueMsg(
RTMessage *,
int front );
277#if OTRTSDEBUG != DEBUG_NONE
283 int dispatch(
int priorityLimit );
284 void awaitResponse(
void );
285 virtual void waitForEvents(
void ) = 0;
287 virtual void wakeup(
void );
291 RTSyncObject * _sync;
295 static const unsigned char topPriority[ 1 << OTRTS_NUMPRIO ];
309 unsigned freeListSize;
312 unsigned freeTimerListSize;
323 void acceptIncoming(
void );
329 RTS_INLINE
RTMessage * getReplyBuffer(
void );
331 RTS_INLINE
void restoreReplyBuffer(
RTMessage * );
337 RTActorFunction, RTActorFunction );
340 void countActorDestroy (
void );
341 void countActorIncarnate (
void );
342 void countMessageTransfer(
RTMessage * );
343 void countPortDestroy (
int );
344 void countPortIncarnate (
int );
345 void countTimerCancel (
void );
346 void countTimerExpire (
void );
347 void countTimerStart (
void );
352 RTS_INLINE
void countActorDestroy (
void );
353 RTS_INLINE
void countActorIncarnate (
void );
354 RTS_INLINE
void countMessageTransfer(
RTMessage * );
355 RTS_INLINE
void countPortDestroy (
int );
356 RTS_INLINE
void countPortIncarnate (
int );
357 RTS_INLINE
void countTimerCancel (
void );
358 RTS_INLINE
void countTimerExpire (
void );
359 RTS_INLINE
void countTimerStart (
void );
369#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