Good way to initialize clusters and parse files into them

I'm writing a small application to open some sonar .xtf files and look at their data.  The format is published and I have done a crude job of building a cluster and initializing it...then reading the file header and parsing it into the cluster so I can use the data in the headers to read the data packets that are stored next.  Here is an example of how I have done one of the parsing jobs...very crudely,
Read the header binary in (length defined)
Build the cluster by creating variables from the input file...and then loading the file data in the appropriate cluster variables after casting and ordering the bytes properly...
Surely this is not the best way to do this...perhaps loops controlled by the number of bytes in parameter to be parsed...???
I'm looking for a smart strategy for looking at the definition document, which defines the name of the variable, where the variable appears in the header (byte offset), how many bytes it is made up of....and translating that information into the cluster definition efficiently...
Ideas would be appreciated....
Thanks in advance for your help.
Attached are a couple of examples of parsing part of the header information.
Hummer1
Attachments:
Channel Header Info Parse.vi ‏36 KB
ClusterHeaderInfo.vi ‏46 KB

There may be a way to do this using "Flatten to String" and "Unflatten from String".
One issue is that it looks like your strings are fixed length, while LabVIEW uses variable length strings where the string length is preprended to the string bytes when the data is flattened.   But I think if you yourself insert the bytes 16 and 53 into the string data you read from the file at the appropriate places, you can get LabVIEW to read the data and convert it to your cluster.
Read the data as a string.
Insert the bytes listed above at the correct places.
Pass that through the Unflatten from string to convert that string data to a cluster.  You define the cluster by feeding a constant that defines the datatype into the function.
I think if your binary files as a not too complicated structure, and you define your data types for each element of the cluster precisely, you can get this to work.
Play with the attached snippet.
Attachments:
Channel%20Header%20Info%20Parse[1].png ‏66 KB

