[Ovmsdev] Proposed changes to IncomingPollReply and IncomingPollError - before making a pull request
Michael Geddes
frog at bunyip.wheelycreek.net
Fri Jun 2 12:46:44 HKT 2023
Hi all,
So I have some changes coming that depend heavily on this
function signature change. What it is doing is taking the members of
OvmsVehicle that are specific to the ISOTP (and VWTP) protocols and making
the parameters to both IncomingPollReply and IncomingPollError.
This way of doing it makes all the bits explicit parameters, which means a
bunch more parameters passed on the stack.
*Original*:
- virtual void IncomingPollReply(canbus* bus, uint16_t type, uint16_t
pid, const uint8_t* data, uint8_t length, uint16_t mlremain);
- virtual void IncomingPollError(canbus* bus, uint16_t type, uint16_t
pid, uint16_t code);
*New:*
virtual void IncomingPollReply(canbus* bus, uint32_t moduleidsent, uint32_t
moduleid, uint16_t type, uint16_t pid, const uint8_t* data, uint16_t
mloffset, uint8_t length, uint16_t mlremain, uint16_t mlframe, const
OvmsPoller::poll_pid_t &pollentry);
virtual void IncomingPollError(canbus* bus, uint32_t moduleidsent, uint32_t
moduleid, uint16_t type, uint16_t pid, uint16_t code, const
OvmsPoller::poll_pid_t &pollentry);
The other way of achieving the same result would be to create a struct that
contains these elements, and then to pass that as a const reference.
Thoughts? If I need to make modifications to the signatures, I'd prefer to
do it before I make the pull request.
//.ichael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20230602/3ce80b11/attachment.htm>
More information about the OvmsDev
mailing list