Macros | Functions | Variables
AppController.c File Reference
#include "XdkAppInfo.h"
#include "AppController.h"
#include <stdio.h>
#include "cJSON.h"
#include "BCDS_BSP_Board.h"
#include "BCDS_CmdProcessor.h"
#include "BCDS_WlanNetworkConfig.h"
#include "BCDS_WlanDriver.h"
#include "BCDS_Assert.h"
#include "XDK_Utils.h"
#include "XDK_WLAN.h"
#include "XDK_MQTT.h"
#include "XDK_Sensor.h"
#include "XDK_SNTP.h"
#include "XDK_Storage.h"
#include "XDK_ServalPAL.h"
#include "XDK_TimeStamp.h"
#include "FreeRTOS.h"
#include "task.h"
#include "aws_secure_sockets_config.h"
+ Include dependency graph for AppController.c:

Macros

#define APP_CLIENT_CERT_KEY_BACKUP_FILE_NAME   "xdk-cert.bkp"
 
#define APP_CLIENT_CERT_KEY_FILE_NAME   "xdk-cert.der"
 
#define APP_CONFIGURATION_BACKUP_FILE_NAME   "config.bkp"
 
#define APP_CONFIGURATION_FILE_NAME   "config.txt"
 
#define APP_CONTROLLER_STEP1   UINT32_C(0)
 
#define APP_CONTROLLER_STEP2   UINT32_C(1)
 
#define APP_MQTT_DATA_BUFFER_SIZE   UINT32_C(256)
 
#define APP_PRIVATE_KEY_BACKUP_FILE_NAME   "xdk-priv.bkp"
 
#define APP_PRIVATE_KEY_FILE_NAME   "xdk-priv.der"
 
#define APP_RESPONSE_FROM_SNTP_SERVER_TIMEOUT   UINT32_C(10000)
 
#define APP_ROOT_CA_BACKUP_FILE_NAME   "rootCA.bkp"
 
#define APP_ROOT_CA_FILE_NAME   "rootCA.der"
 
#define APP_TEMPERATURE_OFFSET_CORRECTION   (-3459)
 
#define AWS_CONFIGURATION_FILE_NAME   "/config.txt"
 
#define BCDS_MODULE_ID   XDK_APP_MODULE_ID_APP_CONTROLLER
 
#define MQTT_CONNECT_TIMEOUT_IN_MS   UINT32_C(60000)
 
#define MQTT_PUBLISH_TIMEOUT_IN_MS   UINT32_C(5000)
 
#define MQTT_SUBSCRIBE_TIMEOUT_IN_MS   UINT32_C(5000)
 
#define WIFI_CFG_FILE_READ_BUFFER   UINT32_C(2024)
 

Functions

void AppController_Init (void *cmdProcessorHandle, uint32_t param2)
 Gives control to the Application controller. More...
 
static void AppControllerEnable (void *param1, uint32_t param2)
 To enable the necessary modules for the application. It is done in 2 steps. In Step 1, the modules enabled are: More...
 
static void AppControllerFire (void *param1, uint32_t param2)
 To fire the necessary modules for the application. It is done in 2 steps. In Step 1, the modules run functionality are: More...
 
static void AppControllerFireTask (void *pvParameters)
 Responsible for controlling the send data over MQTT application control flow. More...
 
static void AppControllerSetup (void *param1, uint32_t param2)
 To setup the necessary modules for the application. It is done in 2 steps. In Step 1, the modules setup are: More...
 
static void AppControllerValidateWLANConnectivity (void)
 This will validate the WLAN network connectivity. More...
 
static void AppMQTTSubscribeCB (MQTT_SubscribeCBParam_T param)
 
static Retcode_T AppParseConfigFile (void)
 

Variables

static CmdProcessor_TAppCmdProcessor
 
static xTaskHandle AppControllerHandle = NULL
 
static uint32_t AppIncomingMsgCount = 0UL
 
static char AppIncomingMsgPayloadBuffer [APP_MQTT_DATA_BUFFER_SIZE]
 
static char AppIncomingMsgTopicBuffer [APP_MQTT_DATA_BUFFER_SIZE]
 
static uint8_t FileReadBuffer [WIFI_CFG_FILE_READ_BUFFER] = { 0 }
 
static cJSONJsonParserHandle = NULL
 
static MQTT_Connect_T MqttConnectInfo
 
static MQTT_Publish_T MqttPublishInfo
 
static MQTT_Setup_T MqttSetupInfo
 
static MQTT_Subscribe_T MqttSubscribeInfo
 
static Sensor_Setup_T SensorSetup
 
static SNTP_Setup_T SNTPSetupInfo
 
static Storage_Setup_T StorageSetup
 
static WLAN_Setup_T WLANSetupInfo
 

This documentation file has been automatically generated on Fri Oct 4 2019 03:46:53 by doxygen 1.8.8