aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/tests/application-generated.cpp182
-rw-r--r--examples/tests/signal.json74
2 files changed, 255 insertions, 1 deletions
diff --git a/examples/tests/application-generated.cpp b/examples/tests/application-generated.cpp
index 06ee30e4..7dd03d73 100644
--- a/examples/tests/application-generated.cpp
+++ b/examples/tests/application-generated.cpp
@@ -7,7 +7,187 @@ 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,"",8,4,frequency_clock_t(5.00000f),true,
+ {std::make_shared<message_definition_t>(message_definition_t{"ls",0x111,"",16,66,frequency_clock_t(5.00000f),true,
+ { // beginning signals vector
+ {std::make_shared<signal_t> (signal_t{
+ "sig1.1",// generic_name
+ 0,// bit_position
+ 16,// bit_size
+ 1.00000f,// factor
+ 0.00000f,// offset
+ 0,// min_value
+ 0,// max_value
+ frequency_clock_t(0.00000f),// frequency
+ true,// send_same
+ false,// force_send_changed
+ {
+ },// states
+ true,// writable
+ nullptr,// decoder
+ nullptr,// encoder
+ false,// received
+ std::make_pair<bool, int>(false, 0),// multiplex
+ 0,// is_big_endian
+ 0,// is_signed
+ ""// unit
+ })},
+ {std::make_shared<signal_t> (signal_t{
+ "sig1.2",// generic_name
+ 16,// bit_position
+ 16,// bit_size
+ 1.00000f,// factor
+ 0.00000f,// offset
+ 0,// min_value
+ 0,// max_value
+ frequency_clock_t(0.00000f),// frequency
+ true,// send_same
+ false,// force_send_changed
+ {
+ },// states
+ true,// writable
+ nullptr,// decoder
+ nullptr,// encoder
+ false,// received
+ std::make_pair<bool, int>(false, 0),// multiplex
+ 0,// is_big_endian
+ 0,// is_signed
+ ""// unit
+ })},
+ {std::make_shared<signal_t> (signal_t{
+ "sig2.1",// generic_name
+ 32,// bit_position
+ 16,// bit_size
+ 1.00000f,// factor
+ 0.00000f,// offset
+ 0,// min_value
+ 0,// max_value
+ frequency_clock_t(0.00000f),// frequency
+ true,// send_same
+ false,// force_send_changed
+ {
+ },// states
+ true,// writable
+ nullptr,// decoder
+ nullptr,// encoder
+ false,// received
+ std::make_pair<bool, int>(false, 0),// multiplex
+ 0,// is_big_endian
+ 0,// is_signed
+ ""// unit
+ })},
+ {std::make_shared<signal_t> (signal_t{
+ "sig2.2",// generic_name
+ 48,// bit_position
+ 16,// bit_size
+ 1.00000f,// factor
+ 0.00000f,// offset
+ 0,// min_value
+ 0,// max_value
+ frequency_clock_t(0.00000f),// frequency
+ true,// send_same
+ false,// force_send_changed
+ {
+ },// states
+ true,// writable
+ nullptr,// decoder
+ nullptr,// encoder
+ false,// received
+ std::make_pair<bool, int>(false, 0),// multiplex
+ 0,// is_big_endian
+ 0,// is_signed
+ ""// unit
+ })},
+ {std::make_shared<signal_t> (signal_t{
+ "sig3.1",// generic_name
+ 64,// bit_position
+ 16,// bit_size
+ 1.00000f,// factor
+ 0.00000f,// offset
+ 0,// min_value
+ 0,// max_value
+ frequency_clock_t(0.00000f),// frequency
+ true,// send_same
+ false,// force_send_changed
+ {
+ },// states
+ true,// writable
+ nullptr,// decoder
+ nullptr,// encoder
+ false,// received
+ std::make_pair<bool, int>(false, 0),// multiplex
+ 0,// is_big_endian
+ 0,// is_signed
+ ""// unit
+ })},
+ {std::make_shared<signal_t> (signal_t{
+ "sig3.2",// generic_name
+ 80,// bit_position
+ 16,// bit_size
+ 1.00000f,// factor
+ 0.00000f,// offset
+ 0,// min_value
+ 0,// max_value
+ frequency_clock_t(0.00000f),// frequency
+ true,// send_same
+ false,// force_send_changed
+ {
+ },// states
+ true,// writable
+ nullptr,// decoder
+ nullptr,// encoder
+ false,// received
+ std::make_pair<bool, int>(false, 0),// multiplex
+ 0,// is_big_endian
+ 0,// is_signed
+ ""// unit
+ })},
+ {std::make_shared<signal_t> (signal_t{
+ "sig4.1",// generic_name
+ 96,// bit_position
+ 16,// bit_size
+ 1.00000f,// factor
+ 0.00000f,// offset
+ 0,// min_value
+ 0,// max_value
+ frequency_clock_t(0.00000f),// frequency
+ true,// send_same
+ false,// force_send_changed
+ {
+ },// states
+ true,// writable
+ nullptr,// decoder
+ nullptr,// encoder
+ false,// received
+ std::make_pair<bool, int>(false, 0),// multiplex
+ 0,// is_big_endian
+ 0,// is_signed
+ ""// unit
+ })},
+ {std::make_shared<signal_t> (signal_t{
+ "sig4.2",// generic_name
+ 112,// bit_position
+ 16,// bit_size
+ 1.00000f,// factor
+ 0.00000f,// offset
+ 0,// min_value
+ 0,// max_value
+ frequency_clock_t(0.00000f),// frequency
+ true,// send_same
+ false,// force_send_changed
+ {
+ },// states
+ true,// writable
+ nullptr,// decoder
+ nullptr,// encoder
+ false,// received
+ std::make_pair<bool, int>(false, 0),// multiplex
+ 0,// is_big_endian
+ 0,// is_signed
+ ""// unit
+ })}
+ } // end signals vector
+ })} // end message_definition entry
+, {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
diff --git a/examples/tests/signal.json b/examples/tests/signal.json
index 1478caf8..a4de3584 100644
--- a/examples/tests/signal.json
+++ b/examples/tests/signal.json
@@ -213,6 +213,80 @@
}
}
},
+ "0x111": {
+ "bus": "ls",
+ "is_fd" : false,
+ "is_extended": false,
+ "is_j1939" : false,
+ "is_isotp" : true,
+ "length" : 16,
+ "signals": {
+ "sig11": {
+ "generic_name": "sig1.1",
+ "bit_position": 0,
+ "bit_size": 16,
+ "factor": 1,
+ "offset": 0,
+ "writable": true
+ },
+ "sig12": {
+ "generic_name": "sig1.2",
+ "bit_position": 16,
+ "bit_size": 16,
+ "factor": 1,
+ "offset": 0,
+ "writable": true
+ },
+ "sig21": {
+ "generic_name": "sig2.1",
+ "bit_position": 32,
+ "bit_size": 16,
+ "factor": 1,
+ "offset": 0,
+ "writable": true
+ },
+ "sig22": {
+ "generic_name": "sig2.2",
+ "bit_position": 48,
+ "bit_size": 16,
+ "factor": 1,
+ "offset": 0,
+ "writable": true
+ },
+ "sig31": {
+ "generic_name": "sig3.1",
+ "bit_position": 64,
+ "bit_size": 16,
+ "factor": 1,
+ "offset": 0,
+ "writable": true
+ },
+ "sig32": {
+ "generic_name": "sig3.2",
+ "bit_position": 80,
+ "bit_size": 16,
+ "factor": 1,
+ "offset": 0,
+ "writable": true
+ },
+ "sig41": {
+ "generic_name": "sig4.1",
+ "bit_position": 96,
+ "bit_size": 16,
+ "factor": 1,
+ "offset": 0,
+ "writable": true
+ },
+ "sig42": {
+ "generic_name": "sig4.2",
+ "bit_position": 112,
+ "bit_size": 16,
+ "factor": 1,
+ "offset": 0,
+ "writable": true
+ }
+ }
+ },
"61442": {
"comment": "Electronic Transmission Controller 1",
"length": 8,