added max-age and content-format
Fork of mbedConnectorInterface by
Diff: api/Utils.cpp
- Revision:
- 19:e2cbaeeea509
- Parent:
- 16:383ad1356963
- Child:
- 29:2f33650ca800
--- a/api/Utils.cpp Wed Feb 18 19:40:13 2015 +0000 +++ b/api/Utils.cpp Tue Feb 24 02:05:06 2015 +0000 @@ -50,6 +50,9 @@ WiFiAuthTypes wifi_auth_type; // WiFi Auth Type uint8_t wifi_auth_key[WIFI_AUTH_KEY_LENGTH]; // WiFi Auth Key +uint8_t mesh_network_id[MESH_NETWORK_ID_LENGTH] = MESH_DEF_NETWORK_ID; // 802.15.4 Network ID (6LowPAN) +uint8_t rf_channel = MESH_DEF_RF_CHANNEL; // 802.15.4 RF Channel (6LowPAN) + // ************************* NSDL Linkage - MDS CONFIGURATION (defaulted) ********************************* @@ -76,6 +79,10 @@ config.setWiFiAuthType(WIFI_WPA_PERSONAL); // default: WPA Personal config.setWiFiAuthKey(WIFI_DEFAULT_AUTH_KEY); // default: changeme + // 802.15.4 defaults (6LowPAN) + config.setNetworkID((char *)mesh_network_id); + config.setRadioChannel((int)mesh_network_id); + // main.cpp can override or change any of the above defaults... logger.log("utils_configure_endpoint: gathering configuration overrides..."); options = configure_endpoint(config); @@ -95,6 +102,10 @@ memcpy(wifi_ssid,options->getWiFiSSID().c_str(),options->getWiFiSSID().size()); wifi_auth_type = options->getWiFiAuthType(); memcpy(wifi_auth_key,options->getWiFiAuthKey().c_str(),options->getWiFiAuthKey().size()); + + // 802.15.4 Configuration + memcpy(mesh_network_id,options->getNetworkID().c_str(),options->getNetworkID().size()); + rf_channel = options->getRadioChannel(); // DONE logger.log("utils_configure_endpoint: endpoint configuration completed.");