132 Variant(std::float_t x, std::float_t y, std::float_t z);
195 bool ToBool(
bool* pOk =
nullptr)
const;
197 std::int32_t
ToInt32(
bool* pOk =
nullptr)
const;
199 std::uint8_t
ToUInt8(
bool* pOk =
nullptr)
const;
201 std::uint16_t
ToUInt16(
bool* pOk =
nullptr)
const;
203 std::uint32_t
ToUInt32(
bool* pOk =
nullptr)
const;
205 std::uint64_t
ToUInt64(
bool* pOk =
nullptr)
const;
207 std::float_t
ToFloat(
bool* pOk =
nullptr)
const;
209 std::double_t
ToDouble(
bool* pOk =
nullptr)
const;
215 std::string
ToString(
bool* pOk =
nullptr)
const;
226 std::array<std::float_t, 3>
ToPosition(
bool* pOk =
nullptr)
const;
247 [[deprecated(
"Use ToAimingAndPosition instead, this method will be removed in the future. "
248 "NOTE: The output of both methods is identical, but the new method has a more consistent name.")]]
267 std::vector<bool>
ToBoolVector(
bool* pOk =
nullptr)
const;
276 std::vector<std::string>
ToStringVector(
bool* pOk =
nullptr)
const;
286 std::vector<std::uint8_t>
ToByteVector(
bool* pOk =
nullptr)
const;
328 std::vector<std::uint8_t>>;
Type-erased OCA parameter value with built-in marshal/unmarshal support.
std::array< std::float_t, 6 > ToAimingAndPosition(bool *pOk=nullptr) const
TypeIndex
Compact index enum for the internal std::variant alternative types.
@ TypeFloat
std::float_t (32-bit IEEE 754)
@ TypeByteVector
std::vector<uint8_t> — used for blobs and multi-float spatial types
@ TypeUInt64
std::uint64_t
@ TypeDouble
std::double_t (64-bit IEEE 754)
@ TypeString
std::string (OCA string: 2-byte length prefix + UTF-8 bytes)
@ TypeNone
Default / unset state (std::monostate). IsValid() returns false.
@ TypeUInt32
std::uint32_t
@ TypeUInt16
std::uint16_t
std::array< std::float_t, 6 > ToPositionAndRotation(bool *pOk=nullptr) const
std::vector< bool > ToBoolVector(bool *pOk=nullptr) const
bool ToBool(bool *pOk=nullptr) const
Returns the value as bool. Numeric types: non-zero = true.
std::float_t ToFloat(bool *pOk=nullptr) const
Returns the value as float_t (32-bit). Conversion from double loses precision.
std::string ToPositionString(bool *pOk=nullptr) const
Ocp1DataType GetDataType() const
std::vector< std::uint8_t > ToByteVector(bool *pOk=nullptr) const
std::double_t ToDouble(bool *pOk=nullptr) const
Returns the value as double_t (64-bit).
virtual ~Variant()=default
std::uint64_t ToUInt64(bool *pOk=nullptr) const
Returns the value as uint64_t.
std::vector< std::uint8_t > ToParamData(Ocp1DataType type=OCP1DATATYPE_NONE, bool *pOk=nullptr) const
std::uint8_t ToUInt8(bool *pOk=nullptr) const
Returns the value as uint8_t. Values outside [0, 255] are clamped/truncated.
bool operator==(const Variant &other) const
Returns true if both Variants hold the same type and value.
std::uint16_t ToUInt16(bool *pOk=nullptr) const
Returns the value as uint16_t.
std::variant< std::monostate, bool, std::int32_t, std::uint8_t, std::uint16_t, std::uint32_t, std::uint64_t, std::float_t, std::double_t, std::string, std::vector< std::uint8_t > > VariantType
The underlying std::variant that holds the actual value.
bool operator!=(const Variant &other) const
Returns true if the Variants differ in type or value.
std::array< std::float_t, 3 > ToPosition(bool *pOk=nullptr) const
std::uint32_t ToUInt32(bool *pOk=nullptr) const
Returns the value as uint32_t.
std::string ToAimingAndPositionString(bool *pOk=nullptr) const
std::int32_t ToInt32(bool *pOk=nullptr) const
Returns the value as int32_t. Numeric widening/narrowing applied as needed.
std::string ToString(bool *pOk=nullptr) const
Returns the value as a std::string. Only succeeds if the internal type is TypeString; numeric types a...
std::vector< std::string > ToStringVector(bool *pOk=nullptr) const
Minimal AES70 / OCP.1 TCP client/server library built on JUCE.
Ocp1DataType
OCA base data type codes, matching OcaBaseDataType in the AES70 specification.
@ OCP1DATATYPE_NONE
No type; used as "not set" sentinel.
@ OCP1DATATYPE_BLOB
Variable-length binary blob; layout is property-specific.