[4284] | 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 | */ |
---|
[1915] | 13 | |
---|
[4284] | 14 | /***************************** Include Files *********************************/ |
---|
| 15 | |
---|
| 16 | // WARPLab includes |
---|
[1915] | 17 | #include "wl_common.h" |
---|
| 18 | |
---|
[4284] | 19 | |
---|
| 20 | |
---|
| 21 | /*************************** Constant Definitions ****************************/ |
---|
[1915] | 22 | #ifndef WL_NODE_H_ |
---|
| 23 | #define WL_NODE_H_ |
---|
| 24 | |
---|
[1949] | 25 | |
---|
[4284] | 26 | // ********************************************************************** |
---|
[4783] | 27 | // Command Groups (must match the CMD_ properties in wl_node_*.m) |
---|
[4284] | 28 | // |
---|
[4783] | 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 |
---|
[1949] | 35 | |
---|
[2003] | 36 | |
---|
| 37 | |
---|
[4284] | 38 | // ********************************************************************** |
---|
[4783] | 39 | // Command IDs (must match the CMD_ properties in wl_node_*.m) |
---|
[4284] | 40 | // |
---|
[4783] | 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 |
---|
[1915] | 47 | |
---|
[4783] | 48 | #define CMDID_NODE_MEM_RW 0x000010 |
---|
[1915] | 49 | |
---|
[4284] | 50 | |
---|
[4783] | 51 | |
---|
| 52 | // ********************************************************************** |
---|
| 53 | // MISC defines |
---|
| 54 | // |
---|
| 55 | #define CMD_PARAM_NODE_MEM_RW_MAX_BYTES 1400 |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | |
---|
[4284] | 59 | /*********************** Global Structure Definitions ************************/ |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | /*************************** Function Prototypes *****************************/ |
---|
| 64 | |
---|
[4514] | 65 | int node_process_cmd(int socket_index, void * from, wl_cmd_resp * command, wl_cmd_resp * response); |
---|
[4284] | 66 | |
---|
[4758] | 67 | void node_send_early_resp(int socket_index, void * to, wl_cmd_resp_hdr * resp_hdr, void * buffer); |
---|
[4514] | 68 | |
---|
[4316] | 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(); |
---|
[4284] | 73 | |
---|
[1915] | 74 | #endif /* WL_NODE_H_ */ |
---|
[4284] | 75 | |
---|