| 1 | #include <dic.h>
|
|---|
| 2 | #include <time.h>
|
|---|
| 3 | #include <string.h>
|
|---|
| 4 | #include <stdio.h>
|
|---|
| 5 |
|
|---|
| 6 | int Data[4000];
|
|---|
| 7 | int no_link = -1;
|
|---|
| 8 |
|
|---|
| 9 | void rout( tag, buf, size )
|
|---|
| 10 | int *buf;
|
|---|
| 11 | int *tag, *size;
|
|---|
| 12 | {
|
|---|
| 13 |
|
|---|
| 14 | printf("Received beam%d Data : %d\n",*tag, buf[0]);
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | int 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 | }
|
|---|