WizziLab / modem_ref_v5_3_217

Dependents:   modem_ref_helper_for_v5_3_217

Revision:
47:cf4519ba56d9
Parent:
41:6f83174ffed4
--- a/include/d7a_1x.h	Wed Jul 31 16:48:48 2019 +0000
+++ b/include/d7a_1x.h	Mon May 25 15:43:37 2020 +0000
@@ -6,7 +6,7 @@
 /// =======================================================================
 ///
 /// @file           d7a_1x.h
-/// @brief          D7A 1.x API (below ALP and FS) 
+/// @brief          D7A 1.x API (below ALP and FS)
 /// @defgroup D7A   D7A 1.x API
 /// @{
 /// =======================================================================
@@ -76,9 +76,9 @@
 // =======================================================================
 typedef enum
 {
-    /// skipped Unicast identifier 
+    /// skipped Unicast identifier
     D7A_ID_VOID = 0,
-    /// Void identifier (broadcast) 
+    /// Void identifier (broadcast)
     /// with indication of number of reached devices
     D7A_ID_NBID = 0,
     /// Void identifier (broadcast)
@@ -119,7 +119,7 @@
 } d7a_nls_t;
 
 //======================================================================
-// ID manipulation macros 
+// ID manipulation macros
 //======================================================================
 
 /// Unique ID length
@@ -130,7 +130,7 @@
 #define D7A_NOID_LEN                    (0)
 /// Void (skipped) identifier length
 #define D7A_VOID_LEN                    (0)
-/// Void ID length with reached 
+/// Void ID length with reached
 /// devices number indicaiton
 #define D7A_NBID_LEN                    (1)
 
@@ -256,7 +256,7 @@
         u8 cl   : 2;
         /// Channel Band
         u8 band : 3;
-        /// Extension 
+        /// Extension
         u8 ext  : 1;
     } bf;
 
@@ -286,7 +286,7 @@
     /// Same as D7A_RESP_ANY, but responders respond only if upper layer payload is available
     /// It is suitable for cases when the smart addressing (queries) is used.
     D7A_RESP_ANY_ON_DATA,
-    /// Get at least one acknowledgement per request during response period. 
+    /// Get at least one acknowledgement per request during response period.
     /// Stick to a single responder when possible
     D7A_RESP_PREFERRED,
     /// Same as D7A_RESP_PREFERRED, but responders respond only if upper layer payload is available
@@ -295,6 +295,41 @@
 
 } d7a_resp_t;
 
+//======================================================================
+// d7a_retry_t
+// -----------------------------------------------------------------------
+// D7A retry policies
+//======================================================================
+typedef enum
+{
+    /// Single request, try once (context cleaned upon completion)
+    /// Suitable for low QoS or QoS managed by the application
+    D7A_RETRY_ONESHOT = 0,
+    /// Single request, retry 3 times (context cleaned upon completion)
+    /// Suitable for higher QoS or QoS managed by the application
+    D7A_RETRY_ONESHOT_RETRY,
+    /// FIFO mode with fast retry pattern (context kept on completion)
+    /// Suitable for periodic frequent chart-type ActP notifications (< ~10s between messages)
+    D7A_RETRY_FIFO_FAST,
+    /// FIFO mode with slow retry pattern (context kept on completion)
+    /// Suitable for periodic unfrequent chart-type ActP notifications (> ~10s between messages)
+    D7A_RETRY_FIFO_SLOW,
+    /// Single ("last-is-best") mode with fast retry pattern (context kept on completion)
+    /// Suitable for periodic frequent state-type ActP notifications (< ~10s between messages)
+    D7A_RETRY_SINGLE_FAST,
+    /// Single ("last-is-best") mode with slow retry pattern (context kept on completion)
+    /// Suitable for periodic unfrequent state-type ActP notifications (> ~10s between messages)
+    D7A_RETRY_SINGLE_SLOW,
+    /// Single request, retry 8 times or more (context cleaned upon completion)
+    /// Suitable for rare ActP notifications with higher priority (revision, etc).
+    /// Suitable for application requests where the QoS is managed by the stack
+    /// or the completion is not expected synchronously (could be very long)
+    D7A_RETRY_ONESHOT_STICKY,
+    /// Reserved for future use
+    D7A_RETRY_RFU_7
+
+} d7a_retry_t;
+
 // =======================================================================
 // d7a_qos_t
 // -----------------------------------------------------------------------
@@ -347,7 +382,7 @@
         /// RFU
         u8 rfu          : 4;
         /// Identifier type of the received segment
-        u8 idf          : 2; 
+        u8 idf          : 2;
         /// Current seqnum was already received
         u8 retry        : 1;
         /// There are not received seqnums anterior to the current seqnum
@@ -381,7 +416,7 @@
 TYPEDEF_STRUCT_PACKED
 {
     /// channel header
-    d7a_ch_header_t header;    
+    d7a_ch_header_t header;
     /// channel index
     u16 idx;
     /// RSSI in -dBm
@@ -424,7 +459,7 @@
     u8  target_rxlev;
     /// segment metadata
     d7a_sp_res_t sp;
-    
+
 } d7a_res_t;
 
 // =======================================================================
@@ -485,7 +520,7 @@
         u32 ok  : 1;
         /// RFU
         u32 rfu : 7;
-        /// D7A error 
+        /// D7A error
         u32 err : 8;
     } bf;
 
@@ -507,9 +542,9 @@
         u32 id  :  8;
         /// Flush status.
         u32 ok  :  1;
-        /// RFU 
+        /// RFU
         u32 rfu : 15;
-        /// D7A error 
+        /// D7A error
         u32 err :  8;
     } bf;