Skip to content

Commit 73ade38

Browse files
committed
Implement new McpsRetransmit primitive
The primitive will be invoked whenever the LoRaMac-node library retransmits an uplink message. This could be used by the application to get notified of uplink retransmissions.
1 parent 2bf36bd commit 73ade38

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/mac/LoRaMac.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3442,6 +3442,11 @@ LoRaMacStatus_t SendFrameOnChannel( uint8_t channel )
34423442
// Send now
34433443
Radio.Send( MacCtx.PktBuffer, MacCtx.PktBufferLen );
34443444

3445+
if(MacCtx.ChannelsNbTransCounter != 1 && MacCtx.MacPrimitives->MacMcpsRetransmit != NULL)
3446+
{
3447+
MacCtx.MacPrimitives->MacMcpsRetransmit( );
3448+
}
3449+
34453450
return LORAMAC_STATUS_OK;
34463451
}
34473452

src/mac/LoRaMac.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2550,6 +2550,12 @@ typedef struct sLoRaMacPrimitives
25502550
* \param [OUT] MCPS-Confirm parameters
25512551
*/
25522552
void ( *MacMcpsConfirm )( McpsConfirm_t* McpsConfirm );
2553+
/*!
2554+
* \brief MCPS-Retransmit primitive
2555+
*
2556+
* \param [OUT] MCPS-Retransmit parameters
2557+
*/
2558+
void ( *MacMcpsRetransmit )( void );
25532559
/*!
25542560
* \brief MCPS-Indication primitive
25552561
*

0 commit comments

Comments
 (0)