Package-level declarations

Types

Link copied to clipboard

Generated at build time from the library-authoritative JSON, with no runtime JSON dependency.

Link copied to clipboard
data class CommandContext(val model: String? = null, val dialect: String? = null)
Link copied to clipboard
data class CommandDescriptor(val id: String, val name: String, val description: String, val input: CommandInput, val encoding: CommandEncoding, val operation: String? = null, val hardwareLimits: String = "unknown")
Link copied to clipboard
Link copied to clipboard
sealed interface CommandEncodingResult
Link copied to clipboard
interface CommandInput

Open input contract: new kinds can supply a validator without changing this interface.

Link copied to clipboard

Extensible structured values, without platform reflection or a generic untyped map API.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Standard command types for EUCs

Link copied to clipboard
sealed interface CommandValue

Typed command/query inputs shared by synchronous engines and session drivers. The command type determines which variant is meaningful. Binary and integer-list values own snapshots: modifying caller input or a returned copy cannot change a queued query.

Link copied to clipboard

EUC BLE protocol fingerprint database.

Link copied to clipboard
interface EucProtocolSpec

Platform-independent, I/O-free part of a protocol contract: identification, GATT layout, command encoding, polling plan and pure state queries. Shared by flow-compatible facades and the synchronous SyncEucProtocol.

Link copied to clipboard
data class GattServiceSpec(val uuid: EucUuid, val version: Int = 1, val requiredCharacteristicUUIDs: Set<EucUuid> = emptySet(), val excludedCharacteristicUUIDs: Set<EucUuid> = emptySet())

Specifies a single GATT service requirement within a GattSignature.

Link copied to clipboard

A GATT signature is a list of GattServiceSpec entries that all must match for a protocol to be identified by GATT fingerprinting. All specs use AND semantics (every spec must hold).

Link copied to clipboard

Gotway/Begode reverse-engineered protocol (updated)

Link copied to clipboard

Single InMotion protocol entrypoint with auto-detected internal dialects (legacy V1 and V2).

Link copied to clipboard

Improved KingSong protocol: tolerant parsing, header resync, header-aware frame reassembly using ByteByByteFrameParser, safe bounds checks, optional cell voltages parsing, and clamped command generation.

Link copied to clipboard

Leaperkim/Veteran protocol implementation based on WheelLog raw frame behavior.

Link copied to clipboard
data class NinebotBmsSnapshot(val bmsIndex: Int, val rawPayloadHex: String, val voltage: Double? = null, val current: Double? = null, val cellVoltages: List<Double>? = null)
Link copied to clipboard
data class NinebotSettingsSnapshot(val bleVersion: String? = null, val authKeyHex: String? = null, val authKeyAscii: String? = null, val lockState: Int? = null, val limitedModeEnabled: Boolean? = null, val speedLimitKmh: Double? = null, val alarmsArmedMask: Int? = null, val alarm1SpeedKmh: Int? = null, val alarm2SpeedKmh: Int? = null, val alarm3SpeedKmh: Int? = null, val ledMode: Int? = null, val driveFlags: Int? = null, val speakerVolumeStep: Int? = null)
Link copied to clipboard

Ninebot protocol MVP parser for common WheelLog-style telemetry payloads.

Link copied to clipboard

Dedicated Ninebot Z-series protocol split with stateful handshake/polling queries. Decoding is delegated to NinebotProtocol while command/query orchestration is Z-specific.

Link copied to clipboard
Link copied to clipboard
class PasswordChangeRequest(val oldPassword: String, val newPassword: String) : CommandRecordValue

Explicit, short-lived KingSong password change input. Never persist this request.

Link copied to clipboard
class ProtocolOutbox(capacity: Int = DEFAULT_CAPACITY)

FIFO queue of ProtocolOutput owned by a SyncEucProtocol. The default capacity is 256; overflow throws instead of dropping protocol outputs. Not thread-safe: the session layer serializes all calls into a protocol.

Link copied to clipboard
sealed class ProtocolOutput

Output produced by a SyncEucProtocol: either an event for the application or an action the session layer must perform. Protocols never perform I/O or schedule work themselves.

Link copied to clipboard
data class ProtocolPollingPlan(val enabled: Boolean, val startupQueries: List<ProtocolQuerySpec> = emptyList(), val periodicQueries: List<ProtocolQuerySpec> = emptyList())
Link copied to clipboard
data class ProtocolQuerySpec(val id: String, val commandType: CommandType, val value: CommandValue = CommandValue.None, val initialDelayMs: Long = 0, val intervalMs: Long = 0, val responseTimeoutMs: Long = 1500, val maxRetries: Int = 2, val retryBackoffMs: Long = 500)
Link copied to clipboard

Preferred GATT write type declared by a protocol for its command writes.

Link copied to clipboard

Synchronous, I/O-free protocol state machine ("sans-IO").

Functions

Link copied to clipboard

Drains every pending output of this protocol in FIFO order.