FACT++  1.0
main ( int  argc,
char **  argv 
)

Definition at line 36 of file test_client_ccpc.c.

References dic_info_service(), i, MONIT_ONLY, no_link, register_callback(), set_register_wait(), and sprintf().

39 {
40  int i, index = 0, value;
41  char aux[80];
42 
43  for(i = 0; i< 10; i++)
44  {
45  sprintf(aux,"Register%03d",i);
46  dic_info_service( aux, MONIT_ONLY, 0, 0, 0,
47  register_callback, i, &no_link, sizeof(int) );
48  }
49 
50  while(1)
51  {
52  value = set_register_wait(index%10, index);
53  printf("Register %d: wrote %d, readback = %d\n",
54  index%10, index, value);
55  index ++;
56  sleep(1);
57  }
58 }
unsigned dic_info_service(char *serv_name, int req_type, int req_timeout, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, void *fill_addr, int fill_size)
Definition: dic.c:601
void register_callback(int *tag, int *data, int *size)
int i
Definition: db_dim_client.c:21
int set_register_wait(int index, int value)
int no_link
sprintf(name1,"NewService%d", i)
#define MONIT_ONLY
Definition: dim_common.h:12

+ Here is the call graph for this function: