LoRaWAN application messaging support interfaces.
Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | _FportCallbacks_t |
struct | _MessageRx_t |
union | _MessageState_t |
struct | _MessageTx_t |
Macros | |
#define | MSG_CLASS_C_INTER_DOWNLINK_TIME_MS (3000) |
#define | MSG_FPORT_CB_MAX (5) |
#define | MSG_MAX_RX_WINDOW_TIME_MS (3000) |
#define | MSG_RX_BUFFER_SIZE (255) |
#define | MSG_TX_BUFFER_SIZE (255) |
Typedefs | |
typedef enum _MessageStatus_t | AppResult_t |
typedef struct _FportCallbacks_t | FportCallbacks_t |
typedef struct _MessageRx_t | MessageRx_t |
typedef union _MessageState_t | MessageState_t |
typedef struct _MessageTx_t | MessageTx_t |
typedef void(* | MsgCallback_t )(appCbParams_t *params) |
Enumerations | |
enum | _MessageStatus_t { APP_RESULT_OK = 0, APP_RESULT_BUSY } |
Functions | |
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) |
#define MSG_CLASS_C_INTER_DOWNLINK_TIME_MS (3000) |
Referenced by MSG_IsTxPossible().
#define MSG_FPORT_CB_MAX (5) |
Referenced by MSG_SetFPortRxDataAvailCallback().
#define MSG_MAX_RX_WINDOW_TIME_MS (3000) |
Referenced by MSG_IsTxPossible().
#define MSG_RX_BUFFER_SIZE (255) |
#define MSG_TX_BUFFER_SIZE (255) |
typedef enum _MessageStatus_t AppResult_t |
typedef struct _FportCallbacks_t FportCallbacks_t |
typedef struct _MessageRx_t MessageRx_t |
typedef union _MessageState_t MessageState_t |
typedef struct _MessageTx_t MessageTx_t |
typedef void(* MsgCallback_t)(appCbParams_t *params) |
enum _MessageStatus_t |
void MSG_DataCallback | ( | void * | appHandle, |
appCbParams_t * | params | ||
) |
uint16_t MSG_GetState | ( | void | ) |
References _MessageState_t::value.
void MSG_Init | ( | void | ) |
bool MSG_IsTxPossible | ( | uint8_t | len, |
uint32_t * | txTime | ||
) |
References CLASS_C, _MessageState_t::classRx2Dl, _TimeOnAirParams::cr, CRC_ON, _TimeOnAirParams::crcOn, CURRENT_DATARATE, _TimeOnAirParams::dr, EDCLASS, ERROR_CODING_RATE, LOGLINE_DEBUG, LORAWAN_GetAttr(), messageIsDutyCyclePending(), MSG_CLASS_C_INTER_DOWNLINK_TIME_MS, MSG_MAX_RX_WINDOW_TIME_MS, NEXT_PAYLOAD_SIZE, NULL, PACKET_TIME_ON_AIR, _TimeOnAirParams::pktLen, PREAMBLE_LEN, _TimeOnAirParams::preambleLen, RADIO_GetAttr(), RX_DELAY2, and US_TO_MS.
void MSG_Process | ( | void | ) |
References messageReceiveProcess(), and messageSendProcess().
AppResult_t MSG_Send | ( | TransmissionType_t | msgType, |
uint8_t | port, | ||
uint8_t * | data, | ||
uint8_t | length, | ||
uint32_t | timeout | ||
) |
References APP_RESULT_BUSY, APP_RESULT_OK, APP_TASK_ID, _LorawanSendReq::buffer, _LorawanSendReq::bufferLength, _MessageState_t::classRx2Dl, _LorawanSendReq::confirmed, length, LOGLINE_WARN, _MessageTx_t::lorawanReq, _LorawanSendReq::port, _MessageTx_t::retries, SYSTEM_PostTask(), _MessageTx_t::timeout, _MessageState_t::transactionInProgress, txBufMem, and _MessageState_t::txWaiting.
void MSG_SetDefaultRxDataAvailCallback | ( | MsgCallback_t | callback | ) |
References callback, and msgDefaultRxDataAvailCallback.
void MSG_SetFPortRxDataAvailCallback | ( | uint8_t | port, |
MsgCallback_t | callback | ||
) |
References callback, fportCallbackAlloc, LOGLINE_WARN, MSG_FPORT_CB_MAX, _FportCallbacks_t::pFunc, and _FportCallbacks_t::port.
void MSG_SetTransactionCompleteCallback | ( | MsgCallback_t | callback | ) |
References callback, and msgTransactionCompleteCallback.