The WaveBsmStats class implements a stats collector for IEEE 1609 WAVE (Wireless Access in Vehicular Environments) Basic Safety Messages (BSMs). More...
#include "wave-bsm-stats.h"
Public Member Functions | |
WaveBsmStats () | |
Constructor. More... | |
double | GetBsmPdr (int index) |
Returns the BSM Packet Delivery Ratio (PDR) which is the percent of expected packets within range(index) that are actually received. More... | |
double | GetCumulativeBsmPdr (int index) |
Returns the cumulative BSM Packet Delivery Ratio (PDR) which is the percent of cumulative expected packets within range(index) that are actually received. More... | |
int | GetExpectedRxPktCount (int index) |
Returns the count of expected packets received within range(index) More... | |
int | GetLogging () |
Gets logging state. More... | |
int | GetRxPktCount () |
Returns the count of packets received. More... | |
int | GetRxPktInRangeCount (int index) |
Increments the count of actual packets received within range(index) More... | |
int | GetTxByteCount () |
Returns the count of (application data) bytes transmitted not include MAC/PHY overhead. More... | |
int | GetTxPktCount () |
Returns the count of transmitted packets. More... | |
void | IncExpectedRxPktCount (int index) |
Increments the count of (broadcast) packets expected to be received within the coverage area1. More... | |
void | IncRxPktCount () |
Increments the count of actual packets received (regardless of coverage area). More... | |
void | IncRxPktInRangeCount (int index) |
Increments the count of actual packets received within the coverage area(index). More... | |
void | IncTxByteCount (int bytes) |
Increments the count of (application data) bytes transmitted not including MAC/PHY overhead. More... | |
void | IncTxPktCount () |
Increments the count of transmitted packets. More... | |
void | ResetTotalRxPktCounts (int index) |
Resets the count of total packets expected and/or within range(index) that are received. More... | |
void | SetExpectedRxPktCount (int index, int count) |
Sets the count of packets expected to received. More... | |
void | SetLogging (int log) |
Enables/disables logging. More... | |
void | SetRxPktCount (int count) |
Sets the count of packets received. More... | |
void | SetRxPktInRangeCount (int index, int count) |
Sets the count of packets within range that are received. More... | |
void | SetTxPktCount (int count) |
Sets the count of packets transmitted. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose (void) |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator (void) const |
Get an iterator to the Objects aggregated to this one. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized (void) const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Attributes | |
int | m_log |
log More... | |
int | m_waveByteSendCount |
byte sent count More... | |
std::vector< int > | m_wavePktExpectedReceiveCounts |
packet expected receive counts More... | |
std::vector< int > | m_wavePktInCoverageReceiveCounts |
packet in ceoverage receive counts More... | |
int | m_wavePktReceiveCount |
packet receive count More... | |
int | m_wavePktSendCount |
packet sent count More... | |
std::vector< int > | m_waveTotalPktExpectedReceiveCounts |
total packet expected receive counts More... | |
std::vector< int > | m_waveTotalPktInCoverageReceiveCounts |
total packet in coverage receive counts More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoDispose (void) |
Destructor implementation. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
The WaveBsmStats class implements a stats collector for IEEE 1609 WAVE (Wireless Access in Vehicular Environments) Basic Safety Messages (BSMs).
The BSM is a ~200-byte packet that is generally broadcast from every vehicle at a nominal rate of 10 Hz.
Definition at line 49 of file wave-bsm-stats.h.
ns3::WaveBsmStats::WaveBsmStats | ( | ) |
Constructor.
Definition at line 31 of file wave-bsm-stats.cc.
References m_wavePktExpectedReceiveCounts, m_wavePktInCoverageReceiveCounts, m_waveTotalPktExpectedReceiveCounts, and m_waveTotalPktInCoverageReceiveCounts.
double ns3::WaveBsmStats::GetBsmPdr | ( | int | index | ) |
Returns the BSM Packet Delivery Ratio (PDR) which is the percent of expected packets within range(index) that are actually received.
index | index for statistics |
Definition at line 130 of file wave-bsm-stats.cc.
References m_wavePktExpectedReceiveCounts, and m_wavePktInCoverageReceiveCounts.
double ns3::WaveBsmStats::GetCumulativeBsmPdr | ( | int | index | ) |
Returns the cumulative BSM Packet Delivery Ratio (PDR) which is the percent of cumulative expected packets within range(index) that are actually received.
index | index for statistics |
Definition at line 151 of file wave-bsm-stats.cc.
References m_waveTotalPktExpectedReceiveCounts, and m_waveTotalPktInCoverageReceiveCounts.
int ns3::WaveBsmStats::GetExpectedRxPktCount | ( | int | index | ) |
Returns the count of expected packets received within range(index)
index | index for statistics |
Definition at line 94 of file wave-bsm-stats.cc.
References m_wavePktExpectedReceiveCounts.
int ns3::WaveBsmStats::GetLogging | ( | ) |
Gets logging state.
Definition at line 178 of file wave-bsm-stats.cc.
References m_log.
int ns3::WaveBsmStats::GetRxPktCount | ( | ) |
Returns the count of packets received.
Definition at line 88 of file wave-bsm-stats.cc.
References m_wavePktReceiveCount.
int ns3::WaveBsmStats::GetRxPktInRangeCount | ( | int | index | ) |
Increments the count of actual packets received within range(index)
index | index for statistics |
Definition at line 100 of file wave-bsm-stats.cc.
References m_wavePktInCoverageReceiveCounts.
int ns3::WaveBsmStats::GetTxByteCount | ( | ) |
Returns the count of (application data) bytes transmitted not include MAC/PHY overhead.
Definition at line 124 of file wave-bsm-stats.cc.
References m_waveByteSendCount.
int ns3::WaveBsmStats::GetTxPktCount | ( | ) |
Returns the count of transmitted packets.
Definition at line 62 of file wave-bsm-stats.cc.
References m_wavePktSendCount.
|
static |
Register this type.
Definition at line 45 of file wave-bsm-stats.cc.
References ns3::TypeId::SetParent().
void ns3::WaveBsmStats::IncExpectedRxPktCount | ( | int | index | ) |
Increments the count of (broadcast) packets expected to be received within the coverage area1.
Broadcast packets (i.e. WAVE Basic Safety Messages) are not ACK'd. For packet delivery ratio (PDR), we need to count transmitted packets that are expected to be received within the coverage area, even though they may not be physically received (due to collisions or receiver power thresholds).
index | index for statistics |
Definition at line 68 of file wave-bsm-stats.cc.
References m_wavePktExpectedReceiveCounts, and m_waveTotalPktExpectedReceiveCounts.
void ns3::WaveBsmStats::IncRxPktCount | ( | ) |
Increments the count of actual packets received (regardless of coverage area).
Definition at line 75 of file wave-bsm-stats.cc.
References m_wavePktReceiveCount.
void ns3::WaveBsmStats::IncRxPktInRangeCount | ( | int | index | ) |
Increments the count of actual packets received within the coverage area(index).
Broadcast packets (i.e. WAVE Basic Safety Messages) are not ACK'd. For packet delivery ratio (PDR), we need to count only those received packets that are actually received within the (circular) coverage area.
index | index for statistics |
Definition at line 81 of file wave-bsm-stats.cc.
References m_wavePktInCoverageReceiveCounts, and m_waveTotalPktInCoverageReceiveCounts.
void ns3::WaveBsmStats::IncTxByteCount | ( | int | bytes | ) |
Increments the count of (application data) bytes transmitted not including MAC/PHY overhead.
bytes | the bytes of application-data transmitted |
Definition at line 118 of file wave-bsm-stats.cc.
References m_waveByteSendCount.
void ns3::WaveBsmStats::IncTxPktCount | ( | ) |
Increments the count of transmitted packets.
Definition at line 56 of file wave-bsm-stats.cc.
References m_wavePktSendCount.
void ns3::WaveBsmStats::ResetTotalRxPktCounts | ( | int | index | ) |
Resets the count of total packets expected and/or within range(index) that are received.
index | index for statistics |
Definition at line 196 of file wave-bsm-stats.cc.
References m_waveTotalPktExpectedReceiveCounts, and m_waveTotalPktInCoverageReceiveCounts.
void ns3::WaveBsmStats::SetExpectedRxPktCount | ( | int | index, |
int | count | ||
) |
Sets the count of packets expected to received.
index | index for statistics |
count | the count of packets |
Definition at line 184 of file wave-bsm-stats.cc.
References m_wavePktExpectedReceiveCounts.
void ns3::WaveBsmStats::SetLogging | ( | int | log | ) |
Enables/disables logging.
log |
Definition at line 172 of file wave-bsm-stats.cc.
References m_log.
void ns3::WaveBsmStats::SetRxPktCount | ( | int | count | ) |
Sets the count of packets received.
count | the count of packets received |
Definition at line 112 of file wave-bsm-stats.cc.
References m_wavePktReceiveCount.
void ns3::WaveBsmStats::SetRxPktInRangeCount | ( | int | index, |
int | count | ||
) |
Sets the count of packets within range that are received.
index | index for statistics |
count | the count of packets |
Definition at line 190 of file wave-bsm-stats.cc.
References m_wavePktInCoverageReceiveCounts.
void ns3::WaveBsmStats::SetTxPktCount | ( | int | count | ) |
Sets the count of packets transmitted.
count | the count of packets transmitted |
Definition at line 106 of file wave-bsm-stats.cc.
References m_wavePktSendCount.
|
private |
|
private |
byte sent count
Definition at line 238 of file wave-bsm-stats.h.
Referenced by GetTxByteCount(), and IncTxByteCount().
|
private |
packet expected receive counts
Definition at line 241 of file wave-bsm-stats.h.
Referenced by GetBsmPdr(), GetExpectedRxPktCount(), IncExpectedRxPktCount(), SetExpectedRxPktCount(), and WaveBsmStats().
|
private |
packet in ceoverage receive counts
Definition at line 240 of file wave-bsm-stats.h.
Referenced by GetBsmPdr(), GetRxPktInRangeCount(), IncRxPktInRangeCount(), SetRxPktInRangeCount(), and WaveBsmStats().
|
private |
packet receive count
Definition at line 239 of file wave-bsm-stats.h.
Referenced by GetRxPktCount(), IncRxPktCount(), and SetRxPktCount().
|
private |
packet sent count
Definition at line 237 of file wave-bsm-stats.h.
Referenced by GetTxPktCount(), IncTxPktCount(), and SetTxPktCount().
|
private |
total packet expected receive counts
Definition at line 243 of file wave-bsm-stats.h.
Referenced by GetCumulativeBsmPdr(), IncExpectedRxPktCount(), ResetTotalRxPktCounts(), and WaveBsmStats().
|
private |
total packet in coverage receive counts
Definition at line 242 of file wave-bsm-stats.h.
Referenced by GetCumulativeBsmPdr(), IncRxPktInRangeCount(), ResetTotalRxPktCounts(), and WaveBsmStats().