XDK API  3.6.0
Documentation
Files | Macros | Functions | Variables
LoRaThingsNetworkDemo

Demo application of Transmitting temperature,pressure,humidity and light sensor data on LoRa every configured interval (APP_CONTROLLER_LORA_TX_DELAY) More...

+ Collaboration diagram for LoRaThingsNetworkDemo:

Files

file  AppController.c
 

Macros

#define APP_TEMPERATURE_OFFSET_CORRECTION   (-3459)
 
#define BCDS_MODULE_ID   XDK_APP_MODULE_ID_APP_CONTROLLER
 
#define HUMIDITY_DATA_CH   0x02
 
#define ILLUMINANCE_DATA_CH   0x04
 
#define PRESSURE_DATA_CH   0x03
 
#define TEMPERATURE_DATA_CH   0x01
 

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 LORA Example application control flow. More...
 
static void AppControllerSetup (void *param1, uint32_t param2)
 To setup the necessary modules for the application. More...
 
static void LoRaEventNotificationCB (LoRa_Event_T event)
 This is the LoRa event Notification callback function. More...
 

Variables

static CmdProcessor_TAppCmdProcessor
 
static xTaskHandle AppControllerHandle = NULL
 
const uint8_t AppKey [16] = { APP_LORA_APP_KEY }
 
static LoRa_Setup_T LoRaSetupInfo
 
static Sensor_Setup_T SensorSetup
 

Detailed Description

Macro Definition Documentation

#define APP_TEMPERATURE_OFFSET_CORRECTION   (-3459)

Macro for static temperature offset correction. Self heating, temperature correction factor

#define BCDS_MODULE_ID   XDK_APP_MODULE_ID_APP_CONTROLLER
#define HUMIDITY_DATA_CH   0x02
#define ILLUMINANCE_DATA_CH   0x04
#define PRESSURE_DATA_CH   0x03
#define TEMPERATURE_DATA_CH   0x01

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
  • LoRa
  • Sensor
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
  • LoRa join is done
  • Read the Sensor data
  • Send sensor data via. LoRa.
  • Wait for APP_CONTROLLER_LORA_TX_DELAY before proceeding to redoing the above steps except first step
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
  • LoRa
  • Sensor
Parameters
[in]param1Unused
[in]param2Unused

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void LoRaEventNotificationCB ( LoRa_Event_T  event)
static
Parameters
[in]eventevent type that is received.

+ Here is the call 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

const uint8_t AppKey[16] = { APP_LORA_APP_KEY }

< AppKey is the data encryption key used to "encode" the messages between the end nodes and the Application Server

LoRa_Setup_T LoRaSetupInfo
static
Initial value:
=
{
.CodingRate = APP_LORA_CODING_RATE,
.DevEUI = NULL,
.AppEUI = APP_LORA_APP_EUI,
.AppKey = (uint8_t*) AppKey,
.EventCallback = LoRaEventNotificationCB,
.JoinType = LORA_JOINTYPE_OTAA,
}
#define APP_LORA_CODING_RATE
Definition: AppController.h:32
#define NULL
Definition: BCDS_Basics.h:80
#define APP_LORA_APP_EUI
Definition: AppController.h:59
Definition: XDK_LoRa.h:61
const uint8_t AppKey[16]
Definition: AppController.c:84
#define APP_LORA_FREQUENCY
Definition: AppController.h:40
static void LoRaEventNotificationCB(LoRa_Event_T event)
This is the LoRa event Notification callback function.
Definition: AppController.c:157
#define APP_LORA_RX_WINDOW_FREQ
Definition: AppController.h:36

< LoRa setup parameters Sensor setup parameters

Sensor_Setup_T SensorSetup
static

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:54 by doxygen 1.8.8