[etherlab-dev] Problem to get VoE Data (Etherlab master patchset 20160804)
christoph.schroeder at helmholtz-berlin.de
Thu Jan 19 16:28:33 CET 2017
that worked, I had to add some minor changes:
memcpy(voe->datagram.data + EC_MBOX_HEADER_SIZE, data, data_size);
memcpy(voe->datagram.data + EC_MBOX_HEADER_SIZE, data, voe->data_size +
The VoE header is taken into account here by ecrt_voe_handler_data and
there is also ecrt_voe_handler_received_header so the VoE header has to
be copied too.
On 01/19/2017 01:09 AM, Gavin Lambert wrote:
> On 19 January 2017 05:26, quoth Christoph Schroeder:
>> I am currently testing the patchset 20160804 and encountered a problem
>> introduced by 0005-Support-for-multiple-mailbox-protocols.patch. It's not
>> possible to retrieve the data via the libraries "ecrt_voe_handler_data"
>> function anymore after a successful ecrt_voe_handler_read. I still get the
>> correct data size but there is no data found at the returned pointer address.
>> I guess this is the problem:
>> "The mailbox state machines will check and fetch the data from their own
>> buffer instead of the datagram buffer (that is no longer used for mailbox
>> read data)."
>> The data seems to be stored somewhere else now and the function still
>> returns a pointer to a datagram buffer. Communication still works and the
>> data is there inside the master as debuglevel=1 prints the correct data into
>> the kernel log. I found the lines were this is done in the new introduced
>> "ec_voe_handler_state_read_response_data", but how can I access the
>> data from the library without using ioctl calls from my user application? I
>> would appreciate any hint or an update of the patch.
> Try the following changes (sorry, can't generate a patch right now):
> * voe_handler.c:372: "mbox_coe_data" should be "mbox_voe_data".
> * voe_handler.c:500: add:
> memcpy(voe->datagram.data + EC_MBOX_HEADER_SIZE, data, data_size);
> * voe_handler.c:608: same here.
> Give this a try and let me know if it helps, or if further changes are required, and I can update the patchset accordingly.
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
Aufsichtsrat: Vorsitzender Dr. Karl Eugen Huthmacher, stv. Vorsitzende Dr. Jutta Koch-Unterseher
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking
Sitz Berlin, AG Charlottenburg, 89 HRB 5583
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 103295 bytes
Desc: not available
More information about the Etherlab-dev