I am playing little bit with canvca library. I'd like to ask whether PDOProcessor suppports handling of SYNC messages?
I mean a situation when a PDO is configured to be sent synchronously after a SYNC message arrives.
I had a look into the code and it seems to me that this is not implemented.
Anyway, I wonder how PDOs are processed by method vcaPDOProcessor_processMsg (in vca_pdo.c). It seems to me that only corresponding PDO in OD is searched, but if found no action is performed with it. Did I miss something?
> I'd like to ask whether PDOProcessor supports handling of SYNC messages?
The code places infrastructure there, but not all features are
finished. It is waiting to some spare time, project funding,
students diploma thesis work or contributors.
The PDO can be sent as response to the source value change notification
over event connectors. This is tested, works and is probably most
complicated mode if should be done without polling.
The SYNC driven and time driven modes needs to be implemented.
The function _pdo_hub_event() should be divided into part processed
at variable change notification, which only marks fields requiring
update and PDO should be moved on list of Tx PDOs which require
more processing. The second part should do real update and sending.
Then PDO processor should take PDO from the list, update it and send
it to the CAN bus. SYNC response would mean only connecting
of SYNC filer and new rx_hub on PDO processor through
vcaNet_msg_rec_connect(). SYNC processing would mean only marking PDO
as requiring to be sent. Each PDO should contain timer field and then
periodic mode could be implemented as marking PDO to be sent
in timer call-back.
This is alternative to use of the full vcaNet_msg_rec_connect()
infrastructure. So yes, above mentioned functionality of marking
SYNC triggered PDOs for Tx could be added there.
The key is to refactor _pdo_hub_event() function and addition
of list for PDOs with pending requests.
All that is thought through in my head, but time is terrible enemy.
I can touch code some way to sketch my ideas, but it would probably
break code. Change could help others to see my ideas. But you or
somebody else needs to pledge time to debug code and test its
standard compliance and functionality standard.
But I can spent only minimal time with that.
I expect, that you use CVS code version, if no, switch to it,
because there is more enhancements accumulated already.
Log in to post a comment.