-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add header metadata to trace files #32
Comments
I'm thinking it's most appropriate to make the trace files complete JSON objects, instead of this newline separate JSON object thing. One advantage of the current trace file format is that it's really tolerant to being interrupted - there's no process to closing the trace out except to stop writing to the file. That makes it really easy to just |
Hmm, as we start to deal with bigger traces, we may want to leave the log files in a format that is easy to parse as a stream, rather than requiring a JSON parser to read through the file in its entirety before allowing a program to manipulate the data. Many traces may be too large to fit in memory, and in other cases we may want to break up the trace to parallelize computations (e.g., map reduce). I definitely agree that we should also add more formal logging support. |
There are JSON parsers that can do stream processing to handle things like the Twitter firehose, I'd consider using one of those. |
A proposal from @zacnelson : Add this as the first line in a trace file - it's just another small JSON object so any legacy parsers would just skip it as invalid: {
"trace header": {
"name": Zac Nelson,
"timestamp": XXXXX,
"kit_number": YY,
"vehicle-model": Mustang,
"vehicle-year": 2013,
"description": "highway drive to work"
}
} |
After some discussion:
|
I propose moving the vehicle information to an object, e.g.: "vehicle": {
"make": "Ford",
"model": "Mustang",
"year": 2013
} |
I propose dropping the |
I propose Lastly, for our purposes the vehicle interface ID should be the MAC address of the VI's RN-42 because we know that will be unique. With my last couple of proposals, the top of a trace would look like this: {"metadata": {
"vehicle_interface_id": "7ABF",
"vehicle": {
"make": "Ford",
"model": "Mustang",
"year": 2013
},
"description": "highway drive to work"
}
{"name":"accelerator_pedal_position","value":0,"timestamp":1364314054.403000}
{"name":"engine_speed","value":0,"timestamp":1364314054.415000}
{"name":"torque_at_transmission…….
|
@zacnelson @peplin , all good points. @peplin , I take your point about privacy issues, however, I think it would be a good idea to leave the With that in mind, I propose we add a |
Agree with all points, making some fields optional. I'm going to edit the top of this ticket to have the proposed format. |
Where could we distinguish between different vehicle models. Like "Mustang GT" vs. "Mustang (v6)"? Could we create an additional field under "vehicle" that is something like "trim?" I think this field would be particularly necessary in order to know what different modules might be on CAN. I'm thinking mostly about the powertrain modules or infotainment signals that vary between "trims." "vehicle": {
"make": "Ford",
"model": "Mustang",
"year": 2013,
"trim:" GT
}, |
We agreed on adding a trim level for future machine processing, and also a version field that should be the version of the cantranslator firmware. Final format: {"metadata": {
"version": "v3.0",
"vehicle_interface_id": "7ABF",
"vehicle": {
"make": "Ford",
"model": "Mustang",
"trim": "V6 Premium",
"year": 2013
},
"description": "highway drive to work",
"driver_name": "TJ Giuli",
"vehicle_id": "17N1039247929"
}
{"name":"accelerator_pedal_position","value":0,"timestamp":1364314054.403000}
{"name":"engine_speed","value":0,"timestamp":1364314054.415000}
{"name":"torque_at_transmission……. |
Tracefiles should have metadata that includes the version number of the tracefile being generated, and any other metadata from the vehicle we're currently connected to, such as model, vehicle interface firmware version, etc.
Latest proposed format:
metadata
field.The text was updated successfully, but these errors were encountered: