| 241 | |
| 242 | [source:/ResearchApps/MAC/WANMAC/Subscriber/substation.c@301#L76 ackmac_main] |
| 243 | The first funtion to be called when the program begins the execution. It extracts the last byte of the MAC Address. This |
| 244 | allocates the Memmory Buffer for the program . It then calls the function for Hardware Initialisation, followed by the |
| 245 | Software Initialization and finally triggering off the State Machine. |
| 246 | |
| 247 | |
| 248 | [source:/ResearchApps/MAC/WANMAC/Subscriber/substation.c@301#L76 RxSSPDUs] |
| 249 | This function waits in a while loop till the timer goes off on the global variable notEndRxPDU. It expects to receive packets from |
| 250 | the Base Station during this time interval. Note the setting of the timer is not done in this function unlike the Base Station, instead |
| 251 | it is done in the state machine itself just after reading the Maps. |
| 252 | |
| 253 | |
| 254 | [source:/ResearchApps/MAC/WANMAC/Subscriber/substation.c@301#L76 TxSSPDUs] |
| 255 | This function keeps on calling the function to remove packets from the transmit queue and sending them to the physcial layer. It |
| 256 | waits on the global variable notEndTxPDU, which again is set in the state machine and not inside this function. |
| 257 | |
| 258 | [source:/ResearchApps/MAC/WANMAC/Subscriber/substation.c@301#L76 SSTxRemoveQueuebyMAC] |
| 259 | This function is responsible for taking out the pdu from one of the circular queue specified. This is responsible for updating the queue |
| 260 | data structure so that we dont over write on any queue location. This is done by incrementing the read index of the circular transmit queue. |
| 261 | The packet is copied into passed argument and memory is allocated for the data. |
| 262 | |
| 263 | |
| 264 | |
| 265 | |