Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
#include "uuid_defs.h"
#include "linked_list.h"
#include "grassroots_service_library.h"
#include "data_resource.h"
#include "hash_table.h"
#include "schema_version.h"
#include "parameter_type.h"
#include "remote_parameter_details.h"
#include "jansson.h"
Go to the source code of this file.
Data Structures | |
struct | NamedParameterType |
This is a datatype that stores a read-only c-style string along with a ParameterType. More... | |
struct | Parameter |
The datatype that stores all of the information about a Parameter. More... | |
struct | ParameterNode |
A datatype for storing Parameters in a LinkedList. More... | |
Macros | |
#define | SET_NAMED_PARAMETER_TYPE_TAGS(a, b) ({ .npt_name_s = a, .npt_type = b}) |
A macro to provide a quick way to set the name and ParameterType for NamedParameterType objects. More... | |
Enumerations | |
enum | ParameterLevel { PL_SIMPLE, PL_ADVANCED, PL_ALL } |
The ParameterLevel defines the level that a user should be to adjust the Parameter. More... | |
Functions | |
const PARAMETER_PREFIX char *const PA_TABLE_COLUMN_HEADERS_PLACEMENT_S | PARAMETER_VAL ("Column Headers Placement") |
const PARAMETER_PREFIX char *const PA_TABLE_COLUMN_HEADINGS_S | PARAMETER_VAL ("Column Headings") |
const PARAMETER_PREFIX char *const PA_TABLE_ROW_HEADINGS_S | PARAMETER_VAL ("Row Headings") |
const PARAMETER_PREFIX char *const PA_TABLE_COLUMN_DELIMITER_S | PARAMETER_VAL ("Column Delimiter") |
const PARAMETER_PREFIX char *const PA_TABLE_ADD_COLUMNS_FLAG_S | PARAMETER_VAL ("Add User-Definable Columns") |
const PARAMETER_PREFIX char *const PA_TABLE_ROW_DELIMITER_S | PARAMETER_VAL ("Row Delimiter") |
const PARAMETER_PREFIX char *const PA_TABLE_DEFAULT_COLUMN_DELIMITER_S | PARAMETER_VAL (",") |
const PARAMETER_PREFIX char *const PA_TABLE_DEFAULT_ROW_DELIMITER_S | PARAMETER_VAL ("\n") |
const PARAMETER_PREFIX char *const PA_DOUBLE_PRECISION_S | PARAMETER_VAL ("precision") |
const PARAMETER_PREFIX char *const PA_TYPE_STRING_ARRAY_S | PARAMETER_VAL ("string_array") |
const PARAMETER_PREFIX char *const PA_TYPE_TIME_ARRAY_S | PARAMETER_VAL ("time_array") |
const PARAMETER_PREFIX char *const PA_TYPE_STRING_S | PARAMETER_VAL ("string") |
const PARAMETER_PREFIX char *const PA_TYPE_BOOLEAN_S | PARAMETER_VAL ("boolean") |
const PARAMETER_PREFIX char *const PA_TYPE_INTEGER_S | PARAMETER_VAL ("integer") |
const PARAMETER_PREFIX char *const PA_TYPE_NUMBER_S | PARAMETER_VAL ("number") |
const PARAMETER_PREFIX char *const PA_TYPE_CHARACTER_S | PARAMETER_VAL ("character") |
const PARAMETER_PREFIX char *const PA_TABLE_COLUMN_HEADERS_PLACEMENT_FIRST_ROW_S | PARAMETER_VAL ("Column Headers Placement On First Row") |
bool | InitParameterFromJSON (Parameter *param_p, const json_t *const root_p, const struct Service *service_p, const bool concise_flag, const ParameterType *pt_p) |
bool | AddParameterValuesToJSON (const Parameter *param_p, json_t *param_json_p, const bool full_definition_flag) |
bool | CompareParameterLevels (const ParameterLevel param_level, const ParameterLevel threshold) |
Test whether a given ParameterLevel matches or exceeds another. More... | |
bool | AddParameterKeyJSONValuePair (Parameter *const parameter_p, const char *key_s, const json_t *value_p) |
bool | AddColumnParameterHint (const char *name_s, const char *description_s, const ParameterType param_type, const bool required_flag, json_t *array_p) |
const char * | GetGrassrootsTypeAsString (const ParameterType param_type) |
Get the human-readable name for a given ParameterType. More... | |
bool | GetGrassrootsTypeFromString (const char *param_type_s, ParameterType *param_type_p) |
Get the ParameterType from its human-readable name. More... | |
bool | AddParameterLevelToJSON (const ParameterLevel level, json_t *root_p, const SchemaVersion *const sv_p) |
void | SetParameterCallbacks (Parameter *param_p, void(*clear_fn)(Parameter *param_p), bool(*add_values_to_json_fn)(const Parameter *param_p, json_t *param_json_p, const bool full_definition_flag), Parameter *(*clone_fn)(const Parameter *param_p, const struct ServiceData *data_p), bool(*set_value_from_string_fn)(Parameter *param_p, const char *value_s)) |
const json_t * | GetParameterFromConfig (const json_t *service_config_p, const char *const param_name_s) |
bool | SetParameterCurrentValueFromJSON (Parameter *param_p, const json_t *value_p) |
const char * | GetNamedParameterDefaultValueFromJSON (const char *id_param_s, const json_t *params_json_p) |
LinkedList * | GetParameterStringMultiOptions (Parameter *param_p) |
const PARAMETER_PREFIX char* const PA_TABLE_COLUMN_HEADERS_PLACEMENT_S PARAMETER_VAL | ( | "Column Headers Placement" | ) |
const PARAMETER_PREFIX char* const PA_TABLE_COLUMN_HEADINGS_S PARAMETER_VAL | ( | "Column Headings" | ) |
const PARAMETER_PREFIX char* const PA_TABLE_ROW_HEADINGS_S PARAMETER_VAL | ( | "Row Headings" | ) |
const PARAMETER_PREFIX char* const PA_TABLE_COLUMN_DELIMITER_S PARAMETER_VAL | ( | "Column Delimiter" | ) |
const PARAMETER_PREFIX char* const PA_TABLE_ADD_COLUMNS_FLAG_S PARAMETER_VAL | ( | "Add User-Definable Columns" | ) |
const PARAMETER_PREFIX char* const PA_TABLE_ROW_DELIMITER_S PARAMETER_VAL | ( | "Row Delimiter" | ) |
const PARAMETER_PREFIX char* const PA_TABLE_DEFAULT_COLUMN_DELIMITER_S PARAMETER_VAL | ( | " | , |
" | |||
) |
const PARAMETER_PREFIX char* const PA_TABLE_DEFAULT_ROW_DELIMITER_S PARAMETER_VAL | ( | "\n" | ) |
const PARAMETER_PREFIX char* const PA_DOUBLE_PRECISION_S PARAMETER_VAL | ( | "precision" | ) |
const PARAMETER_PREFIX char* const PA_TYPE_STRING_ARRAY_S PARAMETER_VAL | ( | "string_array" | ) |
const PARAMETER_PREFIX char* const PA_TYPE_TIME_ARRAY_S PARAMETER_VAL | ( | "time_array" | ) |
const PARAMETER_PREFIX char* const PA_TYPE_STRING_S PARAMETER_VAL | ( | "string" | ) |
const PARAMETER_PREFIX char* const PA_TYPE_BOOLEAN_S PARAMETER_VAL | ( | "boolean" | ) |
const PARAMETER_PREFIX char* const PA_TYPE_INTEGER_S PARAMETER_VAL | ( | "integer" | ) |
const PARAMETER_PREFIX char* const PA_TYPE_NUMBER_S PARAMETER_VAL | ( | "number" | ) |
const PARAMETER_PREFIX char* const PA_TYPE_CHARACTER_S PARAMETER_VAL | ( | "character" | ) |
const PARAMETER_PREFIX char* const PA_TABLE_COLUMN_HEADERS_PLACEMENT_FIRST_ROW_S PARAMETER_VAL | ( | "Column Headers Placement On First Row" | ) |
bool InitParameterFromJSON | ( | Parameter * | param_p, |
const json_t *const | root_p, | ||
const struct Service * | service_p, | ||
const bool | concise_flag, | ||
const ParameterType * | pt_p | ||
) |
bool AddParameterValuesToJSON | ( | const Parameter * | param_p, |
json_t * | param_json_p, | ||
const bool | full_definition_flag | ||
) |
bool CompareParameterLevels | ( | const ParameterLevel | param_level, |
const ParameterLevel | threshold | ||
) |
Test whether a given ParameterLevel matches or exceeds another.
param_level | The level to check. |
threshold | The level to check against. |
true
if the param_level matched or exceeded the threshold, false
otherwise. bool AddParameterKeyJSONValuePair | ( | Parameter *const | parameter_p, |
const char * | key_s, | ||
const json_t * | value_p | ||
) |
bool AddColumnParameterHint | ( | const char * | name_s, |
const char * | description_s, | ||
const ParameterType | param_type, | ||
const bool | required_flag, | ||
json_t * | array_p | ||
) |
const char* GetGrassrootsTypeAsString | ( | const ParameterType | param_type | ) |
Get the human-readable name for a given ParameterType.
param_type | The ParameterType to get the name for. |
NULL
upon error. bool GetGrassrootsTypeFromString | ( | const char * | param_type_s, |
ParameterType * | param_type_p | ||
) |
Get the ParameterType from its human-readable name.
param_type_s | The human-readable name of a ParameterType. |
param_type_p | Pointer to where the ParameterType will be set. |
true
if the ParameterType was set successfully, false
otherwise. bool AddParameterLevelToJSON | ( | const ParameterLevel | level, |
json_t * | root_p, | ||
const SchemaVersion *const | sv_p | ||
) |
void SetParameterCallbacks | ( | Parameter * | param_p, |
void(*)(Parameter *param_p) | clear_fn, | ||
bool(*)(const Parameter *param_p, json_t *param_json_p, const bool full_definition_flag) | add_values_to_json_fn, | ||
Parameter *(*)(const Parameter *param_p, const struct ServiceData *data_p) | clone_fn, | ||
bool(*)(Parameter *param_p, const char *value_s) | set_value_from_string_fn | ||
) |
const json_t* GetParameterFromConfig | ( | const json_t * | service_config_p, |
const char *const | param_name_s | ||
) |
bool SetParameterCurrentValueFromJSON | ( | Parameter * | param_p, |
const json_t * | value_p | ||
) |
const char* GetNamedParameterDefaultValueFromJSON | ( | const char * | id_param_s, |
const json_t * | params_json_p | ||
) |
LinkedList* GetParameterStringMultiOptions | ( | Parameter * | param_p | ) |