Skip to content

Commit

Permalink
Implement new McpsRetransmit primitive
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
janakj committed Feb 4, 2023
1 parent 2bf36bd commit 73ade38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mac/LoRaMac.c
Original file line number Diff line number Diff line change
Expand Up @@ -3442,6 +3442,11 @@ LoRaMacStatus_t SendFrameOnChannel( uint8_t channel )
// Send now
Radio.Send( MacCtx.PktBuffer, MacCtx.PktBufferLen );

if(MacCtx.ChannelsNbTransCounter != 1 && MacCtx.MacPrimitives->MacMcpsRetransmit != NULL)
{
MacCtx.MacPrimitives->MacMcpsRetransmit( );
}

return LORAMAC_STATUS_OK;
}

Expand Down
6 changes: 6 additions & 0 deletions src/mac/LoRaMac.h
Original file line number Diff line number Diff line change
Expand Up @@ -2550,6 +2550,12 @@ typedef struct sLoRaMacPrimitives
* \param [OUT] MCPS-Confirm parameters
*/
void ( *MacMcpsConfirm )( McpsConfirm_t* McpsConfirm );
/*!
* \brief MCPS-Retransmit primitive
*
* \param [OUT] MCPS-Retransmit parameters
*/
void ( *MacMcpsRetransmit )( void );
/*!
* \brief MCPS-Indication primitive
*
Expand Down

0 comments on commit 73ade38

Please sign in to comment.