View Single Post
  #3  
Old 03-10-2015, 01:05 PM
shall6 shall6 is offline
Member
 
Join Date: Dec 2014
Posts: 9
Hi,

Sorry about that.
Code:
import viz
import viznet

dataNetwork = viz.addNetwork('LocalHost');
#viz.net.addPort(4960)
def onNetwork(e):
	if isinstance(e,viz.RawNetworkEvent):
		print e.raw_data

viz.callback(viz.NETWORK_EVENT,onNetwork)
It's just a test code to see if I can make this work, so that is all there is right now.
The matlab has no indents.

What I hope to do later:
Code:
dataNetwork = viz.addNetwork('LocalHost');
#viz.net.addPort(4960)
def onNetwork(e):
	if isinstance(e,viz.RawNetworkEvent):
		print e.raw_data
		if e.raw_data == 'command'
			SetBrakeFlag(not BrakeFlag)

viz.callback(viz.NETWORK_EVENT,onNetwork)
Reply With Quote