|
libdsproc3
2.0
|
Functions | |
| int | dsproc_dqrdb_connect (void) |
| Connect to the DQR database. | |
| void | dsproc_dqrdb_disconnect (void) |
| Disconnect from the DQR database. | |
| void | dsproc_free_dqrs (DQR **dqrs) |
| Free all memory used by an array of pointers to DQR structures. | |
| int | dsproc_get_dqrs (const char *site, const char *facility, const char *dsc_name, const char *dsc_level, const char *var_name, time_t start_time, time_t end_time, DQR ***dqrs) |
| Get the DQRs for a datastream variable. | |
| int dsproc_dqrdb_connect | ( | void | ) |
Connect to the DQR database.
To insure the database connection is not held open longer than necessary it is important that every call to dsproc_dqrdb_connect() is followed by a call to dsproc_dqrdb_disconnect().
If an error occurs in this function it will be appended to the log and error mail messages, and the process status will be set appropriately.
Definition at line 396 of file dsproc_dqrdb.c.
| void dsproc_dqrdb_disconnect | ( | void | ) |
Disconnect from the DQR database.
To insure the database connection is not held open longer than necessary it is important that every call to dsproc_dqrdb_connect() is followed by a call to dsproc_dqrdb_disconnect().
Definition at line 442 of file dsproc_dqrdb.c.
| void dsproc_free_dqrs | ( | DQR ** | dqrs | ) |
Free all memory used by an array of pointers to DQR structures.
| dqrs | - pointer to the array of pointers to DQR structures |
Definition at line 460 of file dsproc_dqrdb.c.
| int dsproc_get_dqrs | ( | const char * | site, |
| const char * | facility, | ||
| const char * | dsc_name, | ||
| const char * | dsc_level, | ||
| const char * | var_name, | ||
| time_t | start_time, | ||
| time_t | end_time, | ||
| DQR *** | dqrs | ||
| ) |
Get the DQRs for a datastream variable.
The memory used by the output array is dynamically allocated. It is the responsibility of the calling process to free this memory when it is no longer needed (see dsproc_free_dqrs()).
Null results from the database are not reported as errors. It is the responsibility of the calling process to report these as errors if necessary.
If an error occurs in this function it will be appended to the log and error mail messages, and the process status will be set appropriately.
| site | - site name |
| facility | - facility name |
| dsc_name | - datastream class name |
| dsc_level | - datastream class level |
| var_name | - variable name or NULL for all variables |
| start_time | - start time in seconds since 1970 |
| end_time | - end time in seconds since 1970 |
| dqrs | - output: pointer to the array of pointers to the DQR structures. |
Definition at line 494 of file dsproc_dqrdb.c.