RUI3 (RAK Unified Interface 3) - RAK4631
service_lora_fuota.h
Go to the documentation of this file.
1 
9 #ifndef __SERVICE_LORA_FUOTA_H__
10 #define __SERVICE_LORA_FUOTA_H__
11 
12 #ifdef SUPPORT_FUOTA
13 
14 
15 #ifdef __cplusplus
16 extern "C"
17 {
18 #endif
19 
20 
21 #include <stdint.h>
22 #include <stdbool.h>
23 #include "pin_define.h"
24 #include "LoRaMac.h"
25 #include "LoRaMacTypes.h"
26 #include "LmHandlerTypes.h"
27 #include "FragDecoder.h"
28 #include "service_nvm.h"
29 #include "service_lora.h"
30 #include "Region.h"
31 #include "LmhPackage.h"
32 #include "service_lora_fuota.h"
33 #include "LmhpClockSync.h"
34 #include "LmhpRemoteMcastSetup.h"
35 #include "LmhpFragmentation.h"
36 
37 #define UNFRAGMENTED_DATA_SIZE ( FRAG_MAX_NB * FRAG_MAX_SIZE )
38 extern volatile uint8_t IsTxFramePending;
39 extern volatile bool IsMcSessionStarted ;
40 extern LmhpFragmentationParams_t LmhpFragmentationParams ;
41 /*
42  * Un-fragmented data storage. Only if datafile fragments are
43  * collected in RAM
44  */
45 static uint8_t UnfragmentedData[UNFRAGMENTED_DATA_SIZE];
46 
47 
48 void UplinkProcess( void );
49 void OnSysTimeUpdate(void);
50 void OnFragProgress(uint16_t fragCounter, uint16_t fragNb, uint8_t fragSize, uint16_t fragNbLost);
51 void OnFragDone(int32_t status, uint8_t *file, uint32_t size);
52 void LoraStartTx(void);
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 
59 #endif // __SERVICE_LORA_H__
60 #endif // FUOTA
Implements the LoRa-Alliance fragmented data block transport package Specification: https://lora-alli...
Provide LoRa service layer for API layer to use.
Implements the LoRa-Alliance fragmentation decoder Specification: https://lora-alliance.org/sites/default/files/2018-09/fragmented_data_block_transport_v1.0.0.pdf.
Provide LoRa service layer for API layer to use.
Implements the LoRa-Alliance remote multicast setup package Specification: https://lora-alliance.org/sites/default/files/2018-09/remote_multicast_setup_v1.0.0.pdf.
Implements the LoRa-Alliance clock synchronization package Specification: https://lora-alliance.org/sites/default/files/2018-09/application_layer_clock_synchronization_v1.0.0.pdf.
Provide NVM service layer.