-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmv-client-test.c
37 lines (35 loc) · 1.58 KB
/
mv-client-test.c
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
/**
* \file
* MeshView Client Test
* \author
* Bhaumik Bhandari <[email protected]>
*/
/*---------------------------------------------------------------------------*/
#include "contiki-net.h"
#include "mv-client.h"
/*---------------------------------------------------------------------------*/
#define DEBUG 0
#if DEBUG
#include <stdio.h>
#define PRINTF(...) printf(__VA_ARGS__)
#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15])
#define PRINTLLADDR(lladdr) PRINTF("[%02x:%02x:%02x:%02x:%02x:%02x]", (lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3], (lladdr)->addr[4], (lladdr)->addr[5])
#else
#define PRINTF(...)
#define PRINT6ADDR(addr)
#define PRINTLLADDR(addr)
#endif
/*---------------------------------------------------------------------------*/
PROCESS(mv_client_test, "MeshView Client Test");
AUTOSTART_PROCESSES(&mv_client_test);
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(mv_client_test, ev, data)
{
PROCESS_BEGIN();
mv_client_init(MV_RPL, ROUTER);
while(1) {
PROCESS_YIELD();
}
PROCESS_END();
}
/*---------------------------------------------------------------------------*/