API Guide
2-370 API Functions 601355 Rev A
18 VST_BOOLEAN rc = VSE_FALSE;
19 VST_REQUEST_HANDLE h;
20 VST_REQUEST_ID RequestID;
21 VST_REQUEST_TYPE RequestType;
22 VST_REQUEST_STATE State;
23 VST_PRIORITY Priority;
24
25 /* create the handle */
26 h = VS_Request_Create();
27 if (h != (VST_REQUEST_HANDLE) NULL)
28 {
29 /* get values from user */
30 printf(“*** Request Handle
***\n”);
31 printf(“Enter request id ==> “);
32 RequestID = atol(gets(input));
33 printf(“Enter request type ==> “);
34 RequestType = atoi(gets(input));
35 printf(“Enter request state ==>
“);
36 State = atoi(gets(input));
37 printf(“Enter Priority ==> “);
38 Priority = atoi(gets(input));
39 /* set the fields */
40 rc = VS_Request_SetFields(h,
41 VSID_REQUEST_ID,
RequestID,
42 VSID_REQUEST_TYPE,
RequestType,
43 VSID_REQUEST_STATE,
State,
44 VSID_PRIORITY,
Priority,
45 VSID_ENDFIELD);
46 if (rc)
47 {
48 vst_print_request(h);
49 }
50 VS_Request_Destroy(h);
51 }
52 return(rc);
53 }