Microchip® Advanced Software Framework

msg.c File Reference

LoRaWAN application messaging support implementation.

Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries.

#include "lorawan.h"
#include "radio_interface.h"
#include "sw_timer.h"
#include "msg.h"
#include "conf_app.h"
#include "log.h"

Functions

static uint8_t messageGetIdByGroupAddr (uint32_t devaddr)
 
static bool messageIsDutyCyclePending (void)
 
static void messageReceiveProcess (void)
 
static void messageSendProcess (void)
 
static void messageTimerCb (void)
 
void MSG_DataCallback (void *appHandle, appCbParams_t *params)
 
uint16_t MSG_GetState (void)
 
void MSG_Init (void)
 
bool MSG_IsTxPossible (uint8_t len, uint32_t *txTime)
 
void MSG_Process (void)
 
AppResult_t MSG_Send (TransmissionType_t msgType, uint8_t port, uint8_t *data, uint8_t length, uint32_t timeout)
 
void MSG_SetDefaultRxDataAvailCallback (MsgCallback_t callback)
 
void MSG_SetFPortRxDataAvailCallback (uint8_t port, MsgCallback_t callback)
 
void MSG_SetTransactionCompleteCallback (MsgCallback_t callback)
 
static void processRxDataAvailable (void *appHandle, appCbParams_t *params)
 
static void processTransactionComplete (void *appHandle, appCbParams_t *params)
 

Variables

uint8_t fportCallbackAlloc
 
FportCallbacks_t fportCallbacks [MSG_FPORT_CB_MAX]
 
MsgCallback_t msgDefaultRxDataAvailCallback
 
MessageRx_t msgRx
 
static MessageState_t msgState
 
MsgCallback_t msgTransactionCompleteCallback
 
MessageTx_t msgTx
 
uint8_t rxBufMem [MSG_TX_BUFFER_SIZE]
 
uint8_t tmrMsg
 
uint8_t txBufMem [MSG_TX_BUFFER_SIZE]
 

static uint8_t messageGetIdByGroupAddr ( uint32_t  devaddr)
static

References i, LORAWAN_GetAttr(), and MCAST_GROUP_ADDR.

Referenced by messageReceiveProcess().

static bool messageIsDutyCyclePending ( void  )
static
uint16_t MSG_GetState ( void  )
void MSG_Process ( void  )
void MSG_SetDefaultRxDataAvailCallback ( MsgCallback_t  callback)
void MSG_SetFPortRxDataAvailCallback ( uint8_t  port,
MsgCallback_t  callback 
)
void MSG_SetTransactionCompleteCallback ( MsgCallback_t  callback)

uint8_t fportCallbackAlloc
MsgCallback_t msgDefaultRxDataAvailCallback
MessageRx_t msgRx
MessageState_t msgState
static
MessageTx_t msgTx
uint8_t rxBufMem[MSG_TX_BUFFER_SIZE]

Referenced by processRxDataAvailable().

uint8_t tmrMsg
uint8_t txBufMem[MSG_TX_BUFFER_SIZE]

Referenced by MSG_Send().