8#if ADC_BOOST_JSON_PUBLIC
9#include "boost/json.hpp"
47#define ADC_HS_BASE 0x0
53#define ADC_HS_RAMSIZE 0x2
60#define ADC_HS_CPU 0x10
63#define ADC_HS_GPU 0x20
66#define ADC_HS_NUMA 0x40
69#define ADC_HS_ALL (ADC_HS_OS|ADC_HS_RAMSIZE|ADC_HS_ENV|ADC_HS_CPU|ADC_HS_GPU|ADC_HS_NUMA)
86#define ADC_MPI_NONE 0x0
89#define ADC_MPI_RANK 0x1
92#define ADC_MPI_SIZE 0x2
95#define ADC_MPI_NAME 0x4
100#define ADC_MPI_HOSTLIST 0x10
105#define ADC_MPI_RANK_HOST 0x20
108#define ADC_MPI_VER 0x100
113#define ADC_MPI_LIB_VER 0x200
117#define ADC_MPI_ALL (ADC_MPI_RANK|ADC_MPI_SIZE|ADC_MPI_NAME|ADC_MPI_HOSTLIST|ADC_MPI_RANK_HOST|ADC_MPI_VER|ADC_MPI_LIB_VER)
120#define ADC_MPI_LOCAL (ADC_MPI_RANK|ADC_MPI_SIZE|ADC_MPI_NAME|ADC_MPI_VER|ADC_MPI_LIB_VER)
166 virtual void add_code_section(std::string tag, std::shared_ptr< builder_api >
version, std::shared_ptr< builder_api > code_details) = 0;
176 virtual void add_exit_data_section(
int return_code, std::string status, std::shared_ptr< builder_api > status_details) = 0;
189 virtual std::shared_ptr< builder_api >
get_section(std::string_view name) = 0;
299 virtual void add_section(std::string_view name, std::shared_ptr< builder_api > section) = 0;
356 virtual void add(std::string_view name,
bool value) = 0;
359 virtual void add(std::string_view name,
char value) = 0;
362 virtual void add(std::string_view name,
char16_t value) = 0;
365 virtual void add(std::string_view name,
char32_t value) = 0;
368 virtual void add(std::string_view name,
char* value) = 0;
370 virtual void add(std::string_view name,
const char* value) = 0;
372 virtual void add(std::string_view name, std::string& value) = 0;
374 virtual void add(std::string_view name, std::string_view value) = 0;
377 virtual void add_path(std::string_view name,
char* value) = 0;
379 virtual void add_path(std::string_view name,
const char* value) = 0;
381 virtual void add_path(std::string_view name, std::string& value) = 0;
383 virtual void add_path(std::string_view name, std::string_view value) = 0;
397#if ADC_BOOST_JSON_PUBLIC
399 virtual void add(std::string_view name, boost::json::value value) = 0;
403 virtual void add(std::string_view name, uint8_t value) = 0;
405 virtual void add(std::string_view name, uint16_t value) = 0;
407 virtual void add(std::string_view name, uint32_t value) = 0;
409 virtual void add(std::string_view name, uint64_t value) = 0;
412 virtual void add(std::string_view name, int8_t value) = 0;
414 virtual void add(std::string_view name, int16_t value) = 0;
416 virtual void add(std::string_view name, int32_t value) = 0;
418 virtual void add(std::string_view name, int64_t value) = 0;
421 virtual void add(std::string_view name,
float value) = 0;
423 virtual void add(std::string_view name,
const std::complex<float>& value) = 0;
425 virtual void add(std::string_view name,
double value) = 0;
427 virtual void add(std::string_view name,
const std::complex<double>& value) = 0;
430 virtual void add(std::string_view name,
const struct timeval& tv) = 0;
432 virtual void add(std::string_view name,
const struct timespec& ts) = 0;
434 virtual void add_epoch(std::string_view name, int64_t epoch) = 0;
444 virtual void add_array(std::string_view name,
bool value[],
size_t len, std::string_view container =
"pointer") = 0;
447 virtual void add_array(std::string_view name,
const char *value,
size_t len, std::string_view container =
"pointer") = 0;
448 virtual void add_array(std::string_view name,
char16_t value[],
size_t len, std::string_view container =
"pointer") = 0;
449 virtual void add_array(std::string_view name,
char32_t value[],
size_t len, std::string_view container =
"pointer") = 0;
451 virtual void add_array(std::string_view name, uint8_t value[],
size_t len, std::string_view container =
"pointer") = 0;
452 virtual void add_array(std::string_view name, uint16_t value[],
size_t len, std::string_view container =
"pointer") = 0;
453 virtual void add_array(std::string_view name, uint32_t value[],
size_t len, std::string_view container =
"pointer") = 0;
454 virtual void add_array(std::string_view name, uint64_t value[],
size_t len, std::string_view container =
"pointer") = 0;
456 virtual void add_array(std::string_view name, int8_t value[],
size_t len, std::string_view container =
"pointer") = 0;
457 virtual void add_array(std::string_view name, int16_t value[],
size_t len, std::string_view container =
"pointer") = 0;
458 virtual void add_array(std::string_view name, int32_t value[],
size_t len, std::string_view container =
"pointer") = 0;
459 virtual void add_array(std::string_view name, int64_t value[],
size_t len, std::string_view container =
"pointer") = 0;
461 virtual void add_array(std::string_view name,
float value[],
size_t len, std::string_view container =
"pointer") = 0;
463 virtual void add_array(std::string_view name,
const std::complex<float> value[],
size_t len, std::string_view container =
"pointer") = 0;
465 virtual void add_array(std::string_view name,
double value[],
size_t len, std::string_view container =
"pointer") = 0;
467 virtual void add_array(std::string_view name,
const std::complex<double> value[],
size_t len, std::string_view container =
"pointer") = 0;
470 virtual void add_array(std::string_view name,
char* value[],
size_t len, std::string_view container =
"pointer") = 0;
471 virtual void add_array(std::string_view name,
const char* value[],
size_t len, std::string_view container =
"pointer") = 0;
472 virtual void add_array(std::string_view name, std::string value[],
size_t len, std::string_view container =
"pointer") = 0;
473 virtual void add_array(std::string_view name,
const std::string value[],
size_t len, std::string_view container =
"pointer") = 0;
474 virtual void add_array(std::string_view name,
const std::vector<std::string> sv, std::string_view container =
"vector") = 0;
475 virtual void add_array(std::string_view name,
const std::set<std::string> ss, std::string_view container =
"set") = 0;
476 virtual void add_array(std::string_view name,
const std::list<std::string> sl, std::string_view container =
"list") = 0;
479 virtual void add_array_json_string(std::string_view name,
const std::string value[],
size_t len, std::string_view container =
"pointer") = 0;
The builder api is used to construct structured log (json) messages that follow naming conventions.
virtual void add_array(std::string_view name, const std::list< std::string > sl, std::string_view container="list")=0
virtual void add_array(std::string_view name, const std::vector< std::string > sv, std::string_view container="vector")=0
virtual void add_workflow_children(std::vector< std::string > &child_uuids)=0
add list of child uuids to "adc_workflow" section after add_workflow_section has been called....
virtual std::vector< std::string > get_field_names()=0
get the names of non-section fields in the section
virtual void add_exit_data_section(int return_code, std::string status, std::shared_ptr< builder_api > status_details)=0
populate "exit_data" section with code and status stream and user provided details.
virtual void add_array(std::string_view name, const std::set< std::string > ss, std::string_view container="set")=0
virtual void add_array(std::string_view name, char16_t value[], size_t len, std::string_view container="pointer")=0
virtual void add_array(std::string_view name, const char *value[], size_t len, std::string_view container="pointer")=0
virtual void add_header_section(std::string_view application_name)=0
auto-populate the "header" section with application name and required local data
virtual void add(std::string_view name, uint64_t value)=0
add named uint64_t
virtual void add_array(std::string_view name, double value[], size_t len, std::string_view container="pointer")=0
virtual void add_code_section(std::string tag, std::shared_ptr< builder_api > version, std::shared_ptr< builder_api > code_details)=0
virtual void add(std::string_view name, char value)=0
add a named character
virtual const field get_value(std::string_view field_name)=0
get the existing named field in the section.
virtual void add(std::string_view name, char *value)=0
add null-terminated string
virtual void add(std::string_view name, int8_t value)=0
add named int8_t
virtual void add_array(std::string_view name, uint8_t value[], size_t len, std::string_view container="pointer")=0
virtual void add_array(std::string_view name, int16_t value[], size_t len, std::string_view container="pointer")=0
virtual void add_array(std::string_view name, char *value[], size_t len, std::string_view container="pointer")=0
virtual void add_gitlab_ci_section()=0
add gitlab_ci environment variable dictionary. The section added is named "gitlab_ci".
virtual void add_path(std::string_view name, const char *value)=0
add null-terminated string filepath
virtual void add_host_section(adc_hs_subsection_flags bitflags)=0
auto-populate the "host" section based on bitflags. There are many optional subsections covering cpus...
virtual void add_path(std::string_view name, char *value)=0
add null-terminated string filepath
virtual void add_xml_string(std::string_view name, std::string_view value)=0
add string which is xml.
virtual void add_path(std::string_view name, std::string_view value)=0
add null-terminated string filepath
virtual void add(std::string_view name, std::string_view value)=0
add null-terminated string
virtual void add_slurm_section()=0
add slurm output environment variable dictionary elements. The section added is named "slurm".
virtual void add_from_pointer_type(std::string_view name, void *ref, enum scalar_type t)=0
virtual void add_array(std::string_view name, int32_t value[], size_t len, std::string_view container="pointer")=0
virtual void add_slurm_section(const std::vector< std::string > &slurmvars)=0
add slurm output environment variable dictionary elements, with the names of additionally desired SLU...
virtual void add_array(std::string_view name, char32_t value[], size_t len, std::string_view container="pointer")=0
virtual void add(std::string_view name, float value)=0
add named 32-bit float
virtual void add_epoch(std::string_view name, int64_t epoch)=0
add unix epoch seconds (gettimeofday)
virtual void add_array(std::string_view name, bool value[], size_t len, std::string_view container="pointer")=0
virtual void add(std::string_view name, std::string &value)=0
add null-terminated string
virtual void add_array(std::string_view name, const std::string value[], size_t len, std::string_view container="pointer")=0
virtual void add_array(std::string_view name, uint32_t value[], size_t len, std::string_view container="pointer")=0
virtual void add_array(std::string_view name, uint64_t value[], size_t len, std::string_view container="pointer")=0
virtual void add_array(std::string_view name, const char *value, size_t len, std::string_view container="pointer")=0
store fixed length array. this is how a character buffer containing nuls is stored.
virtual void add_array(std::string_view name, std::string value[], size_t len, std::string_view container="pointer")=0
virtual void add(std::string_view name, uint32_t value)=0
add named uint32_t
virtual std::vector< std::string > get_section_names()=0
get the names of sections
virtual void add(std::string_view name, bool value)=0
add a named boolean
virtual void add_array(std::string_view name, uint16_t value[], size_t len, std::string_view container="pointer")=0
virtual void add_mpi_section(std::string_view name, void *mpi_comm_p, adc_mpi_field_flags bitflags)=0
populate mpi_comm_$name section with members mpi_* as indicated by bitflags
virtual void add_array_json_string(std::string_view name, const std::string value[], size_t len, std::string_view container="pointer")=0
Add Array of strings which are serialized json.
virtual void add_yaml_string(std::string_view name, std::string_view value)=0
add string which is yaml.
virtual void add_array(std::string_view name, float value[], size_t len, std::string_view container="pointer")=0
virtual void add(std::string_view name, const struct timeval &tv)=0
add timeval
virtual void add_array(std::string_view name, int8_t value[], size_t len, std::string_view container="pointer")=0
virtual void add(std::string_view name, const char *value)=0
add null-terminated string
virtual void add_memory_usage_section()=0
populate "memory_usage" section with current host /proc/meminfo data in the style of free(1).
virtual void add(std::string_view name, char32_t value)=0
add a named char32_t
virtual void add_workflow_section()=0
add data from adc_wfid_ environment variables. The section name is "adc_workflow".
virtual std::shared_ptr< builder_api > get_section(std::string_view name)=0
get the existing named section
virtual void add(std::string_view name, const std::complex< float > &value)=0
add named 32-bit complex
virtual void add(std::string_view name, int32_t value)=0
add named int32_t
virtual void add_app_data_section(std::shared_ptr< builder_api > app_data)=0
create the "app_data" section with data defined by the application writer.
virtual void add(std::string_view name, const std::complex< double > &value)=0
add named 64-bit complex
virtual void add(std::string_view name, double value)=0
add named 64-bit float
virtual std::string serialize()=0
convert object to a json string reflecting the section hierarchy.
virtual void add_path(std::string_view name, std::string &value)=0
add null-terminated string filepath
virtual void add(std::string_view name, uint8_t value)=0
add named uint8_t
virtual void add_number_string(std::string_view name, std::string_view value)=0
add string which is an arbitrary precision decimal number
virtual void add_section(std::string_view name, std::shared_ptr< builder_api > section)=0
copy populated generic section into the builder under specified name.
virtual void add_code_configuration_section(std::shared_ptr< builder_api > build_details)=0
Populate build/install "configuration" information such as options enabled.
virtual void add(std::string_view name, uint16_t value)=0
add named uint16_t
virtual void add_json_string(std::string_view name, std::string_view value)=0
add string which is serialized json.
virtual void add(std::string_view name, const struct timespec &ts)=0
add timespec (e.g. clock_gettime)
virtual void add_model_data_section(std::shared_ptr< builder_api > model_data)=0
populate application run-time physics (re)configuration/result to "model_data" section....
virtual void add(std::string_view name, int16_t value)=0
add named int16_t
virtual void add(std::string_view name, int64_t value)=0
add named int64_t
virtual void add_array(std::string_view name, int64_t value[], size_t len, std::string_view container="pointer")=0
virtual void add(std::string_view name, char16_t value)=0
add a named char16_t
std::string format_timespec_utc_ns(struct timespec &ts)
std::string format_timespec_8601(struct timespec &ts)
version builder_api_version("1.0.0", {"none"})
scalar_type
field types for scientific data encode/decode with json.
int32_t adc_hs_subsection_flags
int32_t adc_mpi_field_flags
A version with tags list.