Tests: reorganize ErrorChannel and ErrorBinaryModel

This commit is contained in:
Tommaso Pecorella
2017-01-29 03:15:41 +01:00
parent 8a8629afe2
commit 4e9537008a
12 changed files with 107 additions and 345 deletions

View File

@@ -459,6 +459,24 @@ private:
};
/**
* \brief The simplest error model, corrupts even packets and does not corrupt odd ones.
*/
class BinaryErrorModel : public ErrorModel
{
public:
static TypeId GetTypeId (void);
BinaryErrorModel ();
virtual ~BinaryErrorModel ();
private:
virtual bool DoCorrupt (Ptr<Packet> p);
virtual void DoReset (void);
uint8_t m_counter; //!< internal state counter.
};
} // namespace ns3
#endif