35#define HS_GET_READER 1
36#define HS_GET_WRITER 2
37#define HS_GET_INACTIVE 4
38#define HS_GET_DEFAULT 8
55 const std::vector<std::string> label,
const std::vector<std::string> formula = {},
56 const std::vector<std::string>
color = {});
146 int num_var,
const char*
const event_name[],
const char*
const tag_name[],
const int var_index[],
147 time_t last_written[]) = 0;
150 int num_var,
const char*
const event_name[],
const char*
const tag_name[],
const int var_index[],
155 int num_var,
const char*
const event_name[],
const char*
const tag_name[],
const int var_index[],
160 int num_var,
const char*
const event_name[],
const char*
const tag_name[],
const int var_index[],
~MidasHistoryBinnedBuffer()
void Add(time_t t, double v)
virtual ~MidasHistoryBufferInterface()
virtual void Add(time_t time, double value)=0
MidasHistoryBufferInterface()
virtual int hs_set_debug(int debug)=0
set debug level, returns previous debug level
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_disconnect()=0
disconnect from history, returns HS_SUCCESS
virtual int hs_connect(const char *connect_string)=0
returns HS_SUCCESS
virtual ~MidasHistoryInterface()
virtual int hs_flush_buffers()=0
flush buffered data to storage where it is visible to mhttpd
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_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_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 begi...
char type[NAME_LENGTH]
history channel name
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 exis...
MidasHistoryInterface()
history type: MIDAS, ODBC, SQLITE, etc
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_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_clear_cache()=0
clear internal cache, 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
MidasHistoryInterface * MakeMidasHistory()
INT hs_define_panel2(const char *group, const char *panel, const std::vector< std::string > var, const std::vector< std::string > label, const std::vector< std::string > formula={}, const std::vector< std::string > color={})
int hs_define_panel(const char *group, const char *panel, const std::vector< std::string > vars)
MidasHistoryInterface * MakeMidasHistoryODBC()
int hs_read_event_list(std::vector< std::string > *pevents)
int hs_find_reader_channel(HNDLE hDB, HNDLE *hKey, int debug_flag)
int hs_save_event_list(const std::vector< std::string > *pevents)
MidasHistoryInterface * MakeMidasHistorySqlite()
int hs_get_history(HNDLE hDB, HNDLE hKey, int flags, int debug_flag, MidasHistoryInterface **mh)
MidasHistoryInterface * MakeMidasHistorySqlDebug()
MidasHistoryInterface * MakeMidasHistoryMysql()
MidasHistoryInterface * MakeMidasHistoryPgsql()
MidasHistoryInterface * MakeMidasHistoryFile()
BOOL debug
debug printouts
MidasHistoryInterface * mh
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)