C++ TargetRTS
|
Provides the combined API of both RTOutSignal and RTInSignal for symmetric protocol events defined as an incoming and an outgoing event with the same name. More...
#include <RTSymmetricSignal.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). | |
int | invoke (RTMessage *replyBuffers) |
Invoke a message of the specified protocol event and on the specified port (optionally passing a specified data object with the invoke message). | |
int | invokeAt (int index, RTMessage *replyBuffer) |
Invoke a message of the specified protocol event and on the specified port (optionally passing a specified data object with the invoke message). | |
int | invoke () |
Invoke a message of the specified protocol event and on the specified port (optionally passing a specified data object with the invoke message). | |
int | invokeAt (int index) |
Invoke a message of the specified protocol event and on the specified port (optionally passing a specified data object with the invoke message). | |
int | reply (void) |
Make a reply to respond to an invoke. | |
int | send (int priority=General) |
Send a message of the specified protocol event and on the specified port (optionally passing a specified data object with the sent message). | |
int | sendAt (int index, int priority=General) |
Send a message of the specified protocol event and on the specified port (optionally passing a specified data object with the sent message). | |
RTSymmetricSignal (RTProtocol *, int signal_in, int signal_out) | |
Public Attributes | |
RTProtocol * | _port |
The port to which the message should be sent. | |
int | _in_signal |
The signal id of the incoming protocol event for the received message. | |
int | _out_signal |
The signal id of the outgoing protocol event for the message to send. | |
Provides the combined API of both RTOutSignal and RTInSignal for symmetric protocol events defined as an incoming and an outgoing event with the same name.
int RTSymmetricSignal::invoke | ( | ) |
Invoke a message of the specified protocol event and on the specified port (optionally passing a specified data object with the invoke message).
No reply data can be passed back to the caller and the callee does not have to make an explicit reply (it is implicitly made when completing the invoke).
int RTSymmetricSignal::invoke | ( | RTMessage * | replyBuffers | ) |
Invoke a message of the specified protocol event and on the specified port (optionally passing a specified data object with the invoke message).
replyBuffers | A caller-supplied message object that stores the reply message(s) resulting from the invoke. The caller is responsible for allocating and deleting the message(s) when they are no longer required. To verify that a returned message is valid call RTMessage::isValid() once the invoke returns. The callee must make an explicit reply call even if no data needs to be passed back to the caller. |
int RTSymmetricSignal::invokeAt | ( | int | index | ) |
Invoke a message of the specified protocol event and on the specified port (optionally passing a specified data object with the invoke message).
The message is invoked at the specified port index. No reply data can be passed back to the caller and the callee does not have to make an explicit reply (it is implicitly made when completing the invoke).
[in] | index | Port index (0-based). |
int RTSymmetricSignal::invokeAt | ( | int | index, |
RTMessage * | replyBuffer | ||
) |
Invoke a message of the specified protocol event and on the specified port (optionally passing a specified data object with the invoke message).
The message is invoked at the specified port index.
[in] | index | Port index (0-based). |
replyBuffer | A caller-supplied message object that stores the reply message(s) resulting from the invoke. The caller is responsible for allocating and deleting the message(s) when they are no longer required. To verify that a returned message is valid call RTMessage::isValid() once the invoke returns. The callee must make an explicit reply call even if no data needs to be passed back to the caller. |
int RTSymmetricSignal::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.
int RTSymmetricSignal::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.
[in] | index | Port index (0-based) |
int RTSymmetricSignal::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).
[in] | front | If 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. |
int RTSymmetricSignal::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).
[in] | front | If 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. |
int RTSymmetricSignal::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.
[in] | index | Port index (0-based) |
[in] | front | If 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. |
int RTSymmetricSignal::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.
[in] | index | Port index (0-based) |
[in] | front | If 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. |
int RTSymmetricSignal::reply | ( | void | ) |
Make a reply to respond to an invoke.
The reply message is of the specified protocol event and is made on the specified port (optionally passing a specified data object with the reply message).
int RTSymmetricSignal::send | ( | int | priority = General | ) |
Send a message of the specified protocol event and on the specified port (optionally passing a specified data object with the sent message).
priority | The priority at which the message should be sent. A message priority is interpreted as its relative importance with respect to all other unprocessed messages on a thread. The priority evaluates to one of the defined global priority values. |
int RTSymmetricSignal::sendAt | ( | int | index, |
int | priority = General |
||
) |
Send a message of the specified protocol event and on the specified port (optionally passing a specified data object with the sent message).
The message is sent at the specified port index.
[in] | index | Port index (0-based). |
priority | The priority at which the message should be sent. A message priority is interpreted as its relative importance with respect to all other unprocessed messages on a thread. The priority evaluates to one of the defined global priority values. |