The PDI specification tree is expressed in YAML.
The specification tree root is a mapping that contains the following keys:
key | value |
---|---|
"types" (optional) | a types_map |
"data" (optional) | a data_map |
"metadata" (optional) | a data_map |
"plugins" (optional) | a plugin_map |
"logging" (optional) | a logging |
"plugin_path" (optional) | a plugin_path |
".*" (optional) | anything |
types
section specifies user-defined datatypesdata
and metadata
sections specify the type of the data in buffers exposed by the application; for metadata
, PDI keeps a copy while it only keeps references for data
,plugins
section specifies the list of plugins to load and their configuration,plugin_path
section specifies the path to a directory where PDI should search for pluginslogging
section specify logger propertiesA array_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "array" |
"size" | a intexpr_or_seq |
"subtype" (optional) | a datatype |
"subsize" (optional, deprecated) | a intexpr_or_seq |
"start" (optional, deprecated) | a intexpr_or_seq |
"\+.*" (optional) | anything |
A array_type_node represents a potentially multi-dimensional array where:
size
key represents the size of the array in each dimension (C order),subtype
key represents the type of the elements in the array,subsize
key represents the number of elements to actually use in each dimension (slicing), if specified it must have the same number of elements as size
, this defaults to the full array size in each dimension,start
key represents the index of the first element to actually use in each dimension (slicing), if specified it must have the same number of elements as size
, this defaults to the first (0) element in each dimension,+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A byte_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "byte" |
"\+.*" (optional) | anything |
A byte_type represents the C++ byte
type. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).Example:
A char_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "char" |
"\+.*" (optional) | anything |
A char_type represents the C char
datatype; it accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A character_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "character" |
"kind" (optional) | a integer-valued $-expression |
"\+.*" (optional) | anything |
A character_type_node represents the Fortran character
datatype, where:
kind
key corresponds to the Fortran kind parameter (character(kind=...)
), if missing, the default kind of the Fortran implementation is used,+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A data_map is a mapping that contains the following keys:
key | value |
---|---|
".*" (optional) | a datatype |
A datatype can be any of:
simple_datatype is just a string that identifies the referenced type. All others cases are dictionaries whose type
key identifies the type.
A datatype represents the memory layout and interpretation for data exposed by the user in the data store.
Optional attributes can be added to any datatype. An attribute is identified by a key that starts with the +
character. The value can be anything (scalar, sequence or mapping).
A datatype_with_disp is a mapping that must be a valid datatype with an additional disp
key:
key | value |
---|---|
"disp" | a integer-valued $-expression |
"type" | a type identifier |
".*" (*datatype *) | see datatype |
disp
key specifies the offset in bytes from the base address of the container to this specific member,A double_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "double" |
"\+.*" (optional) | anything |
A double_type represents the C double
type; it accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A $-expression is a scalar whose content matches the following grammar:
The rules for evaluating an expression are close to those of BASH for example.
In addition to raw text, a STRING_LITERAL
can contain references to the string value of some data in the store as well as the result of an operation by enclosing it inside a dollar-parenthesis $()
.
An OPERATION
can include logical and arithmetic operators grouped by parenthesis. The basic terms manipulated in an operation can be integer literals or references to the integer value of some data in the store.
A REFERENCE
is introduced by a dollar $
sign and optionally enclosed in curly braces {
, }
. Its value is that of the data or metadata with the associated name. It is always a good idea to have referenced values in the metadata section as it prevents dangling references. Value formatting can be applied using a FMT format_spec
string by adding a column :
followed by the format_spec
after a column just before the closing bracket }
(see: https://fmt.dev/latest/syntax.html#grammar-token-format_spec). A direct reference is possible as well as sub-references to:
[
, ]
operator,.
operator.The value-type of an EXPRESSION
is as follow:
REFERENCE
, it has the type of the referenced data in the store,OPERATION
, it is integer-valued,STRING_LITERAL
, it is string-valued.In addition, an integer can be interpreted as a string or as a boolean value where zero is interpreted as false and any other value as true.
The following strings can also be interpreted as a boolean integer values:
y
, Y
, yes
, Yes
, YES
, true
, True
, TRUE
, on
, On
, ON
.n
, N
, no
, No
, NO
, false
, False
, FALSE
, Off
, Off
, OFF
.A float_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "float" |
"\+.*" (optional) | anything |
A float_type represents the C float
type. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A int_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int" |
"\+.*" (optional) | anything |
A int_type represents the C int
type. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A int16_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int16" or "int16_t" |
"\+.*" (optional) | anything |
A int16_type represents the C int16_t
type from the <stdtypes.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A int32_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int32" |
"\+.*" (optional) | anything |
A int32_type represents the C int32_t
type from the <stdtypes.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A int64_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int64" |
"\+.*" (optional) | anything |
A int64_type represents the C int64_t
type from the <stdtypes.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A int8_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int8" |
"\+.*" (optional) | anything |
A int8_type represents the C int8_t
type from the <stdtypes.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A integer_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "integer" |
"kind" (optional) | a integer-valued $-expression |
"\+.*" (optional) | anything |
A integer_type represents the Fortran integer
datatype.
kind
key corresponds to the Fortran kind parameter (integer(kind=...)
). If missing, the default kind of the Fortran implementation is used.+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A intexpr_or_seq can be any of:
In that context, a simple $-expression is interpreted as a shortcut for a sequence containing a single $-expression.
For example, the following value:
is interpreted as if it was:
A intexpr_seq is a sequence where each element of the sequence is a integer-valued $-expression.
A int_fast16_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int_fast16" or "int_fast16_t" |
"\+.*" (optional) | anything |
A int_fast16_type represents the C int_fast16_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A int_fast32_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int_fast32" or "int_fast32_t" |
"\+.*" (optional) | anything |
A int_fast32_type represents the C int_fast32_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A int_fast64_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int_fast64" or "int_fast64_t" |
"\+.*" (optional) | anything |
A int_fast64_type represents the C int_fast64_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A int_fast8_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int_fast8" or "int_fast8_t" |
"\+.*" (optional) | anything |
A int_fast8_type represents the C int_fast8_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A int_least16_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int_least16" or "int_least16_t" |
"\+.*" (optional) | anything |
A int_least16_type represents the C int_least16_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A int_least32_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int_least32" or "int_least32_t" |
"\+.*" (optional) | anything |
A int_least32_type represents the C int_least32_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A int_least64_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int_least64" or "int_least64_t" |
"\+.*" (optional) | anything |
A int_least64_type represents the C int_least64_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A int_least8_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "int_least8" or "int_least8_t" |
"\+.*" (optional) | anything |
A int_least8_type represents the C int_least8_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A intmax_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "intmax" or "intmax_t" |
"\+.*" (optional) | anything |
A intmax_type represents the C intmax_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A intptr_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "intptr" or "intptr_t" |
"\+.*" (optional) | anything |
A intptr_type represents the C intptr_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A logging can be any of:
A logging is fully supported in specification tree root and any plugin_map .
A logging_level is a scalar which determines verbosity level. It can be set to (from the most to the least verbose):
"debug"
- shows a log when a normal situation of the execution might be useful to understand the behavior of the library,"info"
- shows a log when a normal situation of the execution is likely useful to understand the behavior of the library,"warn"
- shows a log when a very likely invalid situation has been detected by the library (user input that is technically valid, but very unusual for example),"error"
- shows a log when an invalid situation has been detected by the library (invalid user input, invalid hardware behaviour, etc.),"off"
- logs are disabled.Examples:
level
is set to info
A logging_map is a mapping that contains the following keys:
key | value |
---|---|
"level" (optional) | a logging_level |
"pattern" (optional) | a logger prefix pattern of spdlog |
"output" (optional) | a logging_output_map |
%{<EXPR>}
, where <EXPR>
represents a string-valued $-expression|a $-expression that will be evaluated just after all plugins have been initialized,PDI
or a plugin name): Example:
A logging_output_map is a mapping that contains the following keys:
key | value |
---|---|
"file" (optional) | a path of the file where to write logs |
"console" (optional) | on or off |
file
is defined, console
is set to off
.Example:
See struct_type for more examples.
A logical_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "logical" |
"kind" (optional) | a integer-valued $-expression |
"\+.*" (optional) | anything |
A logical_type represents the Fortran logical
datatype.
kind
key corresponds to the Fortran kind parameter (logical(kind=...)
). If missing, the default kind of the Fortran implementation is used.+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A long_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "long" |
"\+.*" (optional) | anything |
A long_type represents the C long
type. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).Example:
A long_long_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "long long" |
"\+.*" (optional) | anything |
A long_long_type represents the C long long
type. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).Example:
A plugin_map is a mapping that contains the following keys:
key | value |
---|---|
".*" (optional) | anything |
Have a look at the plugins documentation to see the specification tree they accept.
See specification tree root for an example.
A path to directory where PDI should search for plugins. It can be single path:
or array of paths (PDI will take first match):
A pointer_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "pointer" |
"subtype" | a datatype |
"\+.*" (optional) | anything |
A pointer_type represents a memory address where data is actually stored (a pointer) where:
subtype
key represents the type of the referenced elements,+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A ptrdiff_t_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "ptrdiff_t" |
"\+.*" (optional) | anything |
A ptrdiff_t_type represents the C ptrdiff_t
type from the <stddef.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).Example:
A real_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "real" |
"kind" (optional) | a integer-valued $-expression |
"\+.*" (optional) | anything |
A real_type represents the Fortran real
datatype.
kind
key corresponds to the Fortran kind parameter (real(kind=...)
). If missing, the default kind of the Fortran implementation is used.+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A record_members_map is a mapping that contains the following keys:
key | value |
---|---|
".*" (optional) | a datatype_with_disp |
See record_type for an example.
A record_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "record" |
"buffersize" | a integer-valued $-expression |
"members" (optional) | a record_members_map |
"\+.*" (optional) | anything |
A record_type represents a "record" where:
buffersize
key represents the overall size of the record, including potential padding,members
key lists all members of the record with their offset,+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A short_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "short" |
"\+.*" (optional) | anything |
A short_type represents the C short
type. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A simple_datatype is a scalar.
It is interpreted as a shortcut for a mapping with a single key type
whose value is the provided scalar and therefore another datatype.
For example, the following value:
is interpreted as if it was:
A size_t_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "size_t" |
"\+.*" (optional) | anything |
A size_t_type represents the C size_t
type from the <stddef.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).Example:
A struct_members_omap is an ordered mapping that contains the following keys:
key | value |
---|---|
".*" (optional) | a datatype |
See struct_type for an example.
A struct_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "struct" |
"members" (optional) | a struct_members_omap |
"\+.*" (optional) | anything |
A struct_type represents a C "struct" or C++ "class" using the default C memory layout, where:
members
key lists all members of the struct
in order,+
represent attributes, the associated value can be anything (scalar, sequence or mapping).matches:
A tuple_elements_seq is a sequence where each element of the sequence is a datatype_with_disp where disp
key is optional.
See tuple_type for an example.
A tuple_elements_seq is a sequence where each element of the sequence is either a datatype or a datatype_with_disp.
If datatypes with no explicit offset are used, the minimum offset that does not lead to overlaps is used.
See tuple_type for an example.
A tuple_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "tuple" |
"buffersize" (optional) | a integer-valued $-expression |
"elements" (optional) | a tuple_elements_seq |
"\+.*" (optional) | anything |
A tuple_type represents a "tuple", where:
buffersize
key represents the overall size of the tuple including potential padding, if omitted, the minimum size that fits all elements is used,members
key lists all elements of the tuple,+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A types_map is a mapping that contains the following keys:
key | value |
---|---|
".*" (optional) | a datatype |
A uint16_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uint16" or "uint16_t" |
"\+.*" (optional) | anything |
A uint16_type represents the C uint16_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uint32_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uint32" or "uint32_t" |
"\+.*" (optional) | anything |
A uint32_type represents the C uint32_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uint64_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uint64" or "uint64_t" |
"\+.*" (optional) | anything |
A uint64_type represents the C uint64_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uint8_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uint8" or "uint8_t" |
"\+.*" (optional) | anything |
A uint8_type represents the C uint8_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uint_fast16_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uint_fast16" or "uint_fast16_t" |
"\+.*" (optional) | anything |
A uint_fast16_type represents the C uint_fast16_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uint_fast32_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uint_fast32" or "uint_fast32_t" |
"\+.*" (optional) | anything |
A uint_fast32_type represents the C uint_fast32_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uint_fast64_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uint_fast64" or "uint_fast64_t" |
"\+.*" (optional) | anything |
A uint_fast64_type represents the C uint_fast64_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uint_fast8_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uint_fast8" or "uint_fast8_t" |
"\+.*" (optional) | anything |
A uint_fast8_type represents the C uint_fast8_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uint_least16_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uint_least16" or "uint_least16_t" |
"\+.*" (optional) | anything |
A uint_least16_type represents the C uint_least16_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uint_least32_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uint_least32" or "uint_least32_t" |
"\+.*" (optional) | anything |
A uint_least32_type represents the C uint_least32_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uint_least64_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uint_least64" or "uint_least64_t" |
"\+.*" (optional) | anything |
A uint_least64_type represents the C uint_least64_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uint_least8_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uint_least8" or "uint_least8_t" |
"\+.*" (optional) | anything |
A uint_least8_type represents the C uint_least8_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uintmax_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uintmax" or "uintmax_t" |
"\+.*" (optional) | anything |
A uintmax_type represents the C uintmax_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A uintptr_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "uintptr" or "uintptr_t" |
"\+.*" (optional) | anything |
A uintptr_type represents the C uintptr_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A unsigned_long_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "unsigned long long" |
"\+.*" (optional) | anything |
A unsigned_long_type represents the C unsigned long
type. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A unsigned_long_long_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "unsigned long long" |
"\+.*" (optional) | anything |
A unsigned_long_long_type represents the C unsigned long long
type. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).A unsigned_short_type is a mapping that contains the following keys:
key | value |
---|---|
"type" | "unsigned short" |
"\+.*" (optional) | anything |
A unsigned_short_type represents the C unsigned short_t
type from the <stdint.h>
header. It accepts no parameter.
+
represent attributes, the associated value can be anything (scalar, sequence or mapping).