Hello, Yes I have attached the file. /* header definition ******************************************************** */
#ifndef APPCONTROLLER_H_
#define APPCONTROLLER_H_
/* local interface declaration ********************************************** */
#include "XDK_Utils.h"
#include "simplelink/include/wlan.h"
/* local type and macro definitions */
/* WLAN configurations ****************************************************** */
//#warning Please configure your WLAN below and remove this line.
/**
* WLAN_SSID is the WIFI network name where user wants connect the XDK device.
* Make sure to update the WLAN_PSK constant according to your required WIFI network.
*/
#define WLAN_SSID "NETGEAR70"
/**
* WLAN_PSK is the WIFI router WPA/WPA2 password used at the Wifi network connection.
* Make sure to update the WLAN_PSK constant according to your router password.
*/
#define WLAN_PSK "************"
/**
* WLAN_STATIC_IP is a boolean. If "true" then static IP will be assigned and if "false" then DHCP is used.
*/
#define WLAN_STATIC_IP false
/**
* WLAN_IP_ADDR is the WIFI router WPA/WPA2 static IPv4 IP address (unused if WLAN_STATIC_IP is false)
* Make sure to update the WLAN_IP_ADDR constant according to your required WIFI network,
* if WLAN_STATIC_IP is "true".
*/
#define WLAN_IP_ADDR XDK_NETWORK_IPV4(0, 0, 0, 0)
/**
* WLAN_GW_ADDR is the WIFI router WPA/WPA2 static IPv4 gateway address (unused if WLAN_STATIC_IP is false)
* Make sure to update the WLAN_GW_ADDR constant according to your required WIFI network,
* if WLAN_STATIC_IP is "true".
*/
#define WLAN_GW_ADDR XDK_NETWORK_IPV4(0, 0, 0, 0)
/**
* WLAN_DNS_ADDR is the WIFI router WPA/WPA2 static IPv4 DNS address (unused if WLAN_STATIC_IP is false)
* Make sure to update the WLAN_DNS_ADDR constant according to your required WIFI network,
* if WLAN_STATIC_IP is "true".
*/
#define WLAN_DNS_ADDR XDK_NETWORK_IPV4(0, 0, 0, 0)
/**
* WLAN_MASK is the WIFI router WPA/WPA2 static IPv4 mask address (unused if WLAN_STATIC_IP is false)
* Make sure to update the WLAN_MASK constant according to your required WIFI network,
* if WLAN_STATIC_IP is "true".
*/
#define WLAN_MASK XDK_NETWORK_IPV4(0, 0, 0, 0)
/* SNTP configurations ****************************************************** */
/**
* SNTP_SERVER_URL is the SNTP server URL.
*/
//#define SNTP_SERVER_URL "ntp.uni-kl.de"
#define SNTP_SERVER_URL "192.168.1.2"
/**
* SNTP_SERVER_PORT is the SNTP server port number.
*/
#define SNTP_SERVER_PORT UINT16_C(42201)
/* MQTT server configurations *********************************************** */
/**
* APP_MQTT_BROKER_HOST_URL is the MQTT broker host address URL.
*/
#define APP_MQTT_BROKER_HOST_URL "test.mosquitto.org"
/**
* APP_MQTT_BROKER_HOST_PORT is the MQTT broker host port.
*/
#define APP_MQTT_BROKER_HOST_PORT UINT16_C(1883)
/**
* APP_MQTT_CLIENT_ID is the device name
*/
#define APP_MQTT_CLIENT_ID "%02x%02x%02x%02x%02x%02x" //device mac
/**
* APP_MQTT_TOPIC is the topic to subscribe and publish
*/
// Topic for environment data
#define APP_MQTT_TOPIC_TEMP "XDK110/%02x%02x%02x%02x%02x%02x/temperature"
// Topic for light
#define APP_MQTT_TOPIC_Light "XDK110/%02x%02x%02x%02x%02x%02x/light"
// Topic for AP's information
#define APP_MQTT_TOPIC_AP "XDK110/%02x%02x%02x%02x%02x%02x/wifi"
// Topic for timestamp
#define APP_MQTT_TOPIC_timestamp "XDK110/%02x%02x%02x%02x%02x%02x/timestamp"
/*#warning Configure APP_MQTT_SECURE_ENABLE to 1 to enable the MQTT with secure communication.\
Otherwise Communication will happen without security. \
Also provide the right server certificate in the ServerCA.h file. \
Remove this line to avoid warnings.*/
/**
* APP_MQTT_SECURE_ENABLE is a macro to enable MQTT with security
*/
#define APP_MQTT_SECURE_ENABLE 0
/**
* APP_MQTT_DATA_PUBLISH_PERIODICITY is time for MQTT to publish the sensor data
*/
#define APP_MQTT_DATA_PUBLISH_PERIODICITY UINT32_C(1000)
/* local function prototype declarations */
/* local module global variable declarations */
/* local inline function definitions */
/**
* @brief Gives control to the Application controller.
*
* @param[in] cmdProcessorHandle
* Handle of the main command processor which shall be used based on the application needs
*
* @param[in] param2
* Unused
*/
void AppController_Init(void * cmdProcessorHandle, uint32_t param2);
void GetRSSiofOtherAP(Sl_WlanNetworkEntry_t netEntries[]);
int string_compare(char str1[], char str2[]);
#endif /* APPCONTROLLER_H_ */
/** ************************************************************************* */
... View more