Libcanard usage questions

hey .how to test with version 1 for mpc microcontrollers?
how can we test without using zubax ?

Libcanard is platform-agnostic. You just need to implement the low-level CAN IO routines yourself and integrate them with the library as explained in the README.

okay, since i developed version1 canard for mpc micro-controller do i need any zubax babel (as recommended for version 0)for testing purpose or i can test as explained in README.

Why memory allocation error comes during frame queue allocation? I am using your heap.c to allocate memory as mentioned in

CanardInternalTxQueueItem* const out =
    (CanardInternalTxQueueItem*) ins->memory_allocate(ins, sizeof(CanardInternalTxQueueItem) + payload_size);

A memory allocation error means that you’re out of memory.

how come source node id and destination node id is same in my case?

Generally, when dealing with a technical problem like yours, good questions yield good answers. I am unable to help you because you didn’t provide much relevant information.

For sending of data, i am assigning values to payload pointer and after TXpush and Tx peek able to send the data using my driver send function.similarly how to receive data using canard?
As per README in RXaccept:

const int8_t result = canardRxAccept(&ins,
                                     &received_frame,            // The CAN frame received from the bus.
                                     redundant_interface_index,  // If the transport is not redundant, use 0.

I am converting my driver format to &received_frame format and passing it,i am getting the value of result as 0 ,and during debugging i found that source and destination node are i am asking a proper method to receive frame sucessfully.
I have a mpc driver so how i wll test its working?

Either the received frame is converted incorrectly or the sender emits invalid frames.

as far i understand the sending(Txpush,pop,peek)and receiving(rx accept)are independent of each other,
okay if received frame conversion causes an error than why source node and destination node are same
i am new to canard

This forum may not be the best place for learning the basics. I’m sorry but we are unable to debug your code for you. Consider asking at stackoverflow or somewhere else.

1 Like