AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface

◆ Signal() [2/2]

void drama::Task::Signal ( long int  index,
sds::Id arg = nullptr,
void data = nullptr 
)
inherited

Trigger the rescheduling of an action, specifying the index of the action.

The method allows an action to trigger the rescheduling of another action in the current task.

This method can be used from an action or when there is no action context (such as in a thread).

The target action may be awaiting rescheduling for any reason (having put a request of RequestCode::Wait, RequestCode::Sleep, or RequestCode::Stage.

Since this routine is often used for communication between interrupt routines and main line code, the message is sent as a high priority message and will thus be put a the beginning of the incoming message buffer.

Note, as this routine is often used to allow non-DRAMA parts of a program to communicate with a DRAMA program, applications often get into trouble if this fail. Ensure exceptions are at least reported.

Parameters
indexThe action index. (HOW TO GET THIS?)
argAn argument to the action. The drama::sds::Id::COut() method will be applied with its outlives argument set true. The underlying SDS id is passed to the action and the underlying SDS structure will be deleted when the action entry completes. Pass nullptr if there is no argument.
dataA pointer which will be associated with the signal. The action can fetch this using DitsGetSigArg(3), but only if not null.