base/libs/cmdparams/cmdparams.h File Reference

Functions to get values in appropriate form from parsed command line and module arguments list. More...

#include "hash_table.h"
#include "hcontainer.h"
#include "list.h"
#include <stdlib.h>

Include dependency graph for cmdparams.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CmdParams_Arg_struct
struct  CmdParams_struct
 Command-line parameter structure. More...
struct  ModuleArgs_struct
 DRMS structure for holding parsed command-line-argument default values. More...

Defines

#define CMDPARAMS_FAILURE
#define CMDPARAMS_INITBUFSZ
#define CMDPARAMS_INVALID_CONVERSION
#define CMDPARAMS_MAGICSTR
#define CMDPARAMS_MAXARGNAME
#define CMDPARAMS_MAXLINE
#define CMDPARAMS_MAXNEST
#define CMDPARAMS_NODEFAULT
#define CMDPARAMS_OUTOFMEMORY
#define CMDPARAMS_QUERYMODE
#define CMDPARAMS_SUCCESS
#define CMDPARAMS_UNKNOWN_PARAM

Typedefs

typedef struct CmdParams_Arg_struct CmdParams_Arg_t
typedef uint64_t CmdParams_Mask64_t
typedef struct CmdParams_struct CmdParams_t
 CmdParams struct reference.
typedef struct ModuleArgs_struct ModuleArgs_t

Enumerations

enum  ModuleArgs_Type_t {
  ARG_END, ARG_FLAG, ARG_TIME, ARG_INT,
  ARG_FLOAT, ARG_DOUBLE, ARG_STRING, ARG_VOID,
  ARG_INTS, ARG_FLOATS, ARG_DOUBLES, ARG_STRINGS,
  ARG_NUME, ARG_DATASET, ARG_DATASERIES, ARG_NEWDATA,
  ARG_NUMARGS
}

FunctionsTitleTestFour

int cmdparams_exists (CmdParams_t *parms, char *name)
void cmdparams_freeall (CmdParams_t *parms)
HContainer_tcmdparams_get_argscont (CmdParams_t *params)
void cmdparams_get_argv (CmdParams_t *params, char *const **argv, int *argc)
const char * cmdparams_getarg (CmdParams_t *parms, int num)
const char * cmdparams_getargument (CmdParams_t *parms, int num, const char **name, const char **value, const char **cmdlinestr, int *accessed)
int cmdparams_isreserved (CmdParams_t *params, const char *key)
int cmdparams_numargs (CmdParams_t *parms)
int cmdparams_parse (CmdParams_t *parms, int argc, char *argv[])
int cmdparams_parsefile (CmdParams_t *parms, char *filename, int depth)
void cmdparams_printall (CmdParams_t *parms)
void cmdparams_reserve (CmdParams_t *params, const char *reserved, const char *owner)
CmdParams_Arg_t * cmdparams_set (CmdParams_t *parms, const char *name, const char *value)
void cmdparams_usage (char *name)
cmdparams_get_XXX
Functions to return the value of the parameter name from the set of cmd-line parameters in parms.

int cmdparams_get_dblarr (CmdParams_t *parms, char *name, double **arr, int *status)
double cmdparams_get_double (CmdParams_t *parms, const char *name, int *status)
float cmdparams_get_float (CmdParams_t *parms, char *name, int *status)
int cmdparams_get_int (CmdParams_t *parms, char *name, int *status)
int16_t cmdparams_get_int16 (CmdParams_t *parms, char *name, int *status)
int32_t cmdparams_get_int32 (CmdParams_t *parms, char *name, int *status)
int64_t cmdparams_get_int64 (CmdParams_t *parms, char *name, int *status)
int cmdparams_get_int64arr (CmdParams_t *parms, char *name, int64_t **arr, int *status)
int8_t cmdparams_get_int8 (CmdParams_t *parms, char *name, int *status)
int cmdparams_get_intarr (CmdParams_t *parms, char *name, int **arr, int *status)
CmdParams_Mask64_t cmdparams_get_mask64 (CmdParams_t *parms, const char *name, int *status)
const char * cmdparams_get_str (CmdParams_t *parms, const char *name, int *status)
int cmdparams_get_strarr (CmdParams_t *parms, char *name, char ***arr, int *status)
double cmdparams_get_time (CmdParams_t *parms, char *name, int *status)
[cmd]params_isflagset
Check the existence of a flag parameter.

int cmdparams_isflagset (CmdParams_t *parms, char *name)
int params_isflagset (CmdParams_t *parms, char *name)
params_get_XXX
Functions to return the value of the parameter name from the set of cmd-line parameters in parms. These functions are equivalent to the cmdparams_get_XXX functions, but without the third argument for a status value.

char params_get_char (CmdParams_t *parms, char *name)
double params_get_double (CmdParams_t *parms, char *name)
float params_get_float (CmdParams_t *parms, char *name)
int params_get_int (CmdParams_t *parms, char *name)
int16_t params_get_int16 (CmdParams_t *parms, char *name)
int32_t params_get_int32 (CmdParams_t *parms, char *name)
int64_t params_get_int64 (CmdParams_t *parms, char *name)
int8_t params_get_int8 (CmdParams_t *parms, char *name)
short params_get_short (CmdParams_t *parms, char *name)
const char * params_get_str (CmdParams_t *parms, char *name)
double params_get_time (CmdParams_t *parms, char *name)


Detailed Description

Functions to get values in appropriate form from parsed command line and module arguments list.

These functions return values of the appropriate type from the hash list of parameters expected to be available to a module as a global variable.

See also:
module module_args

Definition in file cmdparams.h.


Generated on Mon Mar 26 07:00:51 2018 for JSOC_Documentation by  doxygen 1.5.7.1