Changes between Version 34 and Version 35 of WANMAC
- Timestamp:
- Jul 21, 2006, 3:20:15 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WANMAC
v34 v35 173 173 174 174 == 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 of177 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 simply182 resets the receiver.183 184 175 185 176 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 rxPhyGood] … … 188 179 resets the receiver. Note, the resetting of the receiver is a must and it must be the last step after packet processing. 189 180 190 191 181 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 BSRxInsertQueuebyMAC] 192 182 The function is called when a packet needs to be inserted into a specific queue of the Base Station. This abstracts the behaviour of the 193 183 PHY-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 184 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 200 185 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 CopyMAPs] 201 186 Another 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 end205 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. After210 having transmitted the packet, it then frees the data of that packet.211 212 187 213 188 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 ackmac_main] … … 216 191 Software Initialization and finally triggering off the State Machine. 217 192 218 219 193 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 InitialiseBS] 220 194 This is the main software Initialization funtion. It allocates memory for all the receive and transmit queues for the 221 195 specified number of queues. 222 223 196 224 197 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 CreateMaps] … … 227 200 update map verion. It does that both for the uplink and the downlink. 228 201 229 230 202 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 InitialiseMAP] 231 203 This is a utility function for initialising the first uplink and downlink maps. It allocates memory to the … … 242 214 setting the timers for each of the downlink slots corresponding to each subscriber 243 215 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 251 216 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 TransmitfrmQ] 252 217 This 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 253 218 loop as long the timer goes on. 254 219 255 256 220 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 BSTxRemoveQueuebyMAC] 257 221 This function is responsible for taking out the pdu from one of the circular queue specified. This is responsible for updating the queue 258 222 data structure so that we dont over write on any queue location. 259 223 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 the262 application layer behaviour.263 264 265 224 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 ReceivefrmPhy] 266 225 All 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 267 226 queueid, so that packets corresponding to the correct subscriber can be used. 268 269 227 270 228 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 RxBSPDUs] … … 277 235 that stage it simple transmits a Map after regular intervals, till it receives something from the Uplink. 278 236 237 == Subscriber Station Functions == 238 239 == Common Functions == 240 279 241 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 pb_int_handler] 280 242 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 281 243 buttons on the board correspond to the switch cases for this handler. 282 244 283 284 == Subscriber Station Functions == 285 286 == Common Functions == 245 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 dummyPktGenerator] 246 This is a virtual application layer function. It simply fills up a specified queue with dummy payloads. This is essentially simulating the 247 application layer behaviour. 248 249 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 SetTimer] 250 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. 251 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, 252 the 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] 255 This fuction hands over a PDU to the Phy layer, copies the header, payload into the memory and triggers the transmission. After 256 having 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] 259 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 260 global 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] 264 This function is used to keep a track of the number of bad packets ( CRC Error ) Received. After receiving it simply 265 resets the receiver. 266 267 268 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 PrintPacket] 269 A utility function for printing out any given pduStruct. Helpful in debugging !! 270 271 [source:/ResearchApps/MAC/WANMAC/Basestation/basestation.c@305#L51 clearTimer] 272 This function is called when u want to clear an already set timer. If an event happens before the desired end 273 time for that event, then we can call this function to prevent the timer from going off unnecessarily. 287 274 288 275 == Hardware Related Funtions ==