1 | /*! \file afdf_char.h |
---|
2 | \brief Top-level "MAC" for testing PHY performance |
---|
3 | |
---|
4 | @version 15.22 |
---|
5 | @author Patrick Murphy |
---|
6 | |
---|
7 | Doesn't actually implement a MAC, and traffic only flows one direction. This is used for characterizing the PHY. |
---|
8 | */ |
---|
9 | |
---|
10 | #define RXPHYDUMP_INCLUDE_EVMPERSC 0x1 |
---|
11 | #define RXPHYDUMP_INCLUDE_EVMPERSYM 0x2 |
---|
12 | #define RXPHYDUMP_INCLUDE_CHANESTAA 0x4 |
---|
13 | #define RXPHYDUMP_INCLUDE_CHANESTBA 0x8 |
---|
14 | |
---|
15 | #define RXPHYDUMP_SIZE_EVMPERSC 256 //(4*64) |
---|
16 | #define RXPHYDUMP_SIZE_CHANEST 256 //(4*64) |
---|
17 | |
---|
18 | //EVMPERSYM should be 4*256 bytes; the PHY has storage for 256 OFDM symbol's worth of EVM |
---|
19 | // It's set to 128 here so EVMPERSYM+EVMPERSC+CHANESTAA+CHANESTBA can all fit in one MTU |
---|
20 | //#define RXPHYDUMP_SIZE_EVMPERSYM (4*256) |
---|
21 | #define RXPHYDUMP_SIZE_EVMPERSYM 512 //(4*128) |
---|
22 | |
---|
23 | int phyRx_goodHeader_callback(Macframe* packet); |
---|
24 | void phyRx_badHeader_callback(); |
---|
25 | void dataFromNetworkLayer_callback(Xuint32 length, char* payload); |
---|
26 | void uartRecv_callback(unsigned char uartByte); |
---|
27 | void mgmtFromNetworkLayer_callback(Xuint32 length, char* payload); |
---|
28 | |
---|
29 | void processPHYControl(warpnetPHYctrl* phyCtrlStruct); |
---|
30 | void processControl(warpnetControl* controlStruct); |
---|
31 | void processCommand(warpnetCommand* commandStruct); |
---|
32 | void Send_RxPHYdump(int sendEVMperSC, int sendEVMperSym, int sendChanEstAA, int sendChanEstBA, unsigned char pktType, unsigned short seqNum); |
---|
33 | void setupNodeBehaviors(); |
---|
34 | void setDACinterp(unsigned int mode, unsigned int radios); |
---|
35 | |
---|
36 | int main(); |
---|