Previous section.
Application Instrumentation and Control (AIC) API, Version 1.0
Copyright © 1999 The Open Group
Data Types
Given the multi-platform nature of AIC, no details on precise number
formats and dimensions are given here, but some statements are made
about the compatibility of implementations on different platforms. In
any case, all types used by AIC in this version of the AIC standard
are to be abstracted by using the typedef names as described in
this Chapter.
Within a single implementation, the representation of the underlying
types will be consistent, and hence present no problems. The defined
behavior of AIC when two versions are interacting between different
platforms is as follows:
-
The receiving AIC component must check that
the encoded transmitted type will fit into an equivalent local variable
without causing overflow.
-
If there will be an overflow, the return
value of the highest level API call will indicate the overflow
condition with the return code AIC_VALUE_OVERFLOW.
Character Strings
The character string data type is called
AIC_String.
The
AIC_String
is a variable length string, which in a C implementation is
interchangeable with a character array or a character pointer. If an
AIC_String
is passed into an AIC function needs to be retained within
AIC for whatever reason (for example, it is the new value for an
AICBusVarChar
object), a copy of the original parameter will be made. The programmer
is then free to re-use or dispose of the
AIC_String
parameter.
AIC must handle the internal resizing of
AIC_Strings
with no memory
leaks. The length of an
AICBusVarChar
is unlimited within the memory
size of the machine, although there are instances where a user is asked
to specify the size of an
AIC_String
buffer for a return value. The
code page or character set in use locally is implementation specific.
This subject is covered in more detail in
Version Compatibility.
Fixed-Point Binary Numbers
The fixed-point binary number is called AIC_Long. This is expected to
be 32 bits in length at a minimum. It should also be signed – although
how precisely this is done is not specified here. The underlying
implementation must handle the correct transmission between AIC
implementations on different platforms and this includes byte and bit
ordering.
Floating-Point Numbers
Floating-point numbers are called
AIC_Double.
an
AIC_Double
must be able
to represent positive and negative values at least in the range
1.00E-99 to 1.00E+99 (and -1.00E-99 to -1.00E+99), although specific
implementations may offer better precision than this. Again the most
important point is that when
AIC_Doubles
are passed between a source
and recipient machine, the recipient should handle the case where the
received value is too large for the internal data type supported.
- Note:
- No formal IEEE reference is intended.
Date/Time Values
The date/time value is a composite called
AIC_DateAndTime.
There is a
small set of utility API calls for manipulating the date/time values.
These must be supported as part of the AIC standard, and completely
encapsulate the date/time value. Obviously, this type and the functions
defined for manipulating it must handle leap years and be able to
perform arithmetic across centuries, years and months. The calendar
used by AIC is defined to be the Gregorian calendar.
The
AIC_DateAndTime
is required to hold dates from 1900 up to the year 9998,
in the form
-
-
<day-month-year hours:minutes:seconds>
The ranges of these components are defined in
Date and Time Values,
below.
Component
| Range
|
---|
Day
| 1 - 31
|
Month
| 1 - 12
|
Year
| 1900 - 9998
|
Hours
| 0 - 23
|
Minutes
| 0 - 59
|
Seconds
| 0 - 59
|
Table: Date and Time Values
Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy
of this publication.