Repository navigation
Expand file tree
/
Copy pathCSIModels.cs
More file actions
70 lines (55 loc) · 1.44 KB
/
Copy pathCSIModels.cs
File metadata and controls
70 lines (55 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using System;
using System.Numerics;
using System.Runtime.InteropServices;
namespace CSILib
{
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct CSIStatusPacket
{
public UInt64 TimeStamp;
public UInt16 CSIDataLength;
public UInt16 Channel;
// Should be 0
public PHYErrorCode PhyError;
// Currently always 0
private byte NoiseFloor;
public byte TransmissionRate;
public Bandwidth ChannelBandwidth;
public byte NumSubcarriers;
public byte NumReceivingAntennas;
public byte NumTransmittingAntennas;
public byte RxRSSIAll;
public byte RxRSSIChain0;
public byte RxRSSIChain1;
public byte RxRSSIChain2;
public UInt16 PayloadLength;
//public UInt16 DataLength;
}
// public struct ComplexNumber
// {
// public Int32 Real;
// public Int32 Imaginary;
// }
public class CSIPacket
{
public Complex[,,] CSIMatrix;
public byte[] PayloadData;
public CSIStatusPacket StatusPacket;
}
public enum PHYErrorCode : byte
{
OK = 0,
TimingError = 1,
IllegalParity = 2,
IllegalRate = 3,
IllegalLength = 4,
RadarDetect = 5,
IllegalService = 6,
TransmitOverrideReceive = 7
}
public enum Bandwidth : byte
{
MHz_20 = 0,
MHz_40 = 1
}
}