I’ve just tested RLP on Panda and its working as expected.
However I couldnt find on the documentation how to use the event handler.
What I’m trying to do is the following:
Collect samples at 1Khz from AD put them on a Queue and after getting 50 samples generate an event on C# side to read those samples and send them via USB CDC to host.
I do not know if this is the best aproach.
Another posible solution would be having the C# checking the queue size and read 50 when there is 50 or more items on queue… But this will be wasting time on checking the queue size on the C# thread…
I suppose the 1st. aproach is better but dont know how to use event handler. What do you think ?
By the way thank GHI for letting me test this SDK without having enough experience points.
I would think definately #1 as well. But have not looked into RLP. I have been resisting looking at gcc again. To many *nix memories and dreaming of failed production cron jobs.
IanR, I’ve just succesed in hooking an interrupt (And it is extremly easy), but I need to generate a C# event from native code, to notify .NETMF to do something.
[quote]PostManagedEvent void PostManagedEvent(unsigned int data) Queues a managed event to be sent to RLPEvent (not sent immediately).
data: User supplied data. [/quote]
Rimvis is correct.
Sample data in a native task that it schedules itself automatically.
Then at 50 samples or so, call PostMangedEvent(some number up to you).
Then in managed code event you have to call RLP with a “Read the current buffer(byte[])”…etc