InMotionSyncProtocol
Single InMotion protocol entrypoint with auto-detected internal dialects (legacy V1 and V2).
Properties
Manufacturer name (used for display and logging).
More specific dialect/family implementations may refine this protocol identity.
Preferred GATT write type for commands sent by this protocol.
Stable fingerprint key; independent of runtime class names and inheritance.
Explicit command support matrix for this protocol. Commands outside this set are considered unsupported by design.
Functions
Whether a BLE-stack rejection may be retried. Accepted writes are never replayed.
Rechecked by the BLE write queue immediately before submission.
Additional live prerequisites; explanations must never include input values or credentials.
Open-ID encoder extension point; existing protocols retain their enum encoder.
Encode a command. Returns an owned byte array, or an empty array when unsupported, invalid or blocked by protocol state. The session must surface an empty result as failure.
Drains every pending output of this protocol in FIFO order.
Checked contract API. Rejects invalid values before encoding (and its possible side effects), instead of relying on legacy clamping, masking or ignored fields.
Get BMS (Battery Management System) data for this protocol. Returns null if this protocol does not support BMS data extraction. Protocols that support BMS data should override this method to return a list of BMSData objects representing the current state of all battery packs.
InMotion exposes two possible data characteristics depending on the dialect detected at runtime. Both must be enabled for notifications at connection time so that the protocol can determine which dialect is in use from the incoming frames:
Latest model/dialect snapshot. Conditional encoding still requires protocol state checks.
API-level command support check (used by framework and clients).
Get the UUID for the data characteristic
Latest diagnostic-log download snapshot, or null if none was started (or unsupported). Data is only exposed once the whole file is received and CRC-verified.
Optional polling/query plan consumed by the session layer.
Get the UUID for the service
Get the UUID for the write characteristic (if different from data characteristic)
True when this telemetry contains a new speed measurement rather than a carried-over value.
Check if the device is ready for operation
Currently latched firmware version, from MAIN_INFO pages or identity bundles.
Currently latched model name (from V2 main-info or legacy identification frames).
Returns true if the given BLE device advertisement name suggests this protocol.
Optional query/response matcher used by session observability and retry policy.
Called only after the BLE stack accepts a queued write, not when it is encoded.
Feeds one raw BLE notification (any fragmentation) into the state machine.
Called when a timer armed with ProtocolOutput.StartTimer expires.
Returns and removes the next pending output, or null when there is none.
Clears connection-specific state without closing this reusable protocol.