|
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 "dfw_field_trial_service_data.h"#include "dfw_field_trial_service_library.h"#include "measured_variable.h"Go to the source code of this file.
Data Structures | |
| struct | Observation |
| A datatype for storing a phneotypic observation within an experiment. More... | |
| struct | ObservationNode |
Enumerations | |
| enum | ObservationType { OT_NUMERIC, OT_STRING, OT_INTEGER, OT_TIME, OT_NUM_TYPES } |
| enum | ObservationNature { ON_UNSET = -1, ON_ROW, ON_EXPERIMENTAL_AREA, ON_NUM_PHENOTYPE_NATURES } |
| enum | ObservationValueType { OVT_RAW_VALUE, OVT_CORRECTED_VALUE } |
Functions | |
| const OBSERVATION_PREFIX char *OB_PHENOTYPE_S | OBSERVATION_VAL ("phenotype") |
| const OBSERVATION_PREFIX char *OB_PHENOTYPE_ID_S | OBSERVATION_VAL ("phenotype_id") |
| const OBSERVATION_PREFIX char *OB_START_DATE_S | OBSERVATION_VAL ("date") |
| const OBSERVATION_PREFIX char *OB_END_DATE_S | OBSERVATION_VAL ("end_date") |
| const OBSERVATION_PREFIX char *OB_RAW_VALUE_S | OBSERVATION_VAL ("raw_value") |
| const OBSERVATION_PREFIX char *OB_INSTRUMENT_ID_S | OBSERVATION_VAL ("instrument_id") |
| const OBSERVATION_PREFIX char *OB_INSTRUMENT_S | OBSERVATION_VAL ("instrument") |
| const OBSERVATION_PREFIX char *OB_GROWTH_STAGE_S | OBSERVATION_VAL ("growth_stage") |
| const OBSERVATION_PREFIX char *OB_CORRECTED_VALUE_S | OBSERVATION_VAL ("corrected_value") |
| const OBSERVATION_PREFIX char *OB_METHOD_S | OBSERVATION_VAL ("method") |
| const OBSERVATION_PREFIX char *OB_NATURE_S | OBSERVATION_VAL ("nature") |
| const OBSERVATION_PREFIX char *OB_INDEX_S | OBSERVATION_VAL ("index") |
| const OBSERVATION_PREFIX char *OB_TYPE_S | OBSERVATION_VAL ("value_type") |
| const OBSERVATION_PREFIX char *OB_NOTES_S | OBSERVATION_VAL ("notes") |
| const OBSERVATION_PREFIX uint32 OB_DEFAULT_INDEX | OBSERVATION_VAL (1) |
| Observation * | AllocateObservation (bson_oid_t *id_p, const struct tm *start_date_p, const struct tm *end_date_p, MeasuredVariable *phenotype_p, MEM_FLAG phenotype_mem, const json_t *raw_value_p, const json_t *corrected_value_p, const char *growth_stage_s, const char *method_s, Instrument *instrument_p, const ObservationNature nature, const uint32 *index_p, const char *notes_s, const ObservationType obs_type) |
| Observation * | AllocateObservationWithErrorHandler (bson_oid_t *id_p, const struct tm *start_date_p, const struct tm *end_date_p, MeasuredVariable *phenotype_p, MEM_FLAG phenotype_mem, const json_t *raw_value_p, const json_t *corrected_value_p, const char *growth_stage_s, const char *method_s, Instrument *instrument_p, const ObservationNature nature, const uint32 *index_p, const char *notes_s, const ObservationType obs_type, void(*on_error_callback_fn)(ServiceJob *job_p, const char *const observation_field_s, const void *value_p, void *user_data_p), ServiceJob *job_p, void *user_data_p) |
| bool | InitObservation (Observation *observation_p, bson_oid_t *id_p, const struct tm *start_date_p, const struct tm *end_date_p, MeasuredVariable *phenotype_p, MEM_FLAG phenotype_mem, const char *growth_stage_s, const char *method_s, Instrument *instrument_p, const ObservationNature nature, const uint32 *index_p, const char *notes_s, const ObservationType obs_type, void(*clear_fn)(Observation *observation_p), bool(*add_values_to_json_fn)(const struct Observation *obs_p, const char *raw_key_s, const char *corrected_key_s, json_t *json_p, const char *null_sequence_s, bool only_if_exists_flag), bool(*set_value_from_json_fn)(struct Observation *observation_p, ObservationValueType ovt, const json_t *value_p), bool(*set_value_from_string_fn)(struct Observation *observation_p, ObservationValueType ovt, const char *value_s), bool(*get_value_as_string_fn)(struct Observation *observation_p, ObservationValueType ovt, char **value_ss, bool *free_value_flag_p)) |
| void | FreeObservation (Observation *observation_p) |
| Free an Observation. More... | |
| void | ClearObservation (Observation *observation_p) |
| Clear the data stored within an Observation. More... | |
| ObservationNode * | AllocateObservationNode (Observation *observation_p) |
| Allocate an ObservationNode for a given Observation. More... | |
| void | FreeObservationNode (ListItem *node_p) |
| Free an ObservationNode. More... | |
| json_t * | GetObservationAsJSON (const Observation *observation_p, const ViewFormat format) |
| Observation * | GetObservationFromJSON (const json_t *phenotype_json_p, FieldTrialServiceData *data_p) |
| bool | SaveObservation (Observation *observation_p, const FieldTrialServiceData *data_p) |
| bool | AreObservationsMatching (const Observation *observation_0_p, const Observation *observation_1_p) |
| Test whether two Observations are the same in terms of phenotypes, dates and observation indexes. More... | |
| bool | AreObservationsMatchingByParts (const Observation *observation_p, const MeasuredVariable *variable_p, const struct tm *start_date_p, const struct tm *end_date_p, const uint32 *index_p) |
| const char * | GetObservationTypeAsString (const ObservationType obs_type) |
| bool | DetermineObservationTypeFromString (const char *const obs_type_s, ObservationType *obs_type_p) |
| bool | SetObservationRawValueFromString (Observation *observation_p, const char *const value_s) |
| bool | SetObservationCorrectedValueFromString (Observation *observation_p, const char *const value_s) |
| bool | SetObservationRawValueFromJSON (Observation *observation_p, const json_t *value_p) |
| bool | SetObservationCorrectedValueFromJSON (Observation *observation_p, const json_t *value_p) |
| bool | AddObservationValuesToFrictionlessData (Observation *obs_p, json_t *fd_json_p) |
| ObservationType | GetObservationTypeForScaleClass (const ScaleClass *class_p) |
| enum ObservationType |
| enum ObservationNature |
| enum ObservationValueType |
| const OBSERVATION_PREFIX char* OB_PHENOTYPE_S OBSERVATION_VAL | ( | "phenotype" | ) |
| const OBSERVATION_PREFIX char* OB_PHENOTYPE_ID_S OBSERVATION_VAL | ( | "phenotype_id" | ) |
| const OBSERVATION_PREFIX char* OB_START_DATE_S OBSERVATION_VAL | ( | "date" | ) |
| const OBSERVATION_PREFIX char* OB_END_DATE_S OBSERVATION_VAL | ( | "end_date" | ) |
| const OBSERVATION_PREFIX char* OB_RAW_VALUE_S OBSERVATION_VAL | ( | "raw_value" | ) |
| const OBSERVATION_PREFIX char* OB_INSTRUMENT_ID_S OBSERVATION_VAL | ( | "instrument_id" | ) |
| const OBSERVATION_PREFIX char* OB_INSTRUMENT_S OBSERVATION_VAL | ( | "instrument" | ) |
| const OBSERVATION_PREFIX char* OB_GROWTH_STAGE_S OBSERVATION_VAL | ( | "growth_stage" | ) |
| const OBSERVATION_PREFIX char* OB_CORRECTED_VALUE_S OBSERVATION_VAL | ( | "corrected_value" | ) |
| const OBSERVATION_PREFIX char* OB_METHOD_S OBSERVATION_VAL | ( | "method" | ) |
| const OBSERVATION_PREFIX char* OB_NATURE_S OBSERVATION_VAL | ( | "nature" | ) |
| const OBSERVATION_PREFIX char* OB_INDEX_S OBSERVATION_VAL | ( | "index" | ) |
| const OBSERVATION_PREFIX char* OB_TYPE_S OBSERVATION_VAL | ( | "value_type" | ) |
| const OBSERVATION_PREFIX char* OB_NOTES_S OBSERVATION_VAL | ( | "notes" | ) |
| const OBSERVATION_PREFIX uint32 OB_DEFAULT_INDEX OBSERVATION_VAL | ( | 1 | ) |
| Observation* AllocateObservation | ( | bson_oid_t * | id_p, |
| const struct tm * | start_date_p, | ||
| const struct tm * | end_date_p, | ||
| MeasuredVariable * | phenotype_p, | ||
| MEM_FLAG | phenotype_mem, | ||
| const json_t * | raw_value_p, | ||
| const json_t * | corrected_value_p, | ||
| const char * | growth_stage_s, | ||
| const char * | method_s, | ||
| Instrument * | instrument_p, | ||
| const ObservationNature | nature, | ||
| const uint32 * | index_p, | ||
| const char * | notes_s, | ||
| const ObservationType | obs_type | ||
| ) |
| Observation* AllocateObservationWithErrorHandler | ( | bson_oid_t * | id_p, |
| const struct tm * | start_date_p, | ||
| const struct tm * | end_date_p, | ||
| MeasuredVariable * | phenotype_p, | ||
| MEM_FLAG | phenotype_mem, | ||
| const json_t * | raw_value_p, | ||
| const json_t * | corrected_value_p, | ||
| const char * | growth_stage_s, | ||
| const char * | method_s, | ||
| Instrument * | instrument_p, | ||
| const ObservationNature | nature, | ||
| const uint32 * | index_p, | ||
| const char * | notes_s, | ||
| const ObservationType | obs_type, | ||
| void(*)(ServiceJob *job_p, const char *const observation_field_s, const void *value_p, void *user_data_p) | on_error_callback_fn, | ||
| ServiceJob * | job_p, | ||
| void * | user_data_p | ||
| ) |
| bool InitObservation | ( | Observation * | observation_p, |
| bson_oid_t * | id_p, | ||
| const struct tm * | start_date_p, | ||
| const struct tm * | end_date_p, | ||
| MeasuredVariable * | phenotype_p, | ||
| MEM_FLAG | phenotype_mem, | ||
| const char * | growth_stage_s, | ||
| const char * | method_s, | ||
| Instrument * | instrument_p, | ||
| const ObservationNature | nature, | ||
| const uint32 * | index_p, | ||
| const char * | notes_s, | ||
| const ObservationType | obs_type, | ||
| void(*)(Observation *observation_p) | clear_fn, | ||
| bool(*)(const struct Observation *obs_p, const char *raw_key_s, const char *corrected_key_s, json_t *json_p, const char *null_sequence_s, bool only_if_exists_flag) | add_values_to_json_fn, | ||
| bool(*)(struct Observation *observation_p, ObservationValueType ovt, const json_t *value_p) | set_value_from_json_fn, | ||
| bool(*)(struct Observation *observation_p, ObservationValueType ovt, const char *value_s) | set_value_from_string_fn, | ||
| bool(*)(struct Observation *observation_p, ObservationValueType ovt, char **value_ss, bool *free_value_flag_p) | get_value_as_string_fn | ||
| ) |
| json_t* GetObservationAsJSON | ( | const Observation * | observation_p, |
| const ViewFormat | format | ||
| ) |
| Observation* GetObservationFromJSON | ( | const json_t * | phenotype_json_p, |
| FieldTrialServiceData * | data_p | ||
| ) |
| bool SaveObservation | ( | Observation * | observation_p, |
| const FieldTrialServiceData * | data_p | ||
| ) |
| bool AreObservationsMatchingByParts | ( | const Observation * | observation_p, |
| const MeasuredVariable * | variable_p, | ||
| const struct tm * | start_date_p, | ||
| const struct tm * | end_date_p, | ||
| const uint32 * | index_p | ||
| ) |
| const char* GetObservationTypeAsString | ( | const ObservationType | obs_type | ) |
| bool DetermineObservationTypeFromString | ( | const char *const | obs_type_s, |
| ObservationType * | obs_type_p | ||
| ) |
| bool SetObservationRawValueFromString | ( | Observation * | observation_p, |
| const char *const | value_s | ||
| ) |
| bool SetObservationCorrectedValueFromString | ( | Observation * | observation_p, |
| const char *const | value_s | ||
| ) |
| bool SetObservationRawValueFromJSON | ( | Observation * | observation_p, |
| const json_t * | value_p | ||
| ) |
| bool SetObservationCorrectedValueFromJSON | ( | Observation * | observation_p, |
| const json_t * | value_p | ||
| ) |
| bool AddObservationValuesToFrictionlessData | ( | Observation * | obs_p, |
| json_t * | fd_json_p | ||
| ) |
| ObservationType GetObservationTypeForScaleClass | ( | const ScaleClass * | class_p | ) |