Re: Displaying Realtime Data
Re: Displaying Realtime Data
- Subject: Re: Displaying Realtime Data
- From: Cameron Hayne <email@hidden>
- Date: Tue, 28 Oct 2003 02:32:56 -0500
On 28/10/03 2:06 AM, "Saul Iversen" <email@hidden> wrote:
>
Could someone please offer a recommendation regarding the best approach
>
in the Cocoa world for displaying an incoming stream of realtime data
>
from an instrument? I have developed some code which correctly parses a
>
serial stream of physiological data and prints body temperature for
>
instance to the console. But I want to be able to go beyond simple
>
printf's and open a separate window with the text representing the
>
temperature enlarged and continuously being updated.
I think it depends on the complexity of the data stream and what you want to
do with it. If you already have a console app that gives you the text output
that you want, it might be best to keep that program separate from the UI
and just hook up an NSTextField with the stdout of that process via an
NSTask. That is what I have done in a somewhat similar situation.
No need for custom NSView subclasses - you just need to have your controller
code be able to detect the marker (whatever it is) that indicates the start
of new data, then parse that data and setString on the NSTextField.
You'll want to look at Apple's Moriarity example and also at Andreas Mayer's
AMShellWrapperTest.
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.