INET Framework for OMNeT++/OMNEST
inet::visualizer::PacketFilter Class Reference

This class provides a generic filter for packets. More...

#include <PacketFilter.h>

Public Member Functions

void setPattern (const char *pattern)
 
bool matches (const cPacket *packet) const
 

Protected Attributes

cMatchExpression matchExpression
 

Detailed Description

This class provides a generic filter for packets.

The filter is expressed as a pattern using the cMatchExpression format.

Member Function Documentation

bool inet::visualizer::PacketFilter::matches ( const cPacket *  packet) const

Referenced by inet::visualizer::MediumVisualizerBase::matchesTransmission(), inet::visualizer::PacketDropVisualizerBase::receiveSignal(), inet::visualizer::LinkVisualizerBase::receiveSignal(), and inet::visualizer::PathVisualizerBase::receiveSignal().

30 {
31  MatchableObject matchableObject(MatchableObject::ATTRIBUTE_FULLNAME, packet);
32  // TODO: eliminate const_cast when cMatchExpression::matches becomes const
33  return const_cast<PacketFilter *>(this)->matchExpression.matches(&matchableObject);
34 }
cMatchExpression matchExpression
Definition: PacketFilter.h:34
Definition: MatchableObject.h:32

Member Data Documentation

cMatchExpression inet::visualizer::PacketFilter::matchExpression
protected

Referenced by matches(), and setPattern().


The documentation for this class was generated from the following files: