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.
MappedParameter Struct Reference

This structure is used to store a relationship between a value from the output of running one service to use as an input parameter value for another service. More...

#include <mapped_parameter.h>

Public Member Functions

MappedParameterAllocateMappedParameter (const char *input_s, const char *output_s, bool required_flag, bool multi_flag)
 Allocate a MappedParameter for the given Parameter names. More...
 
void FreeMappedParameter (MappedParameter *mapped_param_p)
 Free a MappedParameter. More...
 
MappedParameterNodeAllocateMappedParameterNode (MappedParameter *mapped_param_p)
 Allocate a MappedParameterNode to store a MappedParameter on a LinkedList. More...
 
void FreeMappedParameterNode (ListItem *node_p)
 Free a MappedParameterNode and its associated MappedParameter. More...
 
bool SetMappedStringParameterValue (MappedParameter *mapped_param_p, ParameterSet *params_p, const char *param_name_s)
 Set a Parameter value within a given ParameterSet by a MappedParameter's defintion. More...
 

Data Fields

char * mp_input_param_s
 This is the selector to get the value from the first service's output. More...
 
char * mp_output_param_s
 This is name of the parameter in the second service. More...
 
bool mp_required_flag
 Is this MappedParameter required for the LinkedService to run? More...
 
bool mp_multiple_flag
 Can there be multiple input values? More...
 

Detailed Description

This structure is used to store a relationship between a value from the output of running one service to use as an input parameter value for another service.

Member Function Documentation

◆ AllocateMappedParameter()

MappedParameter * AllocateMappedParameter ( const char *  input_s,
const char *  output_s,
bool  required_flag,
bool  multi_flag 
)

Allocate a MappedParameter for the given Parameter names.

Parameters
input_sThe selector for the input Service's parameter. The new MappedParameter will make a deep copy of this value to store.
output_sThe name of the output Service's parameter. The new MappedParameter will make a deep copy of this value to store.
required_flagtrue if this MappedParameter required or false if it is optional to run the LinkedService.
multi_flagtrue if this MappedParameter can have multiple input values or false if it just has a single value.
Returns
The newly-allocated MappedParameter or NULL upon error.

◆ FreeMappedParameter()

void FreeMappedParameter ( MappedParameter mapped_param_p)

Free a MappedParameter.

Parameters
mapped_param_pThe MappedParameter to free.

◆ AllocateMappedParameterNode()

MappedParameterNode * AllocateMappedParameterNode ( MappedParameter mapped_param_p)

Allocate a MappedParameterNode to store a MappedParameter on a LinkedList.

Parameters
mapped_param_pThe MappedParameter to store.
Returns
The newly-allocated MappedParameterNode or NULL upon error.

◆ FreeMappedParameterNode()

void FreeMappedParameterNode ( ListItem node_p)

Free a MappedParameterNode and its associated MappedParameter.

Parameters
node_pThe MappedParameterNode to free.

◆ SetMappedStringParameterValue()

bool SetMappedStringParameterValue ( MappedParameter mapped_param_p,
ParameterSet params_p,
const char *  param_name_s 
)

Set a Parameter value within a given ParameterSet by a MappedParameter's defintion.

Parameters
mapped_param_pThe MappedParameter to set the value for.
params_pThe ParameterSet where the Parameter will be set.
param_name_sThe name of the Parameter within the ParamaterSet to set teh value for.
Returns
true if the Parameter was set successfully, false upon error.

Field Documentation

◆ mp_input_param_s

char* mp_input_param_s

This is the selector to get the value from the first service's output.

This uses a dot notation to signify parent-child relationship.

◆ mp_output_param_s

char* mp_output_param_s

This is name of the parameter in the second service.

This MappedParameter will set <mp_output_param_s> = <input parameter's value> in the LinkedService using this. If this is set to "$value", then it will treat the input parameter's value as a boolean variable e.g. set <input parameter's value> = true in the LinkedService

◆ mp_required_flag

bool mp_required_flag

Is this MappedParameter required for the LinkedService to run?

◆ mp_multiple_flag

bool mp_multiple_flag

Can there be multiple input values?


The documentation for this struct was generated from the following file: