MIDAS
Loading...
Searching...
No Matches
MidasHistoryInterface Class Referenceabstract

#include <history.h>

Inheritance diagram for MidasHistoryInterface:

Public Member Functions

 MidasHistoryInterface ()
 history type: MIDAS, ODBC, SQLITE, etc
 
virtual ~MidasHistoryInterface ()
 
virtual int hs_connect (const char *connect_string)=0
 returns HS_SUCCESS
 
virtual int hs_disconnect ()=0
 disconnect from history, returns HS_SUCCESS
 
virtual int hs_set_debug (int debug)=0
 set debug level, returns previous debug level
 
virtual int hs_clear_cache ()=0
 clear internal cache, returns HS_SUCCESS
 
virtual int hs_define_event (const char *event_name, time_t timestamp, int ntags, const TAG tags[])=0
 see hs_define_event(), returns HS_SUCCESS or HS_FILE_ERROR
 
virtual int hs_write_event (const char *event_name, time_t timestamp, int data_size, const char *data)=0
 see hs_write_event(), returns HS_SUCCESS or HS_FILE_ERROR
 
virtual int hs_flush_buffers ()=0
 flush buffered data to storage where it is visible to mhttpd
 
virtual int hs_get_events (time_t time_from, std::vector< std::string > *pevents)=0
 get list of events that exist(ed) at given time and later (value 0 means "return all events from beginning of time"), returns HS_SUCCESS
 
virtual int hs_get_tags (const char *event_name, time_t time_from, std::vector< TAG > *ptags)=0
 get list of history variables for given event (use event names returned by hs_get_events()) that exist(ed) at given time and later (value 0 means "all variables for this event that ever existed"), also see hs_get_tags(), returns HS_SUCCESS
 
virtual int hs_get_last_written (time_t start_time, int num_var, const char *const event_name[], const char *const tag_name[], const int var_index[], time_t last_written[])=0
 
virtual int hs_read_buffer (time_t start_time, time_t end_time, int num_var, const char *const event_name[], const char *const tag_name[], const int var_index[], MidasHistoryBufferInterface *buffer[], int status[])=0
 returns HS_SUCCESS
 
virtual int hs_read (time_t start_time, time_t end_time, time_t interval, int num_var, const char *const event_name[], const char *const tag_name[], const int var_index[], int num_entries[], time_t *time_buffer[], double *data_buffer[], int status[])=0
 see hs_read(), returns HS_SUCCESS
 
virtual int hs_read_binned (time_t start_time, time_t end_time, int num_bins, int num_var, const char *const event_name[], const char *const tag_name[], const int var_index[], int num_entries[], int *count_bins[], double *mean_bins[], double *rms_bins[], double *min_bins[], double *max_bins[], time_t *bins_first_time[], double *bins_first_value[], time_t *bins_last_time[], double *bins_last_value[], time_t last_time[], double last_value[], int status[])=0
 returns HS_SUCCESS
 

Public Attributes

char name [NAME_LENGTH]
 
char type [NAME_LENGTH]
 history channel name
 

Detailed Description

Definition at line 108 of file history.h.

Constructor & Destructor Documentation

◆ MidasHistoryInterface()

MidasHistoryInterface::MidasHistoryInterface ( )
inline

history type: MIDAS, ODBC, SQLITE, etc

Definition at line 115 of file history.h.

116 {
117 name[0] = 0;
118 type[0] = 0;
119 }
char type[NAME_LENGTH]
history channel name
Definition history.h:112
char name[NAME_LENGTH]
Definition history.h:111

◆ ~MidasHistoryInterface()

virtual MidasHistoryInterface::~MidasHistoryInterface ( )
inlinevirtual

Definition at line 121 of file history.h.

121{ }; // dtor

Member Function Documentation

◆ hs_clear_cache()

virtual int MidasHistoryInterface::hs_clear_cache ( )
pure virtual

clear internal cache, returns HS_SUCCESS

Implemented in MidasHistory, SqlHistory, SchemaHistoryBase, and FileHistory.

Here is the caller graph for this function:

◆ hs_connect()

virtual int MidasHistoryInterface::hs_connect ( const char connect_string)
pure virtual

returns HS_SUCCESS

Implemented in SqlHistory, SqlHistoryBase, FileHistory, SchemaHistoryBase, and MidasHistory.

Here is the caller graph for this function:

◆ hs_define_event()

virtual int MidasHistoryInterface::hs_define_event ( const char event_name,
time_t  timestamp,
int  ntags,
const TAG  tags[] 
)
pure virtual

see hs_define_event(), returns HS_SUCCESS or HS_FILE_ERROR

