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