Public Member Functions
|std::list< uint32_t >||GetList (void) const|
|void||SetList (const std::list< uint32_t > &packetlist)|
Static Public Member Functions
|static TypeId||GetTypeId (void)|
|This method returns the TypeId associated to ns3::ListErrorModel. |
This object is used to flag packets as being lost/errored or not. A note on performance: the list is assumed to be unordered, and in general, Packet uids received may be unordered. Therefore, each call to IsCorrupt() will result in a walk of the list with the present underlying implementation.
Note also that if one wants to target multiple packets from looking at an (unerrored) trace file, the act of erroring a given packet may cause subsequent packet uids to change. For instance, suppose one wants to error packets 11 and 17 on a given device. It may be that erroring packet 11 will cause the subsequent uid stream to change and 17 may no longer correspond to the second packet that one wants to lose. Therefore, be advised that it might take some trial and error to select the right uids when multiple are provided.
Reset() on this model will clear the list
IsCorrupt() will not modify the packet data buffer
|static TypeId ns3::ListErrorModel::GetTypeId||(||void||)||
Reimplemented from ns3::ErrorModel.
|void ns3::ListErrorModel::SetList||(||const std::list< uint32_t > &||packetlist||)|
|packetlist||The list of packet uids to error.|