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.
plot.h File Reference
#include "dfw_field_trial_service_library.h"
#include "study.h"
#include "jansson.h"
#include "linked_list.h"
Include dependency graph for plot.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Plot
 
struct  PlotNode
 

Functions

const PLOT_PREFIX char *PL_ID_S PLOT_VAL ("id")
 
const PLOT_PREFIX char *PL_PARENT_STUDY_S PLOT_VAL ("parent_study_id")
 
const PLOT_PREFIX char *PL_SOWING_DATE_S PLOT_VAL ("sowing_date")
 
const PLOT_PREFIX char *PL_HARVEST_DATE_S PLOT_VAL ("harvest_date")
 
const PLOT_PREFIX char *PL_WIDTH_S PLOT_VAL ("width")
 
const PLOT_PREFIX char *PL_LENGTH_S PLOT_VAL ("length")
 
const PLOT_PREFIX char *PL_TREATMENT_S PLOT_VAL ("treatment")
 
const PLOT_PREFIX char *PL_ROW_INDEX_S PLOT_VAL ("row_index")
 
const PLOT_PREFIX char *PL_COLUMN_INDEX_S PLOT_VAL ("column_index")
 
const PLOT_PREFIX char *PL_ROWS_S PLOT_VAL ("rows")
 
const PLOT_PREFIX char *PL_RACK_INDICES_S PLOT_VAL ("rack_indices")
 
const PLOT_PREFIX char *PL_COMMENT_S PLOT_VAL ("comment")
 
const PLOT_PREFIX char *PL_IMAGE_S PLOT_CONCAT_VAL (CONTEXT_PREFIX_SCHEMA_ORG_S, "image")
 
const PLOT_PREFIX char *PL_THUMBNAIL_S PLOT_CONCAT_VAL (CONTEXT_PREFIX_SCHEMA_ORG_S, "thumbnail")
 
PLOT_PREFIX int32 PL_UNSET_ID PLOT_VAL (INT32_MAX)
 
const PLOT_PREFIX char *PL_SOWING_ORDER_S PLOT_VAL ("sowing_order")
 
const PLOT_PREFIX char *PL_WALKING_ORDER_S PLOT_VAL ("walking_order")
 
PlotAllocatePlot (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)
 
void FreePlot (Plot *plot_p)
 
PlotNodeAllocatePlotNode (Plot *plot_p)
 
void FreePlotNode (ListItem *node_p)
 
json_t * GetPlotAsJSON (Plot *plot_p, const ViewFormat format, JSONProcessor *processor_p, const FieldTrialServiceData *data_p)
 
PlotGetPlotFromJSON (const json_t *plot_json_p, Study *parent_study_p, const ViewFormat format, FieldTrialServiceData *data_p)
 
bool GetPlotRows (Plot *plot_p, json_t *rows_array_p, const Study *study_p, const ViewFormat format, FieldTrialServiceData *data_p)
 
bool SavePlot (Plot *plot_p, const FieldTrialServiceData *data_p)
 
bool AddRowToPlot (Plot *plot_p, struct Row *row_p)
 
struct RowGetRowFromPlotByStudyIndex (Plot *plot_p, const uint32 by_study_index)
 
struct RowGetRowFromPlotByRackIndex (Plot *plot_p, const uint32 rack_index)
 
PlotGetPlotByIdString (const char *plot_id_s, const ViewFormat format, const FieldTrialServiceData *data_p)
 
void * GetPlotCallback (const json_t *json_p, const ViewFormat format, const FieldTrialServiceData *data_p)
 

Function Documentation

◆ PLOT_VAL() [1/15]

const PLOT_PREFIX char* PL_ID_S PLOT_VAL ( "id"  )

◆ PLOT_VAL() [2/15]

const PLOT_PREFIX char* PL_PARENT_STUDY_S PLOT_VAL ( "parent_study_id"  )

◆ PLOT_VAL() [3/15]

const PLOT_PREFIX char* PL_SOWING_DATE_S PLOT_VAL ( "sowing_date"  )

◆ PLOT_VAL() [4/15]

