Skip to content

Commit f6ac30a

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 24d55f6 commit f6ac30a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/mac/LoRaMac.c

+5
Original file line numberDiff line numberDiff line change
@@ -3327,6 +3327,11 @@ LoRaMacStatus_t SendFrameOnChannel( uint8_t channel )
33273327
// Send now
33283328
Radio.Send( MacCtx.PktBuffer, MacCtx.PktBufferLen );
33293329

3330+
if(MacCtx.ChannelsNbTransCounter != 1 && MacCtx.MacPrimitives->MacMcpsRetransmit != NULL)
3331+
{
3332+
MacCtx.MacPrimitives->MacMcpsRetransmit( );
3333+
}
3334+
33303335
return LORAMAC_STATUS_OK;
33313336
}
33323337

src/mac/LoRaMac.h

+6
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)