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.
23 #ifndef SERVICES_FIELD_TRIALS_INCLUDE_PLOT_H_
24 #define SERVICES_FIELD_TRIALS_INCLUDE_PLOT_H_
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
36 #ifdef ALLOCATE_PLOT_TAGS
37 #define PLOT_PREFIX DFW_FIELD_TRIAL_SERVICE_API
38 #define PLOT_VAL(x) = x
39 #define PLOT_CONCAT_VAL(x,y) = x y
41 #define PLOT_PREFIX extern
43 #define PLOT_CONCAT_VAL(x,y)
49 PLOT_PREFIX
const char *PL_ID_S
PLOT_VAL (
"id");
51 PLOT_PREFIX
const char *PL_PARENT_STUDY_S
PLOT_VAL (
"parent_study_id");
53 PLOT_PREFIX
const char *PL_SOWING_DATE_S
PLOT_VAL (
"sowing_date");
55 PLOT_PREFIX
const char *PL_HARVEST_DATE_S
PLOT_VAL (
"harvest_date");
57 PLOT_PREFIX
const char *PL_WIDTH_S
PLOT_VAL (
"width");
59 PLOT_PREFIX
const char *PL_LENGTH_S
PLOT_VAL (
"length");
61 PLOT_PREFIX
const char *PL_TREATMENT_S
PLOT_VAL (
"treatment");
63 PLOT_PREFIX
const char *PL_ROW_INDEX_S
PLOT_VAL (
"row_index");
65 PLOT_PREFIX
const char *PL_COLUMN_INDEX_S
PLOT_VAL (
"column_index");
67 PLOT_PREFIX
const char *PL_ROWS_S
PLOT_VAL (
"rows");
69 PLOT_PREFIX
const char *PL_RACK_INDICES_S
PLOT_VAL (
"rack_indices");
71 PLOT_PREFIX
const char *PL_COMMENT_S
PLOT_VAL (
"comment");
77 PLOT_PREFIX int32 PL_UNSET_ID
PLOT_VAL (INT32_MAX);
79 PLOT_PREFIX
const char *PL_SOWING_ORDER_S
PLOT_VAL (
"sowing_order");
81 PLOT_PREFIX
const char *PL_WALKING_ORDER_S
PLOT_VAL (
"walking_order");
166 const uint32 column_index,
const char *treatments_s,
const char *comment_s,
const char *image_s,
const char *thumbnail_s,
167 const uint32 *walking_order_p,
const uint32 *sowing_order_p,
Study *parent_p);
Plot * GetPlotFromJSON(const json_t *plot_json_p, Study *parent_study_p, const ViewFormat format, FieldTrialServiceData *data_p)
uint32 * pl_sowing_order_index_p
Definition: plot.h:102
uint32 pl_row_index
Definition: plot.h:94
struct Row * GetRowFromPlotByRackIndex(Plot *plot_p, const uint32 rack_index)
struct tm * pl_harvest_date_p
Definition: plot.h:121
bool GetPlotRows(Plot *plot_p, json_t *rows_array_p, const Study *study_p, const ViewFormat format, FieldTrialServiceData *data_p)
const PLOT_PREFIX char *PL_IMAGE_S PLOT_CONCAT_VAL(CONTEXT_PREFIX_SCHEMA_ORG_S, "image")
void * GetPlotCallback(const json_t *json_p, const ViewFormat format, const FieldTrialServiceData *data_p)
Plot * GetPlotByIdString(const char *plot_id_s, const ViewFormat format, const FieldTrialServiceData *data_p)
Definition: json_processor.h:21
struct tm * pl_sowing_date_p
Definition: plot.h:98
char * pl_comment_s
Definition: plot.h:118
void FreePlotNode(ListItem *node_p)
double64 * pl_length_p
Definition: plot.h:112
ListItem pn_node
Definition: plot.h:148
#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
Plot * pn_plot_p
Definition: plot.h:150
char * pl_treatments_s
Definition: plot.h:114
char * pl_soil_type_s
Definition: plot.h:116
const PLOT_PREFIX char *PL_ID_S PLOT_VAL("id")
char * pl_image_url_s
A url for any images,.
Definition: plot.h:134
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
char * pl_thumbnail_url_s
A url for any images thumbnail,.
Definition: plot.h:140
struct Row * GetRowFromPlotByStudyIndex(Plot *plot_p, const uint32 by_study_index)
double pl_sowing_rate
Definition: plot.h:100
Plot * AllocatePlot(bson_oid_t *id_p, const struct tm *sowing_date_p, const struct tm *harvest_date_p, const double64 *width_p, const double64 *length_p, const uint32 row_index, const uint32 column_index, const char *treatments_s, const char *comment_s, const char *image_s, const char *thumbnail_s, const uint32 *walking_order_p, const uint32 *sowing_order_p, Study *parent_p)
uint32 pl_column_index
Definition: plot.h:96
bool AddRowToPlot(Plot *plot_p, struct Row *row_p)
void FreePlot(Plot *plot_p)
json_t * GetPlotAsJSON(Plot *plot_p, const ViewFormat format, JSONProcessor *processor_p, const FieldTrialServiceData *data_p)
Study * pl_parent_p
Definition: plot.h:88
double64 * pl_width_p
Definition: plot.h:110
bson_oid_t * pl_id_p
Definition: plot.h:86
The configuration data used by the DFW Field Trial Service.
Definition: dfw_field_trial_service_data.h:118
PlotNode * AllocatePlotNode(Plot *plot_p)
LinkedList * pl_rows_p
A LinkedList of RowNodes for all of the Rows in this Plot.
Definition: plot.h:129
uint32 * pl_walking_order_index_p
Definition: plot.h:104
bool SavePlot(Plot *plot_p, const FieldTrialServiceData *data_p)
A doubly-linked node that points to its predecessor and successor.
Definition: linked_list.h:43