跳转到内容

BM_TxTaskTypeDef

结构体与成员名称和 BMAPI SDK 保持一致,便于直接对应头文件与示例代码。

BM_TxTaskTypeDef data structure.

Member Declaration Description
type uint8_t type Type ID of the TX task, see BM_TxTaskTypeTypeDef for details.
version uint8_t version Version of BM_TxTaskTypeDef, set to 1 for BMAPI1.x.
unused uint8_t unused [32] For backward-compatibility only
flags uint8_t flags CAN message control Flags, see BM_MessageFlagsTypeDef for details.
length uint8_t length: 7 Length of payload in unit given by ‘lengthunit’ (not DLC)
lengthunit uint8_t lengthunit: 1 Unit of length, 0=1B, 1=128B, default as 0, that is, length in bytes Note that not payload buffer might not be 100% used, user would need to check specific data header in payload for further information, i.e. ((BM_CanfdDataTypeDef*)txtask.payload)->ctrl.tx.DLC
delay uint16_t delay Delay within tx cycle, that is, offset of tx timing slot within tx cycle (given by ‘cycle’ field) i.e. If cycle=50 and delay=10, this txtask will be executed at 10, 60, 110, 160, etc.
cycle uint16_t cycle ms delay between rounds
nrounds uint16_t nrounds num of cycles, nrounds=0xFFFFU indicates INFINITE
nmessages uint16_t nmessages messages per round, default as 1 message/cycle
id uint32_t id Generic ID field, normally you would need to set specific ID structure instead (e.g. CAN.SID).
SID uint32_t SID: 11 CAN Standard ID
EID uint32_t EID: 18 CAN Extended ID
SID11 uint32_t SID11: 1 Reserved
unimplemented1 uint32_t unimplemented1: 2 Reserved
ID uint8_t ID LIN message id, 0~63
CHECKSUM uint8_t CHECKSUM LIN manual checksum value, only valid if (flags & BM_LIN_MESSAGE_FLAGS_USER_CHECKSUM) != 0
startbit uint16_t startbit Start bit of data increment, currently only 8-bit aligned value is accepted
nbits uint8_t nbits Number of bits of data increment, currently only 32 is accepted
format uint8_t format 0x80=Intel, 0x00=Motorola
min uint32_t min Minimum value of the Increment range
max uint32_t max Maximum value of the Increment range
step uint32_t step Step of the Increment range
seed uint32_t seed Random seed
pattern } pattern Changing pattern of a Volatile TX task
e2e uint8_t e2e Index of E2E (in E2E table), currently unsupported
e2e_reserved uint8_t e2e_reserved [15] Reserved for future (e.g. E2E information)
payload uint8_t payload [64] Default payload data, note this is also the template payload of the unchanged part in a volatile TX task

This data-structure reference follows the current BUSMUST BMAPI SDK.