FACT++
1.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
test_server_slac.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <
dis.h
>
3
#include <
dic.h
>
4
5
char
str
[10][80];
6
7
void
rout
( tag, buf,
size
)
8
char *buf;
9
int
*tag, *
size
;
10
{
11
printf(
"%s Received for Server %d\n"
, buf, *tag);
12
}
13
14
main
(argc,argv)
15
int argc;
16
char
**argv;
17
{
18
char
aux[80];
19
int
n;
20
21
sscanf(argv[1],
"%d"
, &n);
22
sprintf
(aux,
"TEST_SLAC/SRV%d"
,n);
23
sprintf
(
str
[0], aux);
24
dis_add_service
(aux,
"C"
,
str
[0], strlen(
str
[0])+1, (
void
*)0, 0);
25
sprintf
(aux,
"TEST_SLAC/%d"
,n);
26
dis_start_serving
(aux);
27
sprintf
(aux,
"TEST_SLAC/CLT%d"
,n);
28
dic_info_service
( aux,
TIMED
, 60, 0, 0,
rout
, n,
29
"No Link"
, 8 );
30
while
(1)
31
{
32
pause();
33
}
34
}
35
dis.h
dic_info_service
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
rout
void rout(int *tag, char *buf, int *size)
Definition:
test_server_slac.c:7
dic.h
dis_start_serving
#define dis_start_serving
Definition:
dis.h:8
main
main(int argc, char **argv)
Definition:
test_server_slac.c:14
size
int size
Definition:
db_dim_server.c:17
dis_add_service
#define dis_add_service
Definition:
dis.h:12
TIMED
#define TIMED
Definition:
dim_common.h:8
str
char str[10][80]
Definition:
test_server_slac.c:5
sprintf
sprintf(name1,"NewService%d", i)
dim
src
examples
test_server_slac.c
Generated on Sun Sep 18 2016 20:50:18 for FACT++ by
1.8.11