How do I interface my model with a software data queue fed from a custom hardware driver?

3 次查看(过去 30 天)
I am using Liunx with the Xenomai OS extension. I have written a custom hardware driver that posts received messages to a software queue created with Xenomai. The contents of the message need to be fed into a Simulink processing model that I was provided. The driver receives messages about every 2-milliseconds and then posts the contents to the queue.
I have written a C-code module that pends on the queue and transfers the contents to a shared buffer. This process is asynchronous to the model processing. The receiving C-module is currently an infinite loop that pends on a queue. In otherwords, it repeatly suspends execution until an queue entry is available.
How do I incorporate this asynchrous data receiving processing into the existing model?

回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by