How do you read a cluster over DataSocket with C?

Hello All,
I am new to Labview and DataSocket in particular, so any help would be greatly appreciated.
I am trying to write a data viewer program in IGOR (www.wavemetrics.com) which will receive multi channel data being published to a DataSocket server and display the requested channel real time. In order to do this I had to write a dll in C, then import that into IGOR, which allowed me to access all the functions in dataskt.dll (DataSocket Library - NI LabWindows™/CVI™ 9.0 Help ).
I have successfully compiled this dll with the DS_Open, DS_IsConnected, DS_DiscardObjHandle, DS_GetDataValue functions and tested them by publishing and retrieving a type double from the server. The problem I am having is that the real data is published as a custom cluster of a double, two singles, and a 1D array of singles (the datapoints at that time slice).
The second input of the DS_GetDataValue function is an unsigned int which represents the type of data expected from the server. There is a list of acceptable data types is in cviauto.h, but as you can see none of them are for a cluster (or structure for that matter):
/* Use these to specify the type of a function parameter, function return */
/* value, and a property. */
enum {
CAVT_EMPTY = 100,
CAVT_NULL,
CAVT_SHORT,
CAVT_LONG,
CAVT_INT = CAVT_LONG,
CAVT_FLOAT,
CAVT_DOUBLE,
CAVT_CY,
CAVT_DATE,
CAVT_BSTR,
CAVT_DISPATCH,
CAVT_ERROR,
CAVT_BOOL,
CAVT_VARIANT,
CAVT_UNKNOWN,
CAVT_UCHAR,
CAVT_CSTRING, /* null terminated ansi (multi-byte) string */
CAVT_OBJHANDLE,
CAVT_CHAR,
CAVT_USHORT,
CAVT_ULONG,
CAVT_UINT,
CAVT_LONGLONG,
CAVT_ULONGLONG,
CAVT_BASICTYPE_MASK = 0x0fff,
CAVT_MODIFIER_MASK = 0xf000,
CAVT_ARRAY = 0x1000,
CAVT_BYREF = 0x2000,
CAVT_IN = 0x4000,
CAVT_OUT = 0x8000,
CAVT_AUTO_CLEAR = 0x0800 /* valid only for VARIANT arguments. VariantClear is called on the variant after the function call */
Then the third input is a pointer to a variable that is the same data
type. I have created a structure to match the cluster and tried to
pass that but it does not change the values of the structure.
Another thing I have tried is the DS_GetDataType function, but that returns 100 which corresponds to CAVT_EMPTY.
Is there any way to define one of these for a cluster? Is there a better way to do what I am trying to do? Any help would be appreciated.
Thanks,
-Jeff VT

Thanks for the response.
Unfortunately I do not have control over how the data is published to the server.  There are actually several clusters like I have described, each with data for a particular location during the test, all being published to the same server.  The data recording program that we have is written to accept the cluster (it is a labview program) so we don't want to change the way it is published right now.  Also we are dealing with a couple hundred datapoints in the array for each cluster.
-Jeff VT 

Similar Messages

  • How do you start endnote numbering over in each section?

    How do you start endnote numbering over in each section?

    Breaking the threads between sections won't help you, since the endnotes
    and the endnote references in the text are completely static, regular
    text. (However, if this is a long document, breaking the thread between
    sections/chapters can significantly speed up InDesign, and it's one of
    the first things I do when working on long docs.)
    Now, presumably your endnotes references in the text have a character
    style applied to them? Likewise, hopefully your endnote references at
    the beginning of each endnote also have a character style applied to
    them? If not, the first thing to do is apply a char style to these (make
    2 styles -- one for the refs in text, the other for the numbers at start
    of endnotes).
    Next, is to find a script that can do maths based on a character style.
    Must be one around somewhere...  ... yup, here
    you go:
    http://indesignsecrets.com/free-script-to-change-all-numbers-in-a-document-using-math.php
    So, now you just need to run the script, figure out how much to subtract
    from each character style for each section so that the first note is 1,
    and Bob's your uncle.

  • How do you read your favorite feeds?

    Hi! This is my very first post on Arch forums.
    I'm wondering about how do you read your favorite feeds? Which software do you use and why (what kind of features).
    I'm more interested in finding a little software that uses the system tray.
    Yet I'm also curious about just how does, those who utilize RSS, do it.
    Personally I've used YARSSR, which is exactly what I want, except for few problems..
    On Ubuntu it used to be as easy as make, make install (having build-essenial installed). On Debian 4.0 stable it is in the stable repos, so it was even easier. On Arch it's not in any of the repos nor AUR and make, make install didn't work:
    # yarssr
    bash: yarssr: command not found
    # /usr/local/bin/yarssr
    Can't locate Gnome2.pm in @INC (@INC contains: /usr/local/lib/yarssr /usr/lib/perl5/5.8.8/i686-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at /usr/local/lib/yarssr/Yarssr.pm line 3.
    BEGIN failed--compilation aborted at /usr/local/lib/yarssr/Yarssr.pm line 3.
    Compilation failed in require at /usr/local/bin/yarssr line 13.
    BEGIN failed--compilation aborted at /usr/local/bin/yarssr line 13.
    I'd love to understand what's going on. How to install it right.
    Anyhow, it's far from perfect anyway. It's the single thing that is not working so perfectly on my Debian as it should. Uses way too much CPU, sometimes stays trying to update and never does update nor allow forced updates, no quitting, etc..
    I also use Google Reader, which is great to read many feeds and manage them, etc.
    All I want is a little applet (maybe GNOME applet?) that gives me quick glimpse of my top favorite feeds, without using my browser nor launching a full-functional aggregator.
    Last edited by UnbreakableMJ (2007-05-24 14:43:38)

    UnbreakableMJ wrote:
    iphitus wrote:
    have used newsgator, planet, own scripts, google reader, akregator, blam, raggle.
    currently using snownews.
    so far, none of them really suit how i want to read my news.
    James
    Hi James.
    I'd like to know how you want to read your news
    i'd prefer a cli frontend, web front would be bonus (river of news style).
    snownews is good, just needs a few tweaks, some ui ones, and the main one being:
    often i dont get to read news for a few days straight, so i'd like something i can put in cron and it'll update, and log the news for a few days straight, so when i get back it's all there. this generally limits me to one of the web clients, i dont know any desktop apps that do this.
    i might write up an app to do this someday
    as for your yassr problem, pacman -S gnome-perl?
    James
    Last edited by iphitus (2007-05-25 11:32:57)

  • HT204382 How do you read AVI sequences with Quick Time Player ?

    How do you read AVI sequences with Quick Time Player ? H2OT

    Hope somebody will help, I downloaded Flip4MacWMV 2.4.4.2dmg as recommended but it did not work. can I get HELP? Thanks

  • How do you read in different kinds of data?

    Hi
    How do you read in integers first and next read in a string of characters?
    Please help.
    Thanks,
    Sincerely,
    Egan

    You don't give enough information to provide a definitive reply. DataInputStream is Java's IO class that is designed to do that . This reference has example code of how it's used.
    http://java.sun.com/docs/books/tutorial/essential/io/dataIO.html

  • How would you read in each line of data and display them to message box?

