source: trunk/FACT++/dim/src/examples/test_client1.c@ 16336

Last change on this file since 16336 was 11071, checked in by tbretz, 14 years ago
Replaced v19r21 by a version extracted with 'unzip -a' to get proper unix text format.
File size: 924 bytes
Line 
1#include <dic.h>
2#include <time.h>
3#include <string.h>
4#include <stdio.h>
5
6int Data[4000];
7int no_link = -1;
8
9void rout( tag, buf, size )
10int *buf;
11int *tag, *size;
12{
13
14 printf("Received beam%d Data : %d\n",*tag, buf[0]);
15}
16
17int main(int argc, char **argv)
18{
19 int i;
20 char aux[80];
21 int id = 123;
22
23 dic_info_service( "Beam1/Data", MONITORED, 0, 0, 0, rout, 1,
24 &no_link, 4 );
25 dic_info_service( "Beam1/Data", MONITORED, 0, 0, 0, rout, 1,
26 &no_link, 4 );
27 dic_info_service( "Beam1/Data", MONITORED, 0, 0, 0, rout, 1,
28 &no_link, 4 );
29 dic_info_service( "Beam2/Data", MONITORED, 0, 0, 0, rout, 2,
30 &no_link, 4 );
31 dic_info_service( "Beam2/Data", MONITORED, 0, 0, 0, rout, 2,
32 &no_link, 4 );
33 dic_info_service( "Beam2/Data", MONITORED, 0, 0, 0, rout, 2,
34 &no_link, 4 );
35
36 while(1)
37 {
38 usleep(1000);
39 dic_cmnd_service("Beam1/Cmd","Update",7);
40 dic_cmnd_service("Beam2/Cmd","Update",7);
41 }
42 return 1;
43}
Note: See TracBrowser for help on using the repository browser.