Macros | Functions | Variables
AppController.c File Reference
#include "XdkAppInfo.h"
#include "AppController.h"
#include <stdio.h>
#include "XDK_WLAN.h"
#include "XDK_LED.h"
#include "XDK_ServalPAL.h"
#include "XDK_Storage.h"
#include "XDK_SNTP.h"
#include "XDK_Button.h"
#include "XDK_LWM2M.h"
#include "AppTxtParser.h"
#include "BCDS_WlanNetworkConnect.h"
#include "BCDS_WlanNetworkConfig.h"
#include "BCDS_CmdProcessor.h"
#include "XDK_Utils.h"
#include "netcfg.h"
#include "FreeRTOS.h"
#include "task.h"
#include "XDK_FOTA.h"
+ Include dependency graph for AppController.c:

Macros

#define APP_CONTROLLER_STEP1   UINT32_C(0)
 
#define APP_CONTROLLER_STEP2   UINT32_C(1)
 
#define APP_RESPONSE_FROM_SNTP_SERVER_TIMEOUT   UINT32_C(10000)
 
#define APP_SYNC_TIME_INTERVAL_MAX_MS   UINT32_C(1800000)
 
#define APP_WLAN_MONITOR_MAX_MS   UINT32_C(10000)
 
#define BCDS_MODULE_ID   XDK_APP_MODULE_ID_APP_CONTROLLER
 
#define LWM2M_CLIENT_PORT   UINT32_C(12345)
 
#define SD_CARD_RENAME_FILE_NAME   "0:config.bkp"
 
#define SERIAL_CONNECT_TIME_INTERVAL_IN_MS   UINT32_C(5000)
 
#define WIFI_CFG_FILE_READ_BUFFER   UINT32_C(2024)
 
#define WIFI_CONFIG_FILE_NAME   "config.txt"
 

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)
 This task triggers the below. More...
 
static const char * AppControllerGetWlanConnectDescription (WlanNetworkConnect_Status_T wlanStatus)
 
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...
 
void AppControllerSyncSNTP (void)
 This will synchronizing the SNTP server time with the node. More...
 
void AppControllerWLANMonitor (void)
 This will monitor the WLAN health. More...
 
static void AppLWM2MStatusNotificationCB (LWM2M_StatusNotification_T status)
 LWM2M status notification callback. More...
 
static void Button1Callback (ButtonEvent_T buttonEvent)
 Callback for Button 1. More...
 
static void Button2Callback (ButtonEvent_T buttonEvent)
 Callback for Button 2. More...
 

Variables

static uint32_t ActualFileReadSize = 0UL
 
static CmdProcessor_TAppCmdProcessor
 
static xTaskHandle AppControllerHandle = NULL
 
static volatile bool Button1State = false
 
static volatile bool Button2State = false
 
static Button_Setup_T ButtonSetup
 
static uint8_t FileReadBuffer [WIFI_CFG_FILE_READ_BUFFER] = { 0 }
 
static LWM2M_Setup_T Lwm2mSetup
 
static SNTP_Setup_T SNTPSetupInfo
 
static Storage_Setup_T StorageSetup
 
static bool UseButtonsForLWM2MAlert = false
 
static WlanNetworkConnect_Status_T WlanConnectStatus = WLANNWCT_STATUS_DISCONNECTED
 
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