VehicleControls
The switches of one vehicle, as in VehicleStateSnapshot. Parts the model does
not have are left out.
Definition
Section titled “Definition”type VehicleControls = Readonly<{ isEngineOn: boolean; headlights: VehicleHeadlightMode; windows: Readonly<Partial<Record<VehicleWindowName, boolean>>>; doors: Readonly<Partial<Record<VehicleDoorName, boolean>>>; isHoodOpen?: boolean; isTrunkOpen?: boolean; isLocked: boolean; isSirenOn: boolean;}>;Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
isEngineOn |
boolean |
Whether its engine is on. |
headlights |
VehicleHeadlightMode |
The headlight mode. |
windows |
Partial<Record<VehicleWindowName, boolean>> |
Open state for the windows it has. |
doors |
Partial<Record<VehicleDoorName, boolean>> |
Open state for the passenger doors it has. |
isHoodOpen |
boolean |
Present only when the model has a hood. |
isTrunkOpen |
boolean |
Present only when the model has a trunk. |
isLocked |
boolean |
Whether it is locked. |
isSirenOn |
boolean |
The siren or alarm setting. |
Related
Section titled “Related”VehicleSnapshotvehicles.setState: change them