RUI3 (RAK Unified Interface 3) - RAK4631
LmhpFragmentation.h
Go to the documentation of this file.
1 
22 #ifndef __LMHP_FRAGMENTATION_H__
23 #define __LMHP_FRAGMENTATION_H__
24 
25 #ifdef SUPPORT_FUOTA
26 #include "LoRaMac.h"
27 #include "LmHandlerTypes.h"
28 #include "LmhPackage.h"
29 #include "FragDecoder.h"
30 
36 #define PACKAGE_ID_FRAGMENTATION 3
37 
41 typedef struct LmhpFragmentationParams_s
42 {
43 #if( FRAG_DECODER_FILE_HANDLING_NEW_API == 1 )
44 
47  FragDecoderCallbacks_t DecoderCallbacks;
48 #else
49 
52  uint8_t *Buffer;
56  uint32_t BufferSize;
57 #endif
58 
66  void ( *OnProgress )( uint16_t fragCounter, uint16_t fragNb, uint8_t fragSize, uint16_t fragNbLost );
67 #if( FRAG_DECODER_FILE_HANDLING_NEW_API == 1 )
68 
76  void ( *OnDone )( int32_t status, uint32_t size );
77 #else
78 
87  void ( *OnDone )( int32_t status, uint8_t *file, uint32_t size );
88 #endif
89 }LmhpFragmentationParams_t;
90 
91 LmhPackage_t *LmhpFragmentationPackageFactory( void );
92 
93 #endif // __LMHP_FRAGMENTATION_H__
94 #endif // FUOTA
Definition: LmhPackage.h:35
Implements the LoRa-Alliance fragmentation decoder Specification: https://lora-alliance.org/sites/default/files/2018-09/fragmented_data_block_transport_v1.0.0.pdf.