Homepage GitHub

What are the parameters CanardOnTransferReception on_reception and CanardShouldAcceptTransfer should_accept in canardInit?


(William Yang) #1

How should these two parameters be understood?


(Pavel Kirienko) #2

Sorry that your question was looked over! These are pointers to callback handlers. on_reception is invoked when a new transfer is received (and validated for data integrity) by libcanard. should_accept is invoked when libcanard receives a new transfer and it needs to understand if the transfer is of interest to the application. This is actually explained in the docs: