FunctionRemoting Sample: Difference between revisions
Line 53: | Line 53: | ||
Demonstrates calling a function with variable sized integer pointer and return value. The passed in pointed values are updated on the target side. | Demonstrates calling a function with variable sized integer pointer and return value. The passed in pointed values are updated on the target side. | ||
=== | === stringsizedarray_in_stringsizedarray_return === | ||
Demonstrates calling a function with variable sized string pointer and return value. In perl the equivalent for sized pointer is an array. When using sized-pointers, you must assign the size field with correct number of elements in the array. The return value is a struct which gets mapped to a hashref in perl. | Demonstrates calling a function with variable sized string pointer and return value. In perl the equivalent for sized pointer is an array. When using sized-pointers, you must assign the size field with correct number of elements in the array. The return value is a struct which gets mapped to a hashref in perl. |
Revision as of 18:57, 12 November 2010
Introduction
This sample demonstrates some common remote function call patterns for the purpose of fixturing your script test scenarios. This sample only demonstrates the STRIDE mechanics of qualifying and invoking the remote functions. The example functions here don't actually implement any fixturing logic - they only verify the parameters passed and returned. This sample is a good place to start if you are interested in creating some functions to provided on-target fixturing for your host-based behavior tests.
Source under test
s2_function_remoting_source.c / h
These files declare and implement several example functions taking and returning a variety of input/output data. In particular, we have examples of:
- void
- integer input/output/return
- string input/output/return
- structure input/output/return
- variable sized integer pointer input/output/return
- variable sized string pointer input/return
Tests Description
void_args_void_return
Demonstrates calling a function with void args and return value.
int_in_int_return
Demonstrates calling a function with integer arg and integer return value.
intptr_inout_void_return
Demonstrates calling a function with integer pointer arg. The passed in pointed integer is updated on the target side.
string_in_string_return
Demonstrates calling a function with string arg and string return value.
string_inout_int_return
Demonstrates calling a function with string arg and int return value. The passed in string is updated on the target side.
struct_in_struct_return
Demonstrates calling a function with struct arg and struct return value.
structptr_inout_void_return
Demonstrates calling a function with struct pointer arg. The passed in pointed struct is updated on the target side.
intsizedptr_in_intsizedptr_return
Demonstrates calling a function with variable sized integer pointer and return value. In perl the equivalent for sized pointer is an array. When using sized-pointers, you must assign the size field with correct number of elements in the array. The return value is a struct which gets mapped to a hashref in perl.
intsizedptr_inout_void_return
Demonstrates calling a function with variable sized integer pointer and return value. The passed in pointed values are updated on the target side.
stringsizedarray_in_stringsizedarray_return
Demonstrates calling a function with variable sized string pointer and return value. In perl the equivalent for sized pointer is an array. When using sized-pointers, you must assign the size field with correct number of elements in the array. The return value is a struct which gets mapped to a hashref in perl.