Skip to content

Commit 4591f2a

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 2fdce5f commit 4591f2a

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
@@ -3333,6 +3333,11 @@ LoRaMacStatus_t SendFrameOnChannel( uint8_t channel )
33333333
// Send now
33343334
Radio.Send( MacCtx.PktBuffer, MacCtx.PktBufferLen );
33353335

3336+
if(MacCtx.ChannelsNbTransCounter != 1 && MacCtx.MacPrimitives->MacMcpsRetransmit != NULL)
3337+
{
3338+
MacCtx.MacPrimitives->MacMcpsRetransmit( );
3339+
}
3340+
33363341
return LORAMAC_STATUS_OK;
33373342
}
33383343

src/mac/LoRaMac.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2476,6 +2476,12 @@ typedef struct sLoRaMacPrimitives
24762476
* \param [OUT] MCPS-Confirm parameters
24772477
*/
24782478
void ( *MacMcpsConfirm )( McpsConfirm_t* McpsConfirm );
2479+
/*!
2480+
* \brief MCPS-Retransmit primitive
2481+
*
2482+
* \param [OUT] MCPS-Retransmit parameters
2483+
*/
2484+
void ( *MacMcpsRetransmit )( void );
24792485
/*!
24802486
* \brief MCPS-Indication primitive
24812487
*

0 commit comments

Comments
 (0)