]> rtime.felk.cvut.cz Git - frescor/fna.git/blob - tests/tests_frescan/test_frescan_init.c
56a0f94397d9ed2606cdbec8a2bc8124b01adeaa
[frescor/fna.git] / tests / tests_frescan / test_frescan_init.c
1 #include <stdio.h>  // perror
2 #include <stdlib.h> // exit
3 #include <unistd.h>   // sleep
4
5 #include "frescan.h"
6
7 #define ERROR(s) {perror (s); exit (-1);}
8
9 #define NETWORK 0
10 #define LOCAL_NODE 1
11
12 int main ()
13 {
14         int ret;
15         frescan_init_params_t init_params;
16
17         init_params.net = NETWORK;
18         init_params.node = LOCAL_NODE;
19         init_params.tx_fp_max_prio = 10;
20         init_params.rx_num_of_channels = 5;
21         init_params.rx_channel_max_prio = NULL;
22
23         ret = frescan_init(&init_params);
24         if (ret != 0) ERROR ("could not init FRESCAN");
25
26         printf("FRESCAN initialized\n");
27
28         while (1) {
29                 sleep(1);
30         }
31
32         return 0;
33 }
34
35