C++ TargetRTS
|
Represents a frame port. More...
#include <RTFrame.h>
Public Member Functions | |
RTActorId | incarnate (RTActorRef &cp) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part. | |
RTActorId | incarnate (RTActorRef &cp, const RTActorClass &cap) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part. | |
RTActorId | incarnate (RTActorRef &cp, const void *data, const RTObject_class *type, RTController *controller, int index) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part. | |
RTActorId | incarnate (RTActorRef &cp, const RTActorClass &cap, const void *data, const RTObject_class *type, RTController *controller, int index) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part. | |
RTActorId | incarnate (RTActorRef &cp, const RTDataObject &data, RTController *controller=nullptr, int index=-1) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part. | |
RTActorId | incarnate (RTActorRef &cp, const RTActorClass &cap, const RTDataObject &data, RTController *controller=nullptr, int index=-1) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part. | |
RTActorId | incarnate (RTActorRef &cp, const RTTypedValue &info, RTController *controller=nullptr, int index=-1) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part. | |
RTActorId | incarnate (RTActorRef &cp, const RTActorClass &cap, const RTTypedValue &info, RTController *controller=nullptr, int index=-1) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part. | |
RTActorId | incarnateCustom (RTActorRef &cp, RTActorFactory &factory, int index=-1) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part using a custom capsule factory for creating the capsule instance. | |
RTActorId | incarnateCustom (RTActorRef &cp, RTActorFactory &&factory, int index=-1) |
RTActorId | incarnateCustom (RTActorRef &cp, const void *data, const RTObject_class *type, RTActorFactory &factory, int index=-1) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part using a custom capsule factory for creating the capsule instance. | |
RTActorId | incarnateCustom (RTActorRef &cp, const void *data, const RTObject_class *type, RTActorFactory &&factory, int index=-1) |
int | destroy (RTActorId &i) |
Destroy a capsule instance. | |
int | destroy (RTActorRef &cp) |
Destroy all capsule instances contained in a certain capsule part. | |
int | import (const RTActorId &i, RTActorRef &cp_dest, int index=-1) |
Import a capsule instance into a plug-in capsule part. | |
int | import (RTActorRef &cp_src, RTActorRef &cp_dest, int index=-1) |
Import a capsule instance into a plug-in capsule part. | |
int | deport (const RTActorId &i, RTActorRef &cp) |
Remove a capsule instance from a plug-in capsule part. | |
RTActorId ** | incarnationsOf (const RTActorRef &cp) |
Return all capsule instances contained in a certain capsule part. | |
RTActorId | incarnationAt (const RTActorRef &cp, int index) |
Return a capsule instance contained in a certain capsule part. | |
RTActorId | me (void) |
Return the capsule instance that owns the frame service port. | |
const RTActorClass & | myClass (void) |
Get the type of the capsule instance that owns the frame service port. | |
const RTActorClass & | classOf (const RTActorId &instance) |
Get the type of a certain capsule instance. | |
int | classIsKindOf (const RTActorClass &subClass, const RTActorClass &superClass) |
Determine if a capsule is the same or inherits from another capsule. | |
const char * | className (const RTActorClass &) |
Get the name of a capsule type. | |
Public Member Functions inherited from RTProtocol | |
RTController * | context (void) const |
Get the context of the capsule that owns this port. | |
int | getId (void) const |
Get the id of the port. | |
const RTPortDescriptor * | getInfo (void) const |
Get information about a port. | |
const char * | getName (void) const |
Get the name of the port. | |
RTActor * | getOwner (void) const |
Get the owner capsule to which the port belongs. | |
int | size (void) const |
Get the size of the port. | |
int | resize (int new_size) |
Set a new size (i.e. | |
int | registerSAP (const char *service) |
Register an unwired port (SAP) with the layer service (as a "client"). | |
int | deregisterSAP (void) |
Deregister an unwired port (SAP). | |
int | registerSPP (const char *service) |
Register an unwired port (SPP) with the layer service (as the "provider"). | |
int | deregisterSPP (void) |
Deregister an unwired port (SPP). | |
const char * | defaultLayerName (void) const |
Get the default registration name for the port. | |
int | isRegistered (void) const |
Determine if the port is currently registered with the layer service or not. | |
const char * | getRegisteredName (void) const |
Get the registration name of the port. | |
int | registerAs (const char *service) |
Register an unwired port either as an SAP or SPP (depending on the "Publish" property of the port). | |
int | deregister (void) |
Deregister an unwired port (either an SAP or SPP). | |
int | isBoundAt (int index) const |
Determine if a port instance is currently connected to another port instance. | |
int | isIndexTo (int index, RTActor *capsule) const |
Determine if a port instance is currently connected to a port instance owned by a certain capsule instance. | |
int | indexTo (RTActor *capsule) const |
Determine if there exists a port instance currently connected to a port instance owned by a certain capsule instance. | |
int | purge (void) |
Empty the defer queue of all port instances without recalling any deferred message. | |
int | purgeAt (int index) |
Empty the defer queue of a specified port instance without recalling any deferred message. | |
int | recall (void) |
Recall a message from the defer queue and insert it at the back of the controller's message queue (after other queued messages). | |
int | recallFront (void) |
Recall a message from the defer queue and insert it at the front of the controller's message queue (before other queued messages). | |
int | recallAt (int index, int front=0) |
Recall a message from the defer queue and insert it in the controller's message queue. | |
int | recallAll (void) |
Recall all messages from the defer queue and insert them at the back of the controller's message queue (after other queued messages). | |
int | recallAllFront (void) |
Recall all messages from the defer queue and insert them at the front of the controller's message queue (before other queued messages). | |
int | recallAllAt (int index, int front=0) |
Recall all messages from the defer queue and insert them in the controller's message queue. | |
void | bindingNotification (int on_off) |
Turn on or off binding notifications for this port. | |
int | bindingNotificationRequested (void) const |
Determine if binding notifications are currently enabled for the port. | |
void | sendTypeCheckEnable (int on_off) |
Turn on or off type checking when performing send(), invoke() or reply() on the port. | |
int | sendTypeCheckEnabled (void) const |
Determine if type checking when sending events is enabled. | |
RTProtocolDescriptor::Status | sendCheck (int signal, const RTObject_class *type) const |
Check if a particular event would be possible to send on this port. | |
void | receiveTypeCheckEnable (int on_off) |
Turn on or off type checking when receiving an event on the port. | |
int | receiveTypeCheckEnabled (void) const |
Determine if type checking when receiving events is enabled. | |
RTProtocolDescriptor::Status | receiveCheck (int signal, const RTObject_class *type) const |
Check if a particular event would be possible to receive on this port. | |
int | invoke (RTMessage *replyBuffer, int signal, const void *data, const RTObject_class *type, bool implicitReply) |
Invoke an event on the port. | |
int | invokeAt (int index, RTMessage *replyBuffer, int signal, const void *data, const RTObject_class *type, bool implicitReply) |
Invoke an event on a replicated port at a specified index. | |
int | reply (int signal, const void *data, const RTObject_class *type) |
Make a reply to respond to an invoke. | |
int | send (int signal, const void *data, const RTObject_class *type, int priority, bool moveData=false) |
Send an event on the port. | |
int | sendAt (int index, int signal, const void *data, const RTObject_class *type, int priority, bool moveData=false) |
Send an event on a replicated port at a specified index. | |
Static Public Attributes | |
static const RTProtocolDescriptor | rt_class |
Additional Inherited Members | |
Protected Types inherited from RTProtocol | |
enum | { BindingNotification = 1 , RegisteredAsSAP = 2 , SendTypeCheck = 4 , ReceiveTypeCheck = 8 , Resized = 16 } |
enum | { rtiLast_RTProtocol = 0 } |
Protected Member Functions inherited from RTProtocol | |
void | init (const RTPortDescriptor *) |
int | getFlags (void) const |
void | setFlag (int) |
void | resetFlag (int) |
void | bindAt (int, RTBindingEnd &, RTController *) |
int | peerAt (int, RTBindingEnd &) |
void | unbindAt (int, RTController *) |
void | notifyInit (RTController *) |
void | notifyBoundAt (int, RTController *) |
Represents a frame port.
int Frame::Base::classIsKindOf | ( | const RTActorClass & | subClass, |
const RTActorClass & | superClass | ||
) |
Determine if a capsule is the same or inherits from another capsule.
[in] | subClass | A capsule to compare the type of. |
[in] | superClass | Another capsule to compare against. |
const char * Frame::Base::className | ( | const RTActorClass & | ) |
Get the name of a capsule type.
const RTActorClass & Frame::Base::classOf | ( | const RTActorId & | instance | ) |
Get the type of a certain capsule instance.
[in] | instance | A capsule instance |
int Frame::Base::deport | ( | const RTActorId & | i, |
RTActorRef & | cp | ||
) |
Remove a capsule instance from a plug-in capsule part.
[in] | i | The capsule instance to remove (deport). |
[in] | cp | The plug-in capsule part where the capsule instance is currently located. |
int Frame::Base::destroy | ( | RTActorId & | i | ) |
Destroy a capsule instance.
[in] | i | The capsule instance to destroy. It must be located in an optional capsule part within the same capsule that owns the frame service port. |
int Frame::Base::destroy | ( | RTActorRef & | cp | ) |
Destroy all capsule instances contained in a certain capsule part.
[in] | cp | The capsule part. It must be optional and located within the same capsule that owns the frame service port. |
int Frame::Base::import | ( | const RTActorId & | i, |
RTActorRef & | cp_dest, | ||
int | index = -1 |
||
) |
Import a capsule instance into a plug-in capsule part.
[in] | i | Capsule instance to import. It must be located in an optional capsule part within the same capsule that owns the frame service port. |
[in] | cp_dest | The destination capsule part into which the capsule instance will be imported. It must be a plug-in capsule part typed by a capsule that is compatible with the type of the imported capsule instance. |
[in] | index | The index within a replicated capsule part where to insert the imported capsule instance. Use -1 to insert the instance at the first free slot. |
int Frame::Base::import | ( | RTActorRef & | cp_src, |
RTActorRef & | cp_dest, | ||
int | index = -1 |
||
) |
Import a capsule instance into a plug-in capsule part.
[in] | cp_src | An optional capsule part that contains exactly one capsule instance that should be imported into another plug-in capsule part. The source capsule part must be located within the same capsule that owns the frame service port. |
[in] | cp_dest | The destination capsule part into which the capsule instance will be imported. It must be a plug-in capsule part typed by a capsule that is compatible with the type of the imported capsule instance. |
[in] | index | The index within a replicated capsule part where to insert the imported capsule instance. Use -1 to insert the instance at the first free slot. |
RTActorId Frame::Base::incarnate | ( | RTActorRef & | cp | ) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
The capsule to incarnate is determined from the type of the capsule part.
[in] | cp | The capsule part where to insert the created capsule instance. |
RTActorId Frame::Base::incarnate | ( | RTActorRef & | cp, |
const RTActorClass & | cap | ||
) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
[in] | cp | The capsule part where to insert the created capsule instance. |
[in] | cap | The capsule to incarnate. |
RTActorId Frame::Base::incarnate | ( | RTActorRef & | cp, |
const RTActorClass & | cap, | ||
const RTDataObject & | data, | ||
RTController * | controller = nullptr , |
||
int | index = -1 |
||
) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
[in] | cp | The capsule part where to insert the created capsule instance. |
[in] | cap | The capsule to incarnate. |
[in] | data | Data object to pass to the created capsule instance. The data can be accessed from the initial transition of its state machine. |
[in] | controller | The controller which should run the created capsule instance. If it is NULL, the same controller that runs the container capsule instance will be used. |
[in] | index | The index within a replicated capsule part where to insert the created capsule instance. Use -1 to insert the instance at the first free slot. |
RTActorId Frame::Base::incarnate | ( | RTActorRef & | cp, |
const RTActorClass & | cap, | ||
const RTTypedValue & | info, | ||
RTController * | controller = nullptr , |
||
int | index = -1 |
||
) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
[in] | cp | The capsule part where to insert the created capsule instance. |
[in] | cap | The capsule to incarnate. |
[in] | info | An RTTypedValue object which encapsules the data to pass to the created capsule instance. The data can be accessed from the initial transition of its state machine. |
[in] | controller | The controller which should run the created capsule instance. If it is NULL, the same controller that runs the container capsule instance will be used. |
[in] | index | The index within a replicated capsule part where to insert the created capsule instance. Use -1 to insert the instance at the first free slot. |
RTActorId Frame::Base::incarnate | ( | RTActorRef & | cp, |
const RTActorClass & | cap, | ||
const void * | data, | ||
const RTObject_class * | type, | ||
RTController * | controller, | ||
int | index | ||
) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
[in] | cp | The capsule part where to insert the created capsule instance. |
[in] | cap | The capsule to incarnate. |
[in] | data | Initialization data to pass to the created capsule instance. It can be accessed from the initial transition of its state machine. |
[in] | type | Type descriptor for the data object. |
[in] | controller | The controller which should run the created capsule instance. If it is NULL, the same controller that runs the container capsule instance will be used. |
[in] | index | The index within a replicated capsule part where to insert the created capsule instance. Use -1 to insert the instance at the first free slot. |
RTActorId Frame::Base::incarnate | ( | RTActorRef & | cp, |
const RTDataObject & | data, | ||
RTController * | controller = nullptr , |
||
int | index = -1 |
||
) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
The capsule to incarnate is determined from the type of the capsule part.
[in] | cp | The capsule part where to insert the created capsule instance. |
[in] | data | Data object to pass to the created capsule instance. The data can be accessed from the initial transition of its state machine. |
[in] | controller | The controller which should run the created capsule instance. If it is NULL, the same controller that runs the container capsule instance will be used. |
[in] | index | The index within a replicated capsule part where to insert the created capsule instance. Use -1 to insert the instance at the first free slot. |
RTActorId Frame::Base::incarnate | ( | RTActorRef & | cp, |
const RTTypedValue & | info, | ||
RTController * | controller = nullptr , |
||
int | index = -1 |
||
) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
The capsule to incarnate is determined from the type of the capsule part.
[in] | cp | The capsule part where to insert the created capsule instance. |
[in] | info | An RTTypedValue object which encapsules the data to pass to the created capsule instance. The data can be accessed from the initial transition of its state machine. |
[in] | controller | The controller which should run the created capsule instance. If it is NULL, the same controller that runs the container capsule instance will be used. |
[in] | index | The index within a replicated capsule part where to insert the created capsule instance. Use -1 to insert the instance at the first free slot. |
RTActorId Frame::Base::incarnate | ( | RTActorRef & | cp, |
const void * | data, | ||
const RTObject_class * | type, | ||
RTController * | controller, | ||
int | index | ||
) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
The capsule to incarnate is determined from the type of the capsule part.
[in] | cp | The capsule part where to insert the created capsule instance. |
[in] | data | Initialization data to pass to the created capsule instance. It can be accessed from the initial transition of its state machine. |
[in] | type | Type descriptor for the data object. |
[in] | controller | The controller which should run the created capsule instance. If it is NULL, the same controller that runs the container capsule instance will be used. |
[in] | index | The index within a replicated capsule part where to insert the created capsule instance. Use -1 to insert the instance at the first free slot. |
RTActorId Frame::Base::incarnateCustom | ( | RTActorRef & | cp, |
const void * | data, | ||
const RTObject_class * | type, | ||
RTActorFactory & | factory, | ||
int | index = -1 |
||
) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part using a custom capsule factory for creating the capsule instance.
Use this instead of the standard incarnate function if you need to create the capsule instance in some special way, for example using another capsule constructor than the one that is used by default.
[in] | cp | The capsule part where to insert the created capsule instance. |
[in] | data | Initialization data to pass to the created capsule instance. It can be accessed from the initial transition of its state machine. |
[in] | type | Type descriptor for the data object. |
[in] | factory | The capsule factory which will be used for creating the capsule instance. |
[in] | index | The index within a replicated capsule part where to insert the created capsule instance. Use -1 to insert the instance at the first free slot. |
RTActorId Frame::Base::incarnateCustom | ( | RTActorRef & | cp, |
RTActorFactory & | factory, | ||
int | index = -1 |
||
) |
Incarnates a capsule by creating an instance of the capsule in an optional capsule part using a custom capsule factory for creating the capsule instance.
Use this instead of the standard incarnate function if you need to create the capsule instance in some special way, for example using another capsule constructor than the one that is used by default.
[in] | cp | The capsule part where to insert the created capsule instance. |
[in] | factory | The capsule factory which will be used for creating the capsule instance. |
[in] | index | The index within a replicated capsule part where to insert the created capsule instance. Use -1 to insert the instance at the first free slot. |
RTActorId Frame::Base::incarnationAt | ( | const RTActorRef & | cp, |
int | index | ||
) |
Return a capsule instance contained in a certain capsule part.
[in] | cp | A capsule part. |
[in] | index | The zero-based index of the capsule instance within the capsule part. |
RTActorId ** Frame::Base::incarnationsOf | ( | const RTActorRef & | cp | ) |
Return all capsule instances contained in a certain capsule part.
[in] | cp | A capsule part. |
RTActorId Frame::Base::me | ( | void | ) |
Return the capsule instance that owns the frame service port.
const RTActorClass & Frame::Base::myClass | ( | void | ) |
Get the type of the capsule instance that owns the frame service port.