Skip to main content

Required Parameters

To add a device using the CANbus communication protocol, the following parameters are required.
id
string
required
A unique identifier for the device.Example: battery1
type
string
required
Indicates the type of device.Options: converter, battery, other
protocol
string
required
The communication protocol between the controller and the device. For this type of device, it will always be CANbus.Example: CANbus
addressMap
string
required
The name of the device’s address map on the controller.Example: canbus_device_address_map
disabled
bool
required
Indicates whether the device is enabled or disabled. A value of true means the device is disabled, while false means the device is enabled.

Optional Parameters

The parameters listed below are optional and are not required for a device with the CANbus protocol to work properly. However, sometimes it is desirable to add these optional parameters for specific device requirements.
controlMap
string
The name of the device’s control map on the controller.Example: canbus_device_control
frameFormat
string
Specifies the CAN frame format to use for communication. Defaults to 29-bit if not specified.Options: 11-bit | 29-bit

Example

The snippet below demonstrates a device with id battery1 and protocol CANbus, including all the required parameters along with the optional parameters.
{
  "id": "battery1",
  "type": "battery",
  "protocol": "CANbus",
  "addressMap": "canbus_device_address_map",
  "controlMap": "canbus_device_control",
  "disabled": false,
  "frameFormat": "11-bit"
}
When configuring a device with CANbus communication, ensure all required parameters are correctly specified to prevent configuration errors. Always verify that the paths provided for addressMap and controlMap are accurate and that the files exist in the specified locations.