Replies: 2 comments 3 replies
-
The LoRaMac-node/src/apps/LoRaMac/common/LmHandler/LmHandler.c Lines 755 to 761 in 05353ff The |
Beta Was this translation helpful? Give feedback.
-
In our application we can only access this structure LmHandlerAppData_s: The application data structure is defined as below: /*!
* Application data structure
*/
typedef struct LmHandlerAppData_s
{
uint8_t Port;
uint8_t BufferSize;
uint8_t *Buffer;
}LmHandlerAppData_t; my question is: is it safe/recommended to modify this structure by adding typedef struct LmHandlerAppData_s
{
uint8_t Port;
uint8_t BufferSize;
uint8_t *Buffer;
uin8_t FramePending;
}LmHandlerAppData_t; and inside the function appData.FramePending = mcpsIndication->FramePending; is this modification acceptable? My second part of the question about the if( ( mcpsIndication->FramePending == true ) && ( LmHandlerGetCurrentClass( ) == CLASS_A ) )
{
// The server signals that it has pending data to be sent.
// We schedule an uplink as soon as possible to flush the server.
// Send an empty message
LmHandlerAppData_t appData =
{
.Buffer = NULL,
.BufferSize = 0,
.Port = 0
};
LmHandlerSend( &appData, LORAMAC_HANDLER_UNCONFIRMED_MSG );
}
else if( ( mcpsIndication->FramePending == false ) && ( Nvm.MacGroup1.SrvAckRequested == true ) && ( LmHandlerGetCurrentClass( ) == CLASS_A ) )
{
// The server signals that it has pending data to be sent.
// We schedule an uplink as soon as possible to flush the server. // Send an empty message
LmHandlerAppData_t appData =
{
.Buffer = NULL,
.BufferSize = 0,
.Port = 0
};
LmHandlerSend( &appData, LORAMAC_HANDLER_UNCONFIRMED_MSG );
} |
Beta Was this translation helpful? Give feedback.
-
In our design we need to have access to the Fpending bit and ACK bit so that we can send an empty TX payload whenever Fpending bit is clear and ACK bit is set so that the server receives the acknowledgement message immediately without waiting till the next uplink message.
To do that, I figured I need to add changes to LoRaMac.c. Could you guys please confirm if it is Ok to go ahead and modify LoRaMac.c file to achieve our needs, or it is not something you recommend.
If it is not recommended, is there any plans that you guys would expose these bits to the application layer in the future code release?
Regards,
Farid
Beta Was this translation helpful? Give feedback.
All reactions