omni_exchange_data(3sh1) — Subroutines
Name
omni_exchange_data − The omni_exchange_data procedure requests or fulfills Exchange Message Serial Transfer services:
•A DECosap client application calls this procedure once to receive and transmit a message value to a remote server application, and to wait for a reply message value.
•A DECosap server application calls this procedure to transmit the message value which fulfills an exchange message indication received from a remote client application.
Syntax
extern unsigned long int omni_exchange_data [_a] (
unsigned long int ∗invoke_id,
omni_l_handle object_handle,
char ∗request_data,
long int request_data_length,
omni_l_handle req_method_handle,
char ∗response_data,
unsigned long int response_data_length,
omni_l_handle res_method_handle,
omni_l_handle modifier_object,
omni_r_iosb ∗iosb,
omni_r_ctrl ∗ctrl);
Arguments
invoke_id
access: write only mechanism: by reference An identifier assigned by DEComni. The argument is used for asynchronous calls only.
object_handle
access: read only mechanism: by value In a client call, the longword identifier of a loaded message definition.
In a server call, the context value returned by the omni_get_indications call that delivered the exchange message indication.
The object_handle argument is the address of the handle.
request_data
access: read only mechanism: by reference A data structure that contains the message value to be sent. The first two bytes of the structure specify the size (in bytes) of the message value, the remaining bytes contain the message value.
request_data_length
access: read only mechanism: by value The actual size (in bytes) of the message value to be sent.
req_method_handle
access: read only mechanism: by value optional argument Reserved for future use.
response_data
access: read only mechanism: by reference A data structure to receive the message. The first two bytes will contain the actual length of the message value; the remaining bytes will contain the value of the received message.
response_data_length
access: read only mechanism: by value The actual size (in bytes) of the received message.
res_method_handle
access: read only mechanism: by value optional argument Reserved for future use.
modifier_object
access: read only mechanism: by value optional argument Reserved for future use.
iosb
access: write only mechanism: by reference optional argument The DEComni I/O status block. The iosb argument is the address of the status block.
ctrl
access: read only mechanism: by reference optional argument A control structure to handle an event flag. The ctrl argument is the address of the control structure.
Usage Notes
The omni_exchange_data procedure requires the value of the message to be sent in the request_data argument, and returns the received message value in the response_data argument; with a single procedure call, the application sends a message and receives the reply.
When a DECosap server application invokes the omni_exchange_data procedure to fulfill a message exchange indication, the received message is only returned after the message to be sent has been transmitted, that is, once the execution of the procedure is terminated. The server application can read the value of the received message before executing the operation, by invoking the omni_get_value procedure. The omni_exchange_data procedure is not supported by H1.