EDCS Binding to C

3  Concepts

EDCS bar

3.1  Introduction and table of contents

3.1.1  Introduction

This clause defines the conformance criteria and overall characteristics of the binding defined in this standard.

3.1.2  Table of contents

See Table 3.1 for the table of contents for this clause.

Table 3.1 — Table of contents

3  Concepts

3.1  Introduction and table of contents

3.1.1  Introduction

3.1.2  Table of contents

3.2  Conformance

3.3  Functions versus macros

3.4  Function identifiers

3.5  Registration

3.6  Return values

3.7  Header files

 

EDCS bar

3.2  Conformance

This binding incorporates the rules of conformance defined in the EDCS Standard (ISO/IEC 18025) for implementations of the EDCS application programmer interface (API), with those additional requirements specifically defined for C bindings of the EDCS API.

The following criteria shall determine conformance of an implementation to this binding:

In order to conform, an implementation of the C binding of the EDCS API shall make visible all of the declarations in the C binding specified in this part of ISO/IEC 18041. Thus, for example, the syntax of the function name shall be precisely as specified in the binding and parameters shall be of the data types stated in the binding.
EDCS bar

3.3  Functions versus macros

An implementation may substitute macros for functions. However, the macros shall be designed so that side-effects work properly.

EDCS bar

3.4  Function identifiers

The C standard (ISO/IEC 9899) requires that compilers recognize internal identifiers which are distinct in at least 31 characters. That standard also requires that external identifiers (i.e., those seen by the linker) be recognized to a minimum of 6 characters, independent of case.

The function names of the EDCS API are all mapped to C functions whose names begin with the letter sequence EDCS_.

Implementations which run in environments where two distinct C internal identifiers would be equivalent if they were both external identifiers shall include a set of #defines in the header file which equate the long names to a set of short names.

EDCS bar

3.5  Registration

ISO/IEC 18025 reserves certain value ranges for registration as graphical items. The registered graphical items will be bound to the C programming language (and other programming languages). The registered item binding shall be consistent with the binding presented in this International Standard.

ISO/IEC 18025 defines several selection item data types. New values for those data types may be specified through registration. These new values are referenced via identifiers specified as part of the registration process. The identifiers for these new values shall follow the format specified for values of the respective selection item data type.

Adding a new value to the EDCS_Attribute_Code data type may require adding an entirely new selection item data type. This will happen if the new attribute is of EDCS type enumerated. In this case, the new data type will have an identifier whose name is EDCS_xxx where xxx is the name of the new attribute. The values for the data type will have identifiers of the form:

"EEC_attributenameabbreviation_yyy"

where:

attributenameabbreviation is the set of characters used for normative value names of this data type. These abbreviations are formed using the abbreviations contained in Table 5.2.
yyy is the label for the particular value code.
EDCS bar

3.6  Return values

The EDCS API function returns a value of type EDCS_Status_Code.

EDCS bar

3.7  Header files

C provides a mechanism to allow external files to be included in a compilation. Clause 5 of this binding describes the data types that shall be defined in the file edcs.h which should be included in any application program that intends to use the EDCS API via the C binding. Additional implementation-dependent items may be placed in this file if needed.

The file edcs.h shall also contain a prototype for the EDCS API function.

EDCS bar