#include <MemoryAttribute.h>
Inheritance diagram for SampledMemoryAttribute< T >:

Public Member Functions | |
| SampledMemoryAttribute (const std::string &ident, uint32_t aType, uint32_t memSize, const Timeval &delta, bool scroll=true) | |
| create a SampledMemoryAttribute | |
| SampledMemoryAttribute (const PacketFilter &filter, const std::string &ident, uint32_t aType, uint32_t memSize, const Timeval &delta, bool scroll=true) | |
| create a filtered SampledMemoryAttribute | |
| SampledMemoryAttribute (const std::string &ident, uint32_t aType, const Timeval &window, const Timeval &delta, bool scroll=true) | |
| create a SampledMemoryAttribute that functions as a time window | |
| SampledMemoryAttribute (const PacketFilter &filter, const std::string &ident, uint32_t aType, const Timeval &window, const Timeval &delta, bool scroll=true) | |
| create a filtered SampledMemoryAttribute that functions as a time window | |
| SampledMemoryAttribute (const SampledMemoryAttribute< T > &toCopy) | |
| SampledMemoryAttribute< T > * | clone (void) const |
| virtual void | handlePassedPacket (TraceIterator &packet) |
| Notify the attribute of a new packet to be included in the computation. | |
| virtual void | handleAlarm (void) |
| virtual void | update (void) |
| update the attribute to the given time | |
| virtual T | getInstanceValue (void) const throw ( UnknownAttributeException ) |
| get the current value of the attribute to remember | |
| virtual T | getInstanceValue (TraceIterator &packet) const throw ( UnknownAttributeException ) |
| get the current value of the attribute to remember | |
| virtual const Attribute & | getAttrib (const std::string &ident) const throw ( UnknownAttributeException ) |
| get an attribute of the attribute | |
| virtual T | getSum (void) const throw ( InvalidDataTypeException ) |
| get the sum of the elements in the memory if they are of an appropriate data type | |
| virtual T | getMax (void) const throw ( InvalidDataTypeException ) |
| get the maximum element in the memory if they are of an appropriate data type | |
| virtual T | getMin (void) const throw ( InvalidDataTypeException ) |
| get the minimum element in the memory if they are of an appropriate data type | |
| std::vector< T >::const_iterator | begin (void) const |
| get a const iterator pointing to the first (oldest) element of the window | |
| std::vector< T >::iterator | begin (void) |
| get an iterator pointing to the first (oldest) element of the window | |
| std::vector< T >::const_iterator | end (void) const |
| get a const iterator pointing to the last (newest) element of the window | |
| std::vector< T >::iterator | end (void) |
| get an iterator pointing to the last (newest) element of the window | |
| 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 std::string | toString (void) const |
| virtual void | handlePacket (TraceIterator &newPkt) |
Static Public Attributes | |
| static const uint32_t | ATTRIB_TYPE_AGGREGATE = 1 |
| types of attributes that can be remembered | |
| static const uint32_t | ATTRIB_TYPE_PACKET = 2 |
| 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 Member Functions | |
| void | append (const Timeval &time, T val) |
| add a value to the end of the queue | |
| void | remove (uint32_t count=1) |
| remove the n first/earliest values from the queue, defaults to removing the first one | |
| void | buildVector (void) const |
| build or rebuild the vector copy of q | |
| void | prune (void) |
| remove values from the queue based on max size or time window | |
| uint32_t | size (void) const |
| return the number of values in the memory | |
Protected Attributes | |
| Aggregate * | aggr |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Attribute &attrib) |
This mainly just wraps an implementation for getInstanceValue; MemoryAttribute itself does most of the work. This one does include support for 'autonomous' updating - i.e. updating driven by a clock rather than by a packet arrival.
|
||||||||||
|
get a const iterator pointing to the first (oldest) element of the window
Implements ArrayAttribute< T >. |
|
||||||||||
|
build or rebuild the vector copy of q
|
|
|
Compute the value of the attribute. Used to update an offline attribute. Reimplemented in ArithmeticAttribute< lType, rType, resType >, ByteCountAttribute, DurationAttribute, and SumAttribute< T >. |
|
||||||||||
|
get an attribute of the attribute
Reimplemented from Attribute. |
|
||||||||||
|
get the current value of the attribute to remember
|
|
||||||||||
|
get the maximum element in the memory if they are of an appropriate data type
|
|
||||||||||
|
get the minimum element in the memory if they are of an appropriate data type
|
|
||||||||||
|
get the sum of the elements in the memory if they are of an appropriate data type
|
|
|
checks the packet against the filter and calls handlePassedPacket if it passes or if the filter is NULL Implements PacketListener. |
|
||||||||||
|
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) Implements MemoryAttribute< T >. |
|
|
Notify the Attribute that it is being linked to a particular aggregate.
Reimplemented in ArithmeticAttribute< lType, rType, resType >, and SumAttribute< T >. |
|
|
Reset the value of the attribute.
Reimplemented in SumAttribute< T >. |
|
||||||||||
|
update the attribute to the given time
Implements MemoryAttribute< T >. |
|
|||||
|
types of attributes that can be remembered Specifically these indicate where the MemoryAttribute needs to look to find the identifier. identifier refers to an attribute attached to the aggregate |
|
|||||
|
identifier refers to an attribute of the packets seen |
|
|
array |
|
|
statistical distribution |
|
|
histogram |
|
|
single-valued type |
|
|
set |
|
|
unknown type |
1.4.2