10#ifndef __RTProtocol_h__
11#define __RTProtocol_h__ included
17#ifndef __RTPriority_h_
18#include <RTPriority.h>
21#ifndef __RTProtocolDescriptor_h__
22#include <RTProtocolDescriptor.h>
63 RTS_INLINE
int getId(
void )
const;
75 RTS_INLINE
const char *
getName(
void )
const;
87 RTS_INLINE
int size(
void )
const;
151#if RTS_COMPATIBLE <= 520
324 BindingNotification = 1
325 , RegisteredAsSAP = 2
327 , ReceiveTypeCheck = 8
333 RTS_INLINE
int getFlags(
void )
const;
335 void resetFlag(
int );
349 rtiLast_RTProtocol = 0
366 const int * signalMap;
404 enum CallStyle { Programmatic, Automatic };
420 int purge (
int signal );
421 int purgeAt (
int signal,
int index );
423 int recall (
int signal,
int front );
424 int recallAt (
int signal,
int index,
int front );
427 int recallAllAt(
int signal,
int index,
int front );
508 bool moveData =
false);
530 bool moveData =
false);
534 int raise(
int signal,
540#include <RTProtocol.inl>
An instance of this class represents a capsule instance.
Definition: RTActor.h:44
Definition: RTActorProbe.h:31
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
Definition: RTLayerConnector.h:34
Definition: RTLayerData.h:24
Represents a message used for communication between capsule instances.
Definition: RTMessage.h:33
Represents a general capsule port typed by a protocol which determines the set of events that can be ...
Definition: RTProtocol.h:50
RTController * context(void) const
Get the context of the capsule that owns this port.
const char * defaultLayerName(void) const
Get the default registration name for the port.
int size(void) const
Get the size of the port.
Definition: RTProtocol.inl:62
RTProtocolDescriptor::Status sendCheck(int signal, const RTObject_class *type) const
Check if a particular event would be possible to send on this port.
int purgeAt(int index)
Empty the defer queue of a specified port instance without recalling any deferred message.
int isRegistered(void) const
Determine if the port is currently registered with the layer service or not.
Definition: RTProtocol.inl:72
void sendTypeCheckEnable(int on_off)
Turn on or off type checking when performing send(), invoke() or reply() on the port.
const char * getRegisteredName(void) const
Get the registration name of the port.
int send(int signal, const void *data, const RTObject_class *type, int priority, bool moveData=false)
Send an event on the port.
int invoke(RTMessage *replyBuffer, int signal, const void *data, const RTObject_class *type, bool implicitReply)
Invoke an event on the port.
void bindingNotification(int on_off)
Turn on or off binding notifications for this port.
int deregisterSAP(void)
Deregister an unwired port (SAP).
Definition: RTProtocol.inl:97
int recallAllAt(int index, int front=0)
Recall all messages from the defer queue and insert them in the controller's message queue.
int reply(int signal, const void *data, const RTObject_class *type)
Make a reply to respond to an invoke.
int recallAllFront(void)
Recall all messages from the defer queue and insert them at the front of the controller's message que...
int receiveTypeCheckEnabled(void) const
Determine if type checking when receiving events is enabled.
Definition: RTProtocol.inl:87
int getId(void) const
Get the id of the port.
Definition: RTProtocol.inl:45
int recall(void)
Recall a message from the defer queue and insert it at the back of the controller's message queue (af...
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.
int indexTo(RTActor *capsule) const
Determine if there exists a port instance currently connected to a port instance owned by a certain c...
int sendTypeCheckEnabled(void) const
Determine if type checking when sending events is enabled.
Definition: RTProtocol.inl:82
int purge(void)
Empty the defer queue of all port instances without recalling any deferred message.
int recallAt(int index, int front=0)
Recall a message from the defer queue and insert it in the controller's message queue.
RTProtocolDescriptor::Status receiveCheck(int signal, const RTObject_class *type) const
Check if a particular event would be possible to receive on this 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 deregisterSPP(void)
Deregister an unwired port (SPP).
Definition: RTProtocol.inl:107
int registerSPP(const char *service)
Register an unwired port (SPP) with the layer service (as the "provider").
Definition: RTProtocol.inl:102
const RTPortDescriptor * getInfo(void) const
Get information about a port.
int isIndexTo(int index, RTActor *capsule) const
Determine if a port instance is currently connected to a port instance owned by a certain capsule ins...
void receiveTypeCheckEnable(int on_off)
Turn on or off type checking when receiving an event on 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 bindingNotificationRequested(void) const
Determine if binding notifications are currently enabled for the port.
Definition: RTProtocol.inl:77
int isBoundAt(int index) const
Determine if a port instance is currently connected to another port instance.
int recallFront(void)
Recall a message from the defer queue and insert it at the front of the controller's message queue (b...
int deregister(void)
Deregister an unwired port (either an SAP or SPP).
const char * getName(void) const
Get the name of the port.
Definition: RTProtocol.inl:50
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").
Definition: RTProtocol.inl:92
RTActor * getOwner(void) const
Get the owner capsule to which the port belongs.
Definition: RTProtocol.inl:55
int recallAll(void)
Recall all messages from the defer queue and insert them at the back of the controller's message queu...
Definition: RTBindingEnd.h:24
Definition: RTExceptionSignal.h:29
Provides the API for working with messages of a certain protocol event received on a certain port.
Definition: RTInSignal.h:34
A type descriptor providing information about a type.
Definition: RTObject_class.h:64
Provides the API for working with messages of a certain protocol event to be sent on a certain port,...
Definition: RTOutSignal.h:36
Definition: RTPortDescriptor.h:42
Provides the combined API of both RTOutSignal and RTInSignal for symmetric protocol events defined as...
Definition: RTSymmetricSignal.h:32
Encapsulates a data object and its type descriptor.
Definition: RTTypedValue.h:29