Using CPI-C verbs

You can emulate CPI-C verbs with STL statements; the STL statements for CPI-C begin with CMACCP on page CMACCP — Accept_Conversation and end with CMTRTS on page CMTRTS — Test_Request_To_Send_Received.

You can specify input verb parameters in any of the following ways:

You must specify output verb parameters as unshared STL variables.

Note: The STL Translator requires a free device save area for each string literal or named constant referenced, and a free device counter for each integer literal or named constant referenced. If a free save area or counter is not available when required, the STL Translator issues error message ITP3027I or ITP3028I.
The syntax for the CPI-C STL statements is
verbname({string_variable|string_name_constant|'literal'},,            <character input>
         {integer_variable|integer_named_constant|numeric_literal},,   <numeric input>
         unshared_integer_variable,,                                   <character output>
                  .
                  .
         unshared_integer_variable)                                    <numeric output>
Note: CPI-C verb parameters are separated by a single comma. STL also uses a comma to indicate continuation. If a CPI-C verb is continued across more than one line, you must break the line at the end of a parameter, and you must specify two commas.
The following example shows how to code CPI-C verbs as STL statements:
Example:
/* Set the symbolic destination name to "SERVER". */
sym_dest_name="SERVER"
/* Initialize a conversation with "SERVER". */
CMINIT (conversation_id, sym_dest_name, return_code)
/* Allocate a conversation with "SERVER". */
CMALLC (conversation_id, return_code)
/* Setup the send buffer and length. */
send_buffer = 'Data to send'
send_length = length(send_buffer)
/* Send data to "SERVER". */
CMSEND (conversation_id,,
        send_buffer,,
        send_length,,
        request_to_send_received,,
        return_code)
/* Deallocate the conversation with "SERVER". */
CMDEAL (conversation_id, return_code)
For more information about defining CPI-C networks and scripts, refer to Creating WSim Scripts.