View Single Post
  #4  
Old 06-19-2014, 06:31 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Vizard can receive raw byte network packets via UDP. If matlab can send the data via UDP then you should be able to get it in Vizard.

First you need to establish a connection with the machine running MatLab. You can either specify the machine name or IP address:

Code:
myNetwork = viz.addNetwork('machineName')
Then you create a callback function for the network event:

Code:
def onNetwork(e):
    if isinstance(e,viz.RawNetworkEvent):
        print e.raw_data

viz.callback(viz.NETWORK_EVENT,onNetwork)
Vizard sends/receives network data over UDP port 4950 by default. To receive data over a different port (e.g. 4960) use the following:

Code:
viz.net.addPort(4960)
Reply With Quote