history_odbc.h

Go to the documentation of this file.
00001 /********************************************************************\
00002 
00003   Name:         history_odbc.h
00004   Created by:   Konstantin Olchanski / TRIUMF
00005 
00006   Contents:     MIDAS history stored in ODBC SQL database
00007 
00008 
00009   $Id$
00010 
00011 \********************************************************************/
00012 
00013 #ifndef HISTORY_ODBC_H
00014 #define HISTORY_ODBC_H
00015 
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif
00019 
00020 /// \file history_odbc.h
00021 ///
00022 
00023 int hs_connect_odbc(const char* odbc_dsn); ///< connect to given ODBC DSN, defined in $HOME/.odbc.ini, returns HS_SUCCESS
00024 int hs_disconnect_odbc();                  ///< disconnect from ODBC, returns HS_SUCCESS
00025 
00026 int hs_debug_odbc(int debug);              ///< set debug level, returns previous debug level
00027 int hs_set_alarm_odbc(const char* alarm_name); ///< set alarm name for history failures. Use NULL to disable alarms
00028 
00029 int hs_define_event_odbc(const char* event_name, const TAG tags[], int tags_size); ///< see hs_define_event(), returns HS_SUCCESS or HS_FILE_ERROR
00030 int hs_write_event_odbc(const char*  event_name, time_t timestamp, const char* buffer, int buffer_size); ///< see hs_write_event(), returns HS_SUCCESS or HS_FILE_ERROR
00031 
00032 int hs_get_tags_odbc(const char* event_name, int *n_tags, TAG **tags); ///< use event names returned by hs_get_events_odbc(), see hs_get_tags(), returns HS_SUCCESS
00033 
00034 int hs_read_odbc(time_t start_time, time_t end_time, time_t interval,
00035                  const char* event_name, const char* tag_name, int var_index,
00036                  int *num_entries,
00037                  time_t** time_buffer, double**data_buffer); ///< see hs_read(), returns HS_SUCCESS
00038 
00039 #ifdef __cplusplus
00040 }
00041 #endif
00042 
00043 #endif
00044 // end

Midas DOC Version 3.0.0 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel - Doxygen - Peter Green - Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Exaos Lee - Rudi Meier - Glenn Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou - Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk