Skip to content

namespace flake

Namespaces

Name
flake::MessageType
Protocol message type constants.
flake::MetaProperties
Meta-property tags (attached as auxiliary data, not user properties).
flake::ParameterProperties
Standard parameter property tags used in protocol messages.
flake::ReservedProperties
System-reserved property tags.
flake::utils

Namespaces

Name
flake::MessageType
Protocol message type constants.
flake::MetaProperties
Meta-property tags (attached as auxiliary data, not user properties).
flake::ParameterProperties
Standard parameter property tags used in protocol messages.
flake::ReservedProperties
System-reserved property tags.
flake::utils

Types

Name
classflake::Array
Type-safe accessor for a raw typed array (array_t).
structflake::AuthenticationSink
Callback interface for authentication during connection setup.
structflake::CallBackFromTag
structflake::CallBackFromTag< TAG_ACTIONABLE, PropTag >
classflake::Confirmation
Represents the reply (confirmation) to a previously sent request.
classflake::ConfirmationSink
Callback interface for receiving Confirmation messages.
classflake::ConnectedObject
An object that is connected to the Flake bus and has an address.
classflake::Connection
Primary client-side handle to the Flake system.
structflake::ConnectionSink
Callback interface for connection lifecycle events.
structflake::flake_uuid
RFC 4122 (v1-style) UUID generator.
structflake::has_tt_of
structflake::has_tt_of< T, std::void_t< decltype(tt_of< std::decay_t< T > >::value)> >
classflake::Indication
Represents an incoming indication (server → client notification).
classflake::IndicationSink
Callback interface for receiving Indication messages.
structflake::is_std_optional
structflake::is_std_optional< std::optional< T > >
classflake::Object
Client-side proxy for a Flake object.
classflake::ObjectDelegate
Interface to be implemented by the application to expose a custom Flake object.
classflake::PropArray
Ordered, serializable collection of Property values.
classflake::Property
A single typed, tagged property value.
structflake::PropTypeFromTag
structflake::PropTypeFromTag<(0x1U) >
structflake::PropTypeFromTag<(0x2U) >
structflake::PropTypeFromTag<(0x3U) >
structflake::PropTypeFromTag<(0x4U) >
structflake::PropTypeFromTag<(0x5U) >
structflake::PropTypeFromTag<(0x6U) >
structflake::PropTypeFromTag<(0x7U) >
structflake::PropTypeFromTag<(0x81U) >
structflake::PropTypeFromTag<(0x82U) >
structflake::PropTypeFromTag<(0x8U) >
structflake::PropTypeFromTag<(0x9U) >
structflake::PropTypeFromTag<(0xAU) >
structflake::PropTypeFromTag<(0xBU) >
structflake::PropTypeFromTag<(0xCU) >
structflake::PropTypeFromTag<(0xEU) >
structflake::PropTypeFromTag<(0xFU) >
structflake::Serializable
Interface for types that support binary serialization.
classflake::ServerWire
Abstract base class for server-side wire implementations.
classflake::Service
classflake::Stream
Byte-oriented read/write stream associated with an Object property.
classflake::Table
Convenience alias – column metadata lives in the MetaProperties namespace.
structflake::TableCompareRestriction
Describes a single comparison-based filter on a table column.
classflake::TagArray
Ordered set of property tags (uint32_t).
structflake::tt_allowed
structflake::tt_allowed< tt_array_t >
structflake::tt_allowed< tt_bin_t >
structflake::tt_allowed< tt_str_t >
structflake::tt_allowed< uint32_t >
structflake::tt_of
structflake::tt_of< bool >
structflake::tt_of< char * >
structflake::tt_of< float >
structflake::tt_of< int16_t >
structflake::tt_of< int32_t >
structflake::tt_of< int64_t >
structflake::tt_of< int8_t >
structflake::tt_of< tt_array_t >
structflake::tt_of< tt_bin_t >
structflake::tt_of< tt_str_t >
structflake::tt_of< tt_uuid_t >
structflake::tt_of< uint16_t >
structflake::tt_of< uint32_t >
structflake::tt_of< uint64_t >
structflake::tt_of< uint8_t >
classflake::UniqueId
128-bit (16 byte) universally unique identifier.
structflake::unwrap_optional
structflake::unwrap_optional< std::optional< U > >
classflake::Wire
Abstract base class for all client-side wire implementations.
enum class uint_least8_tflakeAuthType
Authentication mode for Flake connections.
enum class uint16_tTableCompareOperation
Comparison operations supported by TableCompareRestriction.
enum class uint16_tTableRestrictionType
Discriminator for the kind of restriction applied to a table query.
enum class intLogLevel
Verbosity levels for library-internal logging.
enum class uint8_tWireType
Discriminator for stream-oriented vs. datagram-oriented wires.
typedef ConnectionDevice
Legacy typedef – Connection was formerly named Device.
typedef UniqueIduniqueId_t
typedef uint16_taddr_t
Network address type used to identify objects on the bus.
typedef int32_ttt_int32_t
Flake property type alias for signed 32-bit integer.
typedef int64_ttt_int64_t
Flake property type alias for signed 64-bit integer.
typedef int16_ttt_int16_t
Flake property type alias for signed 16-bit integer.
typedef int8_ttt_int8_t
Flake property type alias for signed 8-bit integer.
typedef uint32_ttt_uint32_t
Flake property type alias for unsigned 32-bit integer.
typedef uint64_ttt_uint64_t
Flake property type alias for unsigned 64-bit integer.
typedef uint16_ttt_uint16_t
Flake property type alias for unsigned 16-bit integer.
typedef uint8_ttt_uint8_t
Flake property type alias for unsigned 8-bit integer.
typedef booltt_bool_t
Flake property type alias for boolean.
typedef binary_ttt_bin_t
Flake property type alias for binary blob.
typedef uniqueId_ttt_uuid_t
Flake property type alias for UUID.
typedef std::stringtt_str_t
Flake property type alias for string.
typedef floattt_float_t
Flake property type alias for single-precision float.
typedef array_ttt_array_t
Flake property type alias for typed array.
template <class T >
using typenameunwrap_optional< std::decay_t< T > >::type
unwrap_optional_t
typedef std ::optional< std::variant< tt_int8_t, tt_int16_t, tt_int32_t, tt_int64_t, tt_uint8_t, tt_uint16_t, tt_uint32_t, tt_uint64_t, tt_bool_t, tt_float_t, tt_uuid_t, tt_bin_t, tt_str_t, tt_array_t > >PropValue
template <uint32_t PropTag>
using typenamePropTypeFromTag<((PropTag) &0x7FFU)>::type
PropType
typedef uint16_tToken
Token type used to match requests with their confirmations.
using std::function< void(constProperty &)>PropCallBackPlain
using std::function< int(Property &, constPropArray &, bool)>PropCallBackActionable
using std::function< int(constchar *, constuint16_t, constuint32_t)>PropCallBackStreamWrite
using std::function< int(char *, uint16_t *, uint16_t, constuint32_t)>PropCallBackStreamRead
using std::function< void(bool)>PropCallBackStreamOpenClose
template <uint32_t PropTag>
using typenameCallBackFromTag< PropTag &TAG_ACTIONABLE, PropTag >::type
PropCallback
typedef TagArrayColumnSet
A set of column tags that define which properties appear in each row.
typedef PropArrayTableRow
A single table row, represented as a PropArray.
typedef void *flakeMutexId_t
Opaque mutex handle used in the portable OS abstraction.

