1 # OpenXC Message Format Specification
3 This specification is a part of the [OpenXC platform][OpenXC].
5 An OpenXC vehicle interface sends generic vehicle data over one or more output
6 interfaces (e.g. USB or Bluetooth) as JSON objects, separated by newlines.
8 There are two valid message types - single valued and evented.
10 There may not be a 1:1 relationship between input and output signals - i.e. raw
11 engine timing CAN signals may be summarized in an "engine performance" metric on
12 the abstract side of the interface.
16 The expected format of a single valued message is:
18 {"name": "steering_wheel_angle", "value": 45}
22 The expected format of an event message is:
24 {"name": "button_event", "value": "up", "event": "pressed"}
26 This format is good for something like a button event, where there are two
27 discrete pieces of information in the measurement.
31 These signal names are a part of the OpenXC specification, although some
32 manufacturers may support custom message names.
34 * steering_wheel_angle
35 * numerical, -600 to +600 degrees
37 * torque_at_transmission
38 * numerical, -500 to 1500 Nm
41 * numerical, 0 to 16382 RPM
44 * numerical, 0 to 655 km/h (this will be positive even if going in reverse
45 as it's not a velocity, although you can use the gear status to figure out
48 * accelerator_pedal_position
51 * parking_brake_status
52 * boolean, (true == brake engaged)
53 * 1Hz, but sent immediately on change
55 * boolean (True == pedal pressed)
56 * 1Hz, but sent immediately on change
57 * transmission_gear_position
58 * states: first, second, third, fourth, fifth, sixth, seventh, eighth,
60 * 1Hz, but sent immediately on change
62 * states: neutral, park, reverse, drive, sport, low, first, second, third,
64 * 1Hz, but sent immediately on change
67 0 to 16777214.000 km, with about .2m resolution
70 * states: off, accessory, run, start
71 * 1Hz, but sent immediately on change
75 * fuel_consumed_since_restart
76 * numerical, 0 - 4294967295.0 L (this goes to 0 every time the vehicle
77 restarts, like a trip meter)
80 * Value is State: driver, passenger, rear_left, rear_right.
81 * Event is boolean: true == ajar
82 * 1Hz, but sent immediately on change
85 * 1Hz, but sent immediately on change
88 * 1Hz, but sent immediately on change
89 * windshield_wiper_status
91 * 1Hz, but sent immediately on change
93 * numerical, -89.0 to 89.0 degrees with standard GPS accuracy
96 * numerical, -179.0 to 179.0 degrees with standard GPS accuracy
99 ## Raw CAN Message format
101 An OpenXC vehicle interface may also output raw CAN messages. Each CAN message
102 is sent as a JSON object, separated by newlines. The format of each object is:
104 {"bus": 1, "id": 1234, "value": "0x12345678"}
106 **bus** - the numerical identifier of the CAN bus where this message originated,
107 most likely 1 or 2 (for a vehicle interface with 2 CAN controllers).
109 **id** - the CAN message ID
111 **data** - up to 8 bytes of data from the CAN message's payload, represented as
112 a hexidecimal number in a string. Many JSON parser cannot handle 64-bit
113 integers, which is why we are not using a numerical data type.
118 Copyright (c) 2012-2013 Ford Motor Company
120 Licensed under the BSD license.
122 [OpenXC]: http://openxcplatform.com