Jump to content

Union c in labview


Recommended Posts

I have to create a library that has as input the pointer to this structure

 

unsigned char 

Type
 
unsigned int  Len
 
union {
   unsigned char   Raw [EFIUDS_MSG_MAX_DATA_SIZE]
 
   struct {
      unsigned char   SI
 
      unsigned char   PARAM [EFIUDS_MSG_MAX_DATA_SIZE-1]
 
   }   REQUEST
 
   struct {
      unsigned char   PR_SI
 
      unsigned char   PARAM [EFIUDS_MSG_MAX_DATA_SIZE-1]
 
   }   POSITIVE_RESPONSE
 
   struct {
      unsigned char   NR_SI
 
      unsigned char   SI
 
      unsigned char   NRC
 
   }   NEGATIVE_RESPONSE
 

Data

how do i implement the labview?
thank you

 

 

Link to comment
19 hours ago, ShaunR said:

Pass a U8 array of length EFIUDS_MSG_MAX_DATA_SIZE

Unions are syntactic sugar for a single piece of contiguous memory. You'll just have to figure out how to interpret the data.

Ok,

thank You!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.