1.1 The STEP Standard
The ISO STEP Standards (ISO 10303) define a methods for the exchange of engineering product data. These standards can be grouped into infrastructure components and industry specific information models. The infrastructure components include the following specifications:
- The EXPRESS information modeling language (Part 11)
- An EXPRESS-driven data exchange file specification (Part 21)
- An EXPRESS-driven data XML file specification (Part 28)
- An EXPRESS-driven application programming interface (SDAI) with bindings to the C, C++, Java, and IDL languages (Parts 22-26)
- A conformance testing framework (Part 31)
- A library of general purpose information models for things like geometry, topology, product identification, dates, times, etc. (The 40-series parts)
In addition to the infrastructure parts of STEP, the standard includes EXPRESS information models for the exchange of data within a particular industrial domain including Explicit Drafting (Part 201), Associative Drafting (Part 202), Configuration Controlled 3D Assemblies (Part 203), Automotive Design (Part 214), and many others (Electrical, Shipbuilding, Sheet Metal, etc.)
1.2 The SDAI
The Standard Data Access Interface (SDAI) defines an application programming interface to EXPRESS defined data, such as STEP APs. STEP defines the SDAI operations and information models in Part 22 (ISO 10303-22:1998). Separate bindings describe how these operations appear in a specific programming language. SDAI bindings are defined for C, C++, and Java. Bindings for CORBA/IDL and Fortran were begun but never completed. This document describes the binding for C as it is defined in Part 24 (ISO 10303-24:2001) and implemented in ST-Developer.
SDAI bindings come in two flavors--early-bound and late-bound. An early-bound API defines access functions for a specific EXPRESS schema. Early-bound APIs are implemented using an EXPRESS compiler that generates code for a schema.
The SDAI C is a late-bound API. Late-bound APIs have a fixed set of functions that do not change with the schema. A late binding generally uses compiled representation of the EXPRESS schema, called the data dictionary. The SDAI data dictionary is defined in Part 22, Clause 6.
1.3 ST-Developer and the SDAI C Binding
ST-Developer includes an implementation of the C language binding to the SDAI (Part 24). This is a late-bound, C-callable, library of functions which enables applications to access STEP data. The ST-Developer SDAI library features optional support for an EXPRESS interpreter. The interpreter can validate global rules, local (where) rules; and the calculate the value of derived attributes.
ROSE and the SDAI
In addition to the SDAI C interface, ST-Developer also includes a high performance, C++ interface to STEP data called ROSE. A STEP application can use either or both interfaces. The SDAI interface itself is implemented on top of the ROSE library, and includes a set of functions which map between the ROSE and the SDAI views of data. Each interface has some advantages over the other that you should be aware of when creating an application.
The ROSE library has the following advantages over the SDAI C library:
- Applications can either be early-bound or late bound. The C SDAI is exclusively late-bound.
- The ROSE library contains advanced traversal and manipulation features that are not available in the SDAI. While the SDAI is bound by an ISO specification, the ROSE interface has evolved from years of demanding application development, and contains features attuned to the specific needs of STEP application developers.
- ROSE is the native interface for ST-Developer. In the SDAI, there is a translation layer which maps the SDAI data structures to the corresponding ROSE objects. This mapping makes an SDAI application a bit slower and larger than the corresponding ROSE application.
- The ROSE library provides an object-oriented API which leverages the strengths of the C++ language. The SDAI library provides a function-based interface which is not object-oriented.
The SDAI Library has the following advantages over the ROSE library
- The SDAI library can be utilized from C applications, as well as C++ code. The ROSE library is exclusively a C++ interface.
- The SDAI is an international standard, making code that uses it portable across SDAI implementations.
- The ROSE library can only retrieve the values of explicit attributes; the SDAI can also obtain the values of derived and inverse attributes. Since the SDAI library includes an EXPRESS interpreter, the SDAI can also validate a data set against the constraints in its information model, while the ROSE library cannot.
1.4 Manual Organization
This manual describes the SDAI library and the techniques necessary to develop SDAI applications using ST-Developer.
SDAI Programming describes the details necessary develop SDAI applications with ST-Developer.
SDAI Library Changes summarizes the differences between various versions of the SDAI library.
Function Reference documents the standard SDAI functions.
Extension Functions documents the ST-Developer extension functions to the SDAI.
SDAI Schemas describes the EXPRESS information models defined by the SDAI.
Font Conventions
Within the body of a paragraph, functions, keywords, and filenames are shown in bold, such as libsdai.a or /usr/local/bin . Function names are shown with trailing parenthesis, such as sdaiOpenSession() or sdaiGetAttrBN() .
Function prototypes are listed with each parameter on a separate line and the function name set off in bold as shown below.
SdaiAppInstance sdaiCreateInstance( SdaiModel model, SdaiEntity entity );
Programming examples are shown in a separate paragraph, in a typewriter-style font:
SdaiSet extent = sdaiGetEntityExtentBN (model, "curve");
SditItrerator itor = sdaiCreateIterator (extent);
while (sdaiNext(itor)) {
SdaiInstance inst=NULL;
sdaiGetAggrByItrator (itor, sdaiINSTANCE, &inst);
/* Process the value in the instance */
}
Attributes and entities from EXPRESS information models, are indicated in bold. When referring to an attribute of a specific entity, the entity name is separated from the attribute name with a dot such as schema_instance.repository . This refers to the repository attribute of the schema_instance entity.