Changes between Version 80 and Version 81 of WANMAC
- Timestamp:
- Jul 24, 2006, 5:53:25 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WANMAC
v80 v81 377 377 == Common Functions == 378 378 379 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@3 05#L51pb_int_handler]379 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@360#L1036 pb_int_handler] 380 380 Interrupt handler for the pushbuttons on the WARP board. This is a low-priority interrupt because it is primarily used for debugging purposes. The five 381 381 buttons on the board correspond to the switch cases for this handler. 382 382 383 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@3 05#L51dummyPktGenerator]383 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@360#L804 dummyPktGenerator] 384 384 This is a virtual application layer function. It simply fills up a specified queue with dummy payloads. This is essentially simulating the 385 385 application layer behaviour. 386 386 387 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@3 05#L51SetTimer]387 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@360#L717 SetTimer] 388 388 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. 389 389 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, 390 390 the timer hadler function is called and the state of the machine can be changed. 391 391 392 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@3 05#L51 txPhy]392 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@360#L321 txPhy] 393 393 This fuction hands over a PDU to the Phy layer, copies the header, payload into the memory and triggers the transmission. After 394 394 having transmitted the packet, it then frees the data of that packet. 395 395 396 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@3 05#L51timer_a_int_handler]396 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@360#L40 timer_a_int_handler] 397 397 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 398 398 global variables accordingly. This is mainly used to tell when the slot for receiving and transmitting ends. 399 399 400 400 401 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@3 05#L51rxPhyBad]401 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@360#L64 rxPhyBad] 402 402 This function is used to keep a track of the number of bad packets ( CRC Error ) Received. After receiving it simply 403 403 resets the receiver. 404 404 405 405 406 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@3 05#L51PrintPacket]406 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@360#L213 PrintPacket] 407 407 A utility function for printing out any given pduStruct. Helpful in debugging !! 408 408 409 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@3 05#L51clearTimer]409 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@360#L250 clearTimer] 410 410 This function is called when u want to clear an already set timer. If an event happens before the desired end 411 411 time for that event, then we can call this function to prevent the timer from going off unnecessarily. … … 419 419 Base Station Hardware Initialization 420 420 421 [source:/ResearchApps/MAC/WANMAC/Basestation/hardware.h@3 05#L51InitializeHW]421 [source:/ResearchApps/MAC/WANMAC/Basestation/hardware.h@360#L79 InitializeHW] 422 422 For the Base Station, this is the main function resposnsible for initialization of the hardware and setting up the warp boards for usage. 423 423 This is a well commented funtion, highlighting the various steps involved. It initializes the LEDs and the push buttons on the board. … … 426 426 and receiver initialization. 427 427 428 [source:/ResearchApps/MAC/WANMAC/Subscriber/hardware.h@3 05#L51InitializeHW]428 [source:/ResearchApps/MAC/WANMAC/Subscriber/hardware.h@361#L79 InitializeHW] 429 429 This is the same as the above function, it simply does all the things mentioned with the Subscriber Station board. 430 430