Matt wrote:
> Hello,
> > Would like to ask if anyone has used OpenDX with inbound streamed data.
> In other words, most examples seem to show OpenDX providing
> visualizations for complete datasets that are already imported.  In
> contrast, I'd like to visualize data as it arrives into DX.  Obviously
> there needs to be some sort of refresh mechanism to update the
> visualizations based on the new data since the last refresh.  However,
> I'm just looking to understand how this can be implemented.  Can objects
> (fields, arrays) be visualized while data is still arriving?

I believe that the responses you received via opendx-users
pretty much summed up the options, but perhaps someone else
will see others.

Firstly, just to be clear, I don't believe there is a way
to have any given DX module or the Display/Image modules
work while the data is changing. You must provide them with
static data, and they produce an output.  All handling of the
changing data would have to be done outside those modules,
then calling those modules to reexecute and produce new
output when new data is available.

>  From the VPE perspective, I'm a little unsure how this would be
> implemented, given the associated C routine is not supposed to have a
> notion of state.  However, I'm not bent right now on which interface to
> use (VPE, callm, etc.).  I just want to understand the method by which
> this can be accomplished, if at all.  Hopefully, it can be.

If you want to use the VPE you can write a module to handle
the import. The trick is to make the module "asynchronous".
In my (very, very old) Programmer's Reference manual it's in
Chapter 10, under "Making Modules Work", under "Asynchronous
Modules".

You set the ASYNC flag in the module .mdf file, and then
inside your module you'd call "DXReadyToRun()" to request
execution. So you'd just call that function every time you
received enough new data to make it worth refiring the net.

Marilyn Noz posted some code (that she later made available via
FTP I think), that does this for an interface to a haptic device.

You'd have to decide whether to buffer up the data inside
your module, and thus send an entire new data set to the
DX net each time; or just provide new data to the DX net which
would append it in some way to the previous data. But then
it would seem there would have to be some way to get rid of
older data.

The same basic approach would also work with code written
outside the VPE and dxexec, via libm. You'd collect the data
as it comes in, and decide when to pass the structure off to
the DX modules that then need to reexecute and redisplay.

Mike

> Thanks,
>
> Matt Genovese
> University of Texas at Austin
> --
>

Reply via email to