64 }
typedef SProtoCanIOBind;
66 explicit CProtoCan(CDescObject &desc)
69 , nodeid(CONFIG_DAWN_PROTO_CAN_NODEID)
75 ~CProtoCan()
override;
77#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
78 const char *getClassNameStr()
const override
126#ifdef DAWN_PROTO_HAS_ISOTP
127 CIsoTp::State *isotp;
129 }
typedef SCanIoData;
131#ifdef DAWN_PROTO_HAS_ISOTP
137 }
typedef SProtoCanWriteAll;
142 const SProtoCanIOBind *cfg;
145#ifdef CONFIG_DAWN_PROTO_CAN_SINGLE_ID
146 SProtoCanWriteAll *write_all;
148 }
typedef SProtoCanRegs;
150 char path[PATH_MAX] = {};
156 std::vector<SProtoCanIOBind *> valloc;
157 std::vector<SProtoCanRegs *> vregs;
159 int configureDesc(
const CDescObject &desc);
160 void allocObject(SProtoCanIOBind *alloc);
163 int validateCanIo(
const SProtoCanIOBind *v, CIOCommon *io, SCanIoData *canio);
164 int createRegsForGroup(SProtoCanIOBind *v);
167 int msgRecv(
const dawn::porting::canmsg_s &msg);
168#ifdef DAWN_PROTO_HAS_ISOTP
169 int sendSegmented(uint16_t canid,
174 int sendSegmentedRead(SCanIoData *canio,
180 int sendIoResponse(SCanIoData *canio, uint8_t index,
bool segmented);
181#ifdef CONFIG_DAWN_PROTO_CAN_SINGLE_ID
182 int handleSingleIdGroup(
const dawn::porting::canmsg_s &msg, SProtoCanRegs *v);
183 int handleSingleIdReadAll(
const dawn::porting::canmsg_s &msg,
185 bool ignore_len =
false);
186 int handleSingleIdWriteAll(
const dawn::porting::canmsg_s &msg,
190 int handleSingleIdIndex(
const dawn::porting::canmsg_s &msg,
196 int handleLegacyGroup(
const dawn::porting::canmsg_s &msg, SProtoCanRegs *v);
198 static int beforePoll(
void *priv,
struct pollfd *pfds, nfds_t nfds);
199 static void afterPoll(
void *priv,
struct pollfd *pfds, nfds_t nfds,
int ret);
200 static int onPollReady(
void *priv,
struct pollfd *pfds, nfds_t nfds,
int pollRet);
201 static int notifierCb(
void *priv, io_ddata_t *data);
static ObjectCfgId objectCfg(uint8_t type, uint16_t cls, uint8_t dtype, bool rw, uint16_t size, uint8_t id)
Construct 32-bit ConfigID from component fields.
static ObjectId objectId(uint8_t type, uint16_t cls, uint8_t dtype, uint8_t flags, uint16_t priv)
Construct 32-bit ObjectID from component fields.