aboutsummaryrefslogtreecommitdiffstats
path: root/examples/tests
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tests')
-rw-r--r--examples/tests/application-generated.cpp325
-rw-r--r--examples/tests/signal.json955
2 files changed, 1124 insertions, 156 deletions
diff --git a/examples/tests/application-generated.cpp b/examples/tests/application-generated.cpp
index 6abb4851..06ee30e4 100644
--- a/examples/tests/application-generated.cpp
+++ b/examples/tests/application-generated.cpp
@@ -7,7 +7,8 @@ application_t::application_t()
, message_set_{
{std::make_shared<message_set_t>(message_set_t{0,"AGL Virtual Car",
{ // beginning message_definition_ vector
- {std::make_shared<message_definition_t>(message_definition_t{"ls",0x30,"",0,false,message_format_t::EXTENDED,frequency_clock_t(5.00000f),true, { // beginning signals vector
+ {std::make_shared<message_definition_t>(message_definition_t{"ls",0x30,"",8,4,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
{std::make_shared<signal_t> (signal_t{
"hvac.fan.speed",// generic_name
32,// bit_position
@@ -21,14 +22,14 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"hvac.temperature.left",// generic_name
@@ -47,10 +48,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"hvac.temperature.right",// generic_name
@@ -69,10 +70,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"hvac.temperature.average",// generic_name
@@ -91,14 +92,15 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})}
} // end signals vector
})} // end message_definition entry
-, {std::make_shared<message_definition_t>(message_definition_t{"hs",0x3D9,"",0,true,message_format_t::STANDARD,frequency_clock_t(5.00000f),true, { // beginning signals vector
+, {std::make_shared<message_definition_t>(message_definition_t{"hs",0x3D9,"",8,2050,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
{std::make_shared<signal_t> (signal_t{
"engine.speed",// generic_name
16,// bit_position
@@ -112,14 +114,14 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"fuel.level.low",// generic_name
@@ -134,14 +136,14 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
decoder_t::decode_boolean,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"fuel.level",// generic_name
@@ -156,18 +158,19 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})}
} // end signals vector
})} // end message_definition entry
-, {std::make_shared<message_definition_t>(message_definition_t{"hs",0x3E9,"",0,false,message_format_t::STANDARD,frequency_clock_t(5.00000f),true, { // beginning signals vector
+, {std::make_shared<message_definition_t>(message_definition_t{"hs",0x3E9,"",8,2,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
{std::make_shared<signal_t> (signal_t{
"vehicle.average.speed",// generic_name
0,// bit_position
@@ -185,14 +188,15 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})}
} // end signals vector
})} // end message_definition entry
-, {std::make_shared<message_definition_t>(message_definition_t{"hs",0x4D1,"",0,false,message_format_t::STANDARD,frequency_clock_t(5.00000f),true, { // beginning signals vector
+, {std::make_shared<message_definition_t>(message_definition_t{"hs",0x4D1,"",8,2,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
{std::make_shared<signal_t> (signal_t{
"engine.oil.temp",// generic_name
16,// bit_position
@@ -206,14 +210,14 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"engine.oil.temp.high",// generic_name
@@ -228,18 +232,19 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
decoder_t::decode_boolean,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})}
} // end signals vector
})} // end message_definition entry
-, {std::make_shared<message_definition_t>(message_definition_t{"hs",0x620,"",0,false,message_format_t::STANDARD,frequency_clock_t(5.00000f),true, { // beginning signals vector
+, {std::make_shared<message_definition_t>(message_definition_t{"hs",0x620,"",8,2,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
{std::make_shared<signal_t> (signal_t{
"doors.boot.open",// generic_name
47,// bit_position
@@ -253,14 +258,14 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
decoder_t::decode_boolean,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"doors.front_left.open",// generic_name
@@ -275,14 +280,14 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
decoder_t::decode_boolean,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"doors.front_right.open",// generic_name
@@ -297,14 +302,14 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
decoder_t::decode_boolean,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"doors.rear_left.open",// generic_name
@@ -319,14 +324,14 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
decoder_t::decode_boolean,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"doors.rear_right.open",// generic_name
@@ -341,18 +346,19 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
decoder_t::decode_boolean,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})}
} // end signals vector
})} // end message_definition entry
-, {std::make_shared<message_definition_t>(message_definition_t{"hs",0x799,"",0,false,message_format_t::STANDARD,frequency_clock_t(5.00000f),true, { // beginning signals vector
+, {std::make_shared<message_definition_t>(message_definition_t{"hs",0x799,"",8,2,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
{std::make_shared<signal_t> (signal_t{
"windows.front_left.open",// generic_name
43,// bit_position
@@ -366,14 +372,14 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
decoder_t::decode_boolean,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"windows.front_right.open",// generic_name
@@ -388,14 +394,14 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
decoder_t::decode_boolean,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"windows.rear_left.open",// generic_name
@@ -410,14 +416,14 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
decoder_t::decode_boolean,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"windows.rear_right.open",// generic_name
@@ -432,18 +438,19 @@ application_t::application_t()
false,// force_send_changed
{
},// states
- false,// writable
+ true,// writable
decoder_t::decode_boolean,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})}
} // end signals vector
})} // end message_definition entry
-, {std::make_shared<message_definition_t>(message_definition_t{"j1939",61442,"ETC1",8,false,message_format_t::J1939,frequency_clock_t(5.00000f),true, { // beginning signals vector
+, {std::make_shared<message_definition_t>(message_definition_t{"j1939",61442,"ETC1",8,18,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
{std::make_shared<signal_t> (signal_t{
"Eng.Momentary.Overspeed.Enable",// generic_name
32,// bit_position
@@ -462,13 +469,13 @@ application_t::application_t()
{3,"TakeNoAction"}
},// states
true,// writable
- nullptr,// decoder
+ decoder_t::decode_state,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"Momentary.Eng.Max.Power.Enable",// generic_name
@@ -488,13 +495,13 @@ application_t::application_t()
{0,"notRqingMaxPowerAvailable"}
},// states
true,// writable
- nullptr,// decoder
+ decoder_t::decode_state,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"Percent.Clutch.Slip",// generic_name
@@ -513,10 +520,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "%",// unit
+ "%"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Progressive.Shift.Disable",// generic_name
@@ -536,13 +543,13 @@ application_t::application_t()
{3,"TakeNoAction"}
},// states
true,// writable
- nullptr,// decoder
+ decoder_t::decode_state,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"Src.Addrss.Of.Ctrllng.Dvc.Fr.Trns.Cntrl",// generic_name
@@ -561,10 +568,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"Trans.Driveline.Engaged",// generic_name
@@ -584,13 +591,13 @@ application_t::application_t()
{3,"NotAvailable"}
},// states
true,// writable
- nullptr,// decoder
+ decoder_t::decode_state,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"Trans.Input.Shaft.Speed",// generic_name
@@ -609,10 +616,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "rpm",// unit
+ "rpm"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Trans.Output.Shaft.Speed",// generic_name
@@ -631,10 +638,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "rpm",// unit
+ "rpm"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Trans.Shift.In.Process",// generic_name
@@ -654,13 +661,13 @@ application_t::application_t()
{0,"ShiftIsNotInProcess"}
},// states
true,// writable
- nullptr,// decoder
+ decoder_t::decode_state,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"Trns.Trq.Cnvrtr.Lckp.Trnstn.In.Prcess",// generic_name
@@ -680,13 +687,13 @@ application_t::application_t()
{0,"TransitionIsNotInProcess"}
},// states
true,// writable
- nullptr,// decoder
+ decoder_t::decode_state,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"Trns.Trque.Converter.Lockup.Engaged",// generic_name
@@ -706,17 +713,18 @@ application_t::application_t()
{1,"TorqueConverterLockupEngaged"}
},// states
true,// writable
- nullptr,// decoder
+ decoder_t::decode_state,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})}
} // end signals vector
})} // end message_definition entry
-, {std::make_shared<message_definition_t>(message_definition_t{"j1939",61444,"EEC1",8,false,message_format_t::J1939,frequency_clock_t(5.00000f),true, { // beginning signals vector
+, {std::make_shared<message_definition_t>(message_definition_t{"j1939",61444,"EEC1",8,18,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
{std::make_shared<signal_t> (signal_t{
"Actl.Eng.Prcnt.Trque.High.Resolution",// generic_name
4,// bit_position
@@ -735,13 +743,13 @@ application_t::application_t()
{8,"1111NotAvailable"}
},// states
false,// writable
- nullptr,// decoder
+ decoder_t::decode_state,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "%",// unit
+ "%"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Actual.Eng.Percent.Torque",// generic_name
@@ -760,10 +768,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "%",// unit
+ "%"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Drivers.Demand.Eng.Percent.Torque",// generic_name
@@ -782,10 +790,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "%",// unit
+ "%"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Eng.Demand.Percent.Torque",// generic_name
@@ -804,10 +812,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "%",// unit
+ "%"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Eng.Speed",// generic_name
@@ -826,10 +834,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "rpm",// unit
+ "rpm"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Eng.Starter.Mode",// generic_name
@@ -858,13 +866,13 @@ application_t::application_t()
{8,"strtrInhbtdDueToStarterOvertemp"}
},// states
false,// writable
- nullptr,// decoder
+ decoder_t::decode_state,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"Eng.Torque.Mode",// generic_name
@@ -893,13 +901,13 @@ application_t::application_t()
{6,"Transmission control"}
},// states
false,// writable
- nullptr,// decoder
+ decoder_t::decode_state,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"Src.AddrssOf.Ctrllng.Dvc.Fr.Eng.Cntrl",// generic_name
@@ -918,14 +926,15 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})}
} // end signals vector
})} // end message_definition entry
-, {std::make_shared<message_definition_t>(message_definition_t{"j1939",61449,"VDC2",8,false,message_format_t::J1939,frequency_clock_t(5.00000f),true, { // beginning signals vector
+, {std::make_shared<message_definition_t>(message_definition_t{"j1939",61449,"VDC2",8,18,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
{std::make_shared<signal_t> (signal_t{
"Lateral.Acceleration",// generic_name
40,// bit_position
@@ -943,10 +952,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "m/s/s",// unit
+ "m/s/s"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Longitudinal.Acceleration",// generic_name
@@ -965,10 +974,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "m/s/s",// unit
+ "m/s/s"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Steer.Wheel.Angle",// generic_name
@@ -987,10 +996,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "rad",// unit
+ "rad"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Steer.Wheel.Angle.Sensor.Type",// generic_name
@@ -1010,13 +1019,13 @@ application_t::application_t()
{2,"Reserved"}
},// states
false,// writable
- nullptr,// decoder
+ decoder_t::decode_state,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "",// unit
+ ""// unit
})},
{std::make_shared<signal_t> (signal_t{
"Steer.Wheel.Turn.Counter",// generic_name
@@ -1035,10 +1044,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "turns",// unit
+ "turns"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Yaw.Rate",// generic_name
@@ -1057,14 +1066,15 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "rad/s",// unit
+ "rad/s"// unit
})}
} // end signals vector
})} // end message_definition entry
-, {std::make_shared<message_definition_t>(message_definition_t{"j1939",65215,"EBC2",8,false,message_format_t::J1939,frequency_clock_t(5.00000f),true, { // beginning signals vector
+, {std::make_shared<message_definition_t>(message_definition_t{"j1939",65215,"EBC2",8,18,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
{std::make_shared<signal_t> (signal_t{
"Front.Axle.Speed",// generic_name
0,// bit_position
@@ -1082,10 +1092,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "km/h",// unit
+ "km/h"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Relative.Speed.Front.Axle.Left.Wheel",// generic_name
@@ -1104,10 +1114,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "km/h",// unit
+ "km/h"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Relative.Speed.Rear.Axle1.Left.Wheel",// generic_name
@@ -1126,10 +1136,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "km/h",// unit
+ "km/h"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Relative.Speed.Rear.Axle2.Left.Wheel",// generic_name
@@ -1148,10 +1158,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "km/h",// unit
+ "km/h"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Rlative.Speed.Front.Axle.Right.Wheel",// generic_name
@@ -1170,10 +1180,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "km/h",// unit
+ "km/h"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Rlative.Speed.Rear.Axle1.Right.Wheel",// generic_name
@@ -1192,10 +1202,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "km/h",// unit
+ "km/h"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Rlative.Speed.Rear.Axle2.Right.Wheel",// generic_name
@@ -1214,14 +1224,15 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "km/h",// unit
+ "km/h"// unit
})}
} // end signals vector
})} // end message_definition entry
-, {std::make_shared<message_definition_t>(message_definition_t{"j1939",65253,"HOURS",8,false,message_format_t::J1939,frequency_clock_t(5.00000f),true, { // beginning signals vector
+, {std::make_shared<message_definition_t>(message_definition_t{"j1939",65253,"HOURS",8,18,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
{std::make_shared<signal_t> (signal_t{
"Eng.Total.Hours.Of.Operation",// generic_name
0,// bit_position
@@ -1239,10 +1250,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "hr",// unit
+ "hr"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Eng.Total.Revolutions",// generic_name
@@ -1261,14 +1272,15 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "r",// unit
+ "r"// unit
})}
} // end signals vector
})} // end message_definition entry
-, {std::make_shared<message_definition_t>(message_definition_t{"j1939",65262,"ET1",8,false,message_format_t::J1939,frequency_clock_t(5.00000f),true, { // beginning signals vector
+, {std::make_shared<message_definition_t>(message_definition_t{"j1939",65262,"ET1",8,18,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
{std::make_shared<signal_t> (signal_t{
"Eng.Coolant.Temp",// generic_name
0,// bit_position
@@ -1286,10 +1298,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "deg C",// unit
+ "deg C"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Eng.Fuel.Temp1",// generic_name
@@ -1308,10 +1320,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "deg C",// unit
+ "deg C"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Eng.Intercooler.Temp",// generic_name
@@ -1330,10 +1342,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "deg C",// unit
+ "deg C"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Eng.Intercooler.Thermostat.Opening",// generic_name
@@ -1352,10 +1364,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "%",// unit
+ "%"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Eng.Oil.Temp1",// generic_name
@@ -1374,10 +1386,10 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "deg C",// unit
+ "deg C"// unit
})},
{std::make_shared<signal_t> (signal_t{
"Eng.Turbo.Oil.Temp",// generic_name
@@ -1396,13 +1408,14 @@ application_t::application_t()
nullptr,// decoder
nullptr,// encoder
false,// received
- std::make_pair<bool, int>(false,0),// multiplex
+ std::make_pair<bool, int>(false, 0),// multiplex
0,// is_big_endian
0,// is_signed
- "deg C",// unit
+ "deg C"// unit
})}
} // end signals vector
})} // end message_definition entry
+
}, // end message_definition vector
{ // beginning diagnostic_messages_ vector
{std::make_shared<diagnostic_message_t>(diagnostic_message_t{
diff --git a/examples/tests/signal.json b/examples/tests/signal.json
new file mode 100644
index 00000000..1478caf8
--- /dev/null
+++ b/examples/tests/signal.json
@@ -0,0 +1,955 @@
+{ "name": "AGL Virtual Car",
+ "extra_sources": [],
+ "initializers": [],
+ "loopers": [],
+ "buses": {},
+ "commands": [],
+ "messages": {
+ "0x620": {
+ "bus": "hs",
+ "is_fd" : false,
+ "is_extended": false,
+ "is_j1939" : false,
+ "length" : 8,
+ "signals": {
+ "doors.driver.open": {
+ "generic_name": "doors.front_left.open",
+ "bit_position": 43,
+ "bit_size": 1,
+ "factor": 1.0,
+ "offset": 0,
+ "writable": true,
+ "decoder": "decoder_t::decode_boolean"},
+ "doors.passenger.open": {
+ "generic_name": "doors.front_right.open",
+ "bit_position": 44,
+ "bit_size": 1,
+ "factor": 1.0,
+ "offset": 0,
+ "writable": true,
+ "decoder": "decoder_t::decode_boolean"},
+ "doors.rearleft.open": {
+ "generic_name": "doors.rear_left.open",
+ "bit_position": 46,
+ "bit_size": 1,
+ "factor": 1.0,
+ "offset": 0,
+ "writable": true,
+ "decoder": "decoder_t::decode_boolean"},
+ "doors.rearright.open": {
+ "generic_name": "doors.rear_right.open",
+ "bit_position": 45,
+ "bit_size": 4,
+ "factor": 1.0,
+ "offset": 0,
+ "writable": true,
+ "decoder": "decoder_t::decode_boolean"},
+ "doors.coffer.open": {
+ "generic_name": "doors.boot.open",
+ "bit_position": 47,
+ "bit_size": 1,
+ "factor": 1.0,
+ "offset": 0,
+ "writable": true,
+ "decoder": "decoder_t::decode_boolean"}
+ }
+ },
+ "0x799": {
+ "bus": "hs",
+ "is_fd" : false,
+ "is_extended": false,
+ "is_j1939" : false,
+ "length" : 8,
+ "signals": {
+ "windows.driver.open": {
+ "generic_name": "windows.front_left.open",
+ "bit_position": 43,
+ "bit_size": 1,
+ "factor": 1.0,
+ "offset": 0,
+ "writable": true,
+ "decoder": "decoder_t::decode_boolean"},
+ "windows.passenger.open": {
+ "generic_name": "windows.front_right.open",
+ "bit_position": 44,
+ "bit_size": 1,
+ "factor": 1.0,
+ "offset": 0,
+ "writable": true,
+ "decoder": "decoder_t::decode_boolean"},
+ "windows.rearleft.open": {
+ "generic_name": "windows.rear_left.open",
+ "bit_position": 46,
+ "bit_size": 1,
+ "factor": 1.0,
+ "offset": 0,
+ "writable": true,
+ "decoder": "decoder_t::decode_boolean"},
+ "windows.rearright.open": {
+ "generic_name": "windows.rear_right.open",
+ "bit_position": 45,
+ "bit_size": 4,
+ "factor": 1.0,
+ "offset": 0,
+ "writable": true,
+ "decoder": "decoder_t::decode_boolean"}
+ }
+ },
+ "0x3D9": {
+ "bus": "hs",
+ "is_fd" : true,
+ "is_extended": false,
+ "is_j1939" : false,
+ "length" : 8,
+ "signals": {
+ "PT_FuelLevelPct": {
+ "generic_name": "fuel.level",
+ "bit_position": 8,
+ "bit_size": 8,
+ "factor": 0.392157,
+ "offset": 0,
+ "writable": true
+ },
+ "PT_EngineSpeed": {
+ "generic_name": "engine.speed",
+ "bit_position": 16,
+ "bit_size": 16,
+ "factor": 0.25,
+ "offset": 0,
+ "writable": true
+ },
+ "PT_FuelLevelLow": {
+ "generic_name": "fuel.level.low",
+ "bit_position": 55,
+ "bit_size": 1,
+ "factor": 1,
+ "offset": 0,
+ "writable": true,
+ "decoder": "decoder_t::decode_boolean"
+ }
+ }
+ },
+ "0x4D1": {
+ "bus": "hs",
+ "is_fd" : false,
+ "is_extended": false,
+ "is_j1939" : false,
+ "length" : 8,
+ "signals": {
+ "PT_EngineOilTempHigh": {
+ "generic_name": "engine.oil.temp.high",
+ "bit_position": 7,
+ "bit_size": 1,
+ "factor": 1,
+ "offset": 0,
+ "writable": true,
+ "decoder": "decoder_t::decode_boolean"
+ },
+ "PT_EngineOilTemp": {
+ "generic_name": "engine.oil.temp",
+ "bit_position": 16,
+ "bit_size": 8,
+ "factor": 1,
+ "offset": 0,
+ "writable": true
+ }
+ }
+ },
+ "0x3E9": {
+ "bus": "hs",
+ "is_fd" : false,
+ "is_extended": false,
+ "is_j1939" : false,
+ "length" : 8,
+ "signals": {
+ "PT_VehicleAvgSpeed": {
+ "generic_name": "vehicle.average.speed",
+ "bit_position": 0,
+ "bit_size": 15,
+ "factor": 0.015625,
+ "offset": 0,
+ "writable": false
+ }
+ }
+ },
+ "0x30": {
+ "bus": "ls",
+ "is_fd" : false,
+ "is_extended": true,
+ "is_j1939" : false,
+ "length" : 8,
+ "signals": {
+ "LeftTemperature": {
+ "generic_name": "hvac.temperature.left",
+ "bit_position": 0,
+ "bit_size": 8,
+ "factor": 1,
+ "offset": 0,
+ "writable": true
+ },
+ "RightTemperature": {
+ "generic_name": "hvac.temperature.right",
+ "bit_position": 8,
+ "bit_size": 8,
+ "factor": 1,
+ "offset": 0,
+ "writable": true
+ },
+ "Temperature": {
+ "generic_name": "hvac.temperature.average",
+ "bit_position": 16,
+ "bit_size": 8,
+ "factor": 1,
+ "offset": 0,
+ "writable": true
+ },
+ "FanSpeed": {
+ "generic_name": "hvac.fan.speed",
+ "bit_position": 32,
+ "bit_size": 8,
+ "factor": 23.529411765,
+ "offset": 0,
+ "writable": true
+ }
+ }
+ },
+ "61442": {
+ "comment": "Electronic Transmission Controller 1",
+ "length": 8,
+ "name": "ETC1",
+ "bus" : "j1939",
+ "is_fd" : false,
+ "is_extended": false,
+ "is_j1939" : true,
+ "signals" : {
+ "Trns.Trque.Converter.Lockup.Engaged" : {
+ "generic_name": "Trns.Trque.Converter.Lockup.Engaged",
+ "bit_position": 2,
+ "bit_size": 2,
+ "factor": 1,
+ "offset": 0,
+ "comment": "State signal which indicates whether the torque converter lockup is engaged.",
+ "is_big_endian": false,
+ "is_signed": false,
+ "writable" : true,
+ "states": {
+ "TorqueConverterLockupDisengaged": [0],
+ "TorqueConverterLockupEngaged": [1],
+ "Error": [2],
+ "NotAvailable": [3]
+ }
+ },
+ "Trns.Trq.Cnvrtr.Lckp.Trnstn.In.Prcess" : {
+ "generic_name": "Trns.Trq.Cnvrtr.Lckp.Trnstn.In.Prcess",
+ "bit_position": 6,
+ "bit_size": 2,
+ "factor": 1,
+ "offset": 0,
+ "comment": "State signal indicating whether or not the transmission torque converter lock up clutch is transitioning between being",
+ "is_big_endian": false,
+ "is_signed": false,
+ "writable" : true,
+ "states": {
+ "TransitionIsNotInProcess": [0],
+ "TransitionIsInProcess": [1],
+ "Error": [2],
+ "NotAvailable": [3]
+ }
+ },
+ "Src.Addrss.Of.Ctrllng.Dvc.Fr.Trns.Cntrl" : {
+ "generic_name": "Src.Addrss.Of.Ctrllng.Dvc.Fr.Trns.Cntrl",
+ "bit_position": 56,
+ "bit_size": 8,
+ "factor": 1,
+ "offset": 0,
+ "comment": "The source address of the SAE J1939 device currently controlling the transmission.",
+ "is_big_endian": false,
+ "is_signed": false,
+ "writable" : true
+ },
+ "Momentary.Eng.Max.Power.Enable" : {
+ "generic_name": "Momentary.Eng.Max.Power.Enable",
+ "bit_position": 36,
+ "bit_size": 2,
+ "factor": 1,
+ "offset": 0,
+ "comment": "Momentarily Requesting highest torque map from the engine control",
+ "is_big_endian": false,
+ "is_signed": false,
+ "writable" : true,
+ "states": {
+ "notRqingMaxPowerAvailable": [0],
+ "mmntarilyRqingMaxPowerAvailable": [1],
+ "fault": [2],
+ "notAvailable": [3]
+ }
+ },
+ "Trans.Input.Shaft.Speed" : {
+ "generic_name": "Trans.Input.Shaft.Speed",
+ "bit_position": 40,
+ "bit_size": 16,
+ "factor": 0.125,
+ "offset": 0,
+ "comment": "Rotational velocity of the primary shaft transferring power into the transmission.",
+ "unit": "rpm",
+ "is_big_endian": false,
+ "is_signed": false,
+ "writable" : true
+ },
+ "Progressive.Shift.Disable" : {
+ "generic_name": "Progressive.Shift.Disable",
+ "bit_position": 34,
+ "bit_size": 2,
+ "factor": 1,
+ "offset": 0,
+ "comment": "Command signal used to indicate that progressive shifting by the engine should be disallowed.",
+ "is_big_endian": false,
+ "is_signed": false,
+ "writable" : true,
+ "states": {
+ "ProgressiveShiftIsNotDisabled": [0],
+ "ProgressiveShiftIsDisabled": [1],
+ "Reserved": [2],
+ "TakeNoAction": [3]
+ }
+ },
+ "Eng.Momentary.Overspeed.Enable" : {
+ "generic_name": "Eng.Momentary.Overspeed.Enable",
+ "bit_position": 32,
+ "bit_size": 2,
+ "factor": 1,
+ "offset": 0,
+ "comment": "Command signal used to indicate that the engine speed may be boosted up to the maximum engine overspeed value to",
+ "is_big_endian": false,
+ "is_signed": false,
+ "writable" : true,
+ "states": {
+ "MomentaryEngOverspeedIsDisabled": [0],
+ "MomentaryEngOverspeedIsEnabled": [1],
+ "Reserved": [2],
+ "TakeNoAction": [3]
+ }
+ },
+ "Percent.Clutch.Slip" : {
+ "generic_name": "Percent.Clutch.Slip",
+ "bit_position": 24,
+ "bit_size": 8,
+ "factor": 0.4,
+ "offset": 0,
+ "comment": "Parameter which represents the ratio of input shaft speed to current engine speed (in percent).",
+ "unit": "%",
+ "is_big_endian": false,
+ "is_signed": false,
+ "writable" : true
+ },
+ "Trans.Output.Shaft.Speed" : {
+ "generic_name": "Trans.Output.Shaft.Speed",
+ "bit_position": 8,
+ "bit_size": 16,
+ "factor": 0.125,
+ "offset": 0,
+ "comment": "Calculated speed of the transmission output shaft.",
+ "unit": "rpm",
+ "is_big_endian": false,
+ "is_signed": false,
+ "writable" : true
+ },
+ "Trans.Shift.In.Process" : {
+ "generic_name": "Trans.Shift.In.Process",
+ "bit_position": 4,
+ "bit_size": 2,
+ "factor": 1,
+ "offset": 0,
+ "comment": "Indicates that the transmission is in process of shifting from the current gear to the selected gear.",
+ "is_big_endian": false,
+ "is_signed": false,
+ "writable" : true,
+ "states": {
+ "ShiftIsNotInProcess": [0],
+ "ShiftInProcess": [1],
+ "Error": [2],
+ "NotAvailable": [3]
+ }
+ },
+ "Trans.Driveline.Engaged" : {
+ "generic_name": "Trans.Driveline.Engaged",
+ "bit_position": 0,
+ "bit_size": 2,
+ "factor": 1,
+ "offset": 0,
+ "comment": "Driveline engaged indicates the transmission controlled portion of the driveline is engaged sufficiently to allow a transfer",
+ "is_big_endian": false,
+ "is_signed": false,
+ "writable" : true,
+ "states": {
+ "DrivelineDisengaged": [0],
+ "DrivelineEngaged": [1],
+ "Error": [2],
+ "NotAvailable": [3]
+ }
+ }
+ }
+ },
+ "61444": {
+ "comment": "Electronic Engine Controller 1",
+ "length": 8,
+ "name": "EEC1",
+ "bus" : "j1939",
+ "is_fd" : false,
+ "is_extended": false,
+ "is_j1939" : true,
+ "signals" : {
+ "Src.AddrssOf.Ctrllng.Dvc.Fr.Eng.Cntrl" : {
+ "generic_name": "Src.AddrssOf.Ctrllng.Dvc.Fr.Eng.Cntrl",
+ "bit_position": 40,
+ "bit_size": 8,
+ "factor": 1,
+ "offset": 0,
+ "comment": "The source address of the SAE J1939 device currently controlling the engine.",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Actl.Eng.Prcnt.Trque.High.Resolution" : {
+ "generic_name": "Actl.Eng.Prcnt.Trque.High.Resolution",
+ "bit_position": 4,
+ "bit_size": 4,
+ "factor": 0.125,
+ "offset": 0,
+ "comment": "This parameter displays an additional torque in percent of the reference engine torque.",
+ "unit": "%",
+ "is_big_endian": false,
+ "is_signed": false,
+ "states": {
+ "0000": [0],
+ "0125": [1],
+ "0875": [7],
+ "1111NotAvailable": [8]
+ }
+ },
+ "Eng.Demand.Percent.Torque" : {
+ "generic_name": "Eng.Demand.Percent.Torque",
+ "bit_position": 56,
+ "bit_size": 8,
+ "factor": 1,
+ "offset": -125,
+ "comment": "The requested torque output of the engine by all dynamic internal inputs, including smoke control, noise control and low",
+ "unit": "%",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Eng.Starter.Mode" : {
+ "generic_name": "Eng.Starter.Mode",
+ "bit_position": 48,
+ "bit_size": 4,
+ "factor": 1,
+ "offset": 0,
+ "comment": "There are several phases in a starting action and different reasons why a start cannot take place.",
+ "is_big_endian": false,
+ "is_signed": false,
+ "states": {
+ "startNotRqed": [0],
+ "starterActiveGearNotEngaged": [1],
+ "starterActiveGearEngaged": [2],
+ "strtFnshdStrtrNtActvAftrHvngBnA": [3],
+ "strtrInhbtdDToEngAlreadyRunning": [4],
+ "strtrInhbtdDTEngNtReadyForStart": [5],
+ "strtrInhbtdDTDrvlnEnggdOthrTrns": [6],
+ "strtrInhbtdDToActiveImmobilizer": [7],
+ "strtrInhbtdDueToStarterOvertemp": [8],
+ "1011Reserved": [9],
+ "starterInhibitedReasonUnknown": [12],
+ "error": [14],
+ "notAvailable": [15]
+ }
+ },
+ "Eng.Speed" : {
+ "generic_name": "Eng.Speed",
+ "bit_position": 24,
+ "bit_size": 16,
+ "factor": 0.125,
+ "offset": 0,
+ "comment": "Actual engine speed which is calculated over a minimum crankshaft angle of 720 degrees divided by the number of cylinders.",
+ "unit": "rpm",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Actual.Eng.Percent.Torque" : {
+ "generic_name": "Actual.Eng.Percent.Torque",
+ "bit_position": 16,
+ "bit_size": 8,
+ "factor": 1,
+ "offset": -125,
+ "comment": "The calculated output torque of the engine.",
+ "unit": "%",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Drivers.Demand.Eng.Percent.Torque" : {
+ "generic_name": "Drivers.Demand.Eng.Percent.Torque",
+ "bit_position": 8,
+ "bit_size": 8,
+ "factor": 1,
+ "offset": -125,
+ "comment": "The requested torque output of the engine by the driver.",
+ "unit": "%",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Eng.Torque.Mode" : {
+ "generic_name": "Eng.Torque.Mode",
+ "bit_position": 0,
+ "bit_size": 4,
+ "factor": 1,
+ "offset": 0,
+ "comment": "State signal which indicates which engine torque mode is currently generating, limiting, or controlling the torque.",
+ "is_big_endian": false,
+ "is_signed": false,
+ "states": {
+ "Low idle governor/no request (de": [0],
+ "Accelerator pedal/operator selec": [1],
+ "Cruise control": [2],
+ "PTO governor": [3],
+ "Road speed governor": [4],
+ "ASR control": [5],
+ "Transmission control": [6],
+ "ABS control": [7],
+ "Torque limiting": [8],
+ "High speed governor": [9],
+ "Braking system": [10],
+ "Remote accelerator": [11],
+ "Not available": [15]
+ }
+ }
+ }
+ },
+ "65253": {
+ "comment": "Engine Hours, Revolutions",
+ "length": 8,
+ "name": "HOURS",
+ "bus" : "j1939",
+ "is_fd" : false,
+ "is_extended": false,
+ "is_j1939" : true,
+ "signals" : {
+ "Eng.Total.Revolutions" : {
+ "generic_name": "Eng.Total.Revolutions",
+ "bit_position": 32,
+ "bit_size": 32,
+ "factor": 1000,
+ "offset": 0,
+ "comment": "Accumulated number of revolutions of engine crankshaft during its operation.",
+ "unit": "r",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Eng.Total.Hours.Of.Operation" : {
+ "generic_name": "Eng.Total.Hours.Of.Operation",
+ "bit_position": 0,
+ "bit_size": 32,
+ "factor": 0.05,
+ "offset": 0,
+ "comment": "Accumulated time of operation of engine.",
+ "unit": "hr",
+ "is_big_endian": false,
+ "is_signed": false
+ }
+ }
+ },
+ "61449": {
+ "comment": "Vehicle Dynamic Stability Control 2",
+ "length": 8,
+ "name": "VDC2",
+ "bus" : "j1939",
+ "is_fd" : false,
+ "is_extended": false,
+ "is_j1939" : true,
+ "signals" : {
+ "Steer.Wheel.Angle" : {
+ "generic_name": "Steer.Wheel.Angle",
+ "bit_position": 0,
+ "bit_size": 16,
+ "factor": 0.0009765625,
+ "offset": -31.374,
+ "comment": "The main operator`s steering wheel angle (on the steering column, not the actual wheel angle).",
+ "unit": "rad",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Longitudinal.Acceleration" : {
+ "generic_name": "Longitudinal.Acceleration",
+ "bit_position": 56,
+ "bit_size": 8,
+ "factor": 0.1,
+ "offset": -12.5,
+ "comment": "Indicates the longitudinal acceleration of the vehicle.",
+ "unit": "m/s/s",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Lateral.Acceleration" : {
+ "generic_name": "Lateral.Acceleration",
+ "bit_position": 40,
+ "bit_size": 16,
+ "factor": 0.00048828125,
+ "offset": -15.687,
+ "comment": "Indicates a lateral acceleration of the vehicle.",
+ "unit": "m/s/s",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Yaw.Rate" : {
+ "generic_name": "Yaw.Rate",
+ "bit_position": 24,
+ "bit_size": 16,
+ "factor": 0.0001220703125,
+ "offset": -3.92,
+ "comment": "Indicates the rotation about the vertical axis.",
+ "unit": "rad/s",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Steer.Wheel.Angle.Sensor.Type" : {
+ "generic_name": "Steer.Wheel.Angle.Sensor.Type",
+ "bit_position": 22,
+ "bit_size": 2,
+ "factor": 1,
+ "offset": 0,
+ "comment": "Indicates whether the steering wheel angle sensor is capable of absolute measuring of the number of steering wheel",
+ "is_big_endian": false,
+ "is_signed": false,
+ "states": {
+ "RelativeMeasuringPrinciple": [0],
+ "AbsMeasuringPrinciple": [1],
+ "Reserved": [2],
+ "NotAvailable": [3]
+ }
+ },
+ "Steer.Wheel.Turn.Counter" : {
+ "generic_name": "Steer.Wheel.Turn.Counter",
+ "bit_position": 16,
+ "bit_size": 6,
+ "factor": 1,
+ "offset": -32,
+ "comment": "Indicates number of steering wheel turns, absolute position or relative position at ignition on.",
+ "unit": "turns",
+ "is_big_endian": false,
+ "is_signed": false
+ }
+ }
+ },
+ "65215": {
+ "comment": "Wheel Speed Information",
+ "length": 8,
+ "name": "EBC2",
+ "bus" : "j1939",
+ "is_fd" : false,
+ "is_extended": false,
+ "is_j1939" : true,
+ "signals" : {
+ "Rlative.Speed.Rear.Axle2.Right.Wheel" : {
+ "generic_name": "Rlative.Speed.Rear.Axle2.Right.Wheel",
+ "bit_position": 56,
+ "bit_size": 8,
+ "factor": 0.0625,
+ "offset": -7.8125,
+ "comment": "The speed of the rear axle #2, right wheel relative to the front axle speed, SPN 904.",
+ "unit": "km/h",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Relative.Speed.Rear.Axle2.Left.Wheel" : {
+ "generic_name": "Relative.Speed.Rear.Axle2.Left.Wheel",
+ "bit_position": 48,
+ "bit_size": 8,
+ "factor": 0.0625,
+ "offset": -7.8125,
+ "comment": "The speed of the rear axle #2, left wheel relative to the front axle speed, SPN 904.",
+ "unit": "km/h",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Rlative.Speed.Rear.Axle1.Right.Wheel" : {
+ "generic_name": "Rlative.Speed.Rear.Axle1.Right.Wheel",
+ "bit_position": 40,
+ "bit_size": 8,
+ "factor": 0.0625,
+ "offset": -7.8125,
+ "comment": "The speed of the rear axle #1, right wheel relative to the front axle speed, SPN 904.",
+ "unit": "km/h",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Relative.Speed.Rear.Axle1.Left.Wheel" : {
+ "generic_name": "Relative.Speed.Rear.Axle1.Left.Wheel",
+ "bit_position": 32,
+ "bit_size": 8,
+ "factor": 0.0625,
+ "offset": -7.8125,
+ "comment": "The speed of the rear axle #1, left wheel relative to the front axle speed, SPN 904.",
+ "unit": "km/h",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Rlative.Speed.Front.Axle.Right.Wheel" : {
+ "generic_name": "Rlative.Speed.Front.Axle.Right.Wheel",
+ "bit_position": 24,
+ "bit_size": 8,
+ "factor": 0.0625,
+ "offset": -7.8125,
+ "comment": "The speed of the front axle, right wheel relative to the front axle speed, SPN 904.",
+ "unit": "km/h",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Relative.Speed.Front.Axle.Left.Wheel" : {
+ "generic_name": "Relative.Speed.Front.Axle.Left.Wheel",
+ "bit_position": 16,
+ "bit_size": 8,
+ "factor": 0.0625,
+ "offset": -7.8125,
+ "comment": "The speed of the front axle, left wheel relative to the front axle speed, SPN 904.",
+ "unit": "km/h",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Front.Axle.Speed" : {
+ "generic_name": "Front.Axle.Speed",
+ "bit_position": 0,
+ "bit_size": 16,
+ "factor": 0.00390625,
+ "offset": 0,
+ "comment": "The average speed of the two front wheels.",
+ "unit": "km/h",
+ "is_big_endian": false,
+ "is_signed": false
+ }
+ }
+ },
+ "65262": {
+ "comment": "Engine Temperature 1",
+ "length": 8,
+ "name": "ET1",
+ "bus" : "j1939",
+ "is_fd" : false,
+ "is_extended": false,
+ "is_j1939" : true,
+ "signals" : {
+ "Eng.Fuel.Temp1" : {
+ "generic_name": "Eng.Fuel.Temp1",
+ "bit_position": 8,
+ "bit_size": 8,
+ "factor": 1,
+ "offset": -40,
+ "comment": "Temperature of fuel (or gas) passing through the first fuel control system.",
+ "unit": "deg C",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Eng.Intercooler.Thermostat.Opening" : {
+ "generic_name": "Eng.Intercooler.Thermostat.Opening",
+ "bit_position": 56,
+ "bit_size": 8,
+ "factor": 0.4,
+ "offset": 0,
+ "comment": "The current position of the thermostat used to regulate the temperature of the engine intercooler.",
+ "unit": "%",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Eng.Intercooler.Temp" : {
+ "generic_name": "Eng.Intercooler.Temp",
+ "bit_position": 48,
+ "bit_size": 8,
+ "factor": 1,
+ "offset": -40,
+ "comment": "Temperature of liquid found in the intercooler located after the turbocharger.",
+ "unit": "deg C",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Eng.Turbo.Oil.Temp" : {
+ "generic_name": "Eng.Turbo.Oil.Temp",
+ "bit_position": 32,
+ "bit_size": 16,
+ "factor": 0.03125,
+ "offset": -273,
+ "comment": "Temperature of the turbocharger lubricant.",
+ "unit": "deg C",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Eng.Oil.Temp1" : {
+ "generic_name": "Eng.Oil.Temp1",
+ "bit_position": 16,
+ "bit_size": 16,
+ "factor": 0.03125,
+ "offset": -273,
+ "comment": "Temperature of the engine lubricant.",
+ "unit": "deg C",
+ "is_big_endian": false,
+ "is_signed": false
+ },
+ "Eng.Coolant.Temp" : {
+ "generic_name": "Eng.Coolant.Temp",
+ "bit_position": 0,
+ "bit_size": 8,
+ "factor": 0.03125,
+ "offset": -273,
+ "comment": "Temperature of liquid found in engine cooling system.",
+ "unit": "deg C",
+ "is_big_endian": false,
+ "is_signed": false
+ }
+ }
+ }
+},
+"diagnostic_messages": [
+ {
+ "bus": "hs",
+ "pid": 4,
+ "name": "engine.load",
+ "frequency": 5,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 5,
+ "name": "engine.coolant.temperature",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 10,
+ "name": "fuel.pressure",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 11,
+ "name": "intake.manifold.pressure",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 12,
+ "name": "engine.speed",
+ "frequency": 5,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 13,
+ "name": "vehicle.speed",
+ "frequency": 5,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 15,
+ "name": "intake.air.temperature",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 16,
+ "name": "mass.airflow",
+ "frequency": 5,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 17,
+ "name": "throttle.position",
+ "frequency": 5,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 31,
+ "name": "running.time",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 45,
+ "name": "EGR.error",
+ "frequency": 0,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 47,
+ "name": "fuel.level",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 51,
+ "name": "barometric.pressure",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 70,
+ "name": "ambient.air.temperature",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 76,
+ "name": "commanded.throttle.position",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 82,
+ "name": "ethanol.fuel.percentage",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 90,
+ "name": "accelerator.pedal.position",
+ "frequency": 5,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 91,
+ "name": "hybrid.battery-pack.remaining.life",
+ "frequency": 5,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 92,
+ "name": "engine.oil.temperature",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 94,
+ "name": "engine.fuel.rate",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ },
+ {
+ "bus": "hs",
+ "pid": 99,
+ "name": "engine.torque",
+ "frequency": 1,
+ "decoder": "decoder_t::decode_obd2_response"
+ }
+ ]
+}