MIDAS
|
Classes | |
class | MidasHistory |
Macros | |
#define | HISTORY_PANEL(_name) |
Functions | |
static bool | xwrite (const std::string &fn, int fh, const void *buf, size_t count) |
static int | xread (const std::string &fn, int fh, void *buf, size_t count, bool eof_ok=false) |
static bool | xseek (const std::string &fn, int fh, DWORD pos) |
static bool | xseek_end (const std::string &fn, int fh) |
static bool | xseek_cur (const std::string &fn, int fh, int offset) |
static DWORD | xcurpos (const std::string &fn, int fh) |
static bool | xtruncate (const std::string &fn, int fh, DWORD pos) |
static INT | hs_set_path (const char *path) |
static INT | hs_open_file (time_t ltime, const char *suffix, INT mode, std::string *pfile_name, int *fh) |
static INT | hs_gen_index (DWORD ltime) |
static INT | hs_search_file (DWORD *ltime, INT direction) |
static INT | hs_define_event (DWORD event_id, const char *name, const TAG *tag, DWORD size) |
static INT | hs_write_event (DWORD event_id, const void *data, DWORD size) |
static INT | hs_enum_events (DWORD ltime, char *event_name, DWORD *name_size, INT event_id[], DWORD *id_size) |
static INT | hs_count_events (DWORD ltime, DWORD *count) |
static INT | hs_get_event_id (DWORD ltime, const char *name, DWORD *id) |
static INT | hs_count_vars (DWORD ltime, DWORD event_id, DWORD *count) |
static INT | hs_enum_vars (DWORD ltime, DWORD event_id, char *var_name, DWORD *size, DWORD *var_n, DWORD *n_size) |
static INT | hs_get_var (DWORD ltime, DWORD event_id, const char *var_name, DWORD *type, INT *n_data) |
static INT | hs_get_tags (DWORD ltime, DWORD event_id, char event_name[NAME_LENGTH], int *n_tags, TAG **tags) |
double | hs_to_double (int tid, const void *ybuffer) |
static INT | hs_read (DWORD event_id, DWORD start_time, DWORD end_time, DWORD interval, const char *tag_name, DWORD var_index, DWORD *time_buffer, DWORD *tbsize, void *data_buffer, DWORD *dbsize, DWORD *data_type, DWORD *data_n, MidasHistoryBufferInterface *buffer) |
static INT | hs_dump (DWORD event_id, DWORD start_time, DWORD end_time, DWORD interval, BOOL binary_time) |
MidasHistory::MidasHistory () | |
MidasHistory::~MidasHistory () | |
int | MidasHistory::hs_connect (const char *path) |
returns HS_SUCCESS More... | |
int | MidasHistory::hs_disconnect () |
disconnect from history, returns HS_SUCCESS More... | |
int | MidasHistory::hs_set_debug (int debug) |
set debug level, returns previous debug level More... | |
int | MidasHistory::hs_clear_cache () |
clear internal cache, returns HS_SUCCESS More... | |
int | MidasHistory::FindEventId (const char *event_name) |
int | MidasHistory::AllocateEventId (const char *event_name) |
int | MidasHistory::CreateOdbTags (int event_id, const char *event_name, int ntags, const TAG tags[]) |
int | MidasHistory::hs_define_event (const char *event_name, time_t timestamp, int ntags, const TAG tags[]) |
see hs_define_event(), returns HS_SUCCESS or HS_FILE_ERROR More... | |
int | MidasHistory::hs_write_event (const char *event_name, time_t timestamp, int data_size, const char *data) |
see hs_write_event(), returns HS_SUCCESS or HS_FILE_ERROR More... | |
int | MidasHistory::hs_flush_buffers () |
flush buffered data to storage where it is visible to mhttpd More... | |
int | MidasHistory::GetEventsFromOdbEvents (std::vector< std::string > *events) |
int | MidasHistory::GetEventsFromOdbTags (std::vector< std::string > *events) |
int | MidasHistory::hs_get_events (time_t t, std::vector< std::string > *pevents) |
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 More... | |
int | MidasHistory::GetEventIdFromHS (time_t ltime, const char *evname, const char *tagname) |
int | MidasHistory::GetEventIdFromOdbTags (const char *evname, const char *tagname) |
int | MidasHistory::GetEventId (time_t t, const char *event_name, const char *tag_name, int *pevid) |
int | MidasHistory::GetTagsFromHS (const char *event_name, std::vector< TAG > *ptags) |
int | MidasHistory::GetTagsFromOdb (const char *event_name, std::vector< TAG > *ptags) |
int | MidasHistory::hs_get_tags (const char *event_name, time_t t, std::vector< TAG > *ptags) |
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 More... | |
int | MidasHistory::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[]) |
int | MidasHistory::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 read_status[]) |
see hs_read(), returns HS_SUCCESS More... | |
int | MidasHistory::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 read_status[]) |
returns HS_SUCCESS More... | |
int | MidasHistory::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 read_status[]) |
returns HS_SUCCESS More... | |
INT | hs_define_panel (const char *group, const char *panel, const std::vector< std::string > var) |
MidasHistoryInterface * | MakeMidasHistory () |
Variables | |
static std::vector< HISTORY * > | _history |
static std::string | _hs_path_name |
HNDLE | MidasHistory::fDB |
int | MidasHistory::fDebug |
std::vector< std::string > | MidasHistory::fEventsCache |
std::map< std::string, std::vector< TAG > > | MidasHistory::fTagsCache |
std::map< std::string, int > | MidasHistory::fEvidCache |
dox
#define HISTORY_PANEL | ( | _name | ) |
Define history panel in ODB with certain variables and default values for everything else
group | History group name |
panel | Historyh panel name |
var | Vector of variables |
Definition at line 3474 of file history.cxx.
|
inline |
Definition at line 2238 of file history.cxx.
|
inline |
Definition at line 2243 of file history.cxx.
|
inline |
Definition at line 2349 of file history.cxx.
|
inline |
Definition at line 2414 of file history.cxx.
|
inline |
Definition at line 2301 of file history.cxx.
|
inline |
Definition at line 2958 of file history.cxx.
|
inline |
Definition at line 2814 of file history.cxx.
|
inline |
Definition at line 2884 of file history.cxx.
|
inline |
Definition at line 2673 of file history.cxx.
|
inline |
Definition at line 2723 of file history.cxx.
|
inline |
Definition at line 2991 of file history.cxx.
|
inline |
Definition at line 3021 of file history.cxx.
|
inlinevirtual |
clear internal cache, returns HS_SUCCESS
Implements MidasHistoryInterface.
Definition at line 2288 of file history.cxx.
|
inlinevirtual |
returns HS_SUCCESS
Implements MidasHistoryInterface.
Definition at line 2250 of file history.cxx.
Definition at line 919 of file history.cxx.
Definition at line 1072 of file history.cxx.
|
inlinevirtual |
see hs_define_event(), returns HS_SUCCESS or HS_FILE_ERROR
Implements MidasHistoryInterface.
Definition at line 2642 of file history.cxx.
|
static |
Definition at line 439 of file history.cxx.
INT hs_define_panel | ( | const char * | group, |
const char * | panel, | ||
const std::vector< std::string > | var | ||
) |
Definition at line 3502 of file history.cxx.
|
inlinevirtual |
disconnect from history, returns HS_SUCCESS
Implements MidasHistoryInterface.
Definition at line 2273 of file history.cxx.
|
static |
dox Display history for a given event at stdout. The output can be redirected to be read by Excel for example.
event_id | Event ID |
start_time | Starting Date/Time |
end_time | End Date/Time |
interval | Minimum time in seconds between reported events. Can be used to skip events |
binary_time | Display DWORD time stamp |
Definition at line 1966 of file history.cxx.
|
static |
|
static |
|
inlinevirtual |
flush buffered data to storage where it is visible to mhttpd
Implements MidasHistoryInterface.
Definition at line 2665 of file history.cxx.
Definition at line 249 of file history.cxx.
Definition at line 996 of file history.cxx.
|
inlinevirtual |
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
Implements MidasHistoryInterface.
Definition at line 2788 of file history.cxx.
|
inlinevirtual |
|
inlinevirtual |
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
Implements MidasHistoryInterface.
Definition at line 3161 of file history.cxx.
|
static |
Definition at line 1340 of file history.cxx.
|
static |
|
static |
dox Open history file belonging to certain date. Internal use only.
ltime | Date for which a history file should be opened. |
suffix | File name suffix like "hst", "idx", "idf" |
mode | R/W access mode |
fh | File handle |
Definition at line 218 of file history.cxx.
|
static |
Definition at line 1463 of file history.cxx.
|
inlinevirtual |
see hs_read(), returns HS_SUCCESS
Implements MidasHistoryInterface.
Definition at line 3198 of file history.cxx.
|
inlinevirtual |
returns HS_SUCCESS
Implements MidasHistoryInterface.
Definition at line 3393 of file history.cxx.
|
inlinevirtual |
returns HS_SUCCESS
Implements MidasHistoryInterface.
Definition at line 3356 of file history.cxx.
Definition at line 365 of file history.cxx.
|
inlinevirtual |
set debug level, returns previous debug level
Implements MidasHistoryInterface.
Definition at line 2281 of file history.cxx.
|
static |
Sets the path for future history file accesses. Should be called before any other history function is called.
path | Directory where history files reside |
Definition at line 190 of file history.cxx.
double hs_to_double | ( | int | tid, |
const void * | ybuffer | ||
) |
|
inlinevirtual |
see hs_write_event(), returns HS_SUCCESS or HS_FILE_ERROR
Implements MidasHistoryInterface.
Definition at line 2656 of file history.cxx.
MidasHistoryInterface* MakeMidasHistory | ( | ) |
Definition at line 3541 of file history.cxx.
|
static |
Definition at line 145 of file history.cxx.
|
static |
Definition at line 85 of file history.cxx.
|
static |
Definition at line 109 of file history.cxx.
|
static |
Definition at line 133 of file history.cxx.
|
static |
Definition at line 121 of file history.cxx.
|
static |
Definition at line 164 of file history.cxx.
|
static |
dox
Definition at line 63 of file history.cxx.
|
static |
dox
Definition at line 57 of file history.cxx.
|
static |
Definition at line 58 of file history.cxx.
HNDLE MidasHistory::fDB |
Definition at line 2230 of file history.cxx.
int MidasHistory::fDebug |
Definition at line 2231 of file history.cxx.
std::vector<std::string> MidasHistory::fEventsCache |
Definition at line 2233 of file history.cxx.
std::map<std::string, int > MidasHistory::fEvidCache |
Definition at line 2235 of file history.cxx.
Definition at line 2234 of file history.cxx.