Example #1 |
DEVELOPER |
Suppose you have a PROIV Function that takes the following four parameters:
Name |
Type |
Size |
Purpose |
FParam1 |
Numeric |
10 |
Account Number |
FParam2 |
Long |
20 |
Balance |
FParam3 |
Alpha |
20 |
Name |
FParam4 |
Alpha |
1000 |
Notes |
Assume you define a Task with that function as the only member function. Corresponding Task parameters that match those function parameters could be:
Name |
Type |
Size |
Array |
T_Param1 |
N |
10 |
<blank> |
T_Param2 |
L |
20 |
<blank> |
T_Param3 |
A |
20 |
<blank> |
T_Param4 |
A |
1000 |
<blank> |
And these values would be entered into the Task Parameter Definition tab.
If you want to invoke that task using P4API calls, you might send the following strings as the sParams parameter in a p4ExecTask() call:
Delimiter separated list stream format to invoke task with parameters using a comma as the delimiter (sParamFormat set to 'D,' in the p4ExecTask() call):
T_Param1=12345,T_Param2=1234.12,T_Param3=John Smith,T_Param4=This person is important
Length-Prefixed Stream Format using same data. Characters in bold inside angle brackets are hex byte values, signalled by '0x'. So, <0x00> is sent as a single byte with a value of zero (the ASCII NUL byte), and <0x08> is sent as a single byte with a value of 8 (ASCII LF byte).
<0x00><0x08>T_Param1<0x05>12345<0x00><0x08>T_Param2<0x00><0x04>1234<0x00><0x08>
T_Param3<0x00><0x0a>John Smith<0x00><0x18>This person is important.
Topic ID: 540053