mbed Sensor node for Instrumented Booth over ETH.
Dependencies: EthernetInterface-1 MaxbotixDriver Presence HTU21D_TEMP_HUMID_SENSOR_SAMPLE Resources SHARPIR mbed-rtos mbed-src WDT_K64F nsdl_lib
Fork of Trenton_Switch_LPC1768_ETH by
Diff: node_cfg.h
- Revision:
- 32:c957a1948ac1
- Parent:
- 30:b74aa0729b07
- Child:
- 36:bb8c769065de
--- a/node_cfg.h Tue Dec 09 11:41:28 2014 +0000 +++ b/node_cfg.h Thu Dec 11 17:15:04 2014 +0000 @@ -10,24 +10,56 @@ //Which Sensors #define NODE_SENSOR_STATION 1 // use K64F platform. Base sensor platform. Includes Microphone, temperature. #define NODE_HEIGHT_STATION 1 // use K64F platform. This include door height sensor -#define NODE_KIOSK_STATION 0 // use K64F platform. This includes kiosk presence sensor -#define NODE_DOOR_TRIP_STATION 0 // use K64F platform. This includes door tripwire sensor +#define NODE_KIOSK_STATION 0 // use K64F platform. This includes kiosk presence sensor +#define NODE_DOOR_TRIP_STATION 1 // use K64F platform. This includes door tripwire sensor #define NODE_PIR_STATION 0 // use K64F platform. This includes pir motion sensor /*************** NODE PROFILE CONFIGURATION *****************/ -#define NODE_SHORT_ADDRESS 5 -#define NODE_MAC_ADDRESS {0,0,6,0x02,0x00,0x00,0x09,0x02} -#define NODE_NAME "mbed-sensor-station-height" +/** CES NODE DEFINITIONS **/ + +#if NODE_6LOWPAN +//6LoWPAN Sensors... +#define ENDPOINT_TYPE {"mbed-sensor-6LoWPAN"} + +//#define NODE_SHORT_ADDRESS 01 //mbed Meeting Room +//#define NODE_NAME "mbed-sensor-mbed" +//#define NODE_SHORT_ADDRESS 02 //Cortex Meeting Room +//#define NODE_NAME "mbed-sensor-Cortex" +//#define NODE_SHORT_ADDRESS 03 //Artisan Meeting Room +//#define NODE_NAME "mbed-sensor-Artisan" +//#define NODE_SHORT_ADDRESS 04 //Mali Meeting Room +//#define NODE_NAME "mbed-sensor-Mali" +//#define NODE_SHORT_ADDRESS 05 //Casual Seating Area 1 +//#define NODE_NAME "mbed-sensor-Casual-1" +//#define NODE_SHORT_ADDRESS 06 //Casual Seating Area 2 +//#define NODE_NAME "mbed-sensor-Casual-2" +//#define NODE_SHORT_ADDRESS 07 //Reception +//#define NODE_NAME "mbed-sensor-Reception" + +#define GENERATE_MAC_ADDRESS(short) {0,0,6,0x02,0x00,0x00,0x09,0x ## short ## } +#define NODE_MAC_ADDRESS GENERATE_MAC_ADDRESS(NODE_SHORT_ADDRESS) //{0,0,6,0x02,0x00,0x00,0x09,0x02} + +#else +//Ethernet Sensors... +#define ENDPOINT_TYPE {"mbed-sensor-Ethernet"} + +#define NODE_NAME "mbed-sensor-demo-door" +//#define NODE_NAME "mbed-sensor-demo-1" +//#define NODE_NAME "mbed-sensor-demo-2" +//#define NODE_NAME "mbed-sensor-demo-3" +//#define NODE_NAME "mbed-sensor-demo-4" -#define ENDPOINT_TYPE {"mbed-device"} +#endif //Node comms Type + #define LIFE_TIME {"600"} //seconds, extra char needed to avoid truncation + // **************************************************************************** // Ethernet Config... - +#if NODE_ETHERNET // Ethernet configuration /* Define this to enable DHCP, otherwise manual address configuration is used */ #define DHCP @@ -36,7 +68,7 @@ #define IP "192.168.1.10" #define MASK "255.255.255.0" #define GW "10.45.0.1" - +#endif //ETHERNET // **************************************************************************** @@ -46,11 +78,11 @@ #define NSP_IP_ADDRESS "192.168.1.100" //IPv4 -#ifdef NODE_6LOWPAN +#if NODE_6LOWPAN #define NSP_IP_ADDRESS_BYTES {0x20, 0x02, 0x0d, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x00, 0x01} //IPv6 -#else +#else // Not NODE_6LOWPAN //Default to IPv4 #define NSP_IP_ADDRESS_BYTES {0xc0, 0xa8, 0x01, 0x64} //IPv4 -#endif // NODE_6LOW_PAN +#endif // NODE_ETHERNET #endif // NODE_CFG_H_ \ No newline at end of file