Changes between Version 13 and Version 14 of CSMAMAC


Ignore:
Timestamp:
Feb 7, 2008, 10:50:30 PM (16 years ago)
Author:
chunter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CSMAMAC

    v13 v14  
    2222== Life of a Packet ==
    2323
    24 Below is the state-machine representation of the above algorithm. Each state can be "clicked" and is described in detail in the accompanying link. The up-to-date code can be found here: [source:/ResearchApps/MAC/CSMA/csmaMac.c@L csmaMac.c]. The API documentation for the code can be found here: [http://warp.rice.edu/WARP_API/csma_mac_8c.html CSMAMAC API]
     24Below is the state-machine representation of the above algorithm. Each state can be "clicked" and is described in detail in the accompanying link. The up-to-date code can be found here: [source:/ResearchApps/MAC/CSMAMAC/csmaMac.c@L csmaMac.c]. The API documentation for the code can be found here: [http://warp.rice.edu/WARP_API/csma_mac_8c.html CSMAMAC API]
    2525
    2626{{{
     
    5959----
    6060
     61Note: Through all of the following descriptions, a "-" is used in place of arguments to functions when those arguments are not important to the overall purpose of the description. Howeverm, that is not to say that these arguments can be changed to ''anything'' and have the code still compile and run successfully. Care must be taken in modifying the reference design.
     62
    6163=== Idle ===
    6264
     
    6870}}}
    6971
    70 function of [source:/ResearchApps/MAC/CSMA/csmaMac.c@L csmaMac.c].
     72function of [source:/ResearchApps/MAC/CSMAMAC/csmaMac.c@L csmaMac.c].
     73
     74==== Steady State ====
     75This block of code calls the following [http://warp.rice.edu/WARP_API/warpmac_8c.html WARPMAC] functions:
     76
     77{{{
     78#!c
     79warpmac_getMyId();
     80}}}
     81
     82This function reads the current setting on the [wiki:HardwareUsersGuides/FPGABoard_v1.2/UserIO#DIPSwitch Dip Switches]. The value is used simply to identify the node in the network. For the purposes of the Reference Design, one node must be identified as "0" and the other as "1."
     83
     84{{{
     85#!c
     86warpmac_init()
     87}}}
     88
     89This function sets reasonable default values for many of the parameters of the MAC, configures interrupts and exceptions, configures Ethernet, and finally initializes the custom peripherals such as the radio controller, the PHY, the packet detector, and the automatic gain control block.
     90
     91{{{
     92#!c
     93warpmac_setMacAddr(-);
     94}}}
     95
     96This function sets the wireless MAC address of the node.
     97
     98{{{
     99#!c
     100warpmac_setMaxResend(-);
     101warpmac_setMaxCW(-);
     102warpmac_setTimeout(-);
     103warpmac_setSlotTime(-);
     104}}}
     105
     106These function set up internal parameters of the MAC. The maximum number of resends is the maximum number of times that a packet should be retransmitted, in the event of not receiving an acknowledgment. The maximum contention window defines "how random" backoffs should be in the worst case. The timeout time is the amount of time that the MAC should wait on an acknowledgment before retransmitting. Finally, the slot time is a length of the minimum contention window.
     107
     108{{{
     109#!c
     110warpmac_setRxBuffer(&rxBuffer,0);
     111warpmac_setTxBuffer(1);
     112}}}
     113
     114The newest version of the [wiki:OFDM PHY]
     115
     116
     117{{{
     118#!c
     119int main()
     120}}}
     121
     122
     123{{{
     124#!c
     125int main()
     126}}}
     127
     128
     129{{{
     130#!c
     131int main()
     132}}}
     133
    71134
    72135----