跳转到内容

BMCLI txtask

命令名、参数与机器可读字段保持英文,以便直接复制到终端或交给 AI 使用;当前安装版本的精确契约请以 bmcli help ... --format=json 为准。

Device-firmware transmit tasks. CAN tasks are hardware-timed periodic or pattern generators. A LIN task on a slave channel is a fixed, header-triggered response, not a periodic transmission. Persistent LIN response tasks require daemon mode.

Terminal window
# Fixed payload, 100ms cycle
bmcli txtask add --channel=0 --message=0x100 --cycle=100 --data="AA BB"
# Increment data: counter at startbit=0, 32-bit, step=1, range 0-255
bmcli txtask add --channel=0 --message=0x100 --cycle=100 --type=incdata \
--inc-startbit=0 --inc-nbits=32 --inc-step=1 --inc-min=0 --inc-max=255
# Increment CAN ID: from 0x100 to 0x1FF, step=1
bmcli txtask add --channel=0 --message=0x100 --cycle=50 --type=incid \
--inc-min=0x100 --inc-max=0x1FF --inc-step=1
# Random data at startbit=16
bmcli txtask add --channel=0 --message=0x100 --cycle=50 --type=random \
--inc-startbit=16 --inc-nbits=16 --inc-min=0 --inc-max=65535
# With delay offset and finite rounds
bmcli txtask add --channel=0 --message=0x100 --cycle=50 --delay=10 --rounds=1000
# LIN slave response: first open the channel as slave in the daemon
bmcli txtask add --channel=10357/4 --id=0x20 --data="01 02 03 04" --cycle=0 --checksum=enhanced
Option Default Description
--channel (required) Channel (SN/port, UID/port, legacy index, or name)
--message / --id (required) CAN ID or LIN response ID 0x00..0x3F
--cycle CAN required; LIN 0 CAN interval in ms; LIN responses are header-triggered
--delay 0 Delay offset within cycle in ms
--data 8 zero bytes Payload hex bytes
--type fixed CAN patterns; LIN requires fixed
--flags none CAN frame flags
--checksum auto LIN response checksum model
--rounds infinite Number of cycles. 0xFFFF or omit = infinite
--inc-startbit 0 Start bit for incdata/random
--inc-nbits 32 Bit width
--inc-step 1 Increment step
--inc-min 0 Minimum value
--inc-max max Maximum value

Open every master and slave endpoint before installing a finite-round LIN response task. Reconfiguring another channel on the same analyzer can consume or reset a task that was armed too early.

Terminal window
bmcli txtask remove --channel=0 --taskid=0
Terminal window
bmcli txtask list --channel=0
bmcli txtask list --channel=0 --format=json


权威来源: bmcli_reference.md in the BMCLI repository. Run bmcli help <category> <action> --format=json for the exact contract of the installed version.