Functions Overview

Name
template <typename T >
constexprunsignedint
UNSIGNED(T v)
template <typename T >
constexprint
SIGNED(T v)
template <typename T >
constexpr std::uint32_t
U32(T v)
template <typename T >
constexpr std::int32_t
I32(T v)
template <typename T >
constexpr std::uint16_t
U16(T v)
template <typename T >
constexpr std::int16_t
I16(T v)
template <typename T >
constexpr std::uint8_t
U8(T v)
template <typename T >
constexpr std::int8_t
I8(T v)
booltokens_match(unsigned a, unsigned b)
booladdresses_match(unsigned a, unsigned b)
boolsafeWrite(uint8_t * buf, uint16_t bufSize, uint16_t & offset, constuint8_t * src, uint16_t len, uint16_t * outConsumed =nullptr)
boolsafeRead(constuint8_t * buf, uint16_t bufSize, uint16_t & offset, uint8_t * dst, uint16_t len, uint16_t * outConsumed =nullptr)
booloperator==(UniqueId & lhs, UniqueId & rhs)
booloperator!=(UniqueId & lhs, UniqueId & rhs)
booloperator<(UniqueId & lhs, UniqueId & rhs)
template <typename T >
constexprbool
type_matches_tag(uint32_t tag)
booloperator==(constProperty & lhs, constProperty & rhs)
booloperator!=(constProperty & lhs, constProperty & rhs)
uint32_tpreprocessTag(uint32_t t)
PropertyPropMakeBool(uint32_t t, tt_bool_t v)
PropertyPropMakeU8(uint32_t t, tt_uint8_t v)
PropertyPropMakeU16(uint32_t t, tt_uint16_t v)
PropertyPropMakeU32(uint32_t t, tt_uint32_t v)
PropertyPropMakeI8(uint32_t t, tt_int8_t v)
PropertyPropMakeI16(uint32_t t, tt_int16_t v)
PropertyPropMakeI32(uint32_t t, tt_int32_t v)
PropertyPropMakeDateTime(uint32_t t, tt_uint32_t v)
PropertyPropMakeFloat(uint32_t t, tt_float_t v)
PropertyPropMakeUUID(uint32_t t, consttt_uuid_t & v)
PropertyPropMakeString(uint32_t t, consttt_str_t & v)
PropertyPropMakeBin(uint32_t t, tt_bin_t v)
voidsetLogLevel(LogLevel level)
Set the global log verbosity at runtime.
constchar *errorToString(long e)
Convert an error code to a human-readable string.
constchar *timeToString(time_t t)
Format a time_t value as a human-readable string.
char *tagToString(uint32_t tag)
Format a property tag as a human-readable string.

