FakePlatform

class FakePlatform : PlatformAdapter

Host-only in-memory PlatformAdapter for tests and the dev harness.

Constructors

Link copied to clipboard
constructor(supportedVersion: String, features: Set<String>)

Functions

Link copied to clipboard
Every apply call, in order.
Link copied to clipboard
open fun droppedWrites(): Int
How many writes were dropped so far.
Link copied to clipboard
open fun ecuDropWrites(n: Int)
The next n writes return normally but the ECU keeps its value and reports nothing.
Link copied to clipboard
open fun ecuFailWrites(n: Int)
The next n writes throw IllegalStateException; checked before drop.
Link copied to clipboard
Whether an accepted write that leaves the ECU's value unchanged is reported too (default true).
Link copied to clipboard
open fun ecuReportWrites(on: Boolean)
Whether an accepted write publishes ParkingSoundChanged before apply returns (default true).
Link copied to clipboard
Simulates the car (not the SDK) changing the persisted value; publishes ParkingSoundChanged.
Link copied to clipboard
The persisted ECU value.
Link copied to clipboard
open fun features(): Set<String>
Link copied to clipboard
open fun id(): String
Link copied to clipboard
open fun parking(): ParkingIo
Link copied to clipboard
open fun roots(tmp: File): SdkRoots
The SDK roots for a test: <tmp>/mibsdk (install, as on the unit), <tmp>/persist and <tmp>/ram, three separate directories so a test sees which root each file lands in.
Link copied to clipboard
open fun setFeatures(features: Set<String>)
Simulates the adapter learning (or losing) features after start, e.g.
Link copied to clipboard
open fun setIgnition(on: Boolean)
Simulates the ignition changing; publishes IgnitionChanged.
Link copied to clipboard
Does what the real DSI proxy does for a stock call: asks the hook table whether the point is vetoed, records the observation, and reports whether the call would be forwarded to the stock service.
Link copied to clipboard
open fun start(host: PlatformHost)
Link copied to clipboard
open fun stop()
Link copied to clipboard
open fun supports(hmiVersion: String): Boolean
Link copied to clipboard
open fun wifi(): WifiIo