Struct with pointer

Hello I need to interface with a DLL with the folowing structure:
extern "C" {
struct IDSTRUCT
UINT8 code[2];
UINT8 signature[8];
UINT8 revision [4];
R2DLL_API BOOL R2DLL_ReadFirmwareHeader (UINT16 port, struct IDSTRUCT* pStoreAdr);
Is there a way to implement this with clusters in labVIEW?
Thanks in advance

"mudder" <[email protected]> wrote in message news:[email protected]..
I'm not sure how to handle structs with unions with another struct inside.&nbsp; I'm new at LabVIEW
&nbsp;
what if the structure was like this:
&nbsp;
#pragma pack(push, 2)
struct IDSTRUCT{
&nbsp;&nbsp; UINT32 temp;
&nbsp;&nbsp; union
&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UINT32 x;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UINT32 x1&nbsp;&nbsp;&nbsp; :1;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UINT32 x2 &nbsp;&nbsp; :31;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };&nbsp;&nbsp; };
&nbsp;&nbsp;
&nbsp;&nbsp; union
&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UINT32 y;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UINT32 y1&nbsp;&nbsp;&nbsp; :1;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UINT32 y2&nbsp;&nbsp;&nbsp; :31;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };&nbsp;&nbsp; };};#pragma pack(pop)
This is basically a pointer to four U32's. Because it is a union, the pointer can point to:
temp { x {x1, x2 } }
Or:
temp { x {y1, y2 } }
I'd use a cluster with 4 U32's. The sub structures have no size, and can be ignored in LabVIEW.
Regards,
Wiebe.

Similar Messages

  • Can't get long from dll's struct with JNA!!!

    Hi,
    I have trade.dll witch contains structs and just informational fields. For example like this:
    long getInstrumentCount ();
    struct Instrument {
    long id;
    char MarketName[15];
    char SectorName[15];
    char GroupName[15];
    char ShortName[15];
    char Name[100];
    double Open;
    struct Instrumnet getInstrumentByNum(long)
    Here is Java mapping:
    public interface TradeDll extends StdCallLibrary {
    public static class Instrument extends Structure
    public static class ByValue extends Instrument implements Structure.ByValue { }
    public Pointer id;
    public byte[] marketName =new byte[15];;
    public byte[] sectorName=new byte[15];
    public byte[] groupName=new byte[15];
    public byte[] shortName=new byte[15];
    public byte[] name=new byte[100];
    public double open;
    long getInstrumentCount();
    Instrument.ByValue getInstrumentByNum(long n);
    So, getInstrumentCount and getInstrumentByNum work fine, but I can't get id value from returned stuct by getInstrumentByNum(long n).
    First I've tried to declare id like just long but, it takes 8 byte and took 4 byte from next field. (I think in dll file for id field allocates only 4 bytes).
    Second I've tried to declare id like NativeLong, but it returns "java.lang.IllegalArgumentException: Unsupported structure field type class com.sun.jna.NativeLong" exception.
    Third I've tried to declare id like Pointer, but I couldn't get long value from Pointer. When I've tried get long with pointer.getLong(0) and pointer.getNativeLong(0) JVM prints "An unexpected error has been detected by Java Runtime Environment:
    Fourth I've declared like this byte[] id = new byte[4], but long type in Java needs 8 bytes.
    I'm sitting on this problem already 2 weeks!
    Can anybody help me, please!
    Thanks!

    Here is my virtual instrument>>>>
    Attachments:
    SOLO_esib_problem_noreading.vi.vi ‏29 KB
    Immagine.GIF ‏66 KB

  • Hi, I have this green mark (with pointing arrow looks like a link) on some words show on my window screen when I open a web page, I wonder if it is a virus link or such. Need help how to get rid of it. Thanks

    Hi, I have this green mark (with pointing arrow looks like a link) on some words show on my window screen when I open a web page, I wonder if it is a virus link or such. Need help how to get rid of it. Here's the example:
    WING
    GAMES
    MAJORITY
    Thanks

    If the third link you posted (the link containing the word "majority") does not look like the following then you inadvertently installed adware.
    That particular page should resemble the following:
    The word "majority" in the third paragraph should not be a link and should not have the green icon associated with it.
    To learn how this may have occurred, and how to prevent it from occurring in the future, read How to install adware
    Most so-called "news" websites are nothing more than entertainment outlets that cater to prurient interests, and contain advertisements that leave the user about three clicks away from installing junk. If you decide to frequent those websites, Safari's "Reader" feature helps minimize that exposure.
    Try it:

  • When I make a project in iDVD'09, there are sometimes green blocs with points flickering in some scenes of my iMovie-film. In iMovie there is no problem with this film, but the problem begins by exporting to iDVD and making a project there.

    When I make a project in iDVD'09, there are sometimes - at voluntary moments - green blocs with points flickering in some scenes of my iMovie-film.
    In i-Movie there is no problem with  this film, but the problem begins by exporting to iDVD and making there a project.
    Who can help me, then I cann't find everything about this in any forum?

    Hi
    Can be a problem that get multiplied and visible when iDVD encode for DVD.
    A. See if problem can be isolated to a single frame in the movie and re-import this clip and see if it's better
    B. When free space on Start-Up hard disk goes low - strange things like this might occure. I never go under 25Gb free space on this Start-Up Mac OS hard disk !
    C. Does this problem arises what ever encoding quality You use ?
    Yours Bengt W

  • Sales order cancellation with points comsuption

    issue is the following :
    As a consumer, i create a sales order in WCEM with points consumption :
    i "give" 8 points to get my stuff -> fine.
    Then, i decide to cancel this order, still in WCEM, as delivery is late ..
    -> i don't have any member activity being triggered to get back my points ..
    should i find a way to create a "Points return" activity ? how ? with an action ?
    Thanks for any feedback
    Regards

    Hi Thierry,
    This is a common requirement in most of the FMCG industries wherein sales and returns works together. For one of my implementation project, we had the similar requirement. This can be achieved through redemption. Create a redemption type as "returns" or "cancellation". When ever you have returns you can create cancellation redemption transactions so that points accumulated during earn will get redeemed for a particular membership. This will also help you to reporting purpose.
    I hope it helps.
    Regards
    Pramod

  • How to make an acquired array of data work with point-by-point functions

    Hello everyone,
    I am working on a LabVIEW project using the Measurement Computing PCI-DAS6402/16 board. I am attempting to use point-by-point analysis with data acquired from the board, but I am having some difficulty. I am currently only able to acquire an array of data and not just a single point of data per scan. So, I was wondering if i) anybody possibly had any knowledge/experience using this particular board and getting it to be compatable with point-by-point VIs or ii) if anybody possibly knows anyway to convert an array of acquired data to work with point-by-point VIs in a hard realtime application. Thanks
    Pat
    Message Edited by Support on 11-16-2005 07:56 AM

    Hi Pat
    I just can tell you how you can use the pt-by-pt functions. As you said you have an array of data. To use the pt-by-pt functions, you need the single datapoints. So the only way is to use a loop to get the single elements and pass them to the pt-by-pt functions.
    I've attache a simple example.
    If this is the right way for you concerning processor and memory load, execution speed etc. I can't tell you.
    Hope this helps.
    Thomas 
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    PtByPt.vi ‏17 KB

  • Rewarding myself with points

    Hi All.
    I have this topic for ERP Financials:
    Authority-check when posting using FBV0 transaction
    but I have posted and solved. How could I reward me with points?
    Thanks,
    Daniel Carvalho

    I dont think so..
    On a lighter note.. As consultants thats what we are paid for ! So, you got your reward already ! And ofcourse there's nothing stopping you from rewarding this one !!

  • Hp pavillion laptop with xp start up displays black screen with pointer

    Start up results in ms logo an turns to black screen with pointer. Fan and led function. No error codes. Maybe lsasse.exe file problem but cannot get to command prompt with esc, f8, f10 options. How do I get a command prompt? Tried all boot tricks including holding down on bottom to bleed power after removal of battery & power cord. Help?

    Yeah probably it died suddenly and some files on the hard drive are corrupt. Can you tap F8 as you power on and get into a menu that includes safe mode? If so choose safe mode with command prompt and when you can get to a command prompt type   
    chkdsk C: /r
    and hit enter and let the full chkdsk utility run. It might take a couple hours but it will fix file system errors on the hard drive and likely allow you to boot again, now that we know there is nothing mechanically wrong with the drive. If this does not work we can link you to a Windows 7 32 bit repair disk that will allow you to do the same thing. 

  • Call DLL function with pointer to simple struct

    Hello,
    I try to call a function using CLFN. My problem is the parameters of the function I try to access.
    Here is the function and his parameter:
    typedef struct {
    int major;
    int minor;
    int revision;
    int build;
    } VersionNumberType;
    int Comm_BTE_softVersion( VersionNumberType *pVersion)
    BYTE byBuffer[2048] ;
    if( !Comm_BTE_readYMem( byBuffer,COMM_BTE_TX14_SOFTVERSIONADDR,
    COMM_BTE_TX14_SOFTVERSIONSIZE))
    return FALSE ;
    //. process the answer
    pVersion->major = (int) (byBuffer[0] & 0xFF) ;
    pVersion->minor = (int) (byBuffer[1] & 0xFF) ;
    pVersion->revision = (int)( byBuffer[2] & 0xFF) ;
    pVersion->build = (int) ((int) ( byBuffer[4] << 8) ) | ((int) ( byBuffer[5] ));
    return TRUE ;
    } //. end Comm_BTE
     In attached file there is the Comm BTE soft Version.vi that try to access this function. The code crashes when the function is called and labVIEW is closed.
    I probably don't pass the data parameters correctly to the CLFN.
    Thanks for help.
    Regards. NewCLAD.
    Solved!
    Go to Solution.
    Attachments:
    Comm BTE soft Version.vi ‏13 KB

    Everything is configured correctly EXCEPT the numeric representation of the values in the cluster. They must match int, which is most likely 32 bits on your platform. In your VI, they are U8.

  • Line with pointed end?

    Trying to find the easiest method to achieve this. This will be a 3/4 circle around a mark. So i draw a circle, delete the right side point to create an opening. Now i'd like for the two end points to come to a "point" (sharp, pointed end like a knife). I've tried outlining the stroke, then adjusting the end points. But it never comes out clean and precise. Would be nice if there was a set of sharp ends along with the endpoints like the arrowheads. 
    Any guidance in how to do this will be much appreciated!
    \m/

    Answered my own question. The width tool.
    ...i'll have more coffee before asking next time.

  • Sql loader problem with point data

    I am struggling to import bulk point data.
    Example line from data file
    2     1     Highest mountain on Skye with steep faces and narrow ridges.     4     32     3001     8307     57.206116     -6.223032     992
    So its all tab deliminated
    3001 is sdo_gtype
    8307 is sdo_srid
    57.xxx is my X point
    -6.xxx is my Y point
    992 is my Z point
    I can import all of the data apart from the final section, and my loader looks like:
    GEOM COLUMN OBJECT
    SDO_GTYPE INTEGER EXTERNAL TERMINATED BY X'09' ,
    SDO_SRID INTEGER EXTERNAL TERMINATED BY X'09',
    SDO_POINT_TYPE(X,Y,Z) INTEGER EXTERNAL TERMINATED BY ','
    Any help? I simply need it take the last three numbers and assign them to x,y,z of point_type.
    Need any more info?

    TSEdinburgh,
    Try
    LOAD DATA INFILE * APPEND INTO TABLE MyTable
    FIELDS TERMINATED BY X'09' TRAILING NULLCOLS
         MyCol1,
         MyCol2,
         description,
         MyCol3,
         MyCol4,
         geom COLUMN OBJECT (
              sdo_gtype INTEGER EXTERNAL,
              sdo_srid INTEGER EXTERNAL,
              sdo_point COLUMN OBJECT (
                   x FLOAT EXTERNAL,
                   y FLOAT EXTERNAL,
                   z FLOAT EXTERNAL
    )Regards,
    Noel

  • Jmeter fails to test a BPEL with point to point JMS

    Hi all,
    Do you have any idea to Jmeter testing with Oracle BPEL. I configured my Jmeter with a point to point JMS.Then I send a request to a Oracle JMS queue using BPEL locator API.An MDB listens to that request queue pickup the message payload and initiate the BPEL using that i/p payload.BPEL itself after finishes its task call a ws which sends the result to another JMS queue listened by Jemeter.Now when I run Jmeter with this conf BPEL initiates properly by the request queue listener MDB, Jmeter listening to that receive queue appropriately receives the message from the receiving queue, but unfortunately i can't get any response in Jemeter Result view Tree.Jmeter fails to render the specific result to it's view tree.
    I have used following list of jars to send a message payload and receiving it by Jmeter to Jmeter lib.
    Apache Specific
    activemq-all-5.0.0.jar
    Oracle Specific
    javax77.jar
    jta.jar
    jms.jar
    oc4j.jar
    oc4j-internal.jar
    optic.jar
    The jars are sufficient and enough to send a request to a Jms queue.I have wriiten an alternative oracle JMS client and used those Jars and did a lot of trial and error and finally reduced to this number of Jars.But why Jmeter can't render the result to its result view tree that I can't understand where it receives the result message successfully from the receive queue.
    Any reply or suggestion is most welcome.
    Thanks in advance.

    sorry for the late reply. The problem is that Oracle XDK is not compatible with the junitreport task. I believe there are some post install steps (due to licensing issues) that you need to perform before running the ant task. This is noted in the release notes (copied below):
    1. base site for xalan is http://xml.apache.org/xalan-j/ site. to download, go to: http://www.apache.org/dyn/closer.cgi/xml/xalan-j. then from the recommended mirror site download xalan-j_2_7_0-bin.zip.
    2. unzip this file.
    3. copy unzip_dir\xalan-j_2_7_0\serializer.jar to Oracle_Home\bpel\lib\serializer_2.7.0.jar. copy unzip_dir\xalan-j_2_7_0\xalan.jar to Oracle_Home\bpel\lib\xalan_2.7.0.jar. Note the filename change
    4. no change to obsetenv is needed.

  • Why are midi notes in piano roll lower volume when selected with pointer than when in playback?

    I'm using Logic X on mac mini. When I select midi notes in piano roll with the pointer, they are at a  lower volume than when in playback? I use Logic X on mac mini with Apogee Duet.

    Thanks for your help Erik.  I found the answer you posted about 30 minutes after posting my question.  To me it doesn't answer my question 100%.  The reason is that I can't expect to believe that every time someone records midi they have to go through all these extra steps to merge it (and it is not easy to do because they are hidden behind one another) in fact my problem was so unique that other logic users didn't understand why I am having this trouble.  SO that brings me to my conclusion, that I have some setting that is keeping this from being a seamless operation and transforming it into a bunch of hoop jumps.  Thoughts?  Could it have to do with record settings of "merge"? I saw a few  different settings there but none make sense to me.
    thanks again.

  • CS4- CS5: changed behavior in file handling with points (".")

    ... oh, no, it's horrible -- new version, new problems
    I have such file names: 1_xxx_26.08.10.jpg, 2_xxx_26.08.10.jpg, ...
    I am creating an action which saves this file in a specific directory (after several editing steps) by using e.g. the first file and "Save for web".
    I want to execute this action via batch processing on all these files.
    Now the changed behaviour in CS5: all the files were saved as "1_xxx_26.08.jpg" in my selected directory and not as several files with the "old" file name. Only files without "my points", e.g. "1_test.jpg" where saved correctly -- as it was in CS4.
    Example action:
    -> "save vor web" doesn't use only the target directory to save the file with their own names. Insted they were all saved as "xxx_22.08.jpg"
    I don't want to change the name of all my files... so, any ideas?
    Thanks a lot.
    Carlos (0:20 am -- only because of this bug; yes, it's a bug for me )

    Are you sure?
    Yes, with these default settings and with other settings the file name is always xxx_26.08.jpg
    -> the result is always the same:
    I got around "my" problem by using a harmless file name ("temp.jpg") during recording of the action. Now I have only the directory specified in this action command without a filename:
    Maybe the only solution
    Thanks again
    carlos

  • Problem moving window with pointer

    I'm having an odd problem with the finder. I'm running 10.4.7.When I click on the title bar of a finder window, or any application window to move it on the screen, I am able to move the window in any direction except down. The window stops moving, and the pointer continues, leaving the window behind. If the pointer then happens to "land" on anything selectable, it will pick that up instead. Anyone else having this problem?

    Nevermind. My mouse is broken......

Maybe you are looking for

  • Urgent : Regarding Oracle Applications tutorials for beginners

    Hi , This is vamsi krishna. I am new to oracle applications. I am looking for material which contains different examples for: 1) Reports and various types of reports 2) Forms and forms customization(all types of examples) 3) Detailed examples of all

  • In which folder can I find the abap instance profile?

    Hi, In which folder can I find the abap instance profile? This is the parameter that I want to change: "profile parameter em/address_space_MB = 250 in the instance profile" Greets Stefan

  • Strange Folders

    I was looking at my preferences and I found at least 20 folders named/titled similar to C†âÄxøˇœ‡è¿≈ or ˆhÒ†0xøˇœ‡è¿. Does anyone know what or why in the heck these are in my mac mini? They all are the same size of zero. Any help is appreciated.

  • Using send email step in workflow

    Hi Experts, I have a question regarding the send email step in workflow. We have the Receipient Type as Organizational Object and Expression as &WF_INITIATOR&. I want to know if the mail will be sent to the SAP email ID (i.e) in SBWP or will be it be

  • Why does Firefox 8 hang every time I put my Mac to sleep?

    I recently switched to Firefox 8 on Mac OS v10.6.8. If I put my laptop to sleep with Firefox running, when I open the computer again Firefox hangs. It's unresponsive to any mouseclicks or keystrokes. I can force-quit Firefox and reopen it again, but