    How would you read in each line of data from the _.txt file_ and display the whole data using an information-type message box?
    I know how to display each line of the .txt file data, but I do not know how to display the whole thing.
    Here is how I did to display each line of data using the message box:
    import javax.swing.JOptionPane;          // Needed for the JOptionPane class
    import java.io.*;                         // Needed for file classes
    public class problem3
         public static void main(String[] args) throws IOException
              String filename;          // Needed to read the file
              String categories;          // Needed to read the categories
              // Get the filename.
              filename = JOptionPane.showInputDialog("Enter the filname.");
              // Open the file.
              FileReader freader = new FileReader(filename);
              BufferedReader inputFile = new BufferedReader(freader);
              // Read the categories from the file.
              categories = inputFile.readLine();
              // If a category was read, display it and
              // read the remainig categories.
              while(categories != null)
                   // Display the last category read.
                   JOptionPane.showMessageDialog(categories);
                   // Read the next category.
                   categories = inputFile.readLine();
              // Close the file.
              inputFile.close();
    }I think I need to change here:
    // If a category was read, display it and
              // read the remainig categories.
              while(categories != null)
                   // Display the last category read.
                   JOptionPane.showMessageDialog(categories);
                   // Read the next category.
                   categories = inputFile.readLine();
              }but I don't know how to.
    Could you please help me?
    Thank you.

    kyorochan wrote:
    jverd wrote:
    What is not understood about your question is which part of "read a bunch of lines and display them in a textbox" do you not understand.
    First thing's first though: You do recognize that "read a bunch of lines and display them in a textbox" has a few distinct and completely independent parts, right?I'm sorry. I'm not good at English, so I do not understand what you said...
    What I was trying to say is "How to display the whole lines of .txt file in single dialog box."We know that.
    Do you understand that any problem can be broken down into smaller pieces?
    Do you understand that your problem has the following pieces?
    1. Read lines from the file.
    2. Put the lines together into one String.
    3. Put the String into the message box.
    and maybe
    4. Make sure the message box contents are split into lines exactly as the file was.
    (You didn't make it clear if that last one is a requirement.)
    Do you understand that 1-4 are completely independent problems and can be solved separately from each other?
    Do you understand that you have stated that you already know how to do 1 and 3?
    Therefore, you are NOT asking "How to display the whole lines of .txt file in single dialog box." Rather, you ARE asking either #2 or #4 or both.
    If you say once more "display all the lines of the file in one dialog box," then it is clear that we are unable to communicate with you and we cannot help you.

  • How do you read an iTunes Book on your Mac computer?

    When my iPod was down, I wanted to reply to a friend about something I had read on a book that I had purchased on the ITunes Store.  Clicking on the book in iTunes on my iMac would not open the book so that I could read it.  I copied it to my desktop, but when I tried to read it with Text or Pages, it would not give me anything but jibberish.  I asked the above question (title) on the iTunes Store Search bar, but it only gave me an App that was a Chinese book reader.  So, How do you read an iTunes Book on your computer?

    Content from ibooks can only be viewed on an IOS device at this time

  • How do you read the camera position in the 3d picture control?

    Hello,
    There is a method to setup the camera position, but how do you read the current camera position?  e.g. the user uses the mouse, ctrl, and shift, to change the camera position.  How do you read this new camera position?  There don't seem to be any properties to do this.
    I've read this thread:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=214629&requireLogin=False
    but the question was never answered....
    From the comments in that thread, even if you had the proper documentation for the "Model Matrix" property, you couldn't get the information necessary to calculation the camera position.

    Lorielle,
    Thanks for the VI.
    Could you point me towards a more detailed description of the "Modelview Matrix" property?  I've attached a screenshot from the online help.  It is not very helpful.
    Attachments:
    Modelview Matrix.jpg ‏71 KB
    Modelview Matrix1.jpg ‏71 KB

  • HT4587 How do you read the Serial Number on the back of the Airport Express? It is sop small and silver writing on hite background?

    How do you read the Serial Number on the back of the Airport Express? It is sop small and silver writing on white background?

    http://support.apple.com/kb/ht3546

  • How do you copy, for example I work with blue prints and I want to copy a section and copy into another new page?

    How do you copy, for example I work with blue prints and I want to copy a section and copy into another new page?

    Forgot to add that it would be an adjustment layer with some kind of mask on it already. The mask is uncentered when copy and pasted which throws it off.
    I guess the same question would go towards doing the same for an object. How to copy and paste it over to a new doc, keeping its position within the document? is this possible?

  • How do you have multiple apple id's with one itunes

    how do you have multiple apple id's with one itunes

    I have multiple IDs and use the single computer sharing itunes. By 'sharing' I mean we open the pc, open itunes and log in with our individual ID as required.
    While Im logged in I plug in  my device. I transfer my purchases from my device as per the file menu (not the check for auto downloads). I move them as required to whichever playlist I like.
    Then when my son wants to use itunes or update his device, he logs in, plugs in his device, transfers purchases from his device, puts whatever music he wants into his playlist and/or drags direct to the device regardless of who purchased it and then syncs.
    Im not sure how it works associating the pc with only one ID or all that other business- I know I don't fiddle with any of that.

  • How do you overlap PDF's and finish with one PDF file? Need help ASAP

    how do you overlap PDF's and finish with one PDF file?
    Need help ASAP

    I'm not sure if you can do that with CreatePDF.  Try it; you got one free use when you sign up with Acrobat.com
    If not, you will have to use Adobe Acrobat; there is a full-use 30 days trial.

  • How do you sync Windows Live Mail Calender with iPhone 4 Calender?

    How do you sync Windows Live Mail Calender with iPhone 4 Calender?

    Hey donfrombig spring,
    Thanks for the question. To setup your Live account on your iPhone, see this article:
    iOS: Setting up Hotmail, Outlook, Live, or MSN email accounts
    http://support.apple.com/kb/HT1694
    Thanks,
    Matt M.

  • How do you use inspirion 13 7000 stylus with adobe photoshop cc

    how do you use inspirion 13 7000 stylus with adobe photoshop cc? Doe anyone know how to use the stylus on this dell 2 in 1? I was told by dell that you could use the stylus to edit in photoshop but its not working-

    You are asking a huge question. You'll get a better response if you ask something specific about a problem you are having with layers.
    I'm not trying to be mean but you can find vast amounts of basic info on layers with a simple Google query. If you click the Video link after inputting a search query, you can even find video tutorials.  YouTube  is one place that has quite a few video tutorials.
    How layers work hasn't changed between Elements versions.  Layers work the same in Photoshop. The application interfaces may be slightly different but layers are layers.
    FWIW, I'm not a big fan of the manual. You're better on getting something like "The Missing Manual" by Barbara Brundage or looking for info on the Internet.  One free resource with tons of info can be found here:
    http://www.garymgordon.com/misc/tutorials/photoshop_tutorial/elements/psE_intro.htm
    The tutorials found at the above link use an older version of Elements so you won't find info on the newest tools and features but the basic Editor info on layers and the tools still apply.

  • How can you save from photoshop to pdf with intact formlayers?

    How can you save from photoshop to pdf with intact formlayers?

    No, it is form layers for a cutting machine, when you save to pdf from ill or indesign you can select make acrobat layers but not in photoshop.
    Do anyone have a sullotion?

Maybe you are looking for

  • Device isn't eligible for requested build - ipod touch 3rd gen

    I have a 3rd generation ipod touch running ios 4.3.2. When I plug in my ipod into my mbp itunes says that a new version (4.3.3) is available. The problem is when it tries to verify the update with apple it returns an error message stating the device

  • STRONG CHEMICAL SMELL FROM NEW MAC MINI ?

    Hi all, Just bought a mini. I am very impressed with the build quality, the functionality and the BSD UNIX/Mach guts! However, from the second I took it out of the box, it has emitted a strong offensive and very toxic smelling chemical odor. I have l

  • Capturing with HD but monitoring Firewire

    I'm just about to start a job being shot on HD Cam but don't want to spend £1000 on an HD to SD converter to play on a regular TV. If I digitise at 1080p and edit in a DV PAL sequence (rendering obvioulsy) will it play out of my firewire as any other

  • Command-L doesn't work for full-screen PDF under Mac

    In Adobe Reader, users can use Ctrl-L to view PDF in full screen under Windows (Cmd-L under Mac);  in AIR, Ctrl-L still works under Windows but Cmd-L doesn't work under Mac. Is this a bug or the short-cut is intentionally disabled?

  • Dreamweaver CS5-6 What is the difference

    HI I currently use CS4 and am wondering what the difference is between 5 and or 6. Do I need to upgrade? Is it worth the price? I currently most likely use about 40% of the features. Dougas SImons