#pragma once
#include <cstdint>
struct Point {
float x;
float y;
float z;
};
.addField<&Point::x>("x")
.addField<&Point::y>("y")
.addField<&Point::z>("z")
.build();
return dt;
}
struct Measurements {
size_t measurementsSize;
float* measurements;
};
.addField<&Measurements::description>("description")
.addField<&Measurements::measurementsSize, &Measurements::measurements>("measurements")
.build();
return dt;
}
struct Opt {
int16_t a;
float* b;
float* c;
};
.addField<&Opt::a>("a")
.addField<&Opt::b>("b")
.addField<&Opt::c>("c")
.build();
return dt;
}
enum class UniSwitch : uint32_t {
None = 0, OptionA = 1, OptionB = 2 };
struct Uni {
UniSwitch switchField;
union {
double optionA;
} fields;
};
.addUnionField<&Uni::fields, double>("optionA")
.build();
return dt;
}
enum class Color : int32_t {
Red = 0,
Green = 1,
Yellow = 2,
};
return dt;
}
static auto createEnum(const char *typeName, NodeId typeId, NodeId binaryEncodingId)
Build a DataType definition for an enum.
static auto createStructure(const char *typeName, NodeId typeId, NodeId binaryEncodingId)
Build a DataType definition for a structure.
static auto createUnion(const char *typeName, NodeId typeId, NodeId binaryEncodingId)
Build a DataType definition for an union.
UA_DataType wrapper class.
const UA_DataType UA_TYPES[191]