Main Page | Modules | Class Hierarchy | Class List | Directories | Class Members | Related Pages | Examples

ConversationTrackerAttribute Class Reference

Class for tracking and computing statistics about conversations. More...

#include <ConversationTrackerAttribute.h>

Inheritance diagram for ConversationTrackerAttribute:

ScalarAttribute< int > Attribute FilteredPacketListener PacketListener List of all members.

Public Member Functions

 ConversationTrackerAttribute (const PacketFilter &filter, uint32_t minExch, uint32_t minConv)
 Create a new filtered ConversationTrackerAttribute.
 ConversationTrackerAttribute (uint32_t minExch, uint32_t minConv)
 Create a new ConversationTrackerAttribute.
 ConversationTrackerAttribute (const ConversationTrackerAttribute &toCopy)
 copy a ConversationTrackerAttribute
ConversationTrackerAttributeoperator= (const ConversationTrackerAttribute &rhs)
 copy a ConversationTrackerAttribute
ConversationTrackerAttributeclone (void) const
virtual int getValue (void) const
 get the value of the primary attribute
virtual const AttributegetAttrib (const std::string &ident) const throw ( UnknownAttributeException )
 Get the value of a subattribute.
virtual void handlePassedPacket (TraceIterator &packet)
 Notify the attribute of a new packet to be included in the computation.
 ScalarAttribute (void)
 ScalarAttribute (const ScalarAttribute< int > &toCopy)
 ScalarAttribute (const PacketFilter &filter)
virtual std::string toString (void) const
 get a string representation of the Attribute
int getType (void)
virtual void linkToAggregate (Aggregate &parent)
 Notify the Attribute that it is being linked to a particular aggregate.
virtual void compute (void)
 Compute the value of the attribute.
virtual void reset (void) throw ( NotResettableException )
 Reset the value of the attribute.
virtual void handlePacket (TraceIterator &newPkt)

Static Public Attributes

static const int TYPE_UNKNOWN = 0
static const int TYPE_SCALAR = 1
static const int TYPE_DISTRIB = 17
static const int TYPE_HISTOGRAM = 25
static const int TYPE_ARRAY = 33
static const int TYPE_SET = 34

Protected Attributes

Aggregateaggr
int attribType
bool dirty

Friends

std::ostream & operator<< (std::ostream &os, const Attribute &attrib)

Detailed Description

Class for tracking and computing statistics about conversations.

Conversation is a concept defined to capture the dynamics of the communication between two hosts. They consist of a series of exchanges, where an exchange is some minimum number of packets in a single direction. There are two thresholds; the minimum number of consecutive datagrams in the same direction required to be considered an exchange, and the minimum number of alternating exchanges that constitute a conversation.

Todo:
possibly extend this to be able to consider bytecounts in each direction instead of or in addition to datagram count.
Subattributes:


Constructor & Destructor Documentation

ConversationTrackerAttribute::ConversationTrackerAttribute const PacketFilter filter,
uint32_t  minExch,
uint32_t  minConv
 

Create a new filtered ConversationTrackerAttribute.

Parameters:
filter PacketFilter for selecting the packets to be considered
minExch minimum number of datagrams in a conversational exchange (one-sided 'utterance')
minConv minimum number of exchanges in a conversation

ConversationTrackerAttribute::ConversationTrackerAttribute uint32_t  minExch,
uint32_t  minConv
 

Create a new ConversationTrackerAttribute.

Parameters:
minExch minimum number of datagrams in a conversational exchange (one-sided 'utterance')
minConv minimum number of exchanges in a conversation

ConversationTrackerAttribute::ConversationTrackerAttribute const ConversationTrackerAttribute toCopy  ) 
 

copy a ConversationTrackerAttribute

Note:
State is not (currently) copied; the new attribute will reset to an initialized state.


Member Function Documentation

void Attribute::compute void   )  [virtual, inherited]
 

Compute the value of the attribute.

Used to update an offline attribute.

Reimplemented in ArithmeticAttribute< lType, rType, resType >, ByteCountAttribute, DurationAttribute, and SumAttribute< T >.

const Attribute & ConversationTrackerAttribute::getAttrib const std::string &  ident  )  const throw ( UnknownAttributeException ) [virtual]
 

Get the value of a subattribute.

Parameters:
ident identifier for the desired subattribute

Reimplemented from Attribute.

void FilteredPacketListener::handlePacket TraceIterator newPkt  )  [virtual, inherited]
 

checks the packet against the filter and calls handlePassedPacket if it passes or if the filter is NULL

Implements PacketListener.

void ConversationTrackerAttribute::handlePassedPacket TraceIterator packet  )  [virtual]
 

Notify the attribute of a new packet to be included in the computation.

For an online attribute, update the attribute. For an offline attribute, set the dirty bit. (default)

Reimplemented from Attribute.

void Attribute::linkToAggregate Aggregate parent  )  [virtual, inherited]
 

Notify the Attribute that it is being linked to a particular aggregate.

Parameters:
parent New parent aggregate - will supplant any previous parent
Note:
If an Attribute subclass is only intended for use with a particular subtype of aggregate, override this method and add type checking. e.g.: Trace *trace = dynamic_cast<Trace*>(parent); if( NULL != trace ) {...} else throw InvalidAggregateException(...);

Reimplemented in ArithmeticAttribute< lType, rType, resType >, and SumAttribute< T >.

ConversationTrackerAttribute & ConversationTrackerAttribute::operator= const ConversationTrackerAttribute rhs  ) 
 

copy a ConversationTrackerAttribute

Note:
State is not (currently) copied; the new attribute will reset to an initialized state.

void Attribute::reset void   )  throw ( NotResettableException ) [virtual, inherited]
 

Reset the value of the attribute.

Exceptions:
NotResettableException if the Attribute cannot be properly reset, e.g. if it is a wrapper for a subattribute.

Reimplemented in SumAttribute< T >.


Member Data Documentation

const int Attribute::TYPE_ARRAY = 33 [static, inherited]
 

array

const int Attribute::TYPE_DISTRIB = 17 [static, inherited]
 

statistical distribution

const int Attribute::TYPE_HISTOGRAM = 25 [static, inherited]
 

histogram

const int Attribute::TYPE_SCALAR = 1 [static, inherited]
 

single-valued type

const int Attribute::TYPE_SET = 34 [static, inherited]
 

set

const int Attribute::TYPE_UNKNOWN = 0 [static, inherited]
 

unknown type


The documentation for this class was generated from the following files:
Generated on Thu Apr 5 01:02:37 2007 for ANTARES by  doxygen 1.4.2