Setting the data import configuration properties for C files

You can set the data import configuration properties for the source C file that you import into your project.

Before you begin

On the Importer page. you can set the data import configuration properties for your binding file. Alternatively, you can change the properties in the source code in the Java™ code editor after you close the wizard. You can change the defaults for these properties in the Preferences page; the values that you set in the Preferences page are shown as defaults in the Setting data import configuration properties page.

Procedure

  1. Include Path: You can include a list of directories to search for include files. Click Add to add a directory path.
  2. Platform - Compiler: Specify the platform on which the C program compiles.
  3. Query: After you have set the importer preferences, including Advanced properties described below, you can change them. Click Query to view the available data structures. The C Importer reads the selected C file and returns all structure names to the application. You then select the name of the C structure that you want to import.
  4. To set the advanced data import configuration properties, click Show Advanced.
  5. Floating point format: Indicates the byte representation of floating point numbers.

  6. Code page: The code page of the C target program.
  7. Treat unsigned short arrays as strings: If the Treat unsigned short arrays as strings check box is selected, then unsigned short arrays are treated as strings. If it is cleared, then unsigned short arrays are not treated as strings.
  8. String encoding: This property determines the format in which strings are encoded.
  9. Byte order: The byte representation of integers ordered from the most significant byte to the least significant byte is referred to as a big endian representation. The byte representation of integers ordered from the least significant byte to most significant byte is referred to as a little endian representation.
  10. Address size: The platform address size of 32 bits or 64 bits.
  11. Size of long double: The storage size of a long double precision floating point value. It can be 64 bits or 128 bits.
  12. Alignment rule: The alignment rule determines the storage layout of C structures.
  13. Pack level: The pack level can be 1, 2, 4, 8 bytes or 16 bytes. This value must match what was used to compile the C program that you are targeting.
  14. Size of enumeration constant: Some compilers compact an enumeration constant into the smallest integral type that contains all variables. Other compilers allow the option of selecting the number of bytes to use for an enumeration constant.
  15. Size of wchar: The storage size of a wchar type. Most platforms implement the size as 2 bytes although some platforms support a size of 4 bytes.
  16. Click Next.

Example

What to do next

Now that you have added the data import properties for your C file, you can save these data bean properties.

Feedback