Bug 661 - WifiMacHeader Print Control Characters
WifiMacHeader Print Control Characters
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3-dev
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-13 15:00 UTC by duy
Modified: 2009-08-24 22:02 UTC (History)
0 users

See Also:


Attachments
Fix WifiMacHeader Print Control Characters (2.18 KB, patch)
2009-08-13 15:00 UTC, duy
Details | Diff
Fix WifiMacHeader Print Control Characters (2.12 KB, patch)
2009-08-13 22:34 UTC, duy
Details | Diff
temporary patch for now WifiMacHeader control characters (750 bytes, patch)
2009-08-13 22:48 UTC, duy
Details | Diff
Fix WifiMacHeader Print Control Characters (2.15 KB, patch)
2009-08-13 23:04 UTC, duy
Details | Diff
Updated patch for Wifi Mac Headers Print (2.24 KB, patch)
2009-08-14 14:34 UTC, duy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description duy 2009-08-13 15:00:19 UTC
Created attachment 556 [details]
Fix WifiMacHeader Print Control Characters

See
http://groups.google.com/group/ns-3-users/browse_thread/thread/239c284e60865053

Let me know if that patch should suffice
Comment 1 duy 2009-08-13 22:34:39 UTC
Created attachment 557 [details]
Fix WifiMacHeader Print Control Characters
Comment 2 duy 2009-08-13 22:48:32 UTC
Created attachment 558 [details]
temporary patch for now WifiMacHeader control characters
Comment 3 duy 2009-08-13 22:56:20 UTC
Is there any reason for m_seqFrag to be declared as uint8_t? 
Comment 4 duy 2009-08-13 23:04:51 UTC
Created attachment 559 [details]
Fix WifiMacHeader Print Control Characters

typecast m_seqFrag from uint8_t to uint18_t since it brings side effects to displaying the rates if we are using std::hex.  Let me know if you have other sugesstions.
Comment 5 Mathieu Lacage 2009-08-14 06:24:25 UTC
Comment on attachment 559 [details]
Fix WifiMacHeader Print Control Characters

>-  os << "ToDS=" << m_ctrlToDs << ", FromDS=" << m_ctrlFromDs 
>-     << ", MoreFrag=" << m_ctrlMoreFrag << ", Retry=" << m_ctrlRetry 
>-     << ", MoreData=" << m_ctrlMoreData 
>+  os << "ToDS=" << std::hex <<  (int) m_ctrlToDs << ", FromDS=" << std::hex << (int) m_ctrlFromDs 
>+     << ", MoreFrag=" <<  std::hex << (int) m_ctrlMoreFrag << ", Retry=" << std::hex << (int)  m_ctrlRetry 
>+     << ", MoreData=" <<  std::hex << (int) m_ctrlMoreData 

You need to switch back to std::dec after formatting these fields.
Comment 6 duy 2009-08-14 14:34:20 UTC
Created attachment 561 [details]
Updated patch for Wifi Mac Headers Print

Thanks Mathieu, I just updated it.
Comment 7 duy 2009-08-24 22:02:42 UTC
pushed in changeset 4737   5e4fb3918879