Bug 661

Summary: WifiMacHeader Print Control Characters
Product: ns-3 Reporter: duy <dnlove>
Component: wifiAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: Fix WifiMacHeader Print Control Characters
Fix WifiMacHeader Print Control Characters
temporary patch for now WifiMacHeader control characters
Fix WifiMacHeader Print Control Characters
Updated patch for Wifi Mac Headers Print

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