1 | /** @file wl_node.h |
---|
2 | * @brief WARPLab Framework (Node) |
---|
3 | * |
---|
4 | * This contains the code for WARPLab Framework. |
---|
5 | * |
---|
6 | * @copyright Copyright 2013, Mango Communications. All rights reserved. |
---|
7 | * Distributed under the WARP license (http://warpproject.org/license) |
---|
8 | * |
---|
9 | * @author Chris Hunter (chunter [at] mangocomm.com) |
---|
10 | * @author Patrick Murphy (murphpo [at] mangocomm.com) |
---|
11 | * @author Erik Welsh (welsh [at] mangocomm.com) |
---|
12 | */ |
---|
13 | |
---|
14 | /***************************** Include Files *********************************/ |
---|
15 | |
---|
16 | // WARPLab includes |
---|
17 | #include "wl_common.h" |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | /*************************** Constant Definitions ****************************/ |
---|
22 | #ifndef WL_NODE_H_ |
---|
23 | #define WL_NODE_H_ |
---|
24 | |
---|
25 | |
---|
26 | // ********************************************************************** |
---|
27 | // Command Groups (must match the CMD_ properties in wl_node_*.m) |
---|
28 | // |
---|
29 | #define GROUP_NODE 0x00 |
---|
30 | #define GROUP_TRANSPORT 0x10 |
---|
31 | #define GROUP_INTERFACE 0x20 |
---|
32 | #define GROUP_BASEBAND 0x30 |
---|
33 | #define GROUP_TRIGGER_MANAGER 0x40 |
---|
34 | #define GROUP_USER 0x50 |
---|
35 | |
---|
36 | |
---|
37 | |
---|
38 | // ********************************************************************** |
---|
39 | // Command IDs (must match the CMD_ properties in wl_node_*.m) |
---|
40 | // |
---|
41 | #define CMDID_NODE_INITIALIZE 0x000001 |
---|
42 | #define CMDID_NODE_INFO 0x000002 |
---|
43 | #define CMDID_NODE_IDENTIFY 0x000003 |
---|
44 | #define CMDID_NODE_TEMPERATURE 0x000004 |
---|
45 | #define CMDID_NODE_CONFIG_SETUP 0x000005 |
---|
46 | #define CMDID_NODE_CONFIG_RESET 0x000006 |
---|
47 | |
---|
48 | #define CMDID_NODE_MEM_RW 0x000010 |
---|
49 | |
---|
50 | |
---|
51 | |
---|
52 | // ********************************************************************** |
---|
53 | // MISC defines |
---|
54 | // |
---|
55 | #define CMD_PARAM_NODE_MEM_RW_MAX_BYTES 1400 |
---|
56 | |
---|
57 | |
---|
58 | |
---|
59 | /*********************** Global Structure Definitions ************************/ |
---|
60 | |
---|
61 | |
---|
62 | |
---|
63 | /*************************** Function Prototypes *****************************/ |
---|
64 | |
---|
65 | int node_process_cmd(int socket_index, void * from, wl_cmd_resp * command, wl_cmd_resp * response); |
---|
66 | |
---|
67 | void node_send_early_resp(int socket_index, void * to, wl_cmd_resp_hdr * resp_hdr, void * buffer); |
---|
68 | |
---|
69 | // Node LED commands |
---|
70 | void blink_node( int num_blinks, int blink_time ); |
---|
71 | void increment_green_leds_one_hot(); |
---|
72 | void increment_red_leds_one_hot(); |
---|
73 | |
---|
74 | #endif /* WL_NODE_H_ */ |
---|
75 | |
---|