|
RTP Trace System
1.0
|
Traffic Policer. More...
#include <trafficpolicer.h>
Classes | |
| struct | TrafficPolicerPacket |
Public Member Functions | |
| TrafficPolicer () | |
| ~TrafficPolicer () | |
| card64 | getBandwidth () const |
| void | setBandwidth (const card64 bandwidth) |
| double | getBufferDelay () const |
| void | setBufferDelay (const double bufferDelay) |
| void | setFlush (const bool on) |
| void | flush () |
| bool | refreshBuffer (const card8 trafficClass, const bool doRemapping) |
| cardinal | write (const cardinal bytes, const card8 trafficClass, const cardinal headerSize) |
| void | timerEvent () |
Static Public Attributes | |
| static card64 | SimulatorTime = 0 |
Private Attributes | |
| card64 | SendTimeStamp |
| card64 | Bandwidth |
| double | BufferDelay |
| bool | ExceedFlush |
| multimap< card64, TrafficPolicerPacket * > | PacketSet |
Traffic Policer.
This class is a traffic policer.
Constructor.
Destructor.
| void Coral::TrafficPolicer::flush | ( | ) |
Flush buffer.
| card64 Coral::TrafficPolicer::getBandwidth | ( | ) | const [inline] |
Get bandwidth for following packets.
| double Coral::TrafficPolicer::getBufferDelay | ( | ) | const [inline] |
Get maximum buffer delay for following packets.
| bool Coral::TrafficPolicer::refreshBuffer | ( | const card8 | trafficClass, |
| const bool | doRemapping | ||
| ) |
Adapt buffer's contents to changed bandwidth and delay settings.
| trafficClass | Traffic class to remap packets to. |
| doRemapping | true, to do traffic class remapping; false otherwise. |
| void Coral::TrafficPolicer::setBandwidth | ( | const card64 | bandwidth | ) | [inline] |
Set bandwidth for following packets.
| bandwidth | Bandwidth. |
| void Coral::TrafficPolicer::setBufferDelay | ( | const double | bufferDelay | ) | [inline] |
Set maximum buffer delay for following packets.
| maxDelay | Maximum buffer delay in microseconds. |
| void Coral::TrafficPolicer::setFlush | ( | const bool | on | ) | [inline] |
Enable *one* buffer flush, if limits are exceeded.
| on | true, to enable one buffer flush; false otherwise. |
| void Coral::TrafficPolicer::timerEvent | ( | ) |
Implementation of TimedThread's timerEvent() method.
| cardinal Coral::TrafficPolicer::write | ( | const cardinal | bytes, |
| const card8 | trafficClass, | ||
| const cardinal | headerSize | ||
| ) |
Write given number of bytes into buffer.
| bytes | Number of bytes. |
| trafficClass | Traffic class for error output. |
| headerSize | Packet header size (e.g. 48 for UDP/IPv6). |
card64 Coral::TrafficPolicer::Bandwidth [private] |
double Coral::TrafficPolicer::BufferDelay [private] |
bool Coral::TrafficPolicer::ExceedFlush [private] |
multimap<card64,TrafficPolicerPacket*> Coral::TrafficPolicer::PacketSet [private] |
card64 Coral::TrafficPolicer::SendTimeStamp [private] |
card64 Coral::TrafficPolicer::SimulatorTime = 0 [static] |