Attributes

Name
constexpruint16_tdefaultPort
Default TCP port for unencrypted Flake connections.
constexpruint16_tdefaultTLSPort
Default TCP port for TLS-encrypted Flake connections.
constexpr boolis_std_optional_v

Types Documentation

enum flakeAuthType

EnumeratorDescription
atNone
atSignature
atInteractive

Authentication mode for Flake connections.

enum TableCompareOperation

EnumeratorDescription
TCO_EQEquality comparison.

Comparison operations supported by TableCompareRestriction.

enum TableRestrictionType

EnumeratorDescription
RES_UNRESTRICTEDNo restriction – return all rows.
RES_COMPARECompare a column value against a reference.

Discriminator for the kind of restriction applied to a table query.

enum LogLevel

EnumeratorDescription
ExplicitAlways-on, critical messages.
ErrorErrors (same priority as Explicit).
InfoInformational messages.
VerboseVerbose trace output.
DebugFine-grained debug output.
RawUnfiltered raw data dumps.

Verbosity levels for library-internal logging.

Higher numeric values are more verbose. Use setLogLevel() to configure at runtime.

enum WireType

EnumeratorDescription
wtStreamStream-oriented (e.g. TCP, Serial).
wtDatagramDatagram-oriented (e.g. UDP).

Discriminator for stream-oriented vs. datagram-oriented wires.

typedef Device

cpp
typedef Connection flake::Device;

Legacy typedef – Connection was formerly named Device.

typedef uniqueId_t

cpp
typedef UniqueId flake::uniqueId_t;

typedef addr_t

cpp
typedef uint16_t flake::addr_t;

Network address type used to identify objects on the bus.

typedef tt_int32_t

cpp
typedef int32_t flake::tt_int32_t;

Flake property type alias for signed 32-bit integer.

typedef tt_int64_t

cpp
typedef int64_t flake::tt_int64_t;

Flake property type alias for signed 64-bit integer.

typedef tt_int16_t

cpp
typedef int16_t flake::tt_int16_t;

Flake property type alias for signed 16-bit integer.

typedef tt_int8_t

cpp
typedef int8_t flake::tt_int8_t;

Flake property type alias for signed 8-bit integer.

