Example: lrs_save_paramCorrelating Statements Functions

Saves data from a static or received buffer to a parameter.

int lrs_save_param( char *s_desc,char *buf_desc, char *param_name, int offset, int param_len );
s_desc A descriptor identifying a connected socket.
buf_desc A descriptor identifying a buffer.
param_name The name of a parameter to hold the buffer value.
offset The offset of the data in the buffer to be saved to the parameter.
param_len The length of the data to be saved to the parameter (in bytes).

The lrs_save_param function saves data from a buffer to a parameter. This function is used for correlating or linking statements within a script.

The first two parameters specify which buffer to use:

Use a specific buffer from the data file: Use the last received buffer:
The buffer descriptor has the form: "bufxx" The socket descriptor is not NULL and the buffer descriptor is NULLLRS_LAST_RECEIVED is specified as the buf_desc parameter

After specifying an active socket and buffer, you specify a parameter name to store the data. Specify an offset to indicate the offset of the data in the buffer, and length of the data.

Once you save the parameter, you can use it in both the script and data file. Substitute all of the appropriate constant values with the parameter. Whenever you reference the parameter, enclose it in angle brackets (or other delimiters defined within VuGen options).

Note: To save encoded data from a user buffer to a parameter, use the lrs_save_param_ex function.

Return Values

Windows Sockets Return Values


You cannot use standard parameterization for any arguments in this function.