FACT++
1.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
demo_client.c
Go to the documentation of this file.
1
#include <
dic.h
>
2
3
int
no_link
= -1;
4
5
void
got_data
( tag,
data
,
size
)
6
int *
data
;
7
int
*tag, *
size
;
8
{
9
10
if
(*data == -1)
11
printf(
"Server is dead\n"
);
12
else
13
printf(
"got data: %d\n"
,*data);
14
}
15
16
main
(argc,argv)
17
int argc;
18
char
**argv;
19
{
20
char
aux[80], cmnd[16];
21
22
23
sprintf
(aux,
"DEVICE/%s/DATA"
,argv[1]);
24
dic_info_service
( aux,
MONITORED
, 0, 0, 0,
got_data
, 0,
25
&
no_link
, 4 );
26
27
sprintf
(aux,
"DEVICE/%s/CMD"
,argv[1]);
28
while
(1)
29
{
30
scanf(
"%s"
,cmnd);
31
printf(
"Sending Command: %s\n"
,cmnd);
32
dic_cmnd_service
(aux,cmnd,(
int
)strlen(cmnd)+1);
33
}
34
}
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
MONITORED
#define MONITORED
Definition:
dim_common.h:9
dic.h
main
main(int argc, char **argv)
Definition:
demo_client.c:16
dic_cmnd_service
int dic_cmnd_service(char *serv_name, void *serv_address, int serv_size)
Definition:
dic.c:694
no_link
int no_link
Definition:
demo_client.c:3
size
int size
Definition:
db_dim_server.c:17
data
float data[4 *1440]
Definition:
EventBuilderWrapper.h:95
got_data
void got_data(int *tag, int *data, int *size)
Definition:
demo_client.c:5
sprintf
sprintf(name1,"NewService%d", i)
dim
src
examples
demo_client.c
Generated on Sun Sep 18 2016 20:50:18 for FACT++ by
1.8.11