1/* 2 * Copyright 2018, Data61, CSIRO (ABN 41 687 119 230) 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include <camkes.h> 8#include <stdio.h> 9#include <stdlib.h> 10 11int run() { 12 char *shello = "hello world"; 13 char *s; 14 int i = 42, j; 15 int p, p1, p2; 16 float f = 273421.4274, g; 17 double d = 273421.4274, e; 18 19 printf("Starting the client\n"); 20 printf("-------------------\n"); 21 22 j = i_echo_int(i); 23 printf("echo_int: %d -> %d\n",i, j); 24 25 g = i_echo_float(f); 26 printf("echo_float: %f -> %f\n",f, g); 27 28 e = i_echo_double(d); 29 printf("echo_double: %f -> %f\n",d, e); 30 31 j = i_echo_mix(d); 32 printf("echo_mix: %f -> %d\n",d, j); 33 34 s = i_echo_string(shello); 35 printf("echo_string: \"%s\" -> \"%s\"\n", shello, s); 36 free(s); 37 38 p = 123; 39 p2 = i_echo_parameter(p, &p1); 40 printf("echo_parameter: %d -> %d (returned = %d)\n", p, p1, p2); 41 42 printf("After the client\n"); 43 return 0; 44} 45