aboutsummaryrefslogtreecommitdiffstats
path: root/conf/unit/CMakeLists.txt
blob: 69f201d153dc9d62e92fb48329884eb050955425 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
###########################################################################
# Copyright 2015, 2016, 2017 IoT.bzh
#
# author: José Bollo <jose.bollo@iot.bzh>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###########################################################################

cmake_minimum_required(VERSION 2.8)

if(AGL_DEVEL)
	configure_file(afm-unit-debug.conf.in afm-unit.conf)
else()
	configure_file(afm-unit.conf.in afm-unit.conf)
endif()

if(NOT USE_SDK)
	install(DIRECTORY DESTINATION ${afm_confdir}/unit.env.d)
	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-unit.conf             DESTINATION ${afm_confdir})
endif()
/* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
{
  "name": "example",
  "extra_sources": [
    "handlers.cpp"
  ],
  "initializers": [
    "initializeMyStuff"
  ],
  "loopers": [
    "myLooper"
  ],
  "buses": {
    "hs": {
      "controller": 1,
      "speed": 500000
    },
    "can0": {
      "controller": 1,
      "speed": 111111
    }
  },
  "commands": [
    {
      "name": "turn_signal_status",
      "handler": "handleTurnSignalCommand"
    }
  ],
  "messages": {
    "0x128": {
      "name": "ECM_z_5D2",
      "bus": "can0",
      "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" ]
    },
	"0x813": {
      "name": "ECM_z_5D2",
      "bus": "can0",
      "signals": {
        "ABC": {
          "generic_name": "abc",
          "bit_position": 52,
          "bit_size": 12,
          "factor": 0.15392,
          "offset": 0,
          "decoder": "handleUnsignedSteeringWheelAngle"
        },
        "DEF": {
          "generic_name": "def",
          "decoder": "decoder_t::ignoreDecoder",
          "bit_position": 52,
          "bit_size": 12
        }
      }
    }
  },
  "diagnostic_messages": [
    {
      "bus": "hs",
      "id": 2015,
      "mode": 1,
      "pid": 12,
      "frequency": 1,
      "decoder": "handleObd2Pid"
    },
    {
      "bus": "hs",
      "id": 2016,
      "mode": 2,
      "pid": 12,
      "frequency": 1
    },
    {
      "bus": "hs",
      "id": 2016,
      "mode": 22,
      "pid": 6,
      "frequency": 1,
      "decoder": "handleMyDiagRequest"
    }
  ]
}