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 Demo Team

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers node_cfg.h Source File

node_cfg.h

00001 #ifndef NODE_CFG_H_
00002 #define NODE_CFG_H_
00003 
00004 /************** NODE PROFILE SELECTION ***********************/
00005 
00006 //Which Radio
00007 #define NODE_6LOWPAN    0
00008 #define NODE_ETHERNET   1
00009 
00010 //Which Sensors
00011 #define     NODE_SENSOR_STATION         1       // use K64F platform. Base sensor platform. Includes Microphone, temperature.
00012 #define     NODE_HEIGHT_STATION         0       // use K64F platform. This include door height sensor
00013 #define     NODE_KIOSK_STATION          1       // use K64F platform. This includes kiosk presence sensor
00014 #define     NODE_DOOR_TRIP_STATION      0       // use K64F platform. This includes door tripwire sensor
00015 #define     NODE_PIR_STATION            0       // use K64F platform. This includes pir motion sensor
00016 
00017 #define     HEART_BEAT                  1       // For debug...
00018 
00019 /*************** NODE PROFILE CONFIGURATION  *****************/
00020 
00021 /** CES NODE DEFINITIONS **/
00022 
00023 #if NODE_6LOWPAN
00024 //6LoWPAN Sensors...
00025 #define ENDPOINT_TYPE       {"mbed-sensor-6LoWPAN"}
00026 
00027 //#define NODE_SHORT_ADDRESS          01                  //mbed Meeting Room
00028 //#define NODE_NAME                   "mbed-sensor-mbed"
00029 //#define NODE_SHORT_ADDRESS          02                  //Cortex Meeting Room
00030 //#define NODE_NAME                   "mbed-sensor-Cortex"
00031 //#define NODE_SHORT_ADDRESS          03                  //Artisan Meeting Room
00032 //#define NODE_NAME                   "mbed-sensor-Artisan"
00033 //#define NODE_SHORT_ADDRESS          04                  //Mali Meeting Room
00034 //#define NODE_NAME                   "mbed-sensor-Mali"
00035 //#define NODE_SHORT_ADDRESS          05                  //Casual Seating Area 1
00036 //#define NODE_NAME                   "mbed-sensor-Casual-1"
00037 //#define NODE_SHORT_ADDRESS          06                  //Casual Seating Area 2
00038 //#define NODE_NAME                   "mbed-sensor-Casual-2"
00039 //#define NODE_SHORT_ADDRESS          07                  //Reception
00040 //#define NODE_NAME                   "mbed-sensor-Reception"
00041 
00042 #define GENERATE_MAC_ADDRESS(short) {0,0,6,0x02,0x00,0x00,0x09,0x ## short ## }
00043 #define NODE_MAC_ADDRESS        GENERATE_MAC_ADDRESS(NODE_SHORT_ADDRESS) //{0,0,6,0x02,0x00,0x00,0x09,0x02}
00044 
00045 #else
00046 //Ethernet Sensors...
00047 #define ENDPOINT_TYPE       {"mbed-sensor-Ethernet"}
00048 
00049 #define NODE_NAME                   "mbed-sensor-demo-eth"
00050 //#define NODE_NAME                   "mbed-sensor-demo-2"
00051 //#define NODE_NAME                   "mbed-sensor-demo-3"
00052 //#define NODE_NAME                   "mbed-sensor-demo-4"  
00053 //#define NODE_NAME                   "mbed-sensor-demo-5"
00054 //#define NODE_NAME                   "mbed-sensor-demo-6"  
00055 //#define NODE_NAME                   "mbed-sensor-stairs"  
00056 //#define NODE_NAME                   "mbed-sensor-reception"
00057 
00058 
00059 #endif //Node comms Type
00060 
00061 #define LIFE_TIME           {"43200"}     //seconds, extra char needed to avoid truncation 12 HOURS
00062 
00063 
00064 // ****************************************************************************
00065 // Ethernet Config...
00066 #if NODE_ETHERNET
00067 // Ethernet configuration
00068 /* Define this to enable DHCP, otherwise manual address configuration is used */
00069 #define DHCP
00070 
00071 /* Manual IP configurations, if DHCP not defined */
00072 #define IP      "192.168.1.100"
00073 #define MASK    "255.255.255.0"
00074 #define GW      "10.45.0.1"
00075 #endif //ETHERNET
00076 // ****************************************************************************
00077 
00078 
00079 
00080 /************** REGISTRATION  PARAMETERS  ************************/
00081 #define RD_UPDATE_PERIOD_MS    300000      // 5 minutes
00082 
00083 #define NSP_IP_ADDRESS              "192.168.1.100" //IPv4
00084 
00085 #if NODE_6LOWPAN
00086 #define NSP_IP_ADDRESS_BYTES      {0x20, 0x02, 0x0d, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x00, 0x01} //IPv6
00087 #else // Not NODE_6LOWPAN
00088 //Default to IPv4
00089 #define NSP_IP_ADDRESS_BYTES        {0xc0, 0xa8, 0x01, 0x64} //IPv4
00090 #endif // NODE_ETHERNET
00091 
00092 #endif  // NODE_CFG_H_