WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-15-2013, 03:29 PM
Ryan Ryan is offline
Member
 
Join Date: Mar 2013
Posts: 5
Streaming data with onNetwork

I'm following the example shown here to get MatLab to stream data to Vizard:

http://docs.worldviz.com/vizard/Networking_Basics.htm

def onNetwork(e):
print '** Received message from',e.sender
print e.data #Prints: (5, 'hello', [1, 2, 3])
...

I know that I've successfully gotten some communication working, but when I run my MatLab program that sends the data, an error message appears in Vizard, instead of the data that I'm expecting. The error is:

Traceback (most recent call last):
File "file name", line 300, in onNetwork
print e.data
AttributeError: 'RawNetworkEvent' object has no attribute 'data'

I am able to transfer data from another Vizard script (using the other example from the Networking_Basics web site), so it seems that the problem has to do with streaming from other applications.

It seems there possibly is no e.data attribute when streaming information from other apps. Is there another way to address the information being sent other than e.data?

Thanks in advance.
Reply With Quote
  #2  
Old 05-15-2013, 04:07 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
When receiving data from a non-Vizard app, you can access the raw data using e.raw_data. The documentation mentions this. The raw_data attribute will be a string that contains the raw byte data from the UDP packet.
Reply With Quote
  #3  
Old 05-16-2013, 07:47 AM
Ryan Ryan is offline
Member
 
Join Date: Mar 2013
Posts: 5
Thanks. Not sure how I missed that.
Reply With Quote
Reply

Tags
data, onnetwork, stream

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
data lose psykoko Vizard 3 12-16-2010 09:08 PM
Use saved text file data as replay sources problem mizutani_jun Vizard 4 10-14-2010 05:49 PM
Flagging the Data Elittdogg Vizard 5 04-11-2008 12:40 PM
tracking using quaternarion data jfreeman Vizard 2 06-01-2005 09:48 AM


All times are GMT -7. The time now is 10:59 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC