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

Definition at line 106 of file test_client.c.

References client_str, dic_cmnd_service(), dic_get_id(), dic_info_service(), dic_info_service_stamped(), TT::i, i, MONITORED, no_link, rout(), sprintf(), str, TIMED, and version_rout().

107 {
108  int i;
109  char aux[80];
110  int id = 123;
111 
112 /*
113  dic_set_debug_on();
114 */
115 /*
116  dic_set_dns_node("pclhcb99.cern.ch");
117 */
118  if(argc){}
119  sprintf(str,"%s/SET_EXIT_HANDLER",argv[2]);
120  dic_cmnd_service(str, &id, 4);
121  dic_get_id(aux);
122  printf("%s\n",aux);
123  strcpy(client_str,argv[1]);
124 
125  for(i = 0; i< 10; i++)
126  {
127  sprintf(str,"%s/Service_%03d",argv[2],i);
128  dic_info_service( str, TIMED, 10, 0, 0, rout, i,
129  "No Link", 8 );
130  }
131 
132  sprintf(aux,"%s/TEST_SWAP",argv[2]);
133  dic_info_service_stamped( aux, TIMED, 5, 0, 0, rout, 1200,
134  &no_link, 4 );
135 
136  sprintf(str,"%s/VERSION_NUMBER",argv[2]);
138  NULL, 0 );
139 /*
140  for(i = 0; i < 20; i++)
141  {
142  sprintf(aux,"%s/TestMem_%d",argv[2], i);
143  dic_info_service( aux, MONITORED, 0, 0, 0, big_rout, i,
144  &no_link, 4 );
145  }
146 */
147 /*
148  sprintf(aux,"DIS_DNS/SERVER_LIST");
149  dic_info_service( aux, MONITORED, 0, 0, 0, rout_list, 0,
150  "DEAD", 5 );
151  sprintf(aux,"%s/SERVICE_LIST",argv[2]);
152  dic_info_service( aux, MONITORED, 0, 0, 0, rout_list, 0,
153  "DEAD", 5 );
154 */
155 /*
156  dic_info_service("DIS_DNS/SERVER_LIST",MONITORED, 0, 0, 0, got_servers, 0,
157  "not there", 10);
158  dic_info_service("xx/SERVICE_LIST",MONITORED, 0, 0, 0, got_services, 0,
159  "not there", 10);
160 */
161  sprintf(aux,"%s/TEST_CMD",argv[2]);
162  while(1)
163  {
164  sleep(10);
165  printf("Sending Command, size = %d, i = %d\n",(int)sizeof(t), t.i);
166  dic_cmnd_service(aux,&t,(int)sizeof(t));
167  }
168  return 1;
169 }
int no_link
Definition: test_client.c:10
unsigned dic_info_service_stamped(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:613
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
int dic_get_id(char *name)
Definition: dic.c:2062
int i
Definition: db_dim_client.c:21
char str[80]
Definition: test_client.c:7
#define MONITORED
Definition: dim_common.h:9
int dic_cmnd_service(char *serv_name, void *serv_address, int serv_size)
Definition: dic.c:694
void rout(int *tag, char *buf, int *size)
Definition: test_client.c:62
void version_rout(int *tag, int *buf, int *size)
Definition: test_client.c:56
int i
Definition: test_client.c:15
char client_str[80]
Definition: test_client.c:9
TT t
Definition: test_client.c:26
#define TIMED
Definition: dim_common.h:8
sprintf(name1,"NewService%d", i)

+ Here is the call graph for this function: