1 | /*! \file csmaMac.h |
---|
2 | \brief Carrier-sensing random access MAC. |
---|
3 | |
---|
4 | @version 11 |
---|
5 | @author Chris Hunter |
---|
6 | |
---|
7 | The csmaMac is a modified ALOHA MAC that |
---|
8 | serves as an example for novel MAC |
---|
9 | development. Nodes transmit whenever |
---|
10 | they have information to transmit, and only |
---|
11 | move on to the next packet once the original |
---|
12 | transmit is acknowledged (ACKed). If no ACK |
---|
13 | is received, a collision is inferred and the |
---|
14 | packet is re-transmitted. |
---|
15 | |
---|
16 | By default, the MAC also implements carrier- |
---|
17 | sensing multiple-access with collision- |
---|
18 | avoidance (CSMA-CA). This functionality is |
---|
19 | built into hardware peripherals in the project |
---|
20 | so very little software state is affected. |
---|
21 | |
---|
22 | In its current state, the project acts as |
---|
23 | a true ethernet MAC-level wireless bridge. |
---|
24 | Any ethernet activity that appears on one |
---|
25 | WARP will be sent to another via the custom |
---|
26 | wireless link. |
---|
27 | */ |
---|
28 | |
---|
29 | void up(); |
---|
30 | void middle(); |
---|
31 | void right(); |
---|
32 | void left(); |
---|
33 | int phyRx_goodHeader_callback(Macframe* packet); |
---|
34 | void phyRx_badHeader_callback(); |
---|
35 | void emacRx_callback(Xuint32 length, char* payload); |
---|
36 | |
---|
37 | void timer_callback(unsigned char timerType); |
---|
38 | void uartRecv_callback(unsigned char uartByte); |
---|
39 | void wirelessRxDone_callback(); |
---|
40 | int main(); |
---|
41 | |
---|