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_LOCATION_H_
24 #define SERVICES_FIELD_TRIALS_INCLUDE_LOCATION_H_
71 #ifndef DOXYGEN_SHOULD_SKIP_THIS
73 #ifdef ALLOCATE_LOCATION_TAGS
74 #define LOCATION_PREFIX DFW_FIELD_TRIAL_SERVICE_LOCAL
75 #define LOCATION_VAL(x) = x
76 #define LOCATION_CONCAT_VAL(x,y) = x y
78 #define LOCATION_PREFIX extern
79 #define LOCATION_VAL(x)
80 #define LOCATION_CONCAT_VAL(x,y)
92 LOCATION_PREFIX
const char *LO_ADDRESS_S
LOCATION_VAL (
"address");
94 LOCATION_PREFIX
const char *LO_ORDER_S
LOCATION_VAL (
"order");
96 LOCATION_PREFIX
const char *LO_NAME_S
LOCATION_VAL (
"name");
99 LOCATION_PREFIX
const char *LO_SOIL_S
LOCATION_VAL (
"soil");
102 LOCATION_PREFIX
const char *LO_MIN_PH_S
LOCATION_VAL (
"min_ph");
104 LOCATION_PREFIX
const char *LO_MAX_PH_S
LOCATION_VAL (
"max_ph");
106 LOCATION_PREFIX
const char *LO_TYPE_S
LOCATION_VAL (
"type");
108 LOCATION_PREFIX
const char *LT_FARM_S
LOCATION_VAL (
"farm");
110 LOCATION_PREFIX
const char *LT_SITE_S
LOCATION_VAL (
"site");
112 LOCATION_PREFIX
const char *LT_UNKNOWN_S
LOCATION_VAL (
"unknown");
Location * GetLocationById(bson_oid_t *id_p, const ViewFormat format, const FieldTrialServiceData *data_p)
Location * GetLocationFromJSON(const json_t *location_json_p, const FieldTrialServiceData *data_p)
A datatype to represent a running task.
Definition: service_job.h:72
void FreeLocationNode(ListItem *node_p)
bool GetLocationTypeFromString(const char *loc_type_s, LocationType *loc_type_p)
uint32 lo_order
Definition: location.h:49
bson_oid_t * lo_id_p
Definition: location.h:47
OperationStatus SaveLocation(Location *location_p, ServiceJob *job_p, FieldTrialServiceData *data_p)
char * lo_soil_s
Definition: location.h:51
Definition: location.h:63
LocationType
Definition: location.h:33
#define DFW_FIELD_TRIAL_SERVICE_LOCAL
Definition: dfw_field_trial_service_library.h:43
json_t * GetLocationAsJSON(Location *location_p)
Definition: location.h:38
double64 * lo_min_ph_p
Definition: location.h:53
LinkedList * GetLocationsByName(FieldTrialServiceData *data_p, const char *location_s)
LocationType lo_type
Definition: location.h:57
A datatype for storing a postal address as well as its geographic coordinates if possible.
Definition: address.h:21
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
ListItem ln_node
Definition: location.h:65
Address * lo_address_p
Definition: location.h:59
Definition: location.h:36
const LOCATION_PREFIX char *LO_ADDRESS_S LOCATION_VAL("address")
OperationStatus
The current status of an Operation.
Definition: operation.h:96
Definition: location.h:37
Location * GetUniqueLocationBySearchString(const char *location_s, const ViewFormat format, const FieldTrialServiceData *data_p)
Definition: location.h:35
void FreeLocation(Location *location_p)
Location * AllocateLocation(Address *address_p, const uint32 order, const char *soil_s, const double64 *min_ph_p, const double64 *max_ph_p, const LocationType loc_type, bson_oid_t *id_p)
The configuration data used by the DFW Field Trial Service.
Definition: dfw_field_trial_service_data.h:118
Location * ln_location_p
Definition: location.h:67
char * GetLocationAsString(const Location *location_p)
const char * GetLocationTypeAsString(const LocationType loc_type)
Definition: location.h:45
Location * GetLocationByIdString(const char *location_id_s, const ViewFormat format, const FieldTrialServiceData *data_p)
LocationNode * AllocateLocationNode(Location *location_p)
double64 * lo_max_ph_p
Definition: location.h:55
A doubly-linked node that points to its predecessor and successor.
Definition: linked_list.h:43