Files | Macros | Functions | Variables
SendDataOverUdp

Send Data Over UDP. More...

+ Collaboration diagram for SendDataOverUdp:

Files

file  AppController.c
 

Macros

#define APP_CONTROLLER_TX_BUFFER_SIZE   UINT8_C(4)
 
#define BCDS_MODULE_ID   XDK_APP_MODULE_ID_APP_CONTROLLER
 

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. More...
 
static void AppControllerFire (void *pvParameters)
 Responsible for controlling the UDP Example application control flow. More...
 
static void AppControllerSetup (void *param1, uint32_t param2)
 To setup the necessary modules for the application. More...
 

Variables

static CmdProcessor_TAppCmdProcessor
 
static xTaskHandle AppControllerHandle = NULL
 
static uint8_t AppControllerTxBuffer [APP_CONTROLLER_TX_BUFFER_SIZE]
 
static WLAN_Setup_T WLANSetupInfo
 

Detailed Description

This module is intended to send UDP data to a server. Here the device connects to an access point and obtains an IP address via DHCP. Thereafter it triggers a task for sending data every pre-defined time interval (APP_UDP_TX_DELAY) , and sends it over WIFI as a UDP broadcast to a pre-defined server listening on a pre-defined port.

Macro Definition Documentation

#define APP_CONTROLLER_TX_BUFFER_SIZE   UINT8_C(4)
#define BCDS_MODULE_ID   XDK_APP_MODULE_ID_APP_CONTROLLER

Function Documentation

void AppController_Init ( void *  cmdProcessorHandle,
uint32_t  param2 
)

This is a template function where the user can write his custom application.

Refer interface header for description

+ Here is the call graph for this function:

static void AppControllerEnable ( void *  param1,
uint32_t  param2 
)
static
  • WLAN
  • UDP
Parameters
[in]param1Unused
[in]param2Unused

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void AppControllerFire ( void *  pvParameters)
static

-Creates a socket for communication -Sends the data to the remote server. -Closes the socket after successful communication.

Parameters
[in]pvParametersUnused

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void AppControllerSetup ( void *  param1,
uint32_t  param2 
)
static
  • WLAN
  • UDP
Parameters
[in]param1Unused
[in]param2Unused

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

CmdProcessor_T* AppCmdProcessor
static

Handle to store the main Command processor handle to be used by run-time event driven threads

xTaskHandle AppControllerHandle = NULL
static

OS thread handle for Application controller to be used by run-time blocking threads

uint8_t AppControllerTxBuffer[APP_CONTROLLER_TX_BUFFER_SIZE]
static

This buffer holds the data to be sent to server via UDP

WLAN_Setup_T WLANSetupInfo
static
Initial value:
=
{
.IsEnterprise = false,
.IsHostPgmEnabled = false,
.SSID = WLAN_SSID,
.Username = WLAN_PSK,
.Password = WLAN_PSK,
.IsStatic = false,
.IpAddr = 0UL,
.GwAddr = 0UL,
.DnsAddr = 0UL,
.Mask = 0UL,
}
#define WLAN_PSK
Definition: AppController.h:75
#define WLAN_SSID
Definition: AppController.h:69

WLAN setup parameters


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