11#define __RTActor_h__ included
17#ifndef __RTController_h__
18#include <RTController.h>
21#ifndef __RTVersionId_h__
22#include <RTVersionId.h>
68#if RTStateId_MaxSize > 1
69 unsigned char idShift;
73 unsigned char s1[ 1 ];
74#if RTStateId_MaxSize > 1
75 unsigned short s2[ 1 ];
77#if RTStateId_MaxSize > 2
165 void enterState(
int );
166 virtual void enterStateV(
void );
177 void exitState(
const RTStateId parent[] );
178 virtual void exitStateV(
void );
179 void processHistory(
void );
180 void exitToChainState(
int,
const RTStateId parent[] );
182 void initializeAll(
void );
197 virtual void _predestroy(
void );
213 RTS_INLINE
int getIndex(
void )
const;
219 RTS_INLINE
int index(
void )
const;
224 RTS_INLINE
int getId(
void )
const;
274 RTS_INLINE
int isActive(
void )
const;
276 virtual int designLevel(
void )
const;
283 RTS_INLINE RTVersionId getVersion(
void )
const;
299 void suspend(
void );
301 RTS_INLINE
int isSuspended(
void )
const;
337 int _numComponents(
void )
const;
340 void _preinitialize(
int _homeIndex,
342 int initMe(
const void * data,
346#if RTIMPORT_ISREFERENCEDBY_CHECK
347 int isReferencedBy(
const RTActor * )
const;
375 void _incarnateAllFixed(
void );
396 RTS_INLINE RTController::Error
getError(
void )
const;
405#include <RTActor.inl>
An instance of this class represents a capsule instance.
Definition: RTActor.h:44
const char * getTypeName(void) const
Get the name of the capsule.
Definition: RTActor.inl:110
virtual const RTActorClass * defaultClass(RTActorRef &component, int repIndex)
Get the default capsule class for a capsule part contained in the capsule instance.
void rtgTransitionEnd(void)
This function is called just after a user-defined transition effect has executed.
int getNumStates(void) const
Get the number of states in the capsule state machine.
void setCurrentState(int s)
Force the state machine of the capsule instance into a particular state.
Definition: RTActor.inl:95
const char * getStateString(int s) const
Get the name of one of the states in the capsule state machine.
int isType(const char *str) const
Performs a lexical comparison between the name of the capsule with a specified string.
void rtgTransitionBegin(void)
This function is called just before a user-defined transition effect executes.
void unexpectedState(void)
This function is called if the TargetRTS detects that the state machine of the capsule instance in in...
int isActive(void) const
Determines if this capsule instance is currently active, i.e.
Definition: RTActor.inl:125
int getCurrentState(void) const
Get the numeric id of the currently active state in the capsule state machine.
Definition: RTActor.inl:37
virtual void logMsg(void)
This function is called just before a received message is processed by the capsule instance.
virtual void unhandledMessage(void)
This function is called when a message is dispatched to a capsule instance, but it isn't handled by i...
const char * getName(void) const
Get the name of the capsule part that contains this capsule instance.
RTActorProbe * probe
A probe attached to the capsule instance for monitoring it.
Definition: RTActor.h:92
void rtgChainBegin(int origin, const char *trans)
This function is called at the beginning of every generated chain function that corresponds to a tran...
const RTMessage * msg
The message which is currently being processed by the capsule instance.
Definition: RTActor.h:88
const RTMessage * getMsg(void)
Get the message which is currently being processed by the capsule instance.
Definition: RTActor.inl:100
int getIndex(void) const
Get the index of this capsule instance in its container capsule part (the capsule part where it was i...
Definition: RTActor.inl:65
virtual const RTActor_class * getActorData(void) const =0
Get information (meta data) about the capsule, such as its name, ports, states etc.
RTController::Error getError(void) const
Get the most recent error that occurred when using the TargetRTS.
Definition: RTActor.inl:145
void saveHistory(void)
Definition: RTActor.inl:75
RTActor(RTController *, RTActorRef *)
Constructor.
virtual void messageReceivedBeforeInitialized(void)
This function is called if a message is dispatched to the capsule instance, before its initial transi...
int index(void) const
Get the index of this capsule instance in its container capsule part (the capsule part where it was i...
Definition: RTActor.inl:70
virtual RTController * defaultController(RTActorRef &component, int repIndex)
Get the default controller for a capsule part contained in the capsule instance.
virtual void rtsBehavior(int signal, int port)=0
Defines the state machine behavior for this capsule instance.
RTActorRef * getReference(void) const
Get the capsule part that contains this capsule instance (the capsule part where it was incarnated).
Definition: RTActor.inl:55
int getHistory(int) const
Get the numeric id of the previously active state in the capsule state machine.
Definition: RTActor.inl:42
const char * getCurrentStateString(void) const
Get the name of the currently active state in the capsule state machine.
virtual void unexpectedMessage(void)
This function is called when a message is dispatched to the capsule instance, and when there is no en...
int isSameType(const RTActorClass *cap) const
Determines if the type of this capsule instance is a particular capsule type.
Definition: RTActor.inl:120
int sendCopyToMe(const RTMessage *msg)
Make a copy of a message and send it to this capsule instance.
Definition: RTActor.inl:105
RTController * context(void) const
Get the controller which runs this capsule instance.
Definition: RTActor.inl:130
virtual void rtgStateEntry(void)
This function is called when the state machine of the capsule instance enters a new state.
int getId(void) const
Get the numeric id for the capsule part that contains this capsule instance.
Definition: RTActor.inl:60
Definition: RTActorProbe.h:31
Represents a capsule part.
Definition: RTActorRef.h:39
A controller manages a group of capsule instances that all run in the same physical thread (i....
Definition: RTController.h:54
Definition: RTDebugger.h:58
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: RTRelayPort.h:27
Definition: RTActor_class.h:49
A type descriptor providing information about the external characteristics of a capsule.
Definition: RTActorClass.h:36
Definition: RTBindingEnd.h:24
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
Definition: RTImportList.h:35