EPANET-RTX
1.1
real-time extension for the EPANET toolkit
|
A Point Record Class for storing and retrieving Points. More...
#include <PointRecord.h>
Public Types | |
typedef boost::shared_ptr < PointRecord > | sharedPointer |
typedef std::pair< time_t, time_t > | time_pair_t |
Public Member Functions | |
std::string | name () |
void | setName (std::string name) |
virtual std::string | registerAndGetIdentifier (std::string recordName, Units dataUnits) |
virtual std::vector< std::string > | identifiers () |
virtual Point | point (const string &identifier, time_t time) |
Get a Point with a specific name at a specific time. More... | |
virtual Point | pointBefore (const string &identifier, time_t time) |
virtual Point | pointAfter (const string &identifier, time_t time) |
virtual std::vector< Point > | pointsInRange (const string &identifier, time_t startTime, time_t endTime) |
Get a vector of Points with a specific name within a specific time range. More... | |
virtual void | addPoint (const string &identifier, Point point) |
virtual void | addPoints (const string &identifier, std::vector< Point > points) |
virtual void | reset () |
virtual void | reset (const string &identifier) |
virtual void | invalidate (const string &identifier) |
virtual Point | firstPoint (const string &id) |
virtual Point | lastPoint (const string &id) |
virtual time_pair_t | range (const string &id) |
virtual std::ostream & | toStream (std::ostream &stream) |
Protected Attributes | |
std::string | _cachedPointId |
Point | _cachedPoint |
std::map< std::string, Point > | _pointCache |
A Point Record Class for storing and retrieving Points.
The base PointRecord class just keeps short-term records. Derive to add specific persistence implementations
|
virtual |
Get a Point with a specific name at a specific time.
name | The name of the data source (tag name). |
time | The requested time. |
Reimplemented in RTX::BufferPointRecord, RTX::MapPointRecord, RTX::DequePointRecord, and RTX::DbPointRecord.
|
virtual |
Get a vector of Points with a specific name within a specific time range.
name | The name of the data source (tag name). |
startTime | The beginning of the requested time range. |
endTime | The end of the requested time range. |
Reimplemented in RTX::BufferPointRecord, RTX::MapPointRecord, RTX::DequePointRecord, and RTX::DbPointRecord.