-
Notifications
You must be signed in to change notification settings - Fork 0
/
range_test.h
61 lines (50 loc) · 1.47 KB
/
range_test.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Copyright (C) 2019 ML!PA Consulting GmbH
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup examples
* @{
*
* @file
* @brief Application to test different PHY modulations
*
* @author Benjamin Valentin <benjamin.valentin@ml-pa.com>
*
* @}
*/
#ifndef RANGE_TEST_H
#define RANGE_TEST_H
#include <stdbool.h>
#include <stdint.h>
#include "xtimer.h"
typedef struct {
uint16_t pkts_send;
uint16_t pkts_rcvd;
int32_t rssi_sum[2];
uint32_t lqi_sum[2];
uint32_t rtt_ticks;
uint16_t payload_size;
bool invalid;
} test_result_t;
void range_test_init(void);
void range_test_start(void);
void range_test_end(void);
bool range_test_set_next_modulation(void);
uint32_t range_test_get_timeout(kernel_pid_t netif);
void range_test_begin_measurement(kernel_pid_t netif);
void range_test_add_measurement(kernel_pid_t netif, uint32_t ticks,
int rssi_local, int rssi_remote,
unsigned lqi_local, unsigned lqi_remote,
uint16_t payload_size);
void range_test_print_results(void);
uint32_t range_test_period_ms(void);
uint16_t range_test_payload_size(void);
unsigned range_test_radio_pid(void);
unsigned range_test_radio_numof(void);
#define GNRC_NETIF_NUMOF (2) // FIXME
#define CONFIG_NETDEV_TYPE NETDEV_AT86RF215
#endif