Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Library

rtlab/Communication/Asynchronous

Block

The OpAsyncSend block allows a user to send data to the asynchronous process started by the associated controller.

Figure 1: OpAsyncSend block

Mask

Figure 2: OpAsyncSend mask.

Description

The OpAsyncSend block is used to pass data from the model to the application started by the associated controller. This block simply writes data into the shared memory. After that, the Asynchronous user's program can acces this data by using AsyncAPI calls. Refer to the section RT-LAB Asynchronous process of chapter RT-LAB Connectivity of the User Guide for more details.

Parameters

Controller IDSpecifies the controller ID that the OpAsyncSend block will use.
Send IDSpecifies the ID of this OpAsync_Send block. This ID is used as an identifier by the asynchronous program.
Sending modeSpecifies the relation between the asynchronous program and this block.

NEED_REPLY_BEFORE_NEXT_SEND: When using this mode, the block needs confirmation that the data have been sent. The confirmation is only required at the next send request. (Confirmation is given by the asynchronous program by using the OpalAsyncSendRequestDone) function.)

NEED_REPLY_NOW: When using this mode, the block needs confirmation that the data have already been sent. This mode causes the model to be stopped until the asynchronous program confirms that the data have been sent. (Confirmation is given by the asynchronous program by using the OpalAsyncSendRequestDone() function.)

DONT_NEED_REPLY: When using this mode, the block do not need any confirmation that the data have been sent.

Display parameters listMasks or Unmasks the parameters described below.
Float parameter 1 .. 5

Any value entered in this field is available in the asynchronous application by calling the OpalGetAsyncSendParameters function. These five values are placed in the FloatParam array in the Opal_SendAsyncParam structure.

EX:Opal_SendAsyncParam Param;
int SendID=1;
OpalGetAsyncSendParameters(&Param,sizeof(Opal_SendAsyncParam), SendID);
printf("The 1st floating point parameter is %f\n",Param.FloatParam[0]);

String parameter 1 .. 5

Any character entered in this field is available in the asynchronous application by calling the OpalGetAsyncSendParameters function. These five strings are placed in the StringParam array in the Opal_SendAsyncParam structure.

EX: Opal_SendAsyncParam Param;
int SendID=1;
OpalGetAsyncSendParameters(&Param,sizeof(Opal_SendAsyncParam), SendID);
printf("The first string parameter is %s\n",Param.StringParam[0]);


Inputs

Data readyUpdate data at the input of the block into the shared memory when the signal input is 1.
DataData to be copied into the shared memory. It is possible to use a mux to send multiple values. Data is actually updated in the shared memory when the Data Ready line is asserted.

Outputs

ErrorOutputs error values which can be set by the user's asynchronous program via the OpalSetAsyncSendIconError function.

Characteristics and Limitations

Direct Feedthrough

N/A

Discrete sample time

No

XHP support

Yes (Partial XHP only)

Work offline

No

  • No labels