#ifndef __PROTO_CAN_ADP_H__
#define __PROTO_CAN_ADP_H__
#include <stdint.h>
#include "protocol.h"
#include "abnormal_log/abnormal_log.h"
typedef struct can_frame_handle_map
{
    uint32_t id;                   // can id
    int (*fun)(proto_can_poll *p); // 解析函数
} can_frame_handle_map;

typedef struct proto_can_adp
{
    const char *name; // 名称
    //
    int handle_map_size;
    can_frame_handle_map *handle_map;
} proto_can_adp;


//
const proto_can_adp *find_proto_can_adp(const char *name);
int (*find_proto_can_adp_handle(const proto_can_adp *adp, uint32_t id))(proto_can_poll *);

#endif