summaryrefslogtreecommitdiff
path: root/cesar/maximus/common
diff options
context:
space:
mode:
authorCeline Buret2011-10-18 18:35:37 +0200
committerCeline Buret2011-11-02 14:52:33 +0100
commite98f03eecacf141249bb6bbb3ee17dd47116d617 (patch)
tree97febc862339502f187b8e18f0226ccd42aad4f3 /cesar/maximus/common
parent65ac15ec3e04d099042d67594fd1157e0dc0c066 (diff)
cesar/maximus: add padding for robo mode, closes #1788
Diffstat (limited to 'cesar/maximus/common')
-rw-r--r--cesar/maximus/common/types/phy_types.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/cesar/maximus/common/types/phy_types.h b/cesar/maximus/common/types/phy_types.h
index 497d549c4e..0df4e0dd97 100644
--- a/cesar/maximus/common/types/phy_types.h
+++ b/cesar/maximus/common/types/phy_types.h
@@ -34,6 +34,7 @@ The original location of this file is /home/buret/eclipse/maximus/common/types/p
#include "sci_types.h"
#include "mac/common/defs.h" // for 'MAC_PB520_BYTES'
+#include "mac/common/timings.h"
#include <stdint.h> // for 'uint8_t', 'uint16_t' and 'uint32_t' types
@@ -41,6 +42,21 @@ The original location of this file is /home/buret/eclipse/maximus/common/types/p
#define PHY_PB_MAX_NB (SCI_MSG_MAX_SIZE/MAC_PB520_BYTES - 1) // = 31 per MPDU (-1 because of PHY header size)
#define PHY_MSG_MAX_NB_PER_MPDU (MAC_MAX_PB_PER_MPDU/PHY_PB_MAX_NB + 1)
+/** Length of PB header and ICV in bytes. */
+#define PHY_PB_HDR_SIZE 4
+#define PHY_ICV_SIZE 4
+
+/** Ratio by which number of bits is multiplied depending on fecrate. */
+#define PHY_FEC_RATE_1_2_RATIO 2
+#define PHY_FEC_RATE_16_21_RATIO (21 / 16)
+
+/** Macro to convert number of bytes to number of bits. */
+#define PHY_BYTES_TO_BITS(nb_bytes) ((nb_bytes) * 8)
+
+/** Offset of PB measeurement fields. */
+#define PHY_PB_MEAS_HALFIT_OFFSET 16
+#define PHY_PB_MEAS_CRC_ERR_OFFSET 21
+
// Phy_Header.flags
//
typedef uint16_t Phy_Flags;