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.
|
Go to the documentation of this file.
30 #ifndef SERVICES_FIELD_TRIALS_INCLUDE_FIELD_TRIAL_H_
31 #define SERVICES_FIELD_TRIALS_INCLUDE_FIELD_TRIAL_H_
114 #ifndef DOXYGEN_SHOULD_SKIP_THIS
116 #ifdef ALLOCATE_FIELD_TRIAL_TAGS
117 #define FIELD_TRIAL_PREFIX DFW_FIELD_TRIAL_SERVICE_LOCAL
118 #define FIELD_TRIAL_VAL(x) = x
119 #define FIELD_TRIAL_CONCAT_VAL(x,y) = x y
121 #define FIELD_TRIAL_PREFIX extern
122 #define FIELD_TRIAL_VAL(x)
123 #define FIELD_TRIAL_CONCAT_VAL(x,y)
136 FIELD_TRIAL_PREFIX
const char *
FT_TEAM_S FIELD_TRIAL_VAL (
"team");
138 FIELD_TRIAL_PREFIX
const char *
FT_ID_S FIELD_TRIAL_VAL (
"_id");
140 FIELD_TRIAL_PREFIX
const char *
FT_STUDIES_S FIELD_TRIAL_VAL (
"studies");
142 FIELD_TRIAL_PREFIX
const char *
FT_PEOPLE_S FIELD_TRIAL_VAL (
"people");
bool SaveFieldTrial(FieldTrial *trial_p, ServiceJob *job_p, FieldTrialServiceData *data_p)
void FreeFieldTrial(FieldTrial *trial_p)
Free a given FieldTrial.
MEM_FLAG
An enum specifying the particular status of a piece of dynamically allocated memory for a particular ...
Definition: memory_allocations.h:38
FieldTrial * GetFieldTrialByIdString(const char *field_trial_id_s, const ViewFormat format, const FieldTrialServiceData *data_p)
LinkedList * ft_studies_p
A LinkedList of StudyNodes for all of the Studies in this FieldTrial.
Definition: field_trial.h:82
A datatype to represent a running task.
Definition: service_job.h:72
uint32 GetNumberOfFieldTrialStudies(const FieldTrial *trial_p)
Get the number of Studies in a given FieldTrial.
bool RemoveFieldTrialStudy(FieldTrial *trial_p, struct Study *study_p)
Remove a Study from a given FieldTrial.
const FIELD_TRIAL_PREFIX char *FT_NAME_S FIELD_TRIAL_CONCAT_VAL(CONTEXT_PREFIX_SCHEMA_ORG_S, "name")
#define DFW_FIELD_TRIAL_SERVICE_LOCAL
Definition: dfw_field_trial_service_library.h:43
#define CONTEXT_PREFIX_SCHEMA_ORG_S
Definition: schema_keys.h:103
struct Programme * ft_parent_p
The Programme that this Field Trial is a part of.
Definition: field_trial.h:62
A datatype that represents a Field Trial that can contain one or more Studies.
Definition: field_trial.h:50
FieldTrial * GetFieldTrialById(const bson_oid_t *id_p, const ViewFormat format, const FieldTrialServiceData *data_p)
FieldTrial * AllocateFieldTrial(const char *name_s, const char *team_s, struct Programme *parent_program_p, MEM_FLAG parent_program_mem, bson_oid_t *id_p, const char *time_s)
const FIELD_TRIAL_PREFIX char * FT_STUDIES_S
Definition: field_trial.h:140
FieldTrialNode * AllocateFieldTrialNode(FieldTrial *trial_p)
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
Definition: programme.h:46
bool AddStudiesToFieldTrialJSON(FieldTrial *trial_p, json_t *trial_json_p, const ViewFormat format, FieldTrialServiceData *data_p)
FieldTrial * ftn_field_trial_p
The FieldTrial.
Definition: field_trial.h:109
char * GetFieldTrialIdAsString(const FieldTrial *trial_p)
FieldTrial * GetFieldTrialFromJSON(const json_t *json_p, const ViewFormat format, const FieldTrialServiceData *data_p)
FieldTrial * GetUniqueFieldTrialBySearchString(const char *trial_s, const ViewFormat format, const FieldTrialServiceData *data_p)
bool AddFieldTrialPerson(FieldTrial *trial_p, Person *person_p, MEM_FLAG mf)
char * ft_team_s
The team or organisation running this FieldTrial.
Definition: field_trial.h:75
LinkedList * ft_people_p
A LinkedList of PersonNodes for each of the PI and Co-I people on this trial.
Definition: field_trial.h:89
MEM_FLAG ft_parent_program_mem
Definition: field_trial.h:64
void FreeFieldTrialNode(ListItem *node_p)
char * GetFieldTrialAsString(const FieldTrial *trial_p)
const FIELD_TRIAL_PREFIX char * FT_ID_S
Definition: field_trial.h:138
bson_oid_t * ft_id_p
Definition: field_trial.h:52
LinkedList * GetFieldTrialsByName(const char *const trial_s, const FieldTrialServiceData *data_p)
const FIELD_TRIAL_PREFIX char * FT_TEAM_S
Definition: field_trial.h:136
bool GetAllFieldTrialStudies(FieldTrial *trial_p, const ViewFormat format, const FieldTrialServiceData *data_p)
The configuration data used by the DFW Field Trial Service.
Definition: dfw_field_trial_service_data.h:118
bool AddFieldTrialStudy(FieldTrial *trial_p, struct Study *study_p, MEM_FLAG mf)
char * ft_timestamp_s
The time when this Field Trial was saved.
Definition: field_trial.h:57
FieldTrial * GetVersionedFieldTrial(const char *field_trial_id_s, const char *timestamp_s, const ViewFormat format, const FieldTrialServiceData *data_p)
const FIELD_TRIAL_PREFIX char * FT_PARENT_PROGRAM_S
Definition: field_trial.h:144
char * ft_name_s
Name of the field trial.
Definition: field_trial.h:70
const FIELD_TRIAL_PREFIX char * FT_PEOPLE_S
Definition: field_trial.h:142
json_t * GetFieldTrialAsJSON(FieldTrial *trial_p, const ViewFormat format, FieldTrialServiceData *data_p)
A datatype for storing a Field Trial on a list.
Definition: field_trial.h:99
ListItem ftn_node
The base node.
Definition: field_trial.h:104
bool AddPeopleToFieldTrialJSON(FieldTrial *trial_p, json_t *trial_json_p, const ViewFormat format, FieldTrialServiceData *data_p)
LinkedList * GetFieldTrialStudies(FieldTrial *trial_p)
A doubly-linked node that points to its predecessor and successor.
Definition: linked_list.h:43