Changes between Version 34 and Version 35 of WANMAC


Ignore:
Timestamp:
Jul 21, 2006, 3:20:15 PM (18 years ago)
Author:
varunnayyar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WANMAC

    v34 v35  
    173173
    174174== Base Station Functions ==
    175 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 timer_a_int_handler]
    176 This 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
    177 global 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]
    181 This function is used to keep a track of the number of bad packets ( CRC Error ) Received. After receiving it simply
    182 resets the receiver.
    183 
    184175
    185176[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 rxPhyGood]
     
    188179resets the receiver. Note, the resetting of the receiver is a must and it must be the last step after packet processing.
    189180
    190 
    191181[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 BSRxInsertQueuebyMAC]
    192182The function is called when a packet needs to be inserted into a specific queue of the Base Station. This abstracts the behaviour of the
    193183PHY-MAC interaction. The queues are circular and this maintains a notion of a flag, to ensure it does not overwrite on any queue location.
    194184
    195 
    196 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 PrintPacket]
    197 A utility function for printing out any given pduStruct. Helpful in debugging !!
    198 
    199 
    200185[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 CopyMAPs]
    201186Another utility function for Copying one Map into another.
    202 
    203 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 clearTimer]
    204 This function is called when u want to clear an already set timer. If an event happens before the desired end
    205 time for that event, then we can call this function to prevent the timer from going off unnecessarily.
    206 
    207 
    208 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 txPhy]
    209 This fuction hands over a PDU to the Phy layer, copies the header, payload into the memory and triggers the transmission. After
    210 having transmitted the packet, it then frees the data of that packet.
    211 
    212187
    213188[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 ackmac_main]
     
    216191Software Initialization and finally triggering off the State Machine.
    217192
    218 
    219193[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 InitialiseBS]
    220194This is the main software Initialization funtion. It allocates memory for all the receive and transmit queues for the
    221195specified number of queues.
    222 
    223196
    224197[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 CreateMaps]
     
    227200update map verion. It does that both for the uplink and the downlink.
    228201
    229 
    230202[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 InitialiseMAP]
    231203This is a utility function for initialising the first uplink and downlink maps. It allocates memory to the
     
    242214setting the timers for each of the downlink slots corresponding to each subscriber
    243215
    244 
    245 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 SetTimer]
    246 The setTimer function allows the use of software timers for the MAC. Currently, the two types of timers for transmitting and the other for receiving.
    247 This function is called each time a Map entry is read and a specific time needs to be set for waiting or transmitting. Once the timer expires,
    248 the timer hadler function is called and the state of the machine can be changed.
    249 
    250 
    251216[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 TransmitfrmQ]
    252217This function makes the call to pull out packets from the queue specified and hands them over to the PHY layer. It simply waits in the while
    253218loop as long the timer goes on.
    254219
    255 
    256220[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 BSTxRemoveQueuebyMAC]
    257221This function is responsible for taking out the pdu from one of the circular queue specified. This is responsible for updating the queue
    258222data structure so that we dont over write on any queue location.
    259223
    260 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 dummyPktGenerator]
    261 This is a virtual application layer function. It simply fills up a specified queue with dummy payloads. This is essentially simulating the
    262 application layer behaviour.
    263 
    264 
    265224[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 ReceivefrmPhy]
    266225All this function does it to set a timer and wait for a packet to be received. It also changes the global variable queueidRx to the specified
    267226queueid, so that packets corresponding to the correct subscriber can be used.
    268 
    269227
    270228[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 RxBSPDUs]
     
    277235that stage it simple transmits a Map after regular intervals, till it receives something from the Uplink.
    278236
     237== Subscriber Station Functions ==
     238
     239== Common Functions ==
     240
    279241[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 pb_int_handler]
    280242Interrupt handler for the pushbuttons on the WARP board. This is a low-priority interrupt because it is primarily used for debugging purposes. The five
    281243buttons on the board correspond to the switch cases for this handler.
    282244
    283 
    284 == Subscriber Station Functions ==
    285 
    286 == Common Functions ==
     245[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 dummyPktGenerator]
     246This is a virtual application layer function. It simply fills up a specified queue with dummy payloads. This is essentially simulating the
     247application layer behaviour.
     248
     249[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 SetTimer]
     250The setTimer function allows the use of software timers for the MAC. Currently, the two types of timers for transmitting and the other for receiving.
     251This function is called each time a Map entry is read and a specific time needs to be set for waiting or transmitting. Once the timer expires,
     252the timer hadler function is called and the state of the machine can be changed.
     253
     254[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 txPhy]
     255This fuction hands over a PDU to the Phy layer, copies the header, payload into the memory and triggers the transmission. After
     256having transmitted the packet, it then frees the data of that packet.
     257
     258[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 timer_a_int_handler]
     259This 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
     260global variables accordingly. This is mainly used to tell when the slot for receiving and transmitting ends.
     261
     262
     263[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 rxPhyBad]
     264This function is used to keep a track of the number of bad packets ( CRC Error ) Received. After receiving it simply
     265resets the receiver.
     266
     267
     268[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 PrintPacket]
     269A utility function for printing out any given pduStruct. Helpful in debugging !!
     270
     271[source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 clearTimer]
     272This function is called when u want to clear an already set timer. If an event happens before the desired end
     273time for that event, then we can call this function to prevent the timer from going off unnecessarily.
    287274
    288275== Hardware Related Funtions ==