Implemented in MidasHistory, SqlHistory, and SchemaHistoryBase.

Here is the caller graph for this function:

◆ hs_disconnect()

virtual int MidasHistoryInterface::hs_disconnect ( )
pure virtual

disconnect from history, returns HS_SUCCESS

Implemented in MidasHistory, SqlHistory, SqlHistoryBase, FileHistory, and SchemaHistoryBase.

Here is the caller graph for this function:

◆ hs_flush_buffers()

virtual int MidasHistoryInterface::hs_flush_buffers ( )
pure virtual

flush buffered data to storage where it is visible to mhttpd

Implemented in MidasHistory, SqlHistory, and SchemaHistoryBase.

Here is the caller graph for this function:

◆ hs_get_events()

virtual int MidasHistoryInterface::hs_get_events ( time_t  time_from,
std::vector< std::string > *  pevents 
)
pure virtual

get list of events that exist(ed) at given time and later (value 0 means "return all events from beginning of time"), returns HS_SUCCESS

Implemented in MidasHistory, SqlHistory, and SchemaHistoryBase.

Here is the caller graph for this function:

◆ hs_get_last_written()

virtual int MidasHistoryInterface::hs_get_last_written ( time_t  start_time,
int  num_var,
const char *const  event_name[],
const char *const  tag_name[],
const int  var_index[],
time_t  last_written[] 
)
pure virtual

Implemented in MidasHistory, SqlHistory, and SchemaHistoryBase.

Here is the caller graph for this function:

◆ hs_get_tags()

virtual int MidasHistoryInterface::hs_get_tags ( const char event_name,
time_t  time_from,
std::vector< TAG > *  ptags 
)
pure virtual

get list of history variables for given event (use event names returned by hs_get_events()) that exist(ed) at given time and later (value 0 means "all variables for this event that ever existed"), also see hs_get_tags(), returns HS_SUCCESS

Implemented in MidasHistory, SqlHistory, and SchemaHistoryBase.

Here is the caller graph for this function:

◆ hs_read()

virtual int MidasHistoryInterface::hs_read ( time_t  start_time,
time_t  end_time,
time_t  interval,
int  num_var,
const char *const  event_name[],
const char *const  tag_name[],
const int  var_index[],
int  num_entries[],
time_t time_buffer[],
double data_buffer[],
int  status[] 
)
pure virtual

see hs_read(), returns HS_SUCCESS

Implemented in SqlHistory, MidasHistory, and SchemaHistoryBase.

Here is the caller graph for this function:

◆ hs_read_binned()

virtual int MidasHistoryInterface::hs_read_binned ( time_t  start_time,
time_t  end_time,
int  num_bins,
int  num_var,
const char *const  event_name[],
const char *const  tag_name[],
const int  var_index[],
int  num_entries[],
int count_bins[],
double mean_bins[],
double rms_bins[],
double min_bins[],
double max_bins[],
time_t bins_first_time[],
double bins_first_value[],
time_t bins_last_time[],
double bins_last_value[],
time_t  last_time[],
double  last_value[],
int  status[] 
)
pure virtual

returns HS_SUCCESS

Implemented in MidasHistory, SqlHistory, and SchemaHistoryBase.

Here is the caller graph for this function:

◆ hs_read_buffer()

virtual int MidasHistoryInterface::hs_read_buffer ( time_t  start_time,
time_t  end_time,
int  num_var,
const char *const  event_name[],
const char *const  tag_name[],
const int  var_index[],
MidasHistoryBufferInterface buffer[],
int  status[] 
)
pure virtual

returns HS_SUCCESS

Implemented in MidasHistory, SqlHistory, and SchemaHistoryBase.

Here is the caller graph for this function:

◆ hs_set_debug()

virtual int MidasHistoryInterface::hs_set_debug ( int  debug)
pure virtual

set debug level, returns previous debug level

Implemented in MidasHistory, SqlHistory, SchemaHistoryBase, and SqlHistoryBase.

Here is the caller graph for this function:

◆ hs_write_event()

virtual int MidasHistoryInterface::hs_write_event ( const char event_name,
time_t  timestamp,
int  data_size,
const char data 
)
pure virtual

see hs_write_event(), returns HS_SUCCESS or HS_FILE_ERROR

Implemented in SqlHistory, SchemaHistoryBase, and MidasHistory.

Here is the caller graph for this function:

Member Data Documentation

◆ name

char MidasHistoryInterface::name[NAME_LENGTH]

Definition at line 111 of file history.h.

◆ type

char MidasHistoryInterface::type[NAME_LENGTH]

history channel name

Definition at line 112 of file history.h.


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