NetSim Source Code Help v14.4
All 13 Components
 
Loading...
Searching...
No Matches
IEEE802_11_PhyFrame.h
1/************************************************************************************
2* Copyright (C) 2023 *
3* TETCOS, Bangalore. India *
4* *
5* Tetcos owns the intellectual property rights in the Product and its content. *
6* The copying, redistribution, reselling or publication of any or all of the *
7* Product or its content without express prior written consent of Tetcos is *
8* prohibited. Ownership and / or any other right relating to the software and all *
9* intellectual property rights therein shall remain at all times with Tetcos. *
10* *
11* Author: Shashi Kant Suman *
12* *
13* ---------------------------------------------------------------------------------*/
14#ifndef _NETSIM_IEEE802_11_PHYFRAME_H_
15#define _NETSIM_IEEE802_11_PHYFRAME_H_
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/// Page-1505 IEEE Std 802.11-2012 Figure 16-1—PLCP frame format
22{
23 // PLCP preamble 144 bits
24 long long int nSYNC; ///<128 bits
25 unsigned short int nSFD; ///<16 bits = 1111 0011 1010 0000
26 // PLCP Header 48 bits
27 unsigned short int nSIGNAL; ///<8 bits
28 unsigned short int nSERVICE; ///<8 bits
29 unsigned short int nLENGTH; ///<16 bits
30 unsigned short int nCRC; ///<16 bits
31}IEEE802_11_DSSS_PLCP_FRAME,*PIEEE802_11_DSSS_PLCP_FRAME;
32
33/// Page-1588 IEEE Std 802.11-2012 Figure 18-1—PPDU frame format
35{
36 // PLCP Header
37 int nRATE:4; ///< 4 bits
38 bool bReserved; ///< 1 bit
39 int bLENGTH:12; ///< 12 bits
40 bool bParity; ///< 1 bit
41 int nTail_1:6; ///< 6 bits
42 int nSERVICE:16; ///< 16 bits
43 int nTail_2:6; ///< 6 bits
44 int nPadBits;
45}IEEE802_11_OFDM_PLCP_FRAME,*PIEEE802_11_OFDM_PLCP_FRAME;
46
47/// Table 20-4—Elements of the HT PLCP packet and Figure 20-1—PPDU format
49{
50 int L_STF; ///< 8 Microsecs Non-HT Short Training field to support Legacy g and a
51 int L_LTF; ///< 8 Microsecs Non-HT Long Training field to support Legacy g and a
52 int L_SIG; ///< 4 Microsecs Non-HT SIGNAL field to support Legacy g and a
53 int HT_STF; ///< 4 Microsecs HT Short Training field Mixed mode
54 int HT_GF_STF; ///< 8 Microsecs HT-Greenfield Short Training field
55 int HT_LTF1; ///< 8 Microsecs First HT Long Training field (Data)
56 //Table 20-10—HT-SIG fields page 275 802.11n-2009.pdf
57 int nMCS:8; ///< 7 bits Modulation and Coding Scheme 7 Index into the MCS table.
58 int bCBW_20_40:1; ///< 1 bit Set to 0 for 20 MHz or 40 MHz upper/lower.
59 ///< Set to 1 for 40 MHz.
60 unsigned short int nHT_Length; ///< 16 bits The number of octets of data in the PSDU in the range of 0 to 65 535.
61 int bSmoothing:1; ///< 1 bit Set to 1 indicates that channel estimate smoothing is recommended.
62 ///< Set to 0 indicates that only per-carrier independent (unsmoothed) channel estimate is recommended. See 20.3.11.10.1.
63 int bNot_Sounding:1; /**< 1 bit Set to 0 indicates that PPDU is a sounding PPDU.
64 Set to 1 indicates that the PPDU is not a sounding PPDU. */
65 int bReserved:1; ///< 1 bit Set to 1.
66 int bAggregation:1; /**< 1 bit Set to 1 to indicate that the PPDU in the data portion of the packet contains an AMPDU;
67 otherwise, set to 0. */
68 int nSTBC:2; /**< 2 bits Set to a nonzero number, to indicate the difference between the number of spacetime
69 streams ( ) and the number of spatial streams ( ) indicated by the MCS.
70 Set to 00 to indicate no STBC ( ). */
71 int bFEC_coding:1; ///< 1 bit Set to 1 for LDPC. Set to 0 for BCC.
72 int bShort_GI:1; /**< 1 bit Set to 1 to indicate that the short GI is used after the HT training.
73 Set to 0 otherwise. */
74 int Number_Ess:2; /**< 2 bits Indicates the number of extension spatial streams ( ).
75 Set to 0 for no extension spatial stream.
76 Set to 1 for 1 extension spatial stream.
77 Set to 2 for 2 extension spatial streams.
78 Set to 3 for 3 extension spatial streams. */
79 int CRC:8; /**< 8 bits CRC of bits 0–23 in HT-SIG1 and bits 0–9 in HT-SIG2. See 20.3.9.4.4. The first
80 bit to be transmitted is bit C7 as explained in 20.3.9.4.4. */
81 int Tail_Bits:7; ///< 6 Used to terminate the trellis of the convolution coder. Set to 0.
82 // End of HT SIG
83
84 int HT_LTFs; ///< Additional HT Long Training fields (Data and Extension)
85}IEEE802_11_HT_PLCP_FRAME,*PIEEE802_11_HT_PLCP_FRAME;
86
87
88
89
90/// Table 27-12 HE PPDU fields for HE SU PPDU page 4180 IEEE Std 802.11-2024
92{
93 int L_STF; ///< 8 Microsecs Non-HT Short Training field to support Legacy g and a
94 int L_LTF; ///< 8 Microsecs Non-HT Long Training field to support Legacy g and a
95 int L_SIG; ///< 4 Microsecs Non-HT SIGNAL field to support Legacy g and a
96 int RL_SIG; ///< 4 Microsecs Repeated Non-HT SIGNAL field to support Legacy g and a
97 int HE_SIG_A; ///< 8 Microsecs HE Signal A field
98 int HE_STF; ///< 4 Microsecs HT Short Training field Mixed mode
99 int HE_LTF; ///< variable duration per HE LTF Symbol - HT Long Training field
100
101
102
103 //Table 27-19 HE-SIG-A field of HE SU PPDU & HE ER SU PPDU page 4217 IEEE Std 802.11-2024
104 int bFormat:1; ///< 1 bit Set to 0 for HE SU and HE ER SU PPDU.
105 int bBeam_change:1;
106 int bUL_DL:1;
107 int nHE_MCS:4; ///< 4 bits Modulation and Coding Scheme Index into the MCS table.
108 int bDCM:1;
109 int bBSS_Color:6; ///< 6 bits BSS Color. The value of this field is the BSS Color of the BSS to which the PPDU is directed.
110 int bReserved:1; ///< 1 bit Set to 0.
111 int bSpatial_Reuse:4;
112 int bBandwidth:2;
113 int bGI_HE_LTF_Size:2; ///< 2 bits Indicates GI duration and HE LTF size
114 int bNSTS_Midamble_Periodicity:3;
115 int bTXOP:7;
116 int bCoding:1;
117 int bLDPC_Extra_Symbol:1; ///< 1 bit Set to 1 for LDPC Extra Symbol. Set to 0 for no LDPC Extra Symbol.
118 int bSTBC:1;
119 int bBeamformed:1;
120 int bPre_FEC_Padding:2;
121 int bPE_Disambiguity:1;
122 int bDoppler:1;
123 int bCRC:4;
124 int bTail:6;
125 // End of HE SIG-A
126
127}IEEE802_11_HE_PLCP_FRAME,*PIEEE802_11_HE_PLCP_FRAME;
128
129
131{
132 UINT64 transmissionId;
133 void* frame;
134}IEEE802_11_PHY_HDR,*ptrIEEE802_11_PHY_HDR;
135
136#ifdef __cplusplus
137}
138#endif
139#endif //_NETSIM_IEEE802_11_PHYFRAME_H_
Page-1505 IEEE Std 802.11-2012 Figure 16-1—PLCP frame format.
unsigned short int nSIGNAL
8 bits
unsigned short int nSERVICE
8 bits
unsigned short int nCRC
16 bits
unsigned short int nSFD
16 bits = 1111 0011 1010 0000
unsigned short int nLENGTH
16 bits
Table 27-12 HE PPDU fields for HE SU PPDU page 4180 IEEE Std 802.11-2024.
int bGI_HE_LTF_Size
2 bits Indicates GI duration and HE LTF size
int HE_LTF
variable duration per HE LTF Symbol - HT Long Training field
int nHE_MCS
4 bits Modulation and Coding Scheme Index into the MCS table.
int HE_SIG_A
8 Microsecs HE Signal A field
int bBSS_Color
6 bits BSS Color. The value of this field is the BSS Color of the BSS to which the PPDU is directed.
int L_STF
8 Microsecs Non-HT Short Training field to support Legacy g and a
int HE_STF
4 Microsecs HT Short Training field Mixed mode
int RL_SIG
4 Microsecs Repeated Non-HT SIGNAL field to support Legacy g and a
int bFormat
1 bit Set to 0 for HE SU and HE ER SU PPDU.
int L_LTF
8 Microsecs Non-HT Long Training field to support Legacy g and a
int L_SIG
4 Microsecs Non-HT SIGNAL field to support Legacy g and a
int bLDPC_Extra_Symbol
1 bit Set to 1 for LDPC Extra Symbol. Set to 0 for no LDPC Extra Symbol.
Table 20-4—Elements of the HT PLCP packet and Figure 20-1—PPDU format.
int L_STF
8 Microsecs Non-HT Short Training field to support Legacy g and a
int HT_STF
4 Microsecs HT Short Training field Mixed mode
int L_LTF
8 Microsecs Non-HT Long Training field to support Legacy g and a
unsigned short int nHT_Length
16 bits The number of octets of data in the PSDU in the range of 0 to 65 535.
int bFEC_coding
1 bit Set to 1 for LDPC. Set to 0 for BCC.
int nMCS
7 bits Modulation and Coding Scheme 7 Index into the MCS table.
int Tail_Bits
6 Used to terminate the trellis of the convolution coder. Set to 0.
int L_SIG
4 Microsecs Non-HT SIGNAL field to support Legacy g and a
int HT_LTF1
8 Microsecs First HT Long Training field (Data)
int HT_LTFs
Additional HT Long Training fields (Data and Extension)
int HT_GF_STF
8 Microsecs HT-Greenfield Short Training field
Page-1588 IEEE Std 802.11-2012 Figure 18-1—PPDU frame format.