typedef tt_uint32_t

cpp
typedef uint32_t flake::tt_uint32_t;

Flake property type alias for unsigned 32-bit integer.

typedef tt_uint64_t

cpp
typedef uint64_t flake::tt_uint64_t;

Flake property type alias for unsigned 64-bit integer.

typedef tt_uint16_t

cpp
typedef uint16_t flake::tt_uint16_t;

Flake property type alias for unsigned 16-bit integer.

typedef tt_uint8_t

cpp
typedef uint8_t flake::tt_uint8_t;

Flake property type alias for unsigned 8-bit integer.

typedef tt_bool_t

cpp
typedef bool flake::tt_bool_t;

Flake property type alias for boolean.

typedef tt_bin_t

cpp
typedef binary_t flake::tt_bin_t;

Flake property type alias for binary blob.

typedef tt_uuid_t

cpp
typedef uniqueId_t flake::tt_uuid_t;

Flake property type alias for UUID.

typedef tt_str_t

cpp
typedef std::string flake::tt_str_t;

Flake property type alias for string.

typedef tt_float_t

cpp
typedef float flake::tt_float_t;

Flake property type alias for single-precision float.

typedef tt_array_t

cpp
typedef array_t flake::tt_array_t;

Flake property type alias for typed array.

using unwrap_optional_t

cpp
template <class T >
using flake::unwrap_optional_t = typedef typename unwrap_optional<std::decay_t<T> >::type;

typedef PropValue

cpp
typedef std ::optional<std::variant<tt_int8_t, tt_int16_t, tt_int32_t, tt_int64_t, tt_uint8_t, tt_uint16_t, tt_uint32_t, tt_uint64_t, tt_bool_t, tt_float_t, tt_uuid_t, tt_bin_t, tt_str_t, tt_array_t> > flake::PropValue;

using PropType

cpp
template <uint32_t PropTag>
using flake::PropType = typedef typename PropTypeFromTag<(( PropTag ) & 0x7FFU)>::type;

Template Speciallizations: PropTypeFromTag

typedef Token

cpp
typedef uint16_t flake::Token;

Token type used to match requests with their confirmations.

using PropCallBackPlain

cpp
using flake::PropCallBackPlain = typedef std::function<void (const Property &)>;

using PropCallBackActionable

cpp
using flake::PropCallBackActionable = typedef std::function<int (Property &, const PropArray &, bool)>;

using PropCallBackStreamWrite

cpp
using flake::PropCallBackStreamWrite = typedef std::function<int (const char*, const uint16_t, const uint32_t)>;

using PropCallBackStreamRead

cpp
using flake::PropCallBackStreamRead = typedef std::function<int (char*, uint16_t*, uint16_t, const uint32_t)>;

using PropCallBackStreamOpenClose

cpp
using flake::PropCallBackStreamOpenClose = typedef std::function<void (bool)>;

using PropCallback

cpp
template <uint32_t PropTag>
using flake::PropCallback = typedef typename CallBackFromTag<PropTag & TAG_ACTIONABLE, PropTag>::type;

typedef ColumnSet

cpp
typedef TagArray flake::ColumnSet;

A set of column tags that define which properties appear in each row.

typedef TableRow

cpp
typedef PropArray flake::TableRow;

A single table row, represented as a PropArray.

typedef flakeMutexId_t

cpp
typedef void* flake::flakeMutexId_t;

Opaque mutex handle used in the portable OS abstraction.

Function Details

function UNSIGNED

cpp
template <typename T >
constexprunsignedint UNSIGNED(
    T v
)

function SIGNED

cpp
template <typename T >
constexprint SIGNED(
    T v
)

function U32

cpp
template <typename T >
constexpr std::uint32_t U32(
    T v
)

function I32

cpp
template <typename T >
constexpr std::int32_t I32(
    T v
)

function U16

cpp
template <typename T >
constexpr std::uint16_t U16(
    T v
)

function I16

cpp
template <typename T >
constexpr std::int16_t I16(
    T v
)

function U8

cpp
template <typename T >
constexpr std::uint8_t U8(
    T v
)

function I8

cpp
template <typename T >
constexpr std::int8_t I8(
    T v
)

function tokens_match

cpp
inline bool tokens_match(
    unsigned a,
    unsigned b
)

function addresses_match

cpp
inline bool addresses_match(
    unsigned a,
    unsigned b
)

function safeWrite

cpp
inline bool safeWrite(
    uint8_t * buf,
    uint16_t bufSize,
    uint16_t & offset,
    constuint8_t * src,
    uint16_t len,
    uint16_t * outConsumed =nullptr
)

function safeRead

cpp
inline bool safeRead(
    constuint8_t * buf,
    uint16_t bufSize,
    uint16_t & offset,
    uint8_t * dst,
    uint16_t len,
    uint16_t * outConsumed =nullptr
)

function operator==

cpp
inline bool operator==(
    UniqueId & lhs,
    UniqueId & rhs
)

function operator!=

cpp
inline bool operator!=(
    UniqueId & lhs,
    UniqueId & rhs
)

function operator<

cpp
inline bool operator<(
    UniqueId & lhs,
    UniqueId & rhs
)

function type_matches_tag

cpp
template <typename T >
constexprbool type_matches_tag(
    uint32_t tag
)

function operator==

cpp
inline bool operator==(
    constProperty & lhs,
    constProperty & rhs
)

function operator!=

cpp
inline bool operator!=(
    constProperty & lhs,
    constProperty & rhs
)

function preprocessTag

cpp
inline uint32_t preprocessTag(
    uint32_t t
)

function PropMakeBool

cpp
inline Property PropMakeBool(
    uint32_t t,
    tt_bool_t v
)

function PropMakeU8

cpp
inline Property PropMakeU8(
    uint32_t t,
    tt_uint8_t v
)

function PropMakeU16

cpp
inline Property PropMakeU16(
    uint32_t t,
    tt_uint16_t v
)

function PropMakeU32

cpp
inline Property PropMakeU32(
    uint32_t t,
    tt_uint32_t v
)

function PropMakeI8

cpp
inline Property PropMakeI8(
    uint32_t t,
    tt_int8_t v
)

function PropMakeI16

cpp
inline Property PropMakeI16(
    uint32_t t,
    tt_int16_t v
)

function PropMakeI32

cpp
inline Property PropMakeI32(
    uint32_t t,
    tt_int32_t v
)

function PropMakeDateTime

cpp
inline Property PropMakeDateTime(
    uint32_t t,
    tt_uint32_t v
)

function PropMakeFloat

cpp
inline Property PropMakeFloat(
    uint32_t t,
    tt_float_t v
)

function PropMakeUUID

cpp
inline Property PropMakeUUID(
    uint32_t t,
    consttt_uuid_t & v
)

function PropMakeString

cpp
inline Property PropMakeString(
    uint32_t t,
    consttt_str_t & v
)

function PropMakeBin

cpp
inline Property PropMakeBin(
    uint32_t t,
    tt_bin_t v
)

function setLogLevel

cpp
void setLogLevel(
    LogLevel level
)

Set the global log verbosity at runtime.

Parameters:

  • level Desired log level.

Messages with a LogLevel numerically greater than level will be suppressed.

function errorToString

cpp
constchar * errorToString(
    long e
)

Convert an error code to a human-readable string.

Parameters:

Return: Static string describing the error.

Note: Debug builds only.

function timeToString

cpp
constchar * timeToString(
    time_t t
)

Format a time_t value as a human-readable string.

Parameters:

  • t The time value.

Return: Static string with the formatted timestamp.

Note: Debug builds only.

function tagToString

cpp
char * tagToString(
    uint32_t tag
)

Format a property tag as a human-readable string.

Parameters:

  • tag The 32-bit property tag.

Return: Heap-allocated string – caller must delete[].

Note: Debug builds only.

Attributes Documentation

variable defaultPort

cpp
constexpr uint16_t flake::defaultPort

Default TCP port for unencrypted Flake connections.

variable defaultTLSPort

cpp
constexpr uint16_t flake::defaultTLSPort

Default TCP port for TLS-encrypted Flake connections.

variable is_std_optional_v

cpp
constexpr bool flake::is_std_optional_v