12#if ADC_BOOST_JSON_PUBLIC
13#include "boost/json.hpp"
51#define ADC_HS_BASE 0x0
57#define ADC_HS_RAMSIZE 0x2
64#define ADC_HS_CPU 0x10
67#define ADC_HS_GPU 0x20
70#define ADC_HS_NUMA 0x40
73#define ADC_HS_ALL (ADC_HS_OS|ADC_HS_RAMSIZE|ADC_HS_ENV|ADC_HS_CPU|ADC_HS_GPU|ADC_HS_NUMA)
90#define ADC_MPI_NONE 0x0
93#define ADC_MPI_RANK 0x1
96#define ADC_MPI_SIZE 0x2
99#define ADC_MPI_NAME 0x4
104#define ADC_MPI_HOSTLIST 0x10
109#define ADC_MPI_RANK_HOST 0x20
112#define ADC_MPI_VER 0x100
117#define ADC_MPI_LIB_VER 0x200
121#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)
124#define ADC_MPI_LOCAL (ADC_MPI_RANK|ADC_MPI_SIZE|ADC_MPI_NAME|ADC_MPI_VER|ADC_MPI_LIB_VER)
170 virtual void add_code_section(std::string tag, std::shared_ptr< builder_api >
version, std::shared_ptr< builder_api > code_details) = 0;
180 virtual void add_exit_data_section(
int return_code, std::string status, std::shared_ptr< builder_api > status_details) = 0;
193 virtual std::shared_ptr< builder_api >
get_section(std::string_view name) = 0;
325 virtual void add_section(std::string_view name, std::shared_ptr< builder_api > section) = 0;
382 virtual void add(std::string_view name,
bool value) = 0;
385 virtual void add(std::string_view name,
char value) = 0;
388 virtual void add(std::string_view name,
char16_t value) = 0;
391 virtual void add(std::string_view name,
char32_t value) = 0;
394 virtual void add(std::string_view name,
char* value) = 0;
396 virtual void add(std::string_view name,
const char* value) = 0;
398 virtual void add(std::string_view name, std::string& value) = 0;
400 virtual void add(std::string_view name, std::string_view value) = 0;
403 virtual void add_path(std::string_view name,
char* value) = 0;
405 virtual void add_path(std::string_view name,
const char* value) = 0;
407 virtual void add_path(std::string_view name, std::string& value) = 0;
409 virtual void add_path(std::string_view name, std::string_view value) = 0;
423#if ADC_BOOST_JSON_PUBLIC
425 virtual void add(std::string_view name, boost::json::value value) = 0;
429 virtual void add(std::string_view name, uint8_t value) = 0;
431 virtual void add(std::string_view name, uint16_t value) = 0;
433 virtual void add(std::string_view name, uint32_t value) = 0;
435 virtual void add(std::string_view name, uint64_t value) = 0;
438 virtual void add(std::string_view name, int8_t value) = 0;
440 virtual void add(std::string_view name, int16_t value) = 0;
442 virtual void add(std::string_view name, int32_t value) = 0;
444 virtual void add(std::string_view name, int64_t value) = 0;
447 virtual void add(std::string_view name,
float value) = 0;
449 virtual void add(std::string_view name,
const std::complex<float>& value) = 0;
451 virtual void add(std::string_view name,
double value) = 0;
453 virtual void add(std::string_view name,
const std::complex<double>& value) = 0;
456 virtual void add(std::string_view name,
const struct timeval& tv) = 0;
458 virtual void add(std::string_view name,
const struct timespec& ts) = 0;
460 virtual void add_epoch(std::string_view name, int64_t epoch) = 0;
470 virtual void add_array(std::string_view name,
bool value[],
size_t len, std::string_view container =
"pointer") = 0;
473 virtual void add_array(std::string_view name,
const char *value,
size_t len, std::string_view container =
"pointer") = 0;
474 virtual void add_array(std::string_view name,
char16_t value[],
size_t len, std::string_view container =
"pointer") = 0;
475 virtual void add_array(std::string_view name,
char32_t value[],
size_t len, std::string_view container =
"pointer") = 0;
477 virtual void add_array(std::string_view name, uint8_t value[],
size_t len, std::string_view container =
"pointer") = 0;
478 virtual void add_array(std::string_view name, uint16_t value[],
size_t len, std::string_view container =
"pointer") = 0;
479 virtual void add_array(std::string_view name, uint32_t value[],
size_t len, std::string_view container =
"pointer") = 0;
480 virtual void add_array(std::string_view name, uint64_t value[],
size_t len, std::string_view container =
"pointer") = 0;
482 virtual void add_array(std::string_view name, int8_t value[],
size_t len, std::string_view container =
"pointer") = 0;
483 virtual void add_array(std::string_view name, int16_t value[],
size_t len, std::string_view container =
"pointer") = 0;
484 virtual void add_array(std::string_view name, int32_t value[],
size_t len, std::string_view container =
"pointer") = 0;
485 virtual void add_array(std::string_view name, int64_t value[],
size_t len, std::string_view container =
"pointer") = 0;
487 virtual void add_array(std::string_view name,
float value[],
size_t len, std::string_view container =
"pointer") = 0;
489 virtual void add_array(std::string_view name,
const std::complex<float> value[],
size_t len, std::string_view container =
"pointer") = 0;
491 virtual void add_array(std::string_view name,
double value[],
size_t len, std::string_view container =
"pointer") = 0;
493 virtual void add_array(std::string_view name,
const std::complex<double> value[],
size_t len, std::string_view container =
"pointer") = 0;
496 virtual void add_array(std::string_view name,
char* value[],
size_t len, std::string_view container =
"pointer") = 0;
497 virtual void add_array(std::string_view name,
const char* value[],
size_t len, std::string_view container =
"pointer") = 0;
498 virtual void add_array(std::string_view name, std::string value[],
size_t len, std::string_view container =
"pointer") = 0;
499 virtual void add_array(std::string_view name,
const std::string value[],
size_t len, std::string_view container =
"pointer") = 0;
500 virtual void add_array(std::string_view name,
const std::vector<std::string> sv, std::string_view container =
"vector") = 0;
501 virtual void add_array(std::string_view name,
const std::set<std::string> ss, std::string_view container =
"set") = 0;
502 virtual void add_array(std::string_view name,
const std::list<std::string> sl, std::string_view container =
"list") = 0;
505 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 uint64_t get_value_uint64(std::string_view path)=0
get the existing named scalar value that can be correctly cast as int64_t
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 const field get_value(std::string_view path)=0
get the existing named nested field in the builder.
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 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 const char * get_value_string(std::string_view path)=0
get the existing named nested scalar string value.
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 int64_t get_value_int64(std::string_view path)=0
get the existing named scalar value that can be correctly cast as int64_t
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.