Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

TurboLag

macrumors member
Original poster
Feb 24, 2004
85
0
I will be developing a data acquisition application which will read data from a USB endpoint transmitting data with interrupt transfers. I would like to graph the data on a 2D plot (or preferably, 3D).

I would like to plan what languages/development route to take before I start. From what I read, using Objective-C with Cocoa is the preferred method of developing applications with a GUI.

Are there any free to use plug ins for graphing data? I was hoping there would be an API for Grapher.app, but there isnt. Does anyone have any success with any 3rd party graphing plug ins?

Also, are there any API calls for reading USB data from an endpoint? Any assistance would be appreciated. Thanks.
 

iSee

macrumors 68040
Oct 25, 2004
3,539
272
The USB APIs are in the IOKit. Link: http://developer.apple.com/document...index.html#//apple_ref/doc/framework/iokit_fw

Check out the USB sections of the headers and classes.

This is a C API, so it's easy to call from Objective-C/Cocoa code (if you don't know, Objective-C is a superset of C). This isn't a high-level API, though, so you're going to need some understand of USB programming to use these APIs. Look around for some sample code to get you started.

I'm not sure how well integrated your app needs to be, but you might be able to acquire the data to a .csv file (or something else) that Excel or Numbers could read. Then develop a graph in Excel or Numbers.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
Check out SM2DGraphView for graphing. However at the moment the developer's site seems to be down.
 

TurboLag

macrumors member
Original poster
Feb 24, 2004
85
0
I have designed the device, so I know the Vendor and Product ID. Could I just read/write to the device's file in /dev?

Would this require the application's user to have administrator privileges?
 

TurboLag

macrumors member
Original poster
Feb 24, 2004
85
0
What about going the openGL route? Would this be over ambitious for 2D graphing? This would probably facilitate a transition to 3D graphing also.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.