Split hierarchies for display plotters Tue, Nov 18 2014 PM
I finally killed off the affinity configuration for graphical blocks: https://github.com/pothosware/pothos-gui/issues/49
Basically, graphical blocks have to be created in the GUI process. For streaming plotter blocks, this means that upstream blocks have a lot of stream data to send into the GUI process, most of it thrown out. Ideally, the streaming plotter blocks would be split into two parts 1) a block in the remote environment collecting data and sending out the displayable chunks and 2) a block in the GUI environment for accepting the display data and driving a QWidget.
The snooper block
First I created a stream snooper block. This block is simple now, it just periodically grabs a chunk of the input stream with labels and forwards it as a Packet message. In the future, the snooper will get additional trigger controls for use with the wave monitor. The snooper block is available in pothos-blocks as a generally useful block.
Another great reason to have the snooper block in the general pothos-blocks package is that it can be instantiated in environments which dont have the graphical tools installed. So when working with a headless or embedded computer, the stream plotters can "plant" the snooper into the remote host because the block will always be available on that environment.
Most graphical blocks are unchanged, but the plotter blocks that take full-rate streams are now hierarchies of a snooper block and a display block with a QWidget. Thats the right idea, but it doesnt get us to a split hierarchy across remote environments.
To make this work, graphical blocks take an optional constructor argument with the keyword remoteEnv. The remoteEnv is a Pothos::ProxyEnvironment which can be used to construct the snooper block (or other blocks) in the user's chosen environment (called affinity zone in the GUI).
The topology simply creates and connects the blocks, and the Framework takes care of all the automatic remote connections. Here are some screenshots from the dot-generated rendered topology:
The stream snoopers in the remote environment
The display plotters in the GUI environment