const PLOT_PREFIX char* PL_HARVEST_DATE_S PLOT_VAL ( "harvest_date"  )

◆ PLOT_VAL() [5/15]

const PLOT_PREFIX char* PL_WIDTH_S PLOT_VAL ( "width"  )

◆ PLOT_VAL() [6/15]

const PLOT_PREFIX char* PL_LENGTH_S PLOT_VAL ( "length"  )

◆ PLOT_VAL() [7/15]

const PLOT_PREFIX char* PL_TREATMENT_S PLOT_VAL ( "treatment"  )

◆ PLOT_VAL() [8/15]

const PLOT_PREFIX char* PL_ROW_INDEX_S PLOT_VAL ( "row_index"  )

◆ PLOT_VAL() [9/15]

const PLOT_PREFIX char* PL_COLUMN_INDEX_S PLOT_VAL ( "column_index"  )

◆ PLOT_VAL() [10/15]

const PLOT_PREFIX char* PL_ROWS_S PLOT_VAL ( "rows"  )

◆ PLOT_VAL() [11/15]

const PLOT_PREFIX char* PL_RACK_INDICES_S PLOT_VAL ( "rack_indices"  )

◆ PLOT_VAL() [12/15]

const PLOT_PREFIX char* PL_COMMENT_S PLOT_VAL ( "comment"  )

◆ PLOT_CONCAT_VAL() [1/2]

const PLOT_PREFIX char* PL_IMAGE_S PLOT_CONCAT_VAL ( CONTEXT_PREFIX_SCHEMA_ORG_S  ,
"image"   
)

◆ PLOT_CONCAT_VAL() [2/2]

const PLOT_PREFIX char* PL_THUMBNAIL_S PLOT_CONCAT_VAL ( CONTEXT_PREFIX_SCHEMA_ORG_S  ,
"thumbnail"   
)

◆ PLOT_VAL() [13/15]

PLOT_PREFIX int32 PL_UNSET_ID PLOT_VAL ( INT32_MAX  )

◆ PLOT_VAL() [14/15]

const PLOT_PREFIX char* PL_SOWING_ORDER_S PLOT_VAL ( "sowing_order"  )

◆ PLOT_VAL() [15/15]

const PLOT_PREFIX char* PL_WALKING_ORDER_S PLOT_VAL ( "walking_order"  )

◆ AllocatePlot()

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 
)

◆ FreePlot()

void FreePlot ( Plot plot_p)

◆ AllocatePlotNode()

PlotNode* AllocatePlotNode ( Plot plot_p)

◆ FreePlotNode()

void FreePlotNode ( ListItem node_p)

◆ GetPlotAsJSON()

json_t* GetPlotAsJSON ( Plot plot_p,
const ViewFormat  format,
JSONProcessor processor_p,
const FieldTrialServiceData data_p 
)

◆ GetPlotFromJSON()

Plot* GetPlotFromJSON ( const json_t *  plot_json_p,
Study parent_study_p,
const ViewFormat  format,
FieldTrialServiceData data_p 
)

◆ GetPlotRows()

bool GetPlotRows ( Plot plot_p,
json_t *  rows_array_p,
const Study study_p,
const ViewFormat  format,
FieldTrialServiceData data_p 
)

◆ SavePlot()

bool SavePlot ( Plot plot_p,
const FieldTrialServiceData data_p 
)

◆ AddRowToPlot()

bool AddRowToPlot ( Plot plot_p,
struct Row row_p 
)

◆ GetRowFromPlotByStudyIndex()

struct Row * GetRowFromPlotByStudyIndex ( Plot plot_p,
const uint32  by_study_index 
)

◆ GetRowFromPlotByRackIndex()

struct Row* GetRowFromPlotByRackIndex ( Plot plot_p,
const uint32  rack_index 
)

◆ GetPlotByIdString()

Plot* GetPlotByIdString ( const char *  plot_id_s,
const ViewFormat  format,
const FieldTrialServiceData data_p 
)

◆ GetPlotCallback()

void* GetPlotCallback ( const json_t *  json_p,
const ViewFormat  format,
const FieldTrialServiceData data_p 
)