libdsdb3  3.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups
Datastream Times

Data Structures

struct  DSTimes
 Process Output Datastream Times. More...

Functions

void dsdb_free_ds_times (DSTimes *ds_times)
 Free all memory used by a DSTimes structure.
int dsdb_delete_process_output_ds_times (DSDB *dsdb, const char *site, const char *facility, const char *proc_type, const char *proc_name, const char *dsc_name, const char *dsc_level)
 Delete process output datastream times from the database.
int dsdb_get_process_output_ds_times (DSDB *dsdb, const char *site, const char *facility, const char *proc_type, const char *proc_name, const char *dsc_name, const char *dsc_level, DSTimes **ds_times)
 Get process output datastream times from the database.
int dsdb_update_process_output_ds_times (DSDB *dsdb, const char *site, const char *facility, const char *proc_type, const char *proc_name, const char *dsc_name, const char *dsc_level, const timeval_t *first_time, const timeval_t *last_time)
 Update process output datastream times.

Detailed Description


Function Documentation

int dsdb_delete_process_output_ds_times ( DSDB dsdb,
const char *  site,
const char *  facility,
const char *  proc_type,
const char *  proc_name,
const char *  dsc_name,
const char *  dsc_level 
)

Delete process output datastream times from the database.

Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).

Parameters:
dsdb- pointer to the open database connection
site- site name
facility- facility name
proc_type- process type
proc_name- process name
dsc_name- datastream class name
dsc_level- datastream class level
Returns:
  • 1 if process output datastream times were deleted
  • 0 if the process output datastream times were not found
  • -1 if an error occurred
See also:
dsdb_get_status()

Definition at line 102 of file ds_times.c.

void dsdb_free_ds_times ( DSTimes ds_times)

Free all memory used by a DSTimes structure.

Parameters:
ds_times- pointer to the DSTimes structure

Definition at line 74 of file ds_times.c.

int dsdb_get_process_output_ds_times ( DSDB dsdb,
const char *  site,
const char *  facility,
const char *  proc_type,
const char *  proc_name,
const char *  dsc_name,
const char *  dsc_level,
DSTimes **  ds_times 
)

Get process output datastream times from the database.

The memory used by the output structure is dynamically allocated. It is the responsibility of the calling process to free this memory when it is no longer needed (see dsdb_free_ds_times()).

Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).

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.

Parameters:
dsdb- pointer to the open database connection
site- site name
facility- facility name
proc_type- process type
proc_name- process name
dsc_name- datastream class name
dsc_level- datastream class level
ds_times- output: pointer to the DSTimes structure
Returns:
  • 1 if successful
  • 0 if the database returned a NULL result
  • -1 if an error occurred
See also:
dsdb_free_ds_times()

Definition at line 157 of file ds_times.c.

int dsdb_update_process_output_ds_times ( DSDB dsdb,
const char *  site,
const char *  facility,
const char *  proc_type,
const char *  proc_name,
const char *  dsc_name,
const char *  dsc_level,
const timeval_t first_time,
const timeval_t last_time 
)

Update process output datastream times.

Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).

Parameters:
dsdb- pointer to the open database connection
site- site name
facility- facility name
proc_type- process type
proc_name- process name
dsc_name- datastream class name
dsc_level- datastream class level
first_time- time of the first data sample
last_time- time of the last data sample
Returns:
  • 1 if the datastream times were updated
  • 0 the database returned a null result
  • -1 if an error occurred

Definition at line 225 of file ds_times.c.