MIDAS
Loading...
Searching...
No Matches
rpc_test.cxx File Reference
#include "midas.h"
#include "mrpc.h"
#include <stdio.h>
Include dependency graph for rpc_test.cxx:

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 27 of file rpc_test.cxx.

29{
30 char host_name[256];
31 INT status;
32 BYTE b;
33 WORD w;
34 INT i;
35 float f;
36 double d;
37
38#ifdef OS_VXWORKS
39 strcpy(host_name, ahost_name);
40#else
41 printf("Remote host IP address: ");
42 ss_gets(host_name, 256);
43#endif
44
45 status = cm_connect_experiment(host_name, "", "RPC_TEST", NULL);
46 if (status != CM_SUCCESS)
47 return 1;
48
49 f = 3.5f;
50 d = 4.5;
51
52 /* rpc_test just doubles numbers */
53 rpc_call(RPC_TEST, 1, 2, 3l, f, d, &b, &w, &i, &f, &d);
54
55 printf("\nResult should be: 2 4 6 7.0 9.0\n");
56 printf("Result is: %d %d %ld %1.1f %1.1lf\n", b, w, (long int) i, f, d);
57
58 printf("\nhit return...");
59 b = getchar();
60
62 return 1;
63}
INT cm_connect_experiment(const char *host_name, const char *exp_name, const char *client_name, void(*func)(char *))
Definition midas.cxx:2278
INT cm_disconnect_experiment(void)
Definition midas.cxx:2846
#define CM_SUCCESS
Definition midas.h:582
unsigned short int WORD
Definition mcstd.h:49
unsigned char BYTE
Definition mcstd.h:48
char * ss_gets(char *string, int size)
Definition system.cxx:7770
INT rpc_call(DWORD routine_id,...)
Definition midas.cxx:13663
#define RPC_TEST
Definition mrpc.h:122
char host_name[HOST_NAME_LENGTH]
Definition mana.cxx:242
INT i
Definition mdump.cxx:32
int INT
Definition midas.h:129
DWORD status
Definition odbhist.cxx:39
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
Definition rmidas.h:24
double d
Definition system.cxx:1311
Here is the call graph for this function: