Fields within structures may be added, deleted or modified, using
operators (+, -, *, -+, *+)
. This allows Trace Headers
to be extensible.
Operator Definition -------- ---------- + append members named by the operand - delete all previous members named by the operand * replace members named by the operand -+ delete and append members named by the operand *+ replace or append members named by the operand
Operators are processed from left to right. For example given:
typedef struct {int a, b, c;} old_xyz; typedef struct {float d, e, f;} add_xyz; typedef struct {void b, e;} drop_xyz;a new revised "drop_xyz" structure can be compose by:
typedef struct { + old_xyz; + add_xyz; - drop_xyz;} drop_xyz;resulting in:
typedef struct {int a, c; float d, f;} xyz;
The end user may explicitly add, drop or modify fields in the
generic DDS format simply by specifying the Definition,
"MOD_FIELD
". For example, the following Definition
will add (or modify) headers "a" and "b" in the
structure as floating point values, add (or replace at the end)
header "c" as an integer value and drop head "d"
all together.
MOD_FIELD= *+ float a, b; -+ int c; - void d;