Changes between Version 21 and Version 22 of WANMAC


Ignore:
Timestamp:
Jul 21, 2006, 12:18:24 PM (18 years ago)
Author:
varunnayyar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WANMAC

    v21 v22  
    135135When the MAC program is executed, it sets up the external devices that must be used ([source:/ResearchApps/MAC/ACKMAC/src/ackmac.c@211#L890 Ethernet], [source:/ResearchApps/MAC/ACKMAC/src/ackmac.c@211#L1128 Radio and PHY], and [source:/ResearchApps/MAC/ACKMAC/src/ackmac.c@211#L1297 Automatic Gain Control]).
    136136
    137 == Typedefs == This section contains all the data structures used in the protocol with their explaination.
     137== Typedefs ==
     138
     139This section contains all the data structures used in the protocol with their explaination.
    138140
    139141[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.h@305#L46 pduStruct]
     
    170172as for newly added subscriber ids. So far we are not using this, as this is used for Network Entry Protocol.
    171173
    172 == Functions ==
    173 [source:/ResearchApps/MAC/ACKMAC/src/ackmac.c@91#L1022 ackmac_main]
    174 
    175 This function is the primary thread spawned by the xilkernel via the shell. It really has two purposes: during startup it must initialize memory spaces and do general set-up tasks such as setting up interrupts, and during all other times, it polls over status bytes that determine if the node is ready and able to transmit a new packet, and if so, it calls the tx function.
    176 
    177 [source:/ResearchApps/MAC/ACKMAC/src/ackmac.c@91#L547 tx]
     174== Base Station Functions ==
     175[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 timer_a_int_handler]
     176This is the interrupt handler for the first timer peripheral.  It checks to see which was the state it was called in and then changes values of
     177global variables accordingly. This is mainly used to tell when the slot for receiving and transmitting ends.
     178
     179
     180[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 rxPhyBad]
     181This function is used to keep a track of the number of bad packets ( CRC Error ) Received. After receiving it simply
     182resets the receiver.
     183
     184
     185[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 rxPhyGood]
     186This function is called when a packet with the correct CRC is received. It copies the packet into the memory. It then checks the state of the
     187BS machine and the Connection ID of the packet received with the expected Connection ID. Else it simply frees the buffer and in the end
     188resets the receiver. Note, the resetting of the receiver is a must and it must be the last step after packet processing.
     189
     190
     191[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 BSRxInsertQueuebyMAC]
     192The function is called when a packet needs to be inserted into a specific queue of the Base Station. This abstracts the behaviour of the
     193PHY-MAC interaction. The queues are circular and this maintains a notion of a flag, to ensure it does not overwrite on any queue location.
     194
     195
     196
     197
     198 
     199
     200
     201
     202
     203
     204 
     205
     206
    178207
    179208The transmitter can send new packets, resend old packets, send ACKs and send nACKs, depending on what state the machine is in when it is called. To help abstraction, the transmitter does not directly send packets. Instead, it passes them off to a dedicated function that interfaces directly with the PHY layer (see mem2ifc).
     
    185214[source:/ResearchApps/MAC/ACKMAC/src/ackmac.c@91#L238 timer_a_int_handler]
    186215
    187 This is the interrupt handler for the first timer peripheral.  It updates the number of dropped packets and number of timeouts, then sets the backoff timer before attempting to resend.
    188216
    189217[source:/ResearchApps/MAC/ACKMAC/src/ackmac.c@91#L773 setTimer]