C++ TargetRTS
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
RTInSignal Struct Reference

Provides the API for working with messages of a certain protocol event received on a certain port. More...

#include <RTInSignal.h>

Public Member Functions

int purge (void)
 Remove from the defer queue all messages that match the receiver port and the signal id of the protocol event.
 
int purgeAt (int index)
 Remove from the defer queue all messages that match the receiver port and the signal id of the protocol event.
 
int recall (int front=0)
 Recall a message from the defer queue and insert it in the controller's message queue (either before or after 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 (either before or after other queued messages).
 
int recallAll (int front=0)
 Recall one or many messages from the defer queue and insert them in the controller's message queue (either before or after other queued messages).
 
int recallAllAt (int index, int front=0)
 Recall one or many messages from the defer queue and insert them in the controller's message queue (either before or after other queued messages).
 
 RTInSignal (RTProtocol *, int)
 

Public Attributes

RTProtocol_port
 The port on which the message is received.
 
int _signal
 The signal id of the protocol event for the received message.
 

Detailed Description

Provides the API for working with messages of a certain protocol event received on a certain port.

Each protocol event is translated to a function on a class that inherits from RTProtocol, and such a function returns an RTInSignal object that is bound to a specific port and protocol event. This is true if the protocol event is incoming, or if it is outgoing and the port is conjugated. Call functions on that object to perform actions on one or several messages that have been received on the specified port, and which have the specified protocol event.

Member Function Documentation

◆ purge()

int RTInSignal::purge ( void  )

Remove from the defer queue all messages that match the receiver port and the signal id of the protocol event.

If the receiver port is replicated messages will be deleted from the defer queue regardless of the port index on which they were received.

Returns
The number of messages deleted from the defer queue.

◆ purgeAt()

int RTInSignal::purgeAt ( int  index)

Remove from the defer queue all messages that match the receiver port and the signal id of the protocol event.

Only the messages that were received on a certain port index will be deleted from the defer queue.

Parameters
[in]indexPort index (0-based)
Returns
The number of messages deleted from the defer queue.

◆ recall()

int RTInSignal::recall ( int  front = 0)

Recall a message from the defer queue and insert it in the controller's message queue (either before or after other queued messages).

At most one message will be recalled and it must match the receiver port and the signal id of the protocol event (however, it doesn't matter on which port index it was received).

Parameters
[in]frontIf 0 the recalled message will be inserted at the back of the message queue, otherwise it will be inserted at the front of the message queue.
Returns
The number of messages recalled from the defer queue (i.e. either 1 or 0).

◆ recallAll()

int RTInSignal::recallAll ( int  front = 0)

Recall one or many messages from the defer queue and insert them in the controller's message queue (either before or after other queued messages).

All messages will be recalled that match the receiver port and the signal id of the protocol event (however, it doesn't matter on which port index they were received).

Parameters
[in]frontIf 0 the recalled messages will be inserted at the back of the message queue, otherwise they will be inserted at the front of the message queue.
Returns
The number of messages recalled from the defer queue.

◆ recallAllAt()

int RTInSignal::recallAllAt ( int  index,
int  front = 0 
)

Recall one or many messages from the defer queue and insert them in the controller's message queue (either before or after other queued messages).

All messages will be recalled that match the receiver port and the signal id of the protocol event. They must also have been received on a certain port index.

Parameters
[in]indexPort index (0-based)
[in]frontIf 0 the recalled messages will be inserted at the back of the message queue, otherwise they will be inserted at the front of the message queue.
Returns
The number of messages recalled from the defer queue.

◆ recallAt()

int RTInSignal::recallAt ( int  index,
int  front = 0 
)

Recall a message from the defer queue and insert it in the controller's message queue (either before or after other queued messages).

At most one message will be recalled and it must match the receiver port and the signal id of the protocol event. It must also have been received on a certain port index.

Parameters
[in]indexPort index (0-based)
[in]frontIf 0 the recalled message will be inserted at the back of the message queue, otherwise it will be inserted at the front of the message queue.
Returns
The number of messages recalled from the defer queue (i.e. either 1 or 0).

The documentation for this struct was generated from the following files: