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
- Include
Path: You can include a list of directories to search
for include files. Click Add to add a directory
path.
- Platform
- Compiler: Specify the platform on which the C program
compiles.
- 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.
- To set the advanced data import configuration properties,
click Show Advanced.
- Floating
point format: Indicates the byte representation of floating
point numbers.
- Code
page: The code page of the C target program.
- 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.
- String
encoding: This property determines the format in which
strings are encoded.
- 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.
- Address
size: The platform address size of 32 bits or 64 bits.
- Size
of long double: The storage size of a long double precision
floating point value. It can be 64 bits or 128 bits.
- Alignment
rule: The alignment rule determines the storage layout
of C structures.
- 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.
- 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.
- 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.
- Click Next.
What to do next
Now that you have added the data import properties for your
C file, you can save these data bean properties.