Similar Messages

  • Is there a way to compress media and project files into something small

    I have a 2TB hard disk where all my FCP files - project files, media files and rendered files are stored.
    I am not sure I will reopen those projects but still to be onthe safer side I do not want to delete them
    but keep the compresed so that in case I need to open them some later time, I can open the project and do the edits.
    So is there a way to compress the files and store that I can reuse in a later stage but still take less space now.

    You can delete all the render files, since they can recreated when needed.
    And you can also delete the optimized or proxy media, if you have any, for the same reason.
    I doubt that you'd get much space back by using compression, since video files are already pretty much compressed.

  • Drag and dropping files into widgets

    I just installed two widgets that are supposed to function by dragging and dropping files into them. How do I get access to files? How do you get files from the Finder into the dashboard?

    EMichaelM wrote:
    I just installed two widgets that are supposed to function by dragging and dropping files into them. How do I get access to files? How do you get files from the Finder into the dashboard?
    You need to activate Dashboard's "Developer Mode" in order to keep widgets active on the desktop.
    Open Terminal and enter the following command:
    <PRE>
    defaults write com.apple.dashboard devmode YES
    </PRE>
    Close Terminal, log out of your user account, and log back in again. To move a widget onto your desktop, activate Dashboard and start dragging the widget to the desktop. Press F12 before letting up on the mouse button to close Dashboard, and the widget should now be permanently affixed to the desktop. Drag to your desired location.
    Steve

  • A good viewer for photoshop, indesign and illustrator files.

    Hello everyone.
    I work at an designers firm, and we are avid users of the Adobe Creative Suite. However, it's expensive software, and certain people at the company only have to view the files we create. It's a bit of a hassle to create PDFs for them, and it's expensive to get full CS6 licenses for people who just view the software.
    So my question is: is there any good software to view these file types simultaneously?
    Thanks!

    Any bog standard image viewer like IrfanView can display PSDs - if they are saved with maximum compatibility. Of course without any color management, so colors may be off and CMYK files look whacky. Other than that your chances are slim. Without the proprietary Adobe libraries in place there is simply no way to "understand" ID and AI files beyond the occasional icon thumbnail based on the PDF-compatible data in the file...
    Mylenium

  • Drag and drop files into folders in iPad reader? or iTunes?

    is it possible to drag and drop files into folders in iPad reader? or iTunes?  It is very clunkey to have to click each separate file to instruct it to move to the folder.  Better still, can I just sync an existing folder on my hard drive so the pdf's inside always remain up to date on my iPad?

    There is no way to drag and drop in Reader on an iPad.
    There is no way to sync PDFs in a folder on your hard drive to those inside of Reader.
    There are readers (which are NOT free) which let you do some of these things and have more capabilities. You might check out PDF Expert from Readdle which costs $9.99 US.

  • How to batch or individual import Canvas .CVX and .CNV files into AI CS6(mac)?

    Is anyone aware how to batch or individually import Canvas .CVX and .CNV files into AI CS6(mac)? I have a large old graphics library representing 10 years of work which would be very nice to convert into Illustrator CS6...
    Thanks a lot for any hint -
    stefan

    JETalmage wrote:
    ...export them as an EPS or another file type that windows will recognize...
    It's not a matter of exporting a file that Windows will recognize; it's a matter of exporting a file format that Illustrator can import or open.
    A Mac OS version of Canvas is under development, by the way.
    JET
    My bad. Typo on my part. I meant one that Adobe will recognize.
    Too early yet. I shouldn't try to type before I get my first morning tea.
    --OB.

  • How to import image, html and other files into your siteroot

    Hi!
    I teach basic web development at a highschool. They've been
    using GoLive before I came along and they all stuggle to adapt and
    understand why DW doesn't support a simple "add" or "import" files
    within the program.
    And frankly neither do I. For most user new to DW the
    intuitive way to add files to the root folder is to:
    -Right click the siteroot window (files tab) > add files
    -File menu > add/import files
    All of these could easily make a duplicate html, png, rar or
    whatever file and put it into the site root without leaving the
    application. Just a simple adjustment to make life easier for all
    DW rookies.
    Dont you agree?
    Well, until anything changes, the fast way to control your
    siteroot folder is still outside DW and in your files/folders of
    your OS, right? Or drag and drop files into the site root also
    works great.

    > and they all stuggle to adapt and understand why DW
    doesn't
    > support a simple "add" or "import" files within the
    program.
    It doesn't need it. Just copy the files into the root folder
    and DW will
    see them.
    > Dont you agree?
    No.
    > the fast way to control your siteroot folder is
    > still outside DW and in your files/folders of your OS,
    right?
    Yes - but you can do it all inside DW too. Note that at the
    very top of
    your site list in the Files panel you have access to
    everything on your hard
    drive.... You can copy and paste from that.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Heffalompen" <[email protected]> wrote in
    message
    news:gcnpls$98q$[email protected]..
    > Hi!
    >
    > I teach basic web development at a highschool. They've
    been using GoLive
    > before I came along and they all stuggle to adapt and
    understand why DW
    > doesn't
    > support a simple "add" or "import" files within the
    program.
    > And frankly neither do I. For most user new to DW the
    intuitive way to add
    > files to the root folder is to:
    >
    Right click the siteroot window
    (files tab) > add files
    > File menu > add/import files
    >
    > All of these could easily make a duplicate html, png,
    rar or whatever file
    > and
    > put it into the site root without leaving the
    application. Just a simple
    > adjustment to make life easier for all DW rookies.
    > Dont you agree?
    > Well, until anything changes, the fast way to control
    your siteroot folder
    > is
    > still outside DW and in your files/folders of your OS,
    right? Or drag and
    > drop
    > files into the site root also works great.
    >
    >

  • I have 2 iphones syncing on one computer and on the same apple ID. Before i updatad my Itunes to the last available update and my Iphones to 5.01 i had no problem draging jpg. and mp3 files into my iphones DCIM folder (the picture folder that opens when c

    I have 2 iphones syncing on one computer and on the same apple ID.
    Before i updatad my Itunes to the last available update and my Iphones to 5.01
    i had no problem draging jpg. and mp3 files into my iphones DCIM folder (the picture folder that opens
    when conecting to Itunes). Since my updates Itune wont let me drag and drop any files' even pictures that
    were taken with my Iphone on 4.3.3.
    Please help as we have no itunes music in Israel, only apps and i cant copy any of my old music from my computer
    to my iphones.
    If it helps, i am using a pc with 32 bit windows 7.
    Other from the obove Itunes works fine and does sync pictures from my computer to my Iphone from "my pictures" folder.
    Thank you for your time
    Yoni Bliss
    [email protected]

    The title of my initial post is a bit misleading. I already took a chance deleting one of the iPhones, hoping if I deleted the wrong one, I can still reauthorize it (all with the same Apple ID acct, so not subject to 90-day waiting period, right?) The iTunes database just updated itself, and it says I have 4 "devices" "in the Cloud", but 5 "computers" associated w my account. How can I find out what computers are associated? Isn't there a list I can see? I dont have a clue what computers they might be. If I use the  "Deauthorize All" option, is it a pain to add them all back in. I assume I would have to log in from each computer to reauthorize each one. Would I have to be running the newest OS or version of iTunes to reauthorize? I think I have a PowerBook G4 Titanium with an older OS and iTunes. I'd like to keep that authorized, if possible.

  • Acrobat 9 - we are unable to merge word and excel files into a pdf.

    Acrobat 9 - we are unable to merge word and excel files into
    a pdf. Any advice?

    To be expected if you are working in a contemporary OS and contemporary MS Office suite.
    The Acrobat 9.x product family passed into End of Support mid-year of 2013.
    The product isn't compatible with contemporary OSs or Office suite.
    You may have to step up into the Acrobat XI product family.
    Be well...

  • HT1399 When I import a CD to itunes, it splits the album in to multiple entries. I have changed the info on some but others just will not merge. Is there an easy way to do this and can I stop them from splitting in future? Thanks

    When I import a CD to itunes, it splits the album in to multiple entries. I have changed the info on some but others just will not merge. Is there an easy way to do this and can I stop them from splitting in future? Thanks

    Okay this is what fixed my problem. Some kind of error/glitch occured half-way through importing that third cd that prevented further imports from any other cd. Once I completely removed the half-imported cd album from my library I could further import cd's without any problems.

  • Can't drag and drop files into Attachments while in Administrator mode

    I can drag and drop files into attachment easily when I'm not in Administrator mode. But I need to be in Administrator mode at work and therefore for some reason I cannot drag and drop files into attachments; I'm forced to manually search and select particular files for attaching, which significantly slows my day-to-day work.
    Is it a bug?
    I have the up-to-date version of Thunderbird and I use MS Windows 7 Ultimate.
    Any help would be highly appreciated.
    Thx

    To diagnose problems with Thunderbird, try one of the following:
    *Restart Thunderbird with add-ons disabled (Thunderbird Safe Mode). On the Help menu, click on "Restart with Add-ons Disabled". If Thunderbird works like normal, there is an Add-on or Theme interfering with normal operations. You will need to re-enable add-ons one at a time until you locate the offender.
    *Restart the operating system in '''[http://en.wikipedia.org/wiki/Safe_mode safe mode with Networking]'''. This loads only the very basics needed to start your computer while enabling an Internet connection. Click on your operating system for instructions on how to start in safe mode: [http://windows.microsoft.com/en-us/windows-8/windows-startup-settings-including-safe-mode Windows 8], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-7 Windows 7], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-vista Windows Vista], [http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/boot_failsafe.mspx?mfr=true" Windows XP], [http://support.apple.com/kb/ht1564 OSX]
    ; If safe mode for the operating system fixes the issue, there's other software in your computer that's causing problems. Possibilities include but not limited to: AV scanning, virus/malware, background downloads such as program updates.

  • Can't drag and drop files into Indesign.

    My ability to dragon and drop files into InDesign has stopped. I also cannot copy and paste. I have tried dropping previously used jpg's and PDFs as well as copying text from Acrobat, Chrome and Word. I reset the prefrences with control option command shift, but still no luck - I can't drag and drop files. Also, I cannot move files with my mouse in the program.

    Nobody can help you without system information. Could be anything from graphics driver issues to a defective mouse to a busted operating system...
    Mylenium

  • Dragging video and still files into a atom strand template

    How do I drag video and still files into an atom strand theme template in Motion 4? I am trying to do it but the opened file keeps snapping back to the file list.

    The templates can be challenging to modify.
    In that template, it's not the camera that's being animated, it's the group containing the camera. If you select that group, and set the Keyframe Editor to view animated keyframes, you'll see them.
    To modify them, it may be easier to show them in the Timeline so that the keyframes at each frame are bundled into one object and therefore easier to move. But if you are new to Motion, you are diving into the deep end of the pool here.

  • Help me to convert Java and Jsp Files into WAR File!!!!

    I need someone to help me to convert some java servlet files and jsp files into a WAR file. I need it URGENTLY and I'll be very grateful to anyone who is willing to help me! My email is [email protected] Thanks!!!!

    Are the Oracle JDBC drivers 11g used?
    oracle.jdbc.driver.OracleDriver is not supported in 11g drivers.
    Please replace with:
    oracle.jdbc.OracleDriver

  • After Effects 12.0 cannot drag and drop files into it?

    I'm simply trying to drag and drop files into the programs project files. Has worked in other ae versions, help?

    Install the updates:
    After Effects CC (12.2.1) bug-fix update

Maybe you are looking for

  • Song names do not show up on itunes from my own cd's

    When I load a cd into my computer it does not show the album name or the song names. Does anyone know what I ma doing wrong

  • MMS Has Arrived For iPhone 3G/3GS

    The latest 5.5 Carrier Update has been posted on iTunes. With this carrier update it allows your 3G or 3GS to send and receive MMS. To get the new carrier file connect your phone to your computer, start iTunes and tell iTunes to check for updates for

  • [SOLVED] Arch Linux on Macbook Pro 4.1

    Hey There, I'm a 2 years old Arch Linux guy and due to the problems I've had with my HP Pavilion PC, I've bought a Macbook Pro 3-4 months ago.. Because that it's a pain in the ass to install, upgrade and remove software on Mac OS X, especially develo

  • Authorization on Family Data ( Infotype 0021 )

    Dear All, I have issue regarding  authorization of maintaining the family data. I have two option one is PA30 and one is PA40 IN PA40 I have to give authorization for create a family data , but in PA30 I have to give the authorization for not able to

  • Keyframe info from After Effects to Premiere Pro?

    I suspect I wount have any luck with this but is there a way to copy 'position' keyframes from a layer in After Effects and apply them to footage in Premiere? I want to add some handheld movement but I dont want to lose image quality by exporting foo