In this example I will show how to connect data from a DDS (Data distribution service for Real-Time Systems). Be aware, that this is very alpha (wink)

First of all you have to install the DDS Feature:

 

After that, you can download the MD PnP Software from here:

http://sourceforge.net/projects/mdpnp/

Start the application

Choose Domain Id 0 (or remeber the choosen value) and run "Start ICE_Supervisor".

You can now "Create a local ICE Device Adap..."

And choose e.g. Simulated Pulse Oximeter. Call "Start Simlulated Pulse Oximeter". After some time, you see e.g.

Now back to Odysseus:

Create a new Project and add the following script:

#PARSER PQL
#RUNQUERY
sampleArray = RECEIVE({
                  source = 'SampleArray',
                  transport = 'dds',
                  datahandler = 'tuple',
                  options=[
                    ['qosFile','${WORKSPACEPROJECT}/USER_QOS_PROFILES.xml'],
                    ['idlFile','${WORKSPACEPROJECT}/ice.idl'],
                    ['topic','SampleArray'],
                    ['topicType','SampleArray'],
                    ['qosLibrary','ice_library'],
                    ['qosProfile','waveform_data'],
                    ['domain','0']
                  ],
                  schema = [
                    ['unique_device_identifier', 'String'],
                    ['metric_id', 'String'],
                    ['instance_id','Long'],
                    ['unit_id','String'],
                    ['frequency','long'],
                    ['values','List<Double>'],
                    ['time','Tuple<Long,Long>']
                  ]                                                        
                }                                              
              )

There are two important files:

USER_QOS_PROFILES.xml 
ice.idl

They contain information necessary for DDS. You can download the files from the following locations:

http://sourceforge.net/p/mdpnp/code/ci/master/tree/data-types/x73-idl/src/main/idl/ice/ice.idl
https://github.com/mdpnp/hello-openice/blob/master/USER_QOS_PROFILES.xml

Copy them to the workspace.

If you changed the domain, please update domain value in the options above.

Now run the query, and show as table. You should see something like:

As you can see, the values attribute contains a list, and the time attribute a tuple. If you want to store this data e.g. in a database this is not possible directly. You have to "flatten" the data. This can be done as follows:

TODO