WorldViz User Forum  

Go Back   WorldViz User Forum > Plug-in development

Reply
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
  #1  
Old 06-16-2008, 10:31 AM
timbo timbo is offline
Member
 
Join Date: Jun 2008
Posts: 16
data from the socket

I understand how to create the socket in python from the examples on this forum and other sources. However, Im not sure how to sequester the x, y, and z data for the position of the LED. Using the code from an earlier question I see that you can recieve a "MAX_DATA_SIZE" but what I need is distinct values for x, y, and z. Is there something in the python socket library that can accomplish this? Thank you for all your help farshizzo!
Reply With Quote
  #2  
Old 06-16-2008, 05:10 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
It depends on what data format the values are sent over the socket. If they are sent as text, then you can use standard text to float conversion. If the values are sent as binary data, then you can use the struct module to extract the values. The following post has an example of this, http://www.worldviz.com/forum/showthread.php?t=1347
Reply With Quote
  #3  
Old 06-24-2008, 09:58 AM
timbo timbo is offline
Member
 
Join Date: Jun 2008
Posts: 16
Thanks farshizzo it worked.
Reply With Quote
Reply

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
Creating a Vizard Sensor Plugin farshizzo Plug-in development 25 08-01-2019 12:24 AM
Sensor callback to the wii mote buttons shivanangel Vizard 3 03-14-2008 09:45 AM
wiimote and sensor bar masaki Vizard 1 03-06-2008 03:07 PM
Multiple Copies of same sensor plugin RedSpikeyThing Plug-in development 2 02-12-2008 02:10 PM
using sensor data in Physics1.py Eunice Vizard 4 01-03-2006 05:18 AM


All times are GMT -7. The time now is 12:11 PM.


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