Another useful feature of the SDR Virtual Machine is the IQ Queue mechanism to allow one task to send a complex block of (IQ) data to another for processing.

As in many other cases, the name of the queue is unique and the queue is handled by the scheduler. Any task can then access the queue just by using the right queue name, as show below.

  • The producer task (Task #1) creates the queue with the Queues.create() constructor to create a Queue object.
  • Then, it can “push” IQ Blocks (here a simple 440 Hz tone) in the queue with the .enqueue() method
  • The consumer task (Task #2) gets the queue and will wait until data is available with .dequeue( true )

Note : As we may not know which task (#1 or #2) will start first, this example shows that both tasks try to create the task. Internally, as the name is unique, the second call would just return with a reference to the existing queue.

Comments are closed