aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-06 10:23:51 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-06 10:23:51 +0200
commit6ed34a503ac6a32be4a06721b9797e7d94ba8e22 (patch)
tree4cced2a2f0278cafc2aae32e34daea8a06f904f3
parentb17e2904e1682b48d278c81559242dcfdb58c888 (diff)
Update signals.json and generated files.
Adding fake windows signals, Fix wrong bit_position about doors (not fake signal) In fact all signals are fake except of doors signals and OBD2 diagnostic messages. Change-Id: Ia5877bb9720b11b0ff3593788d3e79324b0fa44e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--CAN-binder/examples/toyota/signals.json93
-rw-r--r--CAN-binder/low-can-binding/binding/application-generated.cpp26
2 files changed, 77 insertions, 42 deletions
diff --git a/CAN-binder/examples/toyota/signals.json b/CAN-binder/examples/toyota/signals.json
index 91c56ac4..cd089188 100644
--- a/CAN-binder/examples/toyota/signals.json
+++ b/CAN-binder/examples/toyota/signals.json
@@ -6,47 +6,80 @@
"commands": [],
"messages": {
"0x620": {
- "bus": "can0",
+ "bus": "hs",
"signals": {
"doors.driver.open": {
"generic_name": "doors.front_left.open",
- "bit_position": 46,
+ "bit_position": 43,
"bit_size": 1,
"factor": 1.0,
"offset": 0,
"decoder": "decoder_t::booleanDecoder"},
"doors.passenger.open": {
"generic_name": "doors.front_right.open",
- "bit_position": 47,
+ "bit_position": 44,
"bit_size": 1,
"factor": 1.0,
"offset": 0,
"decoder": "decoder_t::booleanDecoder"},
"doors.rearleft.open": {
"generic_name": "doors.rear_left.open",
- "bit_position": 54,
+ "bit_position": 46,
"bit_size": 1,
"factor": 1.0,
"offset": 0,
"decoder": "decoder_t::booleanDecoder"},
"doors.rearright.open": {
"generic_name": "doors.rear_right.open",
- "bit_position": 53,
+ "bit_position": 45,
"bit_size": 4,
"factor": 1.0,
"offset": 0,
"decoder": "decoder_t::booleanDecoder"},
"doors.coffer.open": {
"generic_name": "doors.boot.open",
- "bit_position": 56,
+ "bit_position": 47,
+ "bit_size": 1,
+ "factor": 1.0,
+ "offset": 0,
+ "decoder": "decoder_t::booleanDecoder"}
+ }
+ },
+ "0x799": {
+ "bus": "hs",
+ "signals": {
+ "windows.driver.open": {
+ "generic_name": "windows.front_left.open",
+ "bit_position": 43,
+ "bit_size": 1,
+ "factor": 1.0,
+ "offset": 0,
+ "decoder": "decoder_t::booleanDecoder"},
+ "windows.passenger.open": {
+ "generic_name": "windows.front_right.open",
+ "bit_position": 44,
+ "bit_size": 1,
+ "factor": 1.0,
+ "offset": 0,
+ "decoder": "decoder_t::booleanDecoder"},
+ "windows.rearleft.open": {
+ "generic_name": "windows.rear_left.open",
+ "bit_position": 46,
"bit_size": 1,
"factor": 1.0,
"offset": 0,
+ "decoder": "decoder_t::booleanDecoder"},
+ "windows.rearright.open": {
+ "generic_name": "windows.rear_right.open",
+ "bit_position": 45,
+ "bit_size": 4,
+ "factor": 1.0,
+ "offset": 0,
"decoder": "decoder_t::booleanDecoder"}
}
},
"0x3D9": {
- "bus": "can0",
+ "bus": "hs",
"signals": {
"PT_FuelLevelPct": {
"generic_name": "fuel.level",
@@ -73,7 +106,7 @@
}
},
"0x4D1": {
- "bus": "can0",
+ "bus": "hs",
"signals": {
"PT_EngineOilTempHigh": {
"generic_name": "engine.oil.temp.high",
@@ -93,7 +126,7 @@
}
},
"0x3E9": {
- "bus": "can0",
+ "bus": "hs",
"signals": {
"PT_VehicleAvgSpeed": {
"generic_name": "vehicle.average.speed",
@@ -107,147 +140,147 @@
},
"diagnostic_messages": [
{
- "bus": "can0",
+ "bus": "hs",
"pid": 4,
"name": "engine.load",
"frequency": 5,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 5,
"name": "engine.coolant.temperature",
"frequency": 1,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 10,
"name": "fuel.pressure",
"frequency": 1,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 11,
"name": "intake.manifold.pressure",
"frequency": 1,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 12,
"name": "engine.speed",
"frequency": 5,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 13,
"name": "vehicle.speed",
"frequency": 5,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 15,
"name": "intake.air.temperature",
"frequency": 1,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 16,
"name": "mass.airflow",
"frequency": 5,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 17,
"name": "throttle.position",
"frequency": 5,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 31,
"name": "running.time",
"frequency": 1,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 45,
"name": "EGR.error",
"frequency": 0,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 47,
"name": "fuel.level",
"frequency": 1,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 51,
"name": "barometric.pressure",
"frequency": 1,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 70,
"name": "ambient.air.temperature",
"frequency": 1,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 76,
"name": "commanded.throttle.position",
"frequency": 1,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 82,
"name": "ethanol.fuel.percentage",
"frequency": 1,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 90,
"name": "accelerator.pedal.position",
"frequency": 5,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 91,
"name": "hybrid.battery-pack.remaining.life",
"frequency": 5,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 92,
"name": "engine.oil.temperature",
"frequency": 1,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 94,
"name": "engine.fuel.rate",
"frequency": 1,
"decoder": "decoder_t::decode_obd2_response"
},
{
- "bus": "can0",
+ "bus": "hs",
"pid": 99,
"name": "engine.torque",
"frequency": 1,
diff --git a/CAN-binder/low-can-binding/binding/application-generated.cpp b/CAN-binder/low-can-binding/binding/application-generated.cpp
index 487e7b56..60a21f51 100644
--- a/CAN-binder/low-can-binding/binding/application-generated.cpp
+++ b/CAN-binder/low-can-binding/binding/application-generated.cpp
@@ -130,7 +130,7 @@ application_t::application_t()
{ // beginning can_signals vector
{std::make_shared<can_signal_t> (can_signal_t{
"doors.boot.open",
- 56,
+ 47,
1,
1.00000f,
0.00000,
@@ -148,7 +148,7 @@ application_t::application_t()
})},
{std::make_shared<can_signal_t> (can_signal_t{
"doors.front_left.open",
- 46,
+ 43,
1,
1.00000f,
0.00000,
@@ -166,7 +166,7 @@ application_t::application_t()
})},
{std::make_shared<can_signal_t> (can_signal_t{
"doors.front_right.open",
- 47,
+ 44,
1,
1.00000f,
0.00000,
@@ -184,7 +184,7 @@ application_t::application_t()
})},
{std::make_shared<can_signal_t> (can_signal_t{
"doors.rear_left.open",
- 54,
+ 46,
1,
1.00000f,
0.00000,
@@ -202,7 +202,7 @@ application_t::application_t()
})},
{std::make_shared<can_signal_t> (can_signal_t{
"doors.rear_right.open",
- 53,
+ 45,
4,
1.00000f,
0.00000,
@@ -220,11 +220,11 @@ application_t::application_t()
})}
} // end can_signals vector
})} // end can_message_definition entry
-, {std::make_shared<can_message_definition_t>(can_message_definition_t{"hs",0x799,can_message_format_t::STANDARD,frequency_clock_t(1.00000f),true,
+, {std::make_shared<can_message_definition_t>(can_message_definition_t{"hs",0x799,can_message_format_t::STANDARD,frequency_clock_t(5.00000f),true,
{ // beginning can_signals vector
{std::make_shared<can_signal_t> (can_signal_t{
"windows.front_left.open",
- 46,
+ 43,
1,
1.00000f,
0.00000,
@@ -242,7 +242,7 @@ application_t::application_t()
})},
{std::make_shared<can_signal_t> (can_signal_t{
"windows.front_right.open",
- 47,
+ 44,
1,
1.00000f,
0.00000,
@@ -260,7 +260,7 @@ application_t::application_t()
})},
{std::make_shared<can_signal_t> (can_signal_t{
"windows.rear_left.open",
- 54,
+ 46,
1,
1.00000f,
0.00000,
@@ -278,7 +278,7 @@ application_t::application_t()
})},
{std::make_shared<can_signal_t> (can_signal_t{
"windows.rear_right.open",
- 53,
+ 45,
4,
1.00000f,
0.00000,
@@ -296,7 +296,8 @@ application_t::application_t()
})}
} // end can_signals vector
})} // end can_message_definition entry
- }, // end can_message_definition vector
+
+ }, // end can_message_definition vector
{ // beginning diagnostic_messages_ vector
{std::make_shared<diagnostic_message_t>(diagnostic_message_t{
4,
@@ -529,6 +530,7 @@ application_t::application_t()
nullptr,
true
})}
+
} // end diagnostic_messages_ vector
})} // end can_message_set entry
} // end can_message_set vector
@@ -552,7 +554,7 @@ application_t::application_t()
dm->set_parent(cms.get());
}
}
-}
+ }
const std::string application_t::get_diagnostic_bus() const
{