summaryrefslogtreecommitdiffstats
path: root/openxc_example/signals.json
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-02-09 17:09:21 +0000
committerRomain Forlot <romain.forlot@iot.bzh>2017-02-09 17:09:21 +0000
commitc7a9be5be6bc984c0d68868528b7891a2fa5da1b (patch)
tree4e08054904c8875ebd107cdea2e4dc3ca7b9e87f /openxc_example/signals.json
parent398f2aafbe3927bd6f4e961e2f5f090a2770d6d1 (diff)
Added simple openxc cpp generated code
Change-Id: I9f394653af4407cf1e2f03e5d20df5f7fb6f54d3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'openxc_example/signals.json')
-rw-r--r--openxc_example/signals.json70
1 files changed, 70 insertions, 0 deletions
diff --git a/openxc_example/signals.json b/openxc_example/signals.json
new file mode 100644
index 00000000..a305b959
--- /dev/null
+++ b/openxc_example/signals.json
@@ -0,0 +1,70 @@
+{ "name": "example",
+ "extra_sources": [
+ "handlers.cpp"
+ ],
+ "initializers": [
+ "initializeMyStuff"
+ ],
+ "loopers": [
+ "myLooper"
+ ],
+ "buses": {
+ "hs": {
+ "controller": 1,
+ "speed": 500000
+ },
+ "ms": {
+ "controller": 2,
+ "speed": 125000
+ }
+ },
+ "commands": [
+ { "name": "turn_signal_status",
+ "handler": "handleTurnSignalCommand"
+ }
+ ],
+ "messages": {
+ "0x128": {
+ "name": "ECM_z_5D2",
+ "bus": "hs",
+ "signals": {
+ "StrAnglAct": {
+ "generic_name": "SteeringWheelAngle",
+ "bit_position": 52,
+ "bit_size": 12,
+ "factor": 0.15392,
+ "offset": 0,
+ "decoder": "handleUnsignedSteeringWheelAngle"},
+ "StrAnglSign": {
+ "generic_name": "steering_angle_sign",
+ "decoder": "ignoreDecoder",
+ "bit_position": 52,
+ "bit_size": 12},
+ "EngSpd": {
+ "generic_name": "engine_speed",
+ "max_frequency": 15,
+ "bit_position": 12,
+ "bit_size": 8},
+ "GrshftPos": {
+ "generic_name": "GearshiftPosition",
+ "bit_position": 41,
+ "bit_size": 3,
+ "states": {
+ "FIRST": [1],
+ "SECOND": [2],
+ "THIRD": [3],
+ "FOURTH": [4],
+ "REVERSE": [5],
+ "NEUTRAL": [6]}
+ },
+ "StrAnglErr": {
+ "decoder": "ignoreDecoder",
+ "generic_name": "steering_wheel_angle_error",
+ "bit_position": 44,
+ "bit_size": 12
+ }
+ },
+ "handlers": ["handleSteeringWheelMessage"]
+ }
+ }
+}