CAN-Bus smartCORE Socket Module
Description
The CAN-Bus module provides the CAN-Bus hardware interface via the Fast Message Dispatcher.
It
- on the one hand, read CAN-Bus messages are dispatched
- on the other hand, a write mechanism is provided
In principle, the module can be operated with any Fast Message Receiver. In the context of the CAN bus, the following are appropriate:
- the (generic) Fast Message Producer ("fmproducer")
- the DBC Receiver module ("dbc")
Interfaces & Protocols Used
- CAN bus
- Fast Message Dispatching
JSON Configuration
The following section describes the module’s entire JSON configuration and explains the individual parameters.
Example Configuration (Minimal)
{
"module":"CANBus1",
"factory":"canbus",
"config":{
"interface":1
}
}
Example Configuration (Maximal)
{
"module":"CANBus1",
"factory":"canbus",
"config":{
"fmd":"CANBus1",
"priority":80,
"writeBufferSize":1024,
"interface":1,
"bitrate":500000,
"listenOnly":false,
"maxBurstDurationUs":0,
"dispatchCanIdAsDataPrefix":false
}
}
Parameter List
| Parameter Name | Required | Data Type | Valid Value Range | Default | Description |
|---|---|---|---|---|---|
| fmd | No | STRING | Name of the module instance | Fast Message Dispatcher Name | |
| priority | No | INT | 1 - 99 | 80 | Scheduling priority of the CAN bus interface |
| writeBufferSize | No | INT | 1 - | 8192 | Maximum number of frames in the write buffer |
| interface | YES | INT or STRING | 1 - | N/A | Index or name of the CAN bus interface (see smartDEVICE documentation) |
| bitrate | No | INT | 1 - | 500000 | Bitrate of the CAN bus interface |
| listenOnly | No | BOOL | false, true | false | Listen-only flag of the CAN bus interface |
| maxBurstDurationUs | No | INT | 0 - | 0 | Maximum burst duration [us] of the CAN bus interface |
| dispatchCanIdAsDataPrefix | No | BOOL | false, true | false | Prepend the 32-bit CAN ID in little-endian format to the forwarded CAN bus data frame. This is useful for CAN ID-independent fast message receivers, such as CAN RAW and debugging |
| keepEFFFlag 1 | No | BOOL | false, true | false | Typically, the EFF flag is set automatically in CAN addressing, depending on the value range of the CAN ID (11 / 29 bits). For interpretation, the bit can be passed on to the fmproducer. In this case, 29-bit addresses must be specified with the offset 2147483648 (0x80000000). |
Module Information
| Information | Value |
|---|---|
| Author | optiMEAS GmbH |
| Since smartCORE | 0.120 |
| Module Type | Dispatcher (Producer) |
| Dependencies | Any Fast Message Receiver module (e.g., "dbc", "fmproducer") |