Control

This page documents the control configuration

Configuration file fields

This section is autogenerated from the Rule Schema file.


Control `` ``

Control signal

Control reception (rx) state properties.control_rx_state

Control CAN-bus reception state (including logging)

type: integer default: 0 options: Disable: [0] Enable: [1]

Control transmission (tx) state properties.control_tx_state

Control CAN-bus transmission state (including logging)

type: integer default: 0 options: Disable: [0] Enable: [1]

Start signal properties.start

$ref: #/definitions/control_signal

Stop signal properties.stop

$ref: #/definitions/control_signal

Control signal object properties.start, properties.stop

ID Format properties.id_format

ID format of the control message.

type: integer default: 1 oneOf: [{'type': 'integer', 'title': 'Standard (11-bit)', 'enum': [0]}, {'type': 'integer', 'title': 'Extended (29-bit)', 'enum': [1]}]

Message ID (hex) properties.id

ID of the control message in hex. Example: 00435354.

default: 00435354 type: string

Message ID mask (hex) properties.id_mask

ID mask of the control message in hex. Example: 1FFFFFFF.

type: string default: 1FFFFFFF

Data mask (hex) properties.data_mask

Data trigger mask (byte 0 to the left). Shall match the length of the control signal message.

type: string maxLength: 16 default: FFFFFFFFFFFFFFFF

Data trigger high (hex) properties.data_high

Data trigger high range (byte 0 to the left)

type: string maxLength: 16 default: 0100000000000000

Data trigger low (hex) properties.data_low

Data trigger low range (byte 0 to the left)

type: string maxLength: 16 default: 0000000000000000

Configuration explained

This section contains additional information and examples.

The control signal has a flexible configuration allowing for integration with many protocols. The control signal can be set to control the device message reception (effectively the logging) and / or the transmission (effectively the processing of the transmit list). The control signal can e.g. be used to start / stop logging based on some application parameters, such as speed, RPM or discrete events.

Control signal overview:

  • A control signal can be setup for each CAN-bus channel
  • One message ID is used for start and one for stop. These can be different or the same
  • The message ID can be masked to trigger on a partial ID match (this allows for e.g. J1939 messages with unknown source)
  • The data trigger can be masked to support CAN-bus frames with multiple signals
  • The date trigger uses a high/low range, such that any value in the range will trigger (this allows for e.g. stop logging when speed is in range 0-10 km/h)
  • File splitting is not affected by the control signal (i.e. the control signal does not force additional log file splits)

Note

The control signal can only be used if accepted by the CAN-bus filter

Note

The control signal data byte fields must match in length vs. the message data

Warning

The start/stop ranges shall be mutual exclusive (cannot both occur at the same time)

Examples

Example: Start / stop on OBD speed response message. The OBD CAN-bus is connected to two CAN-bus channels. Channel 1 is configured to start / stop message reception based on the OBD speed response. Channel 2 does not use the control signal feature.

Start trigger:

  • High: \(\text{03410DFF00000000}_{16} \Rightarrow 255 \text{ km/h}\)
  • Low: \(\text{03410D0A00000000}_{16} \Rightarrow 10 \text{ km/h}\)

Stop trigger:

  • High: \(\text{03410D0500000000}_{16} \Rightarrow 5 \text{ km/h}\)
  • Low: \(\text{03410D0000000000}_{16} \Rightarrow 0 \text{ km/h}\)
"start": {
  "id_format": 0,
  "id": "7E8",
  "id_mask": "7FF",
  "data_mask": "FFFFFFFF00000000",
  "data_high": "03410DFF00000000",
  "data_low": "03410D0A00000000"
},
"stop": {
  "id_format": 0,
  "id": "7E8",
  "id_mask": "7FF",
  "data_mask": "FFFFFFFF00000000",
  "data_high": "03410D0500000000",
  "data_low": "03410D0000000000"
}

Below plot illustrates that Channel 1 message reception (and logging) starts when the speed signal goes above 10 km/h and stops below 5 km/h. Channel 2 is shown for reference (no control signal).

image Control message simple

Example: Start / stop on simple discrete value. In this example the start / stop is controlled via a single byte.

Start trigger:

  • High: \(\text{01}_{16} \Rightarrow \text{on}\)
  • Low: \(\text{01}_{16} \Rightarrow \text{on}\)

Stop trigger:

  • High: \(\text{00}_{16} \Rightarrow \text{off}\)
  • Low: \(\text{00}_{16} \Rightarrow \text{off}\)
"start": {
  "id_format": 1,
  "id": "00435354",
  "id_mask": "1FFFFFFF",
  "data_mask": "FF",
  "data_high": "01",
  "data_low": "01"
},
"stop": {
  "id_format": 1,
  "id": "00435354",
  "id_mask": "1FFFFFFF",
  "data_mask": "FF",
  "data_high": "00",
  "data_low": "00"
}
image Control message simple

Example: Start / stop on J1939 broadcast speed. This can be used to start logging when a vehicle is moving.

Start trigger:

  • High: \(\text{0000070000000000}_{16} \Rightarrow 7 \text{ km/h}\)
  • Low: \(\text{0000030000000000}_{16} \Rightarrow 3 \text{ km/h}\)

Stop trigger:

  • High: \(\text{0000010000000000}_{16} \Rightarrow 1 \text{ km/h}\)
  • Low: \(\text{0000000000000000}_{16} \Rightarrow 0 \text{ km/h}\)
"control": {
  "start": {
    "id_format": 1,
    "id": "CFEF100",
    "id_mask": "3FFFF00",
    "data_mask": "0000FF0000000000",
    "data_high": "0000070000000000",
    "data_low":  "0000030000000000"
  },
  "stop": {
    "id_format": 1,
    "id": "CFEF100",
    "id_mask": "3FFFF00",
    "data_mask": "0000FF0000000000",
    "data_high": "0000010000000000",
    "data_low":  "0000000000000000"
  }
}
image Control message j1939 speed