|
Bugzilla – Full Text Bug Listing |
| Summary: | Sleep state and CCA | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Salva Climent <jocliba> |
| Component: | uan | Assignee: | Andrea Sacco <andrea.sacco85> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | jocliba, ns-bugs |
| Priority: | P5 | ||
| Version: | ns-3.12 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
Mods to the UanPhyGen::SetSleepMode method
Test Code |
||
Hi Salva, can you please give a test code to reproduce the bug? Thanks, Andrea Created attachment 1325 [details]
Test Code
You can find attached the test code. Fixed changeset 7738 fe52cb6371f2 Thanks Salva |
Created attachment 1257 [details] Mods to the UanPhyGen::SetSleepMode method Hello, There is a problem with the UanPhyGen::SetSleepMode (bool) method, when called in the middle of a Tx. Suppose the following: - The Phy layer is in the middle of a Tx. - For some reason, the upper layer calls SetSleepMode with the bool parameter set to false. This will change the m_state variable from TX to IDLE. - When the transmission finishes, an error will be thrown at TxEndEvent line 558 since m_state has changed. I propose checking the m_state variable before changing the state. Another problem comes with the wakeup procedure. When the phy layer wakes up it starts at the IDLE state. Instead, I think the channel should be listened first and switch to the CCABUSY state if appropriate. I'm attaching a patch with the modifications.