How to Use Virtual Table Server in TruClient

  • KM00515338
  • 29-Aug-2013
  • 23-Oct-2013


How to Use VTS in TruClient


How to Use Virtual Table Server in TruClient


1. Prerequisites
This tasks assumes that the VTS already is installed and you are accessing the data using
TruClient functions.

2. Include VTS functions in the C-functions.c file
a. From the Solution Explorer > Extra Files, open the C-functions.c file and insert clanguage
code. The following is an example of how to send data to VTS:

#include "SharedParameter.h"
void main()
void connectVTS()
PVCI2 pvci = 0;
pvci = lrvtc_connect(<server name> ,<port>,VTOPT_KEEP_

void sendData()
int rc = 0;
rc = lrvtc_send_message("A", "TC-FF data");
void disconnectVTS()

b. Specify the server name and port in the code where VTS is installed. The server name and
port are marked in red.

3. Insert an Evaluate C step in the Init, Action and End sections.
a. Open TruClient in interactive mode by clicking the Develop Script button.
b. From the TruClient Side Bar select Init from the action dropdown list. Repeat for Action and End.
c. From the Toolbox > Miscellaneous drag an Evaluate C step to the left side bar.
d. Click on fname . Name the function using quotes. For example, "ConnectVTS

4. Results
The following steps will be displayed in script-view:

truclient_step("Evaluate C function 'connectVTS'",
truclient_step("Evaluate C function 'sendData'", "snapshot=Action_
truclient_step("Evaluate C function 'disconnectVTS'",