You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
707 B

#pragma once
#include <stdint.h>
typedef enum {
kcmd,
kreceipt,
kerror_receipt,
kreport,
kevent, // 非周期上报, 相同的indexid, 表明是事件, 上层可过滤掉
kevent_confirm, // 事件确认,收到事件确认后, 说明上层已收到该事件, 不再重复上报
} packet_type_t;
typedef enum {
kpriority_emergency_report = 7,
kpriority_cmd = 8,
kpriority_receipt = 9,
kpriority_report = 10,
} priority_t;
typedef struct {
uint8_t frameNumAndFrameId;
uint8_t to;
uint8_t from;
uint8_t pad;
} zcanid_t;
typedef struct {
uint8_t ptype;
uint8_t index;
uint16_t function_id;
uint8_t params[];
} zcanbus_packet_t;