Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
tempsense_app_coord.c File Reference

Chili temperature sensing app functions for coordinator. More...

#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include "cascoda-bm/cascoda_evbme.h"
#include "cascoda-bm/cascoda_interface.h"
#include "cascoda-bm/cascoda_serial.h"
#include "cascoda-bm/cascoda_spi.h"
#include "cascoda-bm/cascoda_types.h"
#include "cascoda-util/cascoda_time.h"
#include "ca821x_api.h"
#include "tempsense_app.h"
#include "tempsense_evbme.h"
Include dependency graph for tempsense_app_coord.c:

Functions

void TEMPSENSE_APP_Coordinator_Handler (struct ca821x_dev *pDeviceRef)
 TEMPSENSE Application Handler for Coordinator. More...
 
void TEMPSENSE_APP_Coordinator_Initialise (struct ca821x_dev *pDeviceRef)
 TEMPSENSE Application Initialisation for Coordinator. More...
 
void TEMPSENSE_APP_Coordinator_Start (struct ca821x_dev *pDeviceRef)
 TEMPSENSE App. More...
 
void TEMPSENSE_APP_Coordinator_ProcessScanCnf (struct MLME_SCAN_confirm_pset *params, struct ca821x_dev *pDeviceRef)
 Coordinator Process incoming Scan Confirm. More...
 
void TEMPSENSE_APP_Coordinator_AssociateResponse (struct MLME_ASSOCIATE_indication_pset *params, struct ca821x_dev *pDeviceRef)
 TEMPSENSE App. More...
 
void TEMPSENSE_APP_Coordinator_ProcessDataInd (struct MCPS_DATA_indication_pset *params, struct ca821x_dev *pDeviceRef)
 Coordinator Process incoming Data Indications. More...
 
void TEMPSENSE_APP_Coordinator_ProcessDataCnf (struct MCPS_DATA_confirm_pset *params, struct ca821x_dev *pDeviceRef)
 Coordinator Process incoming Data Confirmations. More...
 
void TEMPSENSE_APP_Coordinator_DisplayData (u8_t device, u8_t edcoord, struct MCPS_DATA_indication_pset *params, struct ca821x_dev *pDeviceRef)
 TEMPSENSE App. More...
 
void TEMPSENSE_APP_Coordinator_CheckTimeouts (struct ca821x_dev *pDeviceRef)
 TEMPSENSE App. More...
 
void TEMPSENSE_APP_Coordinator_CheckVbatt (u16_t vbat)
 TEMPSENSE App. More...
 
void TEMPSENSE_APP_Coordinator_CheckLQI (u8_t lqi_ts, u8_t lqi_coord)
 TEMPSENSE App. More...
 
void TEMPSENSE_APP_Coordinator_CheckED (u8_t ed_ts, u8_t ed_coord)
 TEMPSENSE App. More...
 
void TEMPSENSE_APP_Coordinator_SoftReinit (struct ca821x_dev *pDeviceRef)
 TEMPSENSE App. More...
 
void TEMPSENSE_APP_Coordinator_ReportStatus (void)
 TEMPSENSE App. More...
 

Detailed Description

Chili temperature sensing app functions for coordinator.

Function Documentation

◆ TEMPSENSE_APP_Coordinator_AssociateResponse()

void TEMPSENSE_APP_Coordinator_AssociateResponse ( struct MLME_ASSOCIATE_indication_pset params,
struct ca821x_dev pDeviceRef 
)

TEMPSENSE App.

Coordinator Association Response

◆ TEMPSENSE_APP_Coordinator_CheckED()

void TEMPSENSE_APP_Coordinator_CheckED ( u8_t  ed_ts,
u8_t  ed_coord 
)

TEMPSENSE App.

Checks and displays ED from both Sides

Parameters
ed_ts- ED received at Temperature Sensor (Device)
ed_coord- ED received locally (Coordinator)

◆ TEMPSENSE_APP_Coordinator_CheckLQI()

void TEMPSENSE_APP_Coordinator_CheckLQI ( u8_t  lqi_ts,
u8_t  lqi_coord 
)

TEMPSENSE App.

Checks and displays LQI from both Sides

Parameters
lqi_ts- LQI received at Temperature Sensor (Device)
lqi_coord- LQI received locally (Coordinator)

◆ TEMPSENSE_APP_Coordinator_CheckTimeouts()

void TEMPSENSE_APP_Coordinator_CheckTimeouts ( struct ca821x_dev pDeviceRef)

TEMPSENSE App.

Coordinator Timeout Check for all Devices

◆ TEMPSENSE_APP_Coordinator_CheckVbatt()

void TEMPSENSE_APP_Coordinator_CheckVbatt ( u16_t  vbat)

TEMPSENSE App.

Checks and displays Battery Voltage

Parameters
vbat- 12-bit Battery Voltage Reading from Device

◆ TEMPSENSE_APP_Coordinator_DisplayData()

void TEMPSENSE_APP_Coordinator_DisplayData ( u8_t  device,
u8_t  edcoord,
struct MCPS_DATA_indication_pset params,
struct ca821x_dev pDeviceRef 
)

TEMPSENSE App.

Coordinator check and display Data Packet

Parameters
device- device number
edcoord- ED received locally (Coordinator)
params- Buffer containing data indication with data to display
pDeviceRef- Pointer to initialised ca821x_device_ref struct

◆ TEMPSENSE_APP_Coordinator_Handler()

void TEMPSENSE_APP_Coordinator_Handler ( struct ca821x_dev pDeviceRef)

TEMPSENSE Application Handler for Coordinator.

◆ TEMPSENSE_APP_Coordinator_Initialise()

void TEMPSENSE_APP_Coordinator_Initialise ( struct ca821x_dev pDeviceRef)

TEMPSENSE Application Initialisation for Coordinator.

◆ TEMPSENSE_APP_Coordinator_ProcessDataCnf()

void TEMPSENSE_APP_Coordinator_ProcessDataCnf ( struct MCPS_DATA_confirm_pset params,
struct ca821x_dev pDeviceRef 
)

Coordinator Process incoming Data Confirmations.

◆ TEMPSENSE_APP_Coordinator_ProcessDataInd()

void TEMPSENSE_APP_Coordinator_ProcessDataInd ( struct MCPS_DATA_indication_pset params,
struct ca821x_dev pDeviceRef 
)

Coordinator Process incoming Data Indications.

◆ TEMPSENSE_APP_Coordinator_ProcessScanCnf()

void TEMPSENSE_APP_Coordinator_ProcessScanCnf ( struct MLME_SCAN_confirm_pset params,
struct ca821x_dev pDeviceRef 
)

Coordinator Process incoming Scan Confirm.

◆ TEMPSENSE_APP_Coordinator_ReportStatus()

void TEMPSENSE_APP_Coordinator_ReportStatus ( void  )

TEMPSENSE App.

Coordinator Report Network Status

◆ TEMPSENSE_APP_Coordinator_SoftReinit()

void TEMPSENSE_APP_Coordinator_SoftReinit ( struct ca821x_dev pDeviceRef)

TEMPSENSE App.

Coordinator Soft Reset (no change in PIB)

◆ TEMPSENSE_APP_Coordinator_Start()

void TEMPSENSE_APP_Coordinator_Start ( struct ca821x_dev pDeviceRef)

TEMPSENSE App.

Coordinator Start Procedure

Parameters
pDeviceRef- pointer to a CA-821x Device reference struct