Example: lrs_get_received_buffer

In the following example, lrs_get_received_buffer gets the last buffer received on "socket2", "\xff\xffUser=TNT\r\n". It retrieves three bytes of data at an offset of 7, which is the User Name. 
char *ReceivedBuffer;
ReceivedBuffer = lrs_get_received_buffer("socket2", 7, 3, NULL);
/* The value in ReceivedBuffer is now "TNT" */
To save the contents of a buffer to a parameter for later use, type:
lrs_save_param_ex("socket2", "user", ReceivedBuffer, 0, 3, "ascii", "new_parameter");
lr_output_message("The new parameter = \"%s\"\n", lr_eval_string("< new_parameter >"));
The output generated by the above code, as seen in the VuGen Execution log is:
Message from run.c(52): The new parameter = "TNT"