EPANET-RTX
1.1
real-time extension for the EPANET toolkit
|
A persistence layer for MySQL databases. More...
#include <MysqlPointRecord.h>
Classes | |
class | mysql_connection_t |
Public Types | |
typedef boost::shared_ptr < MysqlPointRecord > | sharedPointer |
Public Types inherited from RTX::DbPointRecord | |
typedef boost::shared_ptr < DbPointRecord > | sharedPointer |
Public Types inherited from RTX::BufferPointRecord | |
typedef boost::circular_buffer < Point > | PointBuffer_t |
typedef std::pair < PointBuffer_t, boost::shared_ptr < boost::signals2::mutex > > | BufferMutexPair_t |
typedef std::map< std::string, BufferMutexPair_t > | KeyedBufferMutexMap_t |
typedef boost::shared_ptr < BufferPointRecord > | sharedPointer |
Public Types inherited from RTX::PointRecord | |
typedef boost::shared_ptr < PointRecord > | sharedPointer |
typedef std::pair< time_t, time_t > | time_pair_t |
Public Member Functions | |
string | host () |
void | setHost (string host) |
string | uid () |
void | setUid (string uid) |
string | pwd () |
void | setPwd (string pwd) |
string | db () |
void | setDb (string db) |
virtual void | dbConnect () throw (RtxException) |
virtual bool | isConnected () |
virtual std::string | registerAndGetIdentifier (std::string recordName, Units dataUnits) |
virtual std::vector< std::string > | identifiers () |
virtual std::vector< std::pair < std::string, Units > > | availableData () |
virtual time_pair_t | range (const string &id) |
virtual std::ostream & | toStream (std::ostream &stream) |
virtual bool | supportsBoundedQueries () |
Public Member Functions inherited from RTX::DbPointRecord | |
Point | point (const string &id, time_t time) |
Get a Point with a specific name at a specific time. More... | |
Point | pointBefore (const string &id, time_t time) |
Point | pointAfter (const string &id, time_t time) |
std::vector< Point > | pointsInRange (const string &id, time_t startTime, time_t endTime) |
Get a vector of Points with a specific name within a specific time range. More... | |
void | addPoint (const string &id, Point point) |
void | addPoints (const string &id, std::vector< Point > points) |
void | reset () |
void | reset (const string &id) |
virtual void | invalidate (const string &identifier) |
void | setSearchDistance (time_t time) |
time_t | searchDistance () |
Public Member Functions inherited from RTX::BufferPointRecord | |
BufferPointRecord (int defaultCapacity=100) | |
virtual Point | firstPoint (const string &id) |
virtual Point | lastPoint (const string &id) |
Public Member Functions inherited from RTX::PointRecord | |
std::string | name () |
void | setName (std::string name) |
Protected Member Functions | |
virtual std::vector< Point > | selectRange (const std::string &id, time_t startTime, time_t endTime) |
virtual Point | selectNext (const std::string &id, time_t time) |
virtual Point | selectPrevious (const std::string &id, time_t time) |
virtual void | insertSingle (const std::string &id, Point point) |
virtual void | insertRange (const std::string &id, std::vector< Point > points) |
virtual void | removeRecord (const std::string &id) |
virtual void | truncate () |
Additional Inherited Members | |
Public Attributes inherited from RTX::DbPointRecord | |
std::string | errorMessage |
Protected Attributes inherited from RTX::DbPointRecord | |
request_t | request |
Protected Attributes inherited from RTX::PointRecord | |
std::string | _cachedPointId |
Point | _cachedPoint |
std::map< std::string, Point > | _pointCache |
A persistence layer for MySQL databases.
Uses the MySQL C++ library for point storage and retrieval. Primarily used for persistent caching of TimeSeries streams after intensive filtering that you only want to do once in a lifetime such as for saving simulation results or cleaned SCADA data.