Package-level declarations

Types

Link copied to clipboard
sealed class BluetoothFormat : BinaryFormat

A BinaryFormat used for encoding and decoding structures to a Binary Data usable for Bluetooth communication.

class ByteArrayEndedBeforeSerializationCompleted(val message: String) : SerializationException

Exception thrown if the ByteArray provided to BluetoothFormat is smaller than expected

Link copied to clipboard
annotation class ByteOrder(val order: ByteOrder = ByteOrder.LEAST_SIGNIFICANT_FIRST)

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Checksum(val width: Int, val polynomial: ULong, val init: ULong, val xorOut: ULong, val reflectIn: Boolean = false, val reflectOut: Boolean = false)

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
class DataAfterUnconstrainedData(val message: String?) : SerializationException

Exception thrown if trying to add data after a collection of data marked with Unsized. Since Unsized elements do not indicate an end point, there is no way to know when to stop decoding them.

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Encoded(val encoding: Encoding = Encoding.UTF_8)

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class FlagIndex(val index: Int)

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
class FlagIndexException(message: String) : SerializationException

Thrown when a Flag is set that has already been reserved by a sibling node.

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class FlagWidth(val bits: Int = 1)

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
class InvalidByteOrderException(message: String) : SerializationException

Thrown when ByteOrder is changed in a sub-structure. Changing byte orders is only allowed for predictable types such as numeric types.

Link copied to clipboard
class InvalidChecksumException(val expected: ULong, val actual: ULong) : SerializationException

Exception thrown if the Checksum does not match given Checksum algorithm. This check can be disabled using BluetoothFormat.validateChecksum

Link copied to clipboard
class InvalidPostfix(val message: String) : SerializationException

Exception thrown if the Postfix of a structure does not match Postfix value

Link copied to clipboard
class InvalidPrefix(val message: String) : SerializationException

Exception thrown if the Prefix of a structure does not match Prefix value

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ItemByteOrder(val order: ByteOrder = ByteOrder.LEAST_SIGNIFICANT_FIRST)
Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ItemEncoded(val encoding: Encoding = Encoding.UTF_8)

Applies Encoded to any Item in a List

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ItemLengthPrefix(val lengthAsShort: Boolean = false, val canOverflow: Boolean = false, val sentinel: Byte = 0xFF.toByte())

Applies LengthPrefix to any Item in a List

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ItemMedFloat

Applies MedFloat to any Item in a List

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ItemNullTerminated

Applies NullTerminated to any Item in a List

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ItemScalar(val multiplier: Int = 1, val decimalExponent: Int = 0, val binaryExponent: Int = 0, val offset: Int = 0)

Applies Scalar to any Item in a List

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ItemSize(val size: Length)

Applies Size to any Item in a List

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ItemUnsigned

Applies Unsigned to any Item in a List

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class KeyByteOrder(val order: ByteOrder = ByteOrder.LEAST_SIGNIFICANT_FIRST)
Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class KeyEncoded(val encoding: Encoding = Encoding.UTF_8)

Applies Encoded to any Key in a Map

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class KeyLengthPrefix(val lengthAsShort: Boolean = false, val canOverflow: Boolean = false, val sentinel: Byte = 0xFF.toByte())

Applies LengthPrefix to any Key in a Map

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class KeyMedFloat

Applies MedFloat to any Key in a Map

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class KeyNullTerminated

Applies NullTerminated to any Key in a Map

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class KeyScalar(val multiplier: Int = 1, val decimalExponent: Int = 0, val binaryExponent: Int = 0, val offset: Int = 0)

Applies Scalar to any Key in a Map

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class KeySize(val size: Length)

Applies Size to any Key in a Map

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class KeyUnsigned

Applies Unsigned to any Key in a Map

Link copied to clipboard
enum Length : Enum<Length>

The length used for encoding (numeric) data. Use the Size annotation to add supported lengths to a Number property

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class LengthPrefix(val lengthAsShort: Boolean = false, val canOverflow: Boolean = false, val sentinel: Byte = 0xFF.toByte())

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class MedFloat

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class NullIfEmpty

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class NullTerminated

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Postfix(val value: ByteArray)

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Prefix(val value: ByteArray)

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Scalar(val multiplier: Int = 1, val decimalExponent: Int = 0, val binaryExponent: Int = 0, val offset: Int = 0)

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
annotation class SerializedByteValue(val value: Byte)

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Size(val length: Length)

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
class UnexpectedBytesRemaining(val message: String) : SerializationException

Exception thrown if the ByteArray provided to BluetoothFormat is bigger then expected

Link copied to clipboard
class UnexpectedNullTermination(val message: String) : SerializationException

Exception thrown when a collection is marked with NullTerminated but one of its items starts with a 0x00 byte.

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Unsigned

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Unsized

Annotation added for serializing using BluetoothFormat

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ValueByteOrder(val order: ByteOrder = ByteOrder.LEAST_SIGNIFICANT_FIRST)
Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ValueEncoded(val encoding: Encoding = Encoding.UTF_8)

Applies Encoded to any Value in a Map

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ValueLengthPrefix(val lengthAsShort: Boolean = false, val canOverflow: Boolean = false, val sentinel: Byte = 0xFF.toByte())

Applies LengthPrefix to any Value in a Map

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ValueMedFloat

Applies MedFloat to any Value in a Map

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ValueNullTerminated

Applies NullTerminated to any Value in a Map

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ValueScalar(val multiplier: Int = 1, val decimalExponent: Int = 0, val binaryExponent: Int = 0, val offset: Int = 0)

Applies Scalar to any Value in a Map

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ValueSize(val size: Length)

Applies Size to any Value in a Map

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ValueUnsigned

Applies Unsigned to any Value in a Map