/**This is a simple example of a header to demonstrate Cheader-parsing.*/
#ifndef __mystruct_h   //this construct will be expected by Cheader.zbnf
#define __mystruct_h
#include "complctr.h"  //defines types compiler specifical 

typedef struct
{ int m,n;
}MyStruct2;



/**Example of a struct type. The comment should be written above, like javadoc. */
typedef struct MyStruct_t
{ /**Also a comment to each element should be written above/before.*/
  int32 a;
  /**Comment and type for both variables: */
  int16 b,c;

  /**Two arrays. */
  int16 x[10], y[10];

  float f;  //the comment after a element will also be detected as comment.

  MyStruct2 embeddedStruct;

} MyStruct;


typedef union MyUnion_t
{
  MyStruct2 s;
  int32 f[2];
  struct{
    float f1,f2;
  };
}MyUnion;



typedef union MyBits_t
{ int32 w[2];
  struct{
    int32 b0:2;
    int32 b2:14;
    int32 b16:16;
    int32 b2_0:1;
    int32 b2_1:1;
    int32 b2_2:30;
  };
}MyBits;

/**Struct type which referes any integer area, used for plain memory data access. */
typedef struct Int32Array16_16_t
{
  int32 _0[16];
  int32 _1[16];
  int32 _2[16];
  int32 _3[16];
  int32 _4[16];
  int32 _5[16];
  int32 _6[16];
  int32 _7[16];
  int32 _8[16];
  int32 _9[16];
  int32 _a[16];
  int32 _b[16];
  int32 _c[16];
  int32 _d[16];
  int32 _e[16];
  int32 _f[16];
}Int32Array16_16;




/**Example to access to any memory. 
 * It is a union of 1 int32 value, which is interpreted 
 * as pointer to a plain memory data access structure. 
 */
typedef union MemAccess_t
{ int32 addr;
  Int32Array16_16* content;
}MemAccess;





#endif //__mystruct.h