Status Data Type
An assignment typically has a status, or state. When not started the status is Pending which hopefully later will change to Running. When an assignment is done its status changes to Stopped.
Currently, the set of statuses are (name, value):
- Pending, 0 - The user has created an assignment but the car is not yet aware of it.
- Downloaded, 1 - A state rarely seen but it signifies the fact that the car is aware of a new assignment but it has not yet been started.
- Running, 2 - The car has successfully started the assignment. It does not imply that the assignment is running at this very moment, this depends on whether the car is actually started and is running. However, once the car is running the assignment will also be started.
- Error, 3 - The WCU in the car could not for some reason start the assignment. The reason for this state can be communicated via a status message.
- Stopped, 4 - The assignment has been stopped and will not be started once the car is running. This is the final state for an assignment.
- Stop pending, 5 - Before the car is aware of that an assignment should be stopped, the intermediate status is Stop pending. This status is the result of either starting a new assignment of the same type or that the user has ordered to stop the current assignment.
- Warning, 6 - A state that signifies that something is wrong but not to the extent that an assignment can not be run.
name | data type | constraints | description |
---|---|---|---|
code | number | required int | A numbered version of the status code. |
text | string | A textual description of the status code. |
Example
{ "code" : 2, "text" : "RUNNING" }