binary_format/binary_format library

Classes

Accum16
Adcu
Marker for special handling, closing the sealed hierarchy.
Angle16
0, 65536 -> [0.0, 1)
Angle16Deg
0, 65536 -> [0.0, 360.0)
Angle16Rad
0, 65536 -> [0.0, 2π)
BinaryCodec<V>
BinaryCodec<V>
BinaryCodecByHandlers<V>
BinaryCodecIdentity
BinaryFormat<S extends NativeType, V>
BinaryFormat<S, V> defines value handling type V to and from a binary representation as an int, It provides a declarative way to handle various data formats, including integers, fixed-point numbers, booleans, signs, and enums, with support for custom encoding/decoding logic through handlers. V determines value conversion
BitStructFormat<K extends BitField>
Bool
Represents a native bool in C.
BoolFormat
Decimal10<S extends NativeType>
1 binary -> 0.1f
Decimal100<S extends NativeType>
DecimalInv10<S extends NativeType>
1 binary -> 10.0f
Double
Represents a native 64 bit double in C.
EnumFormat<S extends NativeType, V extends Enum>
EnumFormatByHandlers<V extends Enum>
for custom handling, separate from index-based. include list for view
EnumOffsetFormat<S extends NativeType, V extends Enum>
FixedPoint<S extends NativeType>
FixedPointBase10<S extends NativeType>
FixedPointN<S extends NativeType>
Float
Represents a native 32 bit float in C.
Fract16
FractFormat<S extends NativeType>
Int
The C int type.
Int16
Represents a native signed 16 bit integer in C.
Int16Int
Int32
Represents a native signed 32 bit integer in C.
Int32Int
Int64
Represents a native signed 64 bit integer in C.
Int8
Represents a native signed 8 bit integer in C.
Int8Int
IntFormat<S extends NativeType>
NativeType
NativeType's subtypes represent a native type in C.
NativeTypeBase<S extends NativeType>
NativeTag - StorageType. Descriptor using NativeType as marker only. NativeType S determines the size and signedness of the underlying binary data. if lets unspecified, defaults to 32-bit signed int (Int32).
NumFormat<S extends NativeType, V extends num>
Hierarchy axis on handling, rather than storage Base sttorage type can be "inherited" by typedef with type marker Int/Fract
Percent16
SignFormat
Uaccum16
Ufract16
Uint16
Represents a native unsigned 16 bit integer in C.
Uint16Int
Uint32
Represents a native unsigned 32 bit integer in C.
Uint32Int
Uint64
Represents a native unsigned 64 bit integer in C.
Uint8
Represents a native unsigned 8 bit integer in C.
Uint8Int

Typedefs

DataDecoder<T> = T Function(int data)
DataEncoder<T> = int Function(T view)
EnumInt16<V extends Enum> = EnumOffsetFormat<Int16, V>
EnumInt32<V extends Enum> = EnumOffsetFormat<Int32, V>
EnumInt8<V extends Enum> = EnumOffsetFormat<Int8, V>
EnumUint<V extends Enum> = EnumFormat<NativeType, V>
Integer16 = IntFormat<Int16>
Raw integer pass-through
Integer16U = IntFormat<Uint16>