Face
Face
2 Definitions........................................................................................................................... 7
2.1 Component State Persistence .................................................................................... 7
2.2 Data Architecture ...................................................................................................... 7
2.3 Data Model Language ............................................................................................... 7
2.4 Domain-Specific Data Model ................................................................................... 7
2.5 FACE Architectural Segments.................................................................................. 7
2.6 FACE Computing Environment ............................................................................... 7
2.7 FACE Infrastructure ................................................................................................. 8
2.8 FACE Interfaces ....................................................................................................... 8
2.9 I/O Service ................................................................................................................ 8
2.10 I/O Services Segment................................................................................................ 8
2.11 Operating System Segment ....................................................................................... 8
2.12 Platform-Specific Common Services........................................................................ 8
2.13 Platform-Specific Device Services ........................................................................... 8
2.14 Platform-Specific Graphics Services ........................................................................ 8
2.15 Platform-Specific Services Segment......................................................................... 9
2.16 Portable Components Segment ................................................................................. 9
2.17 Security Transformation ........................................................................................... 9
2.18 Security Transformation Boundary........................................................................... 9
2.19 Shared Data Model ................................................................................................... 9
2.20 Transport Protocol Module ....................................................................................... 9
2.21 TS Domains .............................................................................................................. 9
2.22 Transport Services Segment ..................................................................................... 9
2.23 TS to TS Interoperability ........................................................................................ 10
2.24 Unit of Conformance .............................................................................................. 10
2.25 Unit of Conformance Package ................................................................................ 10
2.26 Unit of Portability ................................................................................................... 10
2.27 UoP Supplied Model............................................................................................... 10
This document is the Future Airborne Capability Environment™ (FACE™) Technical Standard,
Edition 3.2. This Standard is developed and maintained by The Open Group FACE™ Consortium.
Background
Today’s military aviation airborne systems typically entail a unique set of requirements and a
single vendor. This form of development has served the military aviation community well;
however, this stovepipe development process has had some undesired side-effects including long
lead times, cumbersome improvement processes, lack of hardware and software reuse between
various aircraft platforms resulting in platform-unique designs.
The advent of complex mission equipment and electronics systems has caused an increase in the
cost and schedule to integrate new hardware and software into aircraft systems. This – combined
with the extensive testing and airworthiness qualification requirements – has begun to affect the
ability of the military aviation community to deploy new capabilities across the military aviation
fleet.
The current military aviation community procurement system does not promote the processes of
hardware and software reuse across different programs. In addition, the current aviation
development community has not created sufficient standards to facilitate the reuse of software
components across the military aviation fleet. Part of the reason for this is the small military
aviation market. Another part is the difficulty in developing qualified software for aviation. An
additional problem is the inability to adopt current commercial software Common Operating
Environment (COE) standards because they do not adhere to the stringent safety requirements
developed to reduce risk and likelihood of loss of aircraft, reduced mission capability, and
ultimately loss of life.
To counter these trends, the Naval Aviation Air Combat Electronics program office (PMA-209),
Army Program Executive Office (PEO) Aviation (AVN), the Army’s Aviation and Missile
Research, Development, and Engineering Center (AMRDEC), and Air Force Research Laboratory
(AFRL), enabled by the expertise and experience of the military aviation community’s industrial
base, are adopting a new approach.
Approach
The FACE approach addresses the affordability initiatives of today’s military aviation domain.
The FACE approach is to develop a Technical Standard for a software COE designed to promote
portability and create software product lines across the military aviation domain. Several
components comprise the FACE approach to software portability and reuse:
• Business processes to adjust procurement and incentivize industry
• Technical practices to promote development of reusable software components
• A software standard to promote the development of portable components between
differing avionics architectures
Ultimately, the FACE key objectives are to reduce development costs, integration costs, and time-
to-field for avionics capabilities.
FACE Artifacts
The following documents provide definition and support of the FACE technical and business
practices:
• FACE Business Guide
• FACE Technical Standard
• FACE Conformance Policy
• FACE Reference Implementation Guide
• FACE Library Policy
• FACE Contract Guide
• FACE Problem Report (PR)/Change Request (CR) Process
The Open Group is a global consortium that enables the achievement of business objectives
through technology standards. With more than 900 member organizations, we have a diverse
membership that spans all sectors of the technology community – customers, systems and
solutions suppliers, tool vendors, integrators and consultants, as well as academics and
researchers.
The mission of The Open Group is to drive the creation of Boundaryless Information Flow™
achieved by:
• Working with customers to capture, understand, and address current and emerging
requirements, establish policies, and share best practices
• Working with suppliers, consortia, and standards bodies to develop consensus and
facilitate interoperability, to evolve and integrate specifications and open source
technologies
• Offering a comprehensive set of services to enhance the operational efficiency of
consortia
• Developing and operating the industry’s premier certification service and encouraging
procurement of certified products
CORBA and OMG are registered trademarks and Data-Distribution Service for Real-Time
Systems and DDS are trademarks of Object Management Group Inc. in the United States and/or
other countries.
OpenGL is a registered trademark of Silicon Graphics Inc. in the United States and/or other
countries worldwide.
All other brands, company, and product names are used for identification purposes only and may
be trademarks that are the sole property of their respective owners.
Principal Authors
Additional Contributors
Sponsors: Air Force Research Laboratory, Boeing, Lockheed Martin, Rockwell Collins, U.S.
Army PEO Aviation
Principals: AeroVironment Inc., BAE Systems, BELCAN, Booz Allen Hamilton, DRS Training
& Control Systems, Elbit Systems of America, GE Aviation Systems, General Dynamics, Green
Hills Software, Harris Corp., Honeywell Aerospace, IBM, Northrop Grumman, Raytheon, Sierra
Nevada Corporation, Sikorsky Aircraft, Textron Systems, U.S. Army AMRDEC, Wind River
Associates: Abaco Systems, AdaCore, Arizona State Univ., ARTEMIS Inc., Astronautics, Avalex
Technologies, Brockwell Technologies, Carnegie Mellon University-SEI, CERTON, CMC
Electronics, Cobham Aerospace Communications, CoreAVI, CS Communication & Systems Inc.,
Crossfield Technology, CTSi, Curtiss-Wright Defense Solutions, DDC-I, DornerWorks, Draper
Lab, Elma Electronic Inc., Enea Software & Services Inc., ENSCO Avionics, Esterel
Technologies, Esterline AVISTA, EuroAvionics USA, Garmin International Inc, GECO Inc.,
General Atomics ASI, IEE, Infinite Dimensions Integration, Inter-Coastal Electronics, Johns
Hopkins University Applied Physics Lab, Joint Tactical Networking Center, Kaman Precision
Products, KEYW Corporation, KIHOMAC, L-3 Communications, LDRA Technology, Leidos,
Lynx Software, Mercury Systems, North Atlantic Industries, OAR Corporation, Performance
Software, Physical Optics Corp., Presagis USA Inc., PrismTech, Pyrrhus Software, Rapid Imaging
Software, Real-Time Innovations, Riverside Research, Rogerson Kratos, SAIC, Selex Galileo
Inc., SimVentions, Skayl, Southwest Research Institute, StackFrame, Technology Service
Corporation, Terma North America, TES-SAVI, Thales USA Inc., Thomas Production Company,
Trideum, TTTech N.A., Univ. of Dayton Research Institute, Vector Software Inc., Verocel, VTS
Inc., Zodiac Data Systems
And Naval Air Systems Command (NAVAIR) under NAVAIR Cooperative Agreement No.
N00421-12-2-0004. The U.S. notwithstanding any copyright notation thereon. The views and
conclusions contained in this document are those of the authors and should not be interpreted as
representing the official policies, either expressed or implied, of the Naval Air Warfare Center
Aircraft Division or the U.S. Government.
Normative references for the FACE Technical Standard are defined in Section 1.4.
Informative References
1.1 Objective
The FACE Technical Standard defines a Reference Architecture intended for the development of
portable software components targeted for general purpose, safety, and/or security purposes. A
more detailed explanation of the FACE Reference Architecture is found in Chapter 3.
1.2 Overview
This document embodies a set of requirements and descriptions referred to as the FACE Technical
Standard. The FACE Technical Standard uses industry standards for distributed communications,
programming languages, graphics, operating systems, and other areas as appropriate.
The FACE Technical Standard contains an architectural overview in Chapter 3 introducing the
Reference Architecture, followed by a detailed description of each architectural segment and
interface. This document then outlines requirements of each software component of the Reference
Architecture. Finally, the appendices list the specific Application Programming Interfaces (APIs)
required by the FACE Technical Standard, the FACE Data Architecture required by the FACE
Technical Standard, as well as other applicable standards. Specific FACE terms are defined in
Chapter 2.
1.2.1 Background
The aviation development community has a unique subset of constraints pertaining to the
development of military systems, often adhering to varying degrees of flight-safety and security
requirements. Many of these systems have advanced the state-of-the-art in software design and
implementation practices. Despite the technical advances, many software systems today result in
the tightly-coupled integration of software components without regards to portability. This lack of
focus on portability results in software components that require a specific software architecture in
order to function correctly and an inability to reuse a software capability from one platform to
another without significant software modification. A side-effect of this is vendor-lock as only the
original implementer can efficiently make software modifications.
1.3 Conformance
The FACE Consortium has established a FACE Conformance Program and defined an associated
Conformance Policy for the FACE Technical Standard. The FACE Conformance Program
provides the associated conformance criteria and processes necessary to assure Units of
Conformance (UoCs) are developed according to the FACE Technical Standard. The FACE
Conformance Program consists of Verification, Certification, and Registration.
FACE Certification is the process of applying for FACE Conformance Certification once
verification has been completed. Certification is processed through the FACE Certification
Authority (CA).
1.5 Terminology
For the purposes of the FACE Technical Standard, the following terminology definitions apply:
Can Describes a feature or behavior that is optional. The presence of this feature should
not be relied upon.
May Describes a feature or behavior that is optional. The presence of this feature should
not be relied upon.
The list of terms and definitions provided in this chapter is not intended to be exhaustive, but
includes concise definitions for principal terms commonly used throughout this document, as well
as for referenced FACE terms and concepts that are more thoroughly discussed in other FACE
documentation. A completed list of terms and definition is provided in the AV-2. Terms defined
in this section are proper nouns throughout this document.
Note: PCS and PSSS components are not required to have a FACE conformant “stamp” in
order to be integrated.
2.21 TS Domains
All of the Units of Conformance that constitute a system utilizing a single implementation of
Transport Services Segment UoCs and integrated by the same integrator.
The five (5) segments of the FACE Reference Architecture are listed below and introduced in the
following subsections:
• Operating System Segment (OSS)
• Input/Output Services Segment (IOSS)
• Platform-Specific Services Segment (PSSS)
• Transport Services Segment (TSS)
• Portable Components Segment (PCS)
Figure 1 depicts a representation of the FACE Reference Architecture illustrating the OSS as the
foundation upon which the other FACE segments are built. The segments introduced in Figure 1
are defined and described in Section 3.1.1 through Section 3.1.5. This architecture is constrained
to promote separation of concerns and establish a product line approach for reusable software
capabilities.
FACE defined
TS
interface set
TS FACE defined
interface set
FACE defined
IO interface set
Hardware
Device Drivers
Interface Hardware
(i.e., MIL-STD-1553, Ethernet)
Platform-Specific Device Services (PSDS) are where management of data and translation between
platform-unique Interface Control Documents (ICDs) and FACE UoP Supplied Models (USMs)
occurs.
The Injectable Interface provides a standardized means for integration software to resolve the
inherent using/providing interface dependency between software components. In order for a
software component to use an interface, it must be integrated in the same address space with at
least one software component that provides that interface. The Injectable Interface implements the
dependency injection idiom of software development.
The Life Cycle Management (LCM) Services Interfaces provide a standardized means for
software components to support behaviors that are consistent with Component Frameworks:
initialization, configuration, framework startup/teardown, and operational state transitions. The
LCM Services Interfaces are optionally provided by a software component in any of the FACE
Reference Architecture segments, and are optionally used by the system integration
implementation or by a software component in any of the FACE Reference Architecture segments.
The FACE Data Model Language supports the modeling of abstract UoPs to provide a
specification mechanism for procurement, or for defining elements based on the FACE Technical
Standard and used in other reference architectures. To address integration between UoPs, the
FACE Data Model Language provides elements for describing the high-level connectivity,
routing, and transformations to be embodied in an instance of transport services.
The FACE Technical Standard contains different representations of the FACE Data Model
Language: a textual listing generated from the metamodel defined in Section 4.9; and an
Extensible Markup Language (XML) Metadata Interchange (XMI) listing from an export of the
metamodel that conforms to EMOF shown in Section J.4.
TS Capability
OS
Distribution
Platform-Specific Services Segment Capability
IO GPU
API
TPM Capability
Interface Hardware
(e.g. MIL-STD-1553, Ethernet) KEY
FACE Defined Interface
External Interface
OFP Platform
GPS EGI
Device Display
The following narrative describes a simple example implementation. In this scenario we have a
simple system that uses navigation data from a Global Positioning System (GPS) device via a
MIL-STD-1553 interface hardware to provide Own Ship Position symbology to a display. The
software is implemented as several components designed for reuse and portability.
Within the “FACE Boundary”, the OSS provides a well-known set of Application Programming
Interfaces (APIs) and services provided by any FACE conformant OS. This allows software
written for one conformant OS to run on systems utilizing another FACE conformant OS.
At the bottom of the example diagram, a GPS device collects sensor data and passes navigation
data in a device-specific format onto a MIL-STD-1553-compliant bus. The device driver is written
to the specific MIL-STD-1553 hardware, and the format of the data is specific to the GPS device.
The data from the device driver is accessed, using the common OS APIs, by a service in the IOSS
to convert the unique implementation to a standardized format to abstract the uniqueness of the
MIL-STD-1553 device. This abstraction allows software using the same external devices to be
deployed on systems using different I/O devices.
The I/O Service then passes this data through a normalized interface defined by the FACE
Technical Standard to the PSSS, in this example a GPS Platform Device Service. This device
service provides an abstraction of the specific GPS communications typically described in that
This data is then transported by the Transport Service Capability and Distribution Capability to
the software component that needs this data for processing, in this case an Own Ship Position PCS
component. The Distribution Path is based on Configuration Information. In this example, the
Transport Service utilizes an OSS provided transport mechanism, specifically POSIX Sockets. All
data to and from the PCS is routed through the TSS.
This Own Ship Position component calculates the graphical symbology and sends it back through
the Transport Services using a well-defined graphics language. In this example, the TSS is
configured to distribute these graphics messages to a Platform-Specific Graphics Service in the
PSSS. The Platform-Specific Graphics Service then draws to the display though a Graphics Driver.
This scenario highlights how the FACE Reference Architecture can be used to isolate changes to
a system. For example, if the GPS device is replaced with a different GPS, the associated Platform
Device Service would be replaced or modified. If the MIL-STD-1553 bus is changed, then the I/O
Service would be replaced or modified. If a transport mechanism is changed then the Transport
Service would be replaced or modified. In all of these cases the Portable Component is isolated
from these changes.
The interface between an operating system and a software component can be substituted or
enhanced by a Programming Language Run-Time. The POSIX API set is often provided in terms
of a Programming Language Run-Time. For the purposes of the FACE Reference Architecture, a
Programming Language Run-Time is an optional feature and can be supplied as part of the OSS,
or included in a software component residing in another segment.
The OSS and TSS support common frameworks, allowing software to be developed to both a
Component Framework and the FACE Technical Standard.
The Security Profile constrains the OS APIs to a minimal useful set allowing assessment for high-
assurance security functions executing in a single address space (e.g., a POSIX process or ARINC
653 partition). The Security Profile requires ARINC 653 support.
The Safety Profile is less restrictive than the Security Profile and constrains the OS APIs to those
that have a safety certification pedigree. The Safety Profile is made up of two sub-profiles. The
Safety Base Sub-profile supports single POSIX process applications with a broader OS API set
than the Security Profile. The Safety Extended Sub-profile includes all of the Safety Base Sub-
profile OS APIs along with additional OS APIs and optional support for multiple POSIX
processes. The Safety Profile requires ARINC 653 support.
Although the Security and Safety Profiles are named to reflect their primary design focus, their
use is not restricted to services with those requirements (i.e., a software component without a
safety or security design focus can be constrained to only use the OS APIs of one of these profiles).
The General Purpose Profile is the least constrained profile and supports OS APIs meeting real-
time deterministic or non-real-time non-deterministic requirements depending on the system or
subsystem implementation. ARINC 653 support and multiple POSIX processes are optional for
the General Purpose Profile.
Profile Pyramid
Oct 27, 2015
A UoC Package can be used to include capabilities made up of multiple UoCs. UoC Packages can
be developed for conformance to the FACE Technical Standard by following the requirements in
Section [Link].
Section Applicability
4.8 Transport Services Interfaces For communication with PSSS, TSS, and other PCS
UoCs
4.9 Data Architecture For defining data sent through the TS Interface
4.13 Life Cycle Management Services When providing or using life-cycle support
The sections defined in Table 2 are applicable when developing a TSS UoC.
Table 2: Sections Applicable to TSS UoCs
Section Applicability
4.8 Transport Services Interfaces For communication with PCS, PSSS, and TSS UoCs
4.9 Data Architecture For defining data sent through the TS Interface
4.13 Life Cycle Management Services When providing or using life-cycle support
The sections defined in Table 3 are applicable when developing a PSSS UoC.
Table 3: Sections Applicable to PSSS UoCs
Section Applicability
4.8 Transport Services Interfaces For communication with PCS, TSS, and other PSSS
UoCs
4.9 Data Architecture For defining data sent through the TS Interface
4.13 Life Cycle Management Services When providing or using life-cycle support
The sections defined in Table 4 are applicable when developing an IOSS UoC.
Table 4: Sections Applicable to IOSS UoCs
Section Applicability
4.13 Life Cycle Management Services When providing or using life-cycle support
The sections defined in Table 5 are applicable when developing an OSS UoC.
Table 5: Sections Applicable to OSS UoCs
Section Applicability
4.13 Life Cycle Management Services When providing or using life-cycle support
The FACE Reference Architecture, as depicted in Figure 4, shows the segmented approach
establishing the separation of concerns necessary to accomplish the overarching FACE goals of
affordability, interoperability, and time-to-field. Each segment and interface and their respective
requirements are defined in further detail in the following sections.
FACE
Operating System Segment
FACE defined
TS
interface set
TS FACE defined
interface set
FACE defined
IO interface set
Hardware
Device Drivers
Interface Hardware
(i.e., MIL-STD-1553, Ethernet)
The OSS requirements are defined in Section 4.1.1. The OS API standards are defined in Section
4.2.1.
The OSS includes networking and file system capabilities adhering to published, standards-based
operating system interfaces to meet basic platform requirements (Section 4.1.1). The OSS can also
provide HMFM capabilities as described in Section 4.1.3.
File system support is provided by General Purpose and Safety Profile OSS UoCs. File system
support is not provided by Security Profile OSS UoCs.
1. When an OSS UoC provides file system support, then:
a. A General Purpose Profile OSS UoC shall support configuration of a file system.
b. A General Purpose Profile OSS UoC shall support data storing of buffered data.
c. A General Purpose Profile OSS UoC shall support data flushing of buffered data.
d. A Safety Profile OSS UoC shall support configuration of a file system.
e. A Safety Profile OSS UoC shall support data storing of buffered data.
f. A Safety Profile OSS UoC shall support data flushing of buffered data.
2. When an OSS UoC provides support for multiple file system storage elements, then:
a. A General Purpose Profile OSS UoC shall support files storage.
b. A General Purpose Profile OSS UoC shall support directories storage.
c. A General Purpose Profile OSS UoC shall support volumes storage.
d. A Safety Profile OSS UoC shall support files storage.
Faults and errors can arise from any software component, including the OSS and the OSS HMFM.
Figure 5 depicts a fault management cycle state machine that provides a framework for an overall
HMFM capability.
Fault
Detection
Health Isolation
Repair Recovery
The overall HMFM goal is to eliminate service outages through an HMFM system that is aware
of the occurrence of faults and errors that occur during run-time. Upon detection of a fault or error,
the HMFM cycle is engaged to direct the system back to a healthy state or to some fail-safe state.
This direction is controlled by pre-configured Fault Management (FM) policies. Given a start state
of a healthy system, management of a real fault (i.e., not a false alarm) can cycle through the FM
state machine diagram as follows:
• Fault detection state – a fault or error is detected and declared by HMFM when some
defined fault criteria have been met and thus promoted to “fault” status; such faults and
errors can originate from any segment within the scope of a system
• Fault isolation state – HMFM determines the scope of a fault or error given the particular
source of the fault or error
Parts or all of the HMFM fault management cycle capabilities may be relevant to a particular
design.
An OSS UoC supports HMFM capability requirements that include scope, functional capabilities,
and configuration properties.
1. An OSS UoC supports HMFM capabilities based on the OSS Profiles.
a. A Security Profile OSS UoC shall provide the HMFM capability in accordance
with requirements in Section [Link].
b. A Safety Profile OSS UoC shall provide the HMFM capability in accordance with
requirements in Section [Link].
c. When a General Purpose Profile OSS UoC provides HMFM capabilities, the UoC
shall provide the HMFM capability according to the requirements in Section
[Link].
2. An OSS UoC includes Health Monitor (HM) capabilities at the module level (i.e.,
computing platform level), partition-level, and thread-level.
a. Module-level HM capabilities shall include the ability to idle the module.
b. Module-level HM capabilities shall include the ability to restart the module.
c. Partition-level HM capabilities shall include the ability to idle the partition.
d. Partition-level HM capabilities shall include the ability to restart the partition.
Note: These capabilities are controlled using configuration data managed directly
by an OSS UoC.
Note: Thread-level HM runs in the context of a partition-specific error handler
that is included as part of the software component. Thread-level HM can invoke
the OS APIs available in this context.
3. An OSS UoC supports HMFM types and services that can be used by other UoCs.
Section 4.2.1 describes the POSIX and ARINC 653 make-up of the OSS Interface for each profile.
The profiles are separated into General Purpose, Safety, and Security. The Safety Profile contains
two Sub-profiles referred to as Safety Base and Safety Extended. Section 4.2.2 describes the
Interface to the Health Monitoring and Fault Management (HMFM) capability for both POSIX
and ARINC 653-based implementations. Section 4.2.3 describes constraints on programming
language features and run-times that are deployed as part of an OSS UoC. Section 4.2.4 describes
constraints on Component Frameworks that are deployed as part of an OSS UoC. Section 4.2.5
describes the Configuration Services which are available for UoCs to utilize. Programming
Language Run-Times, Component Frameworks, and Configuration Services that do not use the
FACE Standardized Interfaces can be used in FACE conformant solutions only when included as
part of an OSS UoC. Figure 6 shows multiple Run-Times and Component Frameworks that use
non-standardized FACE Interfaces on the “Bottom side” while still providing aligned FACE
Interfaces.
Operating
System
Segment
Operating Health Programming
Component Configuration
System Monitor/Fault Language
Frameworks Services
Management Run-Times
No No
FACE
No FACE
No FACE
FACE
Standardizationof
Standardization
Standardization
ofof“Bottom
of“Bottom-side”
“Bottom
of“Bottom-
“Bottom
side”
side” interfaces
interfaces
Interfaces
The software resources (e.g., bottom-side interfaces) used by Operating Systems, Programming
Language Run-Times, Life Cycle, Component Frameworks, and Configuration Services are
expected to vary and are not prescribed or otherwise controlled by the FACE Technical Standard.
As an example, Operating Systems are often fielded on computing hardware with different Board
Support Packages (BSPs). Operating Systems may use device drivers to abstract differences
between hardware devices.
The number of Programming Language Run-Times and Component Frameworks is not prescribed
by the FACE Technical Standard. The use of Programming Language Run-Times and/or
Component Frameworks is optional. It may be necessary to have distinct instances of
Programming Language Run-Times and/or Component Frameworks in different partitions to
support safety and security.
FACE OS APIs correspond to the General Purpose, Safety, and Security Profiles. An OSS UoC
must provide the functionality as defined, but may support excluded and/or additional features. A
non-OSS UoC is restricted to using the functionality as defined.
The POSIX and ARINC 653 standards include Ada and C language bindings for the OS APIs
included in the OSS Profiles. The C language header files for the POSIX and ARINC 653 APIs
may be compatible for direct use by C++ based software components. Bindings for Java may be
provided by other means such as by a compiler vendor or the development of a standard that
Partitions and POSIX processes execute software components designed for one of the FACE OSS
Profiles.
Partitions may use a different operational environment (POSIX or ARINC 653). Each partition
uses either a POSIX or an ARINC 653 operational environment.
A computing platform may simultaneously support partitions of different OSS Profiles and
operational environments. The FACE Technical Standard recognizes the APIs associated with the
General Purpose, Safety, and Security Profiles provide divergent capabilities. The divergence of
these capabilities may prevent or represent considerable safety or security risks, including
simultaneous hosting of General Purpose, Safety, and Security Profile OSS UoCs on the same
computing platform. When system requirements include software components of different OSS
Profiles, the use of multiple computing platforms may be required. Other architectural capabilities
(e.g., virtualization), if supported by the processor and OS selected by the system integrator, may
provide other means to simultaneously host on the same computing platform software components
which are using different FACE OSS Profiles.
Based on the profile and operating environment, OSS UoCs provide support for ARINC 653
sampling ports, ARINC 653 queuing ports, and POSIX sockets to be used for inter-partition
communications (i.e., the lower-layer transport mechanism that can be used by other FACE
standardized interface software libraries).
A UoC designed to the General Purpose Profile, when communicating with UoCs designed to the
Security and/or Safety Profile, uses the same restricted inter-partition communications as a UoC
designed to the Security and/or Safety Profile. A UoC designed to the General Purpose Profile, if
communicating to another UoC designed to the General Purpose Profile, may use additional
sockets services (if supported by the transport mechanism).
This section summarizes the OSS Interface characteristics for the General Purpose, Safety, and
Security Profiles. These characteristics are based on support of APIs and OS capabilities defined
in the ARINC 653 and POSIX standards.
The referenced ARINC 653 standards for all OSS Profiles include API and OS support for utilizing
multiple processor cores to concurrently schedule multiple ARINC 653 processes within a
partition based on an ARINC 653 operating environment. When a computing platform basis
includes multiple equivalent processing cores, the supported APIs provide a means to control how
ARINC 653 processes are concurrently scheduled on the processor cores allocated to the partition.
The OS configuration data includes a means to control the number of cores available to each
partition. A partition allocated a single processor core of a multicore processor has the same
ARINC 653 scheduling characteristics the partition would have when running on a single-core
processor.
For General Purpose, Safety, and Security Profile ARINC 653 implementations:
1. An OSS UoC implementing ARINC 653 shall provide messages to UoCs in the order they
are received.
2. An OSS UoC implementing ARINC 653 shall support delivery of available messages.
3. An OSS UoC implementing ARINC 653 shall support receipt of complete messages.
Note: No silently truncated messages.
4. An OSS UoC implementing ARINC 653 shall support sending messages on an ARINC
653 port and receiving the same messages in another partition using an ARINC 653 port.
1. A Security Profile OSS UoC shall support ARINC 653 and POSIX.
2. A Security Profile OSS UoC shall provide the following ARINC 653 APIs for use in an
ARINC 653 operational environment:
a. ARINC 653 Part 1 – All services associated with Avionics Application Software
Standard Interface Part 1 – Required Services
i. For platforms that support multicore partitions, all services from ARINC
653 Part 1-4 (Part 1, Supplement 4, August 2015)
ii. For platforms that support only single core partitions, all services from
ARINC 653 Part 1-3 (Part 1, Supplement 3, November 2010) or ARINC
653 Part 1-4 (Part 1, Supplement 4, August 2015)
b. ARINC 653 Part 2 – Services associated with the following categories of
Avionics Application Software Standard Interface Part 2 – Extended Services:
i. Memory Blocks
Note: All other ARINC 653 Part 2 services are intentionally excluded from the
Security Profile.
1. A Safety Profile OSS UoC shall support ARINC 653 and POSIX.
2. A Safety Profile OSS UoC shall provide the following ARINC 653 APIs for use in an
ARINC 653 operational environment:
a. ARINC 653 Part 1 – All services associated with Avionics Application Software
Standard Interface Part 1 – Required Services:
i. For platforms that support multicore partitions, all services from ARINC
653 Part 1-4 (Part 1, Supplement 4, August 2015)
ii. For platforms that support only single core partitions, all services from
ARINC 653 Part 1-3 (Part 1, Supplement 3, November 2010) or ARINC
653 Part 1-4 (Part 1, Supplement 4, August 2015)
b. ARINC 653 Part 2 – Services associated with the following categories of
Avionics Application Software Standard Interface Part 2 – Extended Services:
i. File System
ii. Sampling Port Extensions
iii. Memory Blocks
iv. Multiple Module Schedules
Note: All other ARINC 653 Part 2 services, including Logbooks and Multiple
Processor Core Extensions, are intentionally excluded. File system services can be
used instead of Logbooks.
1. A Safety Base Sub-profile OSS UoC shall provide the POSIX APIs defined in Section A.1
and Section A.3 for the Safety Base Sub-profile.
2. A Safety Base Sub-profile OSS UoC shall provide the FD_CLR(), FD_ISSET(),
FD_SET(), FD_ZERO(), and select() APIs for use with sockets.
3. A Safety Base Sub-profile OSS UoC shall provide message queue support within a
partition only (i.e., it is not an inter-partition communications mechanism).
[Link].2 Safety Extended Sub-Profile API Requirements
1. A Safety Extended OSS UoC implementation shall provide the POSIX APIs defined in
Section A.1 marked as “INCL” and Section A.3 for the Safety Extended Sub-profile.
Note: The Safety Extended Sub-profile includes all of the Safety Base Sub-profile OS
POSIX APIs.
2. When supporting multiple POSIX processes, a Safety Extended OSS UoC implementation
shall provide the multi-process POSIX APIs defined in Section A.1 marked as “MP” for
the Safety Extended Sub-profile.
3. A Safety Extended Sub-profile OSS UoC shall provide FD_CLR(), FD_ISSET(),
FD_SET(), FD_ZERO(), and select() for use with sockets.
1. A General Purpose Profile OSS UoC shall provide the POSIX APIs defined in Section
A.1 marked as “INCL” and Section A.3 for the General Purpose Profile.
2. When supporting multiple POSIX processes, a General Purpose Profile OSS UoC
implementation shall provide the multi-process POSIX APIs defined in Section A.1
marked as “MP” for the General Purpose Profile.
ARINC 653 operational environments include services for OSS UoC HMFM as part of the
required API and operational support. As such, the requirements in the following subsections are
applicable only to POSIX operational environments.
For the General Purpose Profile, support for HMFM interfaces is optional. Support for POSIX
HMFM can depend upon support for ARINC 653 operational environments.
The scope of the POSIX HMFM interfaces is the partition (i.e., POSIX process) boundary.
1. The Initialize(HMFM) function shall initialize the HMFM POSIX implementation for the
current POSIX process.
2. The Initialize(HMFM) function shall return one of the return codes as specified in Section
F.2.1.
A UoC can use a run-time provided by the OSS following the requirements in this section. A UoC
can also use a non-standard run-time if that run-time is included in the UoC and follows all
requirements for the segment in which the UoC is implemented. This concept also applies to
frameworks, as depicted in Figure 7.
Mission-Level Mission-Level
Capability Mission-Level Mission-Level
Capability Capability
Capability
RT OS OS FW
Portability between
Interfaces Interfaces Interfaces Interfaces
the Run-time and the
Operating System
Interface
Standard Standard
Portability Operating System Portability
Programming Component
between the between the
Language Run-time Framework
Component and Component and
the Run-time Operating System Segment the Framework
The following subsections define Programming Language capability sets that are considered part
of the OSS. The defined Programming Language capability sets include features that typically do
not require Programming Language Run-Time support and features that typically require
Programming Language Run-Time support. To account for potential differences between
compiler/Programming Language Run-Time implementations, minimal discussion is included as
to actual Programming Language Run-Time dependencies. OSS UoC support for Programming
Language capability sets is optional.
Note: There are some overlaps in library functions between C++, C, and the POSIX standards.
The C++ library capabilities consist of library functions that are unique to C++ and a set
of functions that are in common with the C library (to permit components developed in
C to be ported to C++). The POSIX standard includes the same functions as the C library
specification, but does not include the additional library functions unique to C++. The
number of C library functions supported varies by FACE OSS Profile. As such, for the
library functions that are in common between C++ and C, only the functions from the
corresponding FACE OSS Profile are supported.
Component developers may apply their own safety-related restrictions, such as programming
restrictions defined by the Motor Industry Software Reliability Association (MISRA C:2004
Guidelines for the Use of the C language in Critical Systems).
[Link].1 C Programming Language Definition
The C library functions include those defined in ANSI/ISO/IEC 9899:1999, §7 supporting the
selected FACE OSS Profile and the Section A.1 FACE OSS Profile APIs whose POSIX
Functionality Categories are defined as POSIX_C_LANG_SUPPORT_R.
Note: Use of compiler-specific Programming Language extensions (i.e., not defined in the
above standard) is prohibited.
Note: For ARINC 653 operational environments, the supported C library functions are as listed
in Section A.8.
The following sections define C++ Programming Language features and library functions for the
supported capability sets. These capability sets are listed in the order of most permissive (General
Purpose) to most restrictive (Security). As with the OSS Profiles, the restrictions are established
to allow deployment of a UoC in an environment developed to any of the more permissive
capability sets. Note that the deployment of a UoC into more permissive capability sets may not
be adequate for the required design assurance of the UoC.
The General Purpose C++ 03 Programming Language capability set includes features from the
Programming Language specification defined in ISO/IEC 1[Link] Programming Languages
– C++ with the following modifications:
• Component use of the pragma directive (ISO/IEC 14882:2003, §16.6) for data structure
compositions on FACE Interfaces is excluded
Note: All other uses of pragma directives are permitted.
Note: Support for pragma directives is compiler implementation-dependent. A compiler
ignores pragma directives it does not recognize.
For the portion of the C++ library functions that are in common with the C library functions, only
the functions defined in Appendix A for the General Purpose Profile are supported. For the C
header files that are part of C++, this includes functions categorized in Section A.1 as
POSIX_C_LANG_SUPPORT_R.
Exception Handling (ISO/IEC 14882:2003, §15, 18.6, 19.1) is supported except across the FACE
defined API boundaries. Exceptions may be thrown and caught within a single UoC.
The optional compiler support for the exact-width types in <stdint.h> from C Programming
Language adhere to ANSI/ISO/IEC [Link] Programming Languages – C (ANSI/ISO/IEC
9899:1999, §[Link]) is included.
[Link].2 C++11/14 Programming Language Definition for General Purpose Capability Set
The General Purpose C++ 11/14 Programming Language capability set includes features from the
Programming Language specification defined in ISO/IEC 1[Link] Programming Languages
– C++ and ISO/IEC 1[Link] Programming Languages – C++ with the following
modifications:
• Component use of the pragma directive (ISO/IEC 14882:2011/2014, §16.6) for data
structure compositions on FACE Interfaces is excluded
Note: All other uses of pragma directives are permitted.
Note: Support for pragma directives is compiler implementation-dependent. A compiler
ignores pragma directives it does not recognize.
• Input/Output library standard iostream objects (ISO/IEC 14882:2011/2014, §27.4) and all
dependencies on them (e.g., ISO/IEC 14882:2011/2014, §[Link].6, [Link]) are
excluded
Note: Some Input/Output library capabilities (e.g., file streams) may have other
implementation-dependent platform dependencies (e.g., file storage device, Input/Output
device).
• Component use of wide characters (ISO/IEC 14882:2011/2014, §[Link]), multibyte
characters (ISO/IEC 14882:2011/2014, §1.3.13), wide strings (ISO/IEC 14882:2011/2014
§[Link].2), and multibyte strings (ISO/IEC 14882:2011/2014, §[Link].4.2) is excluded,
including library functions that manipulate those types and library typedefs based on them
• C++ atomic operation support library (ISO/IEC 14882: 2011/2014, §29) is excluded
• C++ thread support library (ISO/IEC 14882:2011/2014, §30) is excluded
For the portion of the C++ library functions that are in common with the C library functions, only
the functions defined in Appendix A for the General Purpose Profile are supported. For the C
header files that are part of C++, this includes functions categorized in Section A.1 as
POSIX_C_LANG_SUPPORT_R.
Exception Handling (ISO/IEC 14882: 2011/2014, §15, 18.8, 19.2) is supported except across the
FACE defined API boundaries. Exceptions may be thrown and caught within a single UoC.
The optional compiler support for the exact-width types in <cstdint> from C++ Programming
Language adhere to ISO/IEC 14882: 2011/2014: Programming Languages – C++ (ISO/IEC
14882: 2011, §18.4.1) is included.
The optional compiler support for the exact-width types in <stdint.h> from C Programming
Language adhere to ANSI/ISO/IEC [Link] Programming Languages – C (ANSI/ISO/IEC
9899:1999, §[Link]) is included.
[Link].2.1 C++11/14 Multi-Threading Programming Language Definition for General Purpose Capability Set
The General Purpose C++11/14 Multi-Threading Programming Language capability set includes
the General Purpose C++11/14 Programming Language capability set features defined in Section
[Link].2 with the following differences:
• C++ atomic operation support library (ISO/IEC 14882: 2011/2014, §29) is included
• C++ thread support library (ISO/IEC 14882:2011/2014, §30) is included
• Thread-local storage as defined in (ISO/IEC 14882:2011/2014, §3.7.2) for use with C++
thread library (ISO/IEC 14882:2014, §30) is included.
[Link].3 C++03 Programming Language Definition for Safety Extended Capability Set
The Safety Extended C++ 03 Programming Language capability set includes features from the
Programming Language specification defined in ISO/IEC 1[Link] Programming Languages
– C++ with the following modifications:
• Component use of the pragma directive (ISO/IEC 14882:2003, §16.6) for data structure
compositions on FACE Interfaces is excluded
Note: All other uses of pragma directives are permitted.
Note: Support for pragma directives is compiler implementation-dependent. A compiler
ignores pragma directives it does not recognize.
• Input/output library (ISO/IEC 14882:2003, §27) is excluded
Note: For input/output support (including file system), safety-related C++ components use
the input/output functional interfaces defined as part of the corresponding OSS Profile.
Dynamic memory management via “operator new” and “operator delete” is supported. Software
components may override the default operator new and operator delete (ISO/IEC 14882:2003,
§[Link]) to implement software component-specific object memory management systems.
The C++ library functions (ISO/IEC 14882:2003, §18.1, 18.2.2, 19.3, 20.4.6, 21.4, 26.5, 27.8.2)
that are supported are only those that are in common with the C library functions listed for the
corresponding OSS Profile defined in Appendix A. For the C header files that are part of C++,
this includes functions categorized in Section A.1 as POSIX_C_LANG_SUPPORT_R.
Exception Handling (ISO/IEC 14882:2003, §15, 18.6, 19.1) is supported except across the FACE
defined API boundaries. Exceptions may be thrown and caught within a single UoC.
The optional compiler support for the exact-width types in <stdint.h> from C Programming
Language adhere to ANSI/ISO/IEC [Link] Programming Languages – C (ANSI/ISO/IEC
9899:1999, §[Link]) is included.
[Link].4 C++11/14 Programming Language Definition for Safety Extended Capability Set
The Safety Extended C++ 11/14 Programming Language capability set includes features from the
Programming Language specification defined in ISO/IEC 14882: 2011: Programming Languages
– C++ and ISO/IEC 14882: 2014: Programming Languages – C++ with the following
modifications:
• Component use of the pragma directive (ISO/IEC 14882: 2011/2014, §16.6) for data
structure compositions on FACE Interfaces is excluded
Note: All other uses of pragma directives are permitted.
Note: Support for pragma directives is compiler implementation-dependent. A compiler
ignores pragma directives it does not recognize.
• Input/output library (ISO/IEC 14882: 2011/2014, §27) is excluded
Note: For input/output support (including file system), safety-related C++ components use
the input/output functional interfaces defined as part of the corresponding OSS Profile.
• Component use of wide characters (ISO/IEC 14882: 2011/2014, §[Link]), multibyte
characters (ISO/IEC 14882: 2011/2014, §1.3.13), wide strings (ISO/IEC 14882:
2011/2014, §[Link].2), and multibyte strings (ISO/IEC 14882: 2011/2014, §[Link].4.2)
is excluded, including library functions that manipulate those types and library typedefs
based on them
• C++ Standard Libraries (ISO/IEC 14882: 2011/2014, §19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30) are excluded
Dynamic memory management via “operator new” and “operator delete” is supported. Software
components may override the default operator new and operator delete (ISO/IEC 14882:
2011/2014, §[Link]) to implement software component-specific object memory management
systems.
The C++ library functions (ISO/IEC 14882: 2011/2014, §18.2, 18.3.3, 18.5, 19.4, 20.8.13, 21.8,
26.8, 27.9.2) that are supported are only those that are in common with the C library functions
listed for the corresponding OSS Profile defined in Appendix A. For the C header files that are
part of C++, this includes functions categorized in Section A.1 as
POSIX_C_LANG_SUPPORT_R.
Exception Handling (ISO/IEC 14882: 2011/2014, §15, 18.8, 19.2) is supported except across the
FACE defined API boundaries. Exceptions may be thrown and caught within a single UoC.
The optional compiler support for the exact-width types in <cstdint> from C++ Programming
Language adhere to ISO/IEC 14882:2011/2014: Programming Languages – C++ (ISO/IEC 14882:
2011, §18.4.1) is included.
The optional compiler support for the exact-width types in <stdint.h> from C Programming
Language adhere to ANSI/ISO/IEC [Link] Programming Languages – C (ANSI/ISO/IEC
9899:1999, §[Link]) is included.
[Link].5 C++03 Programming Language Definition for Safety Base and Security Capability Sets
Restrictions to the C++ 03 Programming Language features and libraries for the Safety Base and
Security capability sets are based on recommendations in DO-332 (Object-Oriented Technology
and Related Techniques Supplement to DO-178C and DO-278A) and recommendations from the
Embedded C++ Committee. The recommendations from these are used to define C++ restrictions
appropriate for use in safety-critical and real-time systems.
The Safety Base and Security C++ Programming Language capability sets includes features from
the Programming Language specification defined in ISO/IEC 1[Link] Programming
Languages – C++ with the following modifications:
• Component use of the pragma directive (ISO/IEC 14882:2003, §16.6) for data structure
compositions on FACE Interfaces are excluded
Note: All other uses of pragma directives are permitted.
Note: Support for pragma directives is compiler implementation-dependent. A compiler
ignores pragma directives it does not recognize.
• Virtual base classes (ISO/IEC 14882:2003, §10.1) are excluded
However, allocators should not throw an exception. A failing new operation that returns to
the caller should return NULL.
• Run-Time Type Information (ISO/IEC 14882:2003, §18.5) and use of dynamic_cast
(ISO/IEC 14882:2003, §5.2.7) are excluded
• Exception Handling (ISO/IEC 14882:2003, §15, 18.6, 19.1) is excluded
• C++ Standard Template Libraries (ISO/IEC 14882:2003, §19, 20, 21, 22, 23, 24, 25, 26,
27) are excluded
• Input/output library (ISO/IEC 14882:2003, §27) is excluded
Note: There are no C++ input/output library functions supported. For input/output support
(including file system), safety-related C++ components utilize the input/output functional
interfaces defined as part of the corresponding OSS Profile.
• Component use of wide characters (ISO/IEC 14882:2003, §[Link]), multibyte characters
(ISO/IEC 14882:2003, §1.3.8), wide strings (ISO/IEC 14882:2003, §[Link].3.3), and
multibyte strings (ISO/IEC 14882:2003, §[Link].3.2) is excluded, including library
functions that manipulate those types and library typedefs based on them
The C++ library functions (ISO/IEC 14882:2003, §18.1, 18.2.2, 19.3, 20.4.6, 21.4, 26.5, 27.8.2)
that are supported are only those that are in common with the C library functions listed for the
corresponding OSS Profile defined in Appendix A. For the C header files that are part of C++,
this includes functions categorized in Section A.1 as POSIX_C_LANG_SUPPORT_R.
The optional compiler support for the exact-width types in <stdint.h> from C Programming
Language adhere to ANSI/ISO/IEC [Link] Programming Languages – C (ANSI/ISO/IEC
9899:1999, §[Link]) is included.
[Link].6 C++11/14 Programming Language Definition for Safety Base and Security Capability Sets
Restrictions to the C++ Programming Language features and libraries for the Safety Base and
Security capability sets are based on recommendations in DO-332 (Object-Oriented Technology
and Related Techniques Supplement to DO-178C and DO-278A) and recommendations from the
Embedded C++ Committee. The recommendations from these are used to define C++ restrictions
appropriate for use in safety-critical and real-time systems.
The Safety Base and Security C++ 11/14 Programming Language capability sets includes features
from the Programming Language specification defined in ISO/IEC 14882: 2011: Programming
Languages – C++ and ISO/IEC 14882: 2014: Programming Languages – C++ with the following
modifications:
The C++ library functions (ISO/IEC 14882: 2011/2014, §18.2, 18.3.3, 18.5, 19.4, 20.8.13, 21.8,
26.8, 27.9.2) that are supported are only those that are in common with the C library functions
listed for the corresponding OSS Profile defined in Appendix A. For the C header files that are
The optional compiler support for the exact-width types in <cstdint> from C++ Programming
Language adhere to ISO/IEC 14882:2011/2014: Programming Languages – C++ (ISO/IEC 14882:
2011, §18.4.1) is included.
The optional compiler support for the exact-width types in <stdint.h> from C Programming
Language adhere to ANSI/ISO/IEC [Link] Programming Languages – C (ANSI/ISO/IEC
9899:1999, §[Link]) is included.
[Link].7 C++ Programming Language and Run-Time Requirements
The following sections define Ada Programming Language features and library functions for the
supported capability sets. These capability sets are listed in the order of most permissive (General
Purpose) to most restrictive (Security). As with the OSS Profiles, the restrictions are established
to allow deployment of a UoC in an environment developed to any of the more permissive
capability sets. Note that the deployment of a UoC into a more permissive capability set may not
be adequate for the required design assurance of the UoC.
Restrictions to Ada 95 and Ada 2012 Programming Language features and libraries for the Safety
Extended, Safety Base, and Security capability sets are based on the Ravenscar Ada subset profile
developed at the Eighth International Real-Time Ada Workshop. This profile is advocated in the
ISO/IEC/JTC1/SC22/WG9 Technical Report TR 15942:2000 and is defined in Section D.13 of
the Ada 2012 Language Reference Manual. The Ravenscar Ada subset is enforced by a compiler
using “pragma Restrictions” in Ada 95 or “pragma Profile(Ravenscar)” in Ada 2012.
[Link].1 Ada 95 Programming Language Definition for General Purpose Capability Set
The General Purpose Ada 95 Programming Language capability set includes features from the
Programming Language specification defined in ANSI/ISO/IEC [Link] Ada Reference
Manual, Language, and Standard Libraries (herein referred to as “Ada 95 LRM”) with the
following modifications:
• Implementation-defined pragmas (Ada 95 LRM, §2.8 (14)) for data structure
compositions on FACE Interfaces are excluded
Note: All other uses of implementation-defined pragma directives are permitted.
Note: Use of the language-defined pragmas (e.g., pragma Priority, pragma Import, pragma
Export) defined throughout the Ada 95 LRM is permitted.
Note: Support for pragma directives is compiler implementation-dependent. A compiler
ignores pragma directives it does not recognize.
• Asynchronous Transfer of Control (Ada 95 LRM, §9.7.4) is excluded
• Wide characters, wide strings, and wide text are excluded
• Input/Output capabilities as defined in Ada 95 LRM, §13.13, A.6, A.7, A.8, A.9, A.10,
A.11, A.12, A.13 access to files requiring any external communications interface
hardware or to external hardware devices is excluded
As described in §A.10, In_File and Out_File must be defined to an internal file. This file
definition restriction applies to all of Annex A and §13.13.
Note: The definition of external_file and file_objects is restricted to files accessible
internally by the OSS.
• The Distributed Systems Annex (Ada 95 LRM, Annex E) is excluded
• The Information Systems Annex (Ada 95 LRM, Annex F) is excluded
The supported Ada 95 exception handling is maintained except across the FACE defined API
boundaries. Exceptions may be thrown and caught within a single UoC.
[Link].2 Ada 2012 Programming Language Definition for General Purpose Capability Set
The General Purpose Ada 2012 Programming Language capability set includes features from the
Programming Language specification defined in ISO/IEC 8652:2012(E) with Technical
Corrigendum 1: Ada Reference Manual, Language, and Standard Libraries (herein referred to as
“Ada 2012 LRM”), with the following modifications:
• Implementation-defined pragmas (Ada 2012 LRM, §2.8 (14)) for data structure
compositions on FACE Interfaces are excluded
Note: All other uses of implementation-defined pragma directives are permitted.
Note: Use of the language-defined pragmas (e.g., pragma Priority, pragma Import, pragma
Export) defined throughout the Ada 2012 LRM is permitted.
Note: Support for pragma directives is compiler implementation-dependent. A compiler
ignores pragma directives it does not recognize.
• Asynchronous Transfer of Control (Ada 2012 LRM, §9.7.4) is excluded
• Wide characters, wide strings, and wide text are excluded
• Wide wide characters, wide wide strings, and wide wide text are excluded
• Input/Output capabilities as defined in Ada 2012 LRM, §13.13, A.6, A.7, A.8, A.9, A.10,
A.11, A.12, A.13 access to files requiring any external communications interface
hardware or to external hardware devices is excluded
As described in §A.10, In_File and Out_File must be defined to an internal file. This file
definition restriction applies to all of Annex A and §13.13.
Note: The definition of external_file and file_objects is restricted to files accessible
internally by the OSS.
• The Distributed Systems Annex (Ada 2012 LRM, Annex E) is excluded
• The Information Systems Annex (Ada 2012 LRM, Annex F) is excluded
For Ada 2012-based components, the component uses the tasking/threading capabilities defined
as part of the Programming Language.
Ada 2012 exception handling is supported except across the FACE defined API boundaries.
Exceptions may be thrown and caught within a single UoC.
[Link].3 Ada 95 Programming Language Definition for Safety Extended Capability Set
The Safety Extended Ada 95 Programming Language capability set includes Programming
Language features based on a subset definition of the ANSI/ISO/IEC [Link] Ada 95
Reference Manual, Language, and Standard Libraries (i.e., Ada 95 LRM), and as restricted by the
Ravenscar Profile for High-Integrity Systems, ISO/IEC/JTC1/SC22/WG9 Technical Report TR
15942:2000 with the following modifications:
Dynamic memory management via the keyword “new” and the generic deallocate procedure
Unchecked_Deallocation are supported. Software components can also override the default “new”
and deallocation mechanisms via user-defined storage pools as defined in Ada 95 LRM 13.11
Coding standards for safety-critical software may impose restrictions on the generality that is
provided in the capability sets, in order to avoid pointer insecurities such as storage leakage,
fragmentation, and dangling references, but such restrictions are outside the scope of the FACE
Technical Standard.
The capability set includes an Ada task’s use of secondary stack (if required) limited to a defined
size.
Note: The recommended minimum value for this size is 4096 bytes.
The capability set includes the subset of functionality defined for the Predefined Language
Environment (Ada 95 LRM, Annex A) based on the above and the Ravenscar Ada 95 subset
profile exclusions.
The capability set includes the subset of functionality defined for Interfaces to Other Languages
(Ada 95 LRM, Annex B) as follows:
The capability set includes the subset of functionality defined for Systems Programming (Ada 95
LRM, Annex C), based on ISO/IEC TR 15942:2000 including Interrupts support (Ada 95 LRM,
§C.3) limited to constants and type definitions associated with [Link] with the following
modification:
• Dependencies on package Task_Attributes (Ada 95 LRM, §C.7.2) are excluded
The capability set includes the subset of functionality defined for Real-Time Systems (Ada 95
LRM, Annex D), based on ISO/IEC TR 15942:2000 including support for monotonic time (Ada
95 LRM, §D.8) with the following modifications:
• Dependencies on package [Link] (Ada 95 LRM, §9.6) are excluded
• Support for relative delay statements (Ada 95 LRM, §9.6) is excluded
Accuracy information related to the elementary functions (Ada 95 LRM, §A.5) is provided by the
run-time supplier.
Ada-based UoCs may use the Ada tasking capability defined as part of the Programming Language
(restricted to the Ravenscar subset) or the tasking/threading from the OS environment (i.e.,
ARINC 653 or POSIX). The supported Ada 95 exception handling is maintained except across
the FACE defined API boundaries. Exceptions may be thrown and caught within a single UoC.
[Link].4 Ada 2012 Programming Language Definition for Safety Extended Capability Set
The Safety Extended Ada 2012 Programming Language capability set includes Programming
Language features based on a subset definition of the ISO/IEC 8652:2012(E) with Technical
Corrigendum 1: Ada Reference Manual, Language, and Standard Libraries (i.e., Ada 2012 LRM)
and as restricted by the Ravenscar Profile (Annex D.13) with the following modifications:
• Component use of implementation-defined pragmas (Ada 2012 LRM, §2.8 (14)) for data
structure compositions on FACE Interfaces is excluded
Note: All other uses of implementation-defined pragma directives are permitted.
Note: Use of the language-defined pragmas (e.g., pragma Priority, pragma Import, pragma
Export, etc.) defined throughout the Ada 2012 LRM is permitted.
Note: Support for pragma directives is compiler implementation-dependent. A compiler
ignores pragma directives it does not recognize.
• Asynchronous Transfer of Control (Ada 2012 LRM, §9.7.4) and dependencies are
excluded
• Synchronized, task, and protected interfaces (Ada 2012 LRM 3.9.4) are excluded
• Exception handling (Ada 2012 LRM, §11) the Exception_Information and
Exception_Message functions are excluded
• Defining a ‘Storage_Size attribute for an access type is excluded, except when the value
specified for the attribute is zero
• Wide characters, wide strings, and wide text are excluded
• Wide wide characters, wide wide strings, and wide wide text are excluded
• Random Number Generation (Ada 2012 LRM, §A.5.2) is excluded
• Input/output capabilities (Ada 2012 LRM, §13.13, A.6, A.7, A.8, A.9, A.10, A.11, A.12,
A.13, A.14, A.15) are excluded
• The Containers library (Ada 2012 LRM, §A.18) is excluded
• The Distributed Systems Annex (Ada 2012 LRM, Annex E) is excluded
• The Information Systems Annex (Ada 2012 LRM, Annex F) is excluded
• The Numerics Annex (Ada 2012 LRM, Annex G) is excluded
• Unbounded strings (the type Unbounded_String in [Link], Ada 2012
LRM, §A.4.5) are excluded
The capability set includes an Ada task’s use of secondary stack (if required) limited to a defined
size.
Note: The recommended minimum value for this size is 4096 bytes.
Dynamic memory management via the keyword “new” and the generic deallocate procedure
Unchecked_Deallocation are supported. Software components can also override the default “new”
and deallocation mechanisms via user-defined storage pools as defined in Ada 2012 LRM.
Coding standards for safety-critical software may impose restrictions on the generality that is
provided in the capability sets, in order to avoid pointer insecurities such as storage leakage,
fragmentation, and dangling references, but such restrictions are outside the scope of the FACE
Technical Standard.
The capability set includes the subset of functionality defined for the Predefined Language
Environment (Ada 2012 LRM, Annex A) based on the above and the Ravenscar Ada 95 subset
profile exclusions.
The capability set includes the subset of functionality defined for Interfaces to Other Languages
(Ada 2012 LRM, Annex B) as follows:
• Sections B.1 and B.2 are included
• Sections B.3.1 and B.3.2 are excluded
• The remainder of Section B.3 is included
The capability set includes the subset of functionality defined for Systems Programming (Ada
2012 LRM, Annex C), based on ISO/IEC TR 15942:2000 including Interrupts support (Ada 2012
The capability set includes the subset of functionality defined for Real-Time Systems (Ada 2012
LRM, Annex D), based on ISO/IEC TR 15942:2000 with the following restrictions:
• D.2.1 The Task Dispatching Model: [Link] is excluded
• D.2.2 Task Dispatching Pragmas: pragma Priority_Specific_Dispatching is excluded
• D.2.4 Non-Preemptive Dispatching: Excluded
• D.2.5 Round Robin Dispatching: Excluded
• D.2.6 Earliest Deadline First Dispatching: Excluded
• D.4 Entry Queuing Policies: Excluded (since there are no entry queues)
• D.5 Dynamic Priorities: Excluded
• D.5.1 Dynamic Priorities for Tasks: Excluded
• D.5.2 Dynamic Priorities for Protected Objects: Excluded
• D.6 Preemptive Abort: Excluded
• D.10 Synchronous Task Control: Ada.Synchronous_Task_Control.EDF is excluded
• D.10.1 Synchronous Barriers: Excluded
• D.11 Asynchronous Task Control: Excluded
• D.12 Other Optimizations and Determinism Rules: Excluded
Note: In general, optimizations are outside the scope of this Technical Standard.
• D.14 Execution Time: Excluded
• D.15 Timing Events: Excluded
• D.16 Multiprocessor Implementation: Excluded
Accuracy information related to the elementary functions (Ada 2012 LRM, §A.5) is provided by
the run-time supplier.
Ada-based UoCs may use the Ada tasking capability defined as part of the Programming Language
(restricted to the Ravenscar subset) or the tasking/threading from the OS environment (i.e.,
ARINC 653 or POSIX). The supported Ada 2012 exception handling is maintained except across
the FACE defined API boundaries. Exceptions may be thrown and caught within a single UoC.
[Link].5 Ada 95 Programming Language Definition for Safety Base and Security Capability Sets
The Safety Base and the Security Ada 95 Programming Language capability sets include
Programming Language features based on a subset definition of the ANSI/ISO/IEC [Link]
Ada 95 Reference Manual, Language, and Standard Libraries (i.e., Ada 95 LRM), and as restricted
The capability sets include the subset of functionality defined for the Predefined Language
Environment (Ada 95 LRM, Annex A) based on the above and the Ravenscar Ada 95 subset
profile exclusions.
The capability sets include the subset of functionality defined for Interfaces to Other Languages
(Ada 95 LRM, Annex B) that is limited to constant and type definitions associated with Interfaces.
The capability sets include the subset of functionality defined for Systems Programming (Ada 95
LRM, Annex C), based on ISO/IEC TR 15942:2000 including Interrupts support (Ada 95 LRM,
§C.3) limited to constants and type definitions associated with [Link] with the following
modification:
The capability sets include the subset of functionality defined for Real-Time Systems (Ada 95
LRM, Annex D), based on ISO/IEC TR 15942:2000 including support for monotonic time (Ada
95 LRM, §D.8) with the following modifications:
• Dependencies on package [Link] (Ada 95 LRM, §9.6) are excluded
• Support for relative delay statements (Ada 95 LRM, §9.6) are excluded
Accuracy information related to the elementary functions (Ada 95 LRM, §A.5) is provided by the
run-time supplier.
Ada-based UoCs may use the Ada tasking capability defined as part of the Programming Language
(restricted to the Ravenscar subset) or the tasking/threading from OS environment (i.e., ARINC
653 or POSIX).
[Link].6 Ada 2012 Programming Language Definition for Safety Base and Security Capability Sets
The Safety Base and the Security Ada 2012 Programming Language capability sets include
Programming Language features based on a subset definition of the ISO/IEC 8652:2012(E) with
Technical Corrigendum 1: Ada Reference Manual, Language, and Standard Libraries (i.e., Ada
2012 LRM) and as restricted by the Ravenscar Profile (Annex D.13) with the following
modifications:
• Component use of implementation-defined pragmas (Ada 2012 LRM, §2.8 (14)) for data
structure compositions on FACE Interfaces is excluded
Note: All other uses of implementation-defined pragma directives are permitted.
Note: Use of the language-defined pragmas (e.g., pragma Priority, pragma Import, pragma
Export) defined throughout the Ada 2012 LRM is permitted.
Note: Support for pragma directives is compiler implementation-dependent. A compiler
ignores pragma directives it does not recognize.
• Asynchronous Transfer of Control (Ada 2012 LRM, §9.7.4) and dependencies are
excluded
• Exception Handling (Ada 2012 LRM, §11) is limited to handling predefined exceptions
using a single default handler (i.e., pragma Restrictions No_Exception_Handlers)
• Synchronized, task, and protected interfaces (Ada 2012 LRM §3.9.4) are excluded
• The only permitted syntax for a formal_package_actual_part in a
formal_package_declaration (Ada 2012 LRM §12.7) is:
formal_package_actual_part ::= (<>) | [generic_actual_part]
• Default deallocation in Storage Management (Ada 2012 LRM, §13.11) is excluded (i.e.,
no usage of the generic deallocate procedure, Unchecked_Deallocation, for the
implementation defined Storage Pool)
• Defining a ‘Storage_Size attribute for an access type is excluded, except when the value
specified for the attribute is zero
• Wide characters, wide strings, and wide text are excluded
Dynamic memory management via the keyword “new” is supported, and software components
can also override the default “new” mechanism via user-defined storage pools as defined in Ada
2012 LRM 13.11. Dynamic memory management via the generic deallocate procedure,
Unchecked_Deallocation, is supported for user-defined storage pools as defined in LRM 13.11.
Coding standards for safety-critical software may impose restrictions on the generality that is
provided in the capability sets, in order to avoid pointer insecurities such as storage leakage, but
such restrictions are outside the scope of the FACE Technical Standard.
The capability sets include the subset of functionality defined for the Predefined Language
Environment (Ada 2012 LRM, Annex A) based on the above and the Ravenscar Ada 2012 subset
profile exclusions.
The capability sets include the subset of functionality defined for Interfaces to Other Languages
(Ada 2012 LRM, Annex B) that is limited to constant and type definitions associated with
Interfaces.
The capability sets include the subset of functionality defined for Systems Programming (Ada
2012 LRM, Annex C), based on ISO/IEC TR 15942:2000 including Interrupts support (Ada 2012
LRM, §C.3) limited to constants and type definitions associated with [Link] with the
following modification:
• Dependencies on package Task_Attributes (Ada 2012 LRM, §C.7.2) are excluded
The capability set includes the subset of functionality defined for Real-Time Systems (Ada 2012
LRM, Annex D), based on ISO/IEC TR 15942:2000 with the following restrictions:
• D.2.1 The Task Dispatching Model: [Link] is excluded
• D.2.2 Task Dispatching Pragmas: pragma Priority_Specific_Dispatching is excluded
• D.2.4 Non-Preemptive Dispatching: Excluded
• D.2.5 Round Robin Dispatching: Excluded
• D.2.6 Earliest Deadline First Dispatching: Excluded
• D.4 Entry Queuing Policies: Excluded (since there are no entry queues)
• D.5 Dynamic Priorities: Excluded
Note: In general, optimizations are outside the scope of this Technical Standard.
• D.14 Execution Time: Excluded
• D.15 Timing Events: Excluded
• D.16 Multiprocessor Implementation: Excluded
Accuracy information related to the elementary functions (Ada 2012 LRM, §A.5) is provided by
the run-time supplier.
Ada-based UoCs may use the Ada tasking capability defined as part of the Programming Language
(restricted to the Ravenscar subset) or the tasking/threading from OS environment (i.e., ARINC
653 or POSIX).
The Java Programming Language may be available in the General Purpose and Safety Extended
capability sets. The following sections define the Java Programming Language support.
[Link].1 Java Programming Language Definition for General Purpose Capability Set
The General Purpose Java Programming Language capability set includes either of the following
Programming Language specifications:
• Programming language features described in Java Platform, Enterprise Edition 8 (Java EE
8)
• Programming language features described in Java Platform, Standard Edition 8 (Java SE
8)
For Java-based components, the component utilizes the tasking/threading capabilities defined as
part of the Programming Language. Support for communications between partitions includes use
of ARINC 653 sampling and queuing port interfaces.
Java exception handling is supported except across the FACE defined API boundaries. Exceptions
may be thrown and caught within a single UoC.
[Link].2 Java Programming Language Definition for Safety Extended Capability Set
The Safety Extended Java Programming Language capability set includes the following
Programming Language specification:
• Java Platform, Standard Edition 8 (Java SE 8)
For Java-based components, the component utilizes the tasking/threading capabilities defined as
part of the Programming Language or the OS environment (ARINC 653 or POSIX). Support for
communications between partitions includes use of ARINC 653 sampling and queuing port
interfaces.
Java exception handling is supported except across the FACE defined API boundaries. Exceptions
may be thrown and caught within a single UoC.
Component Frameworks can help increase the efficiency of creating new software by allowing
developers to focus on the unique requirements of software components without having to use
resources to develop lower-level details of how to manage functionality. Component Frameworks
are not the same as portable libraries. With portable libraries, components instantiate and invoke
the functions and objects provided by the portable library. With Component Frameworks,
developers implement functions and objects specific to their own component that are then
instantiated and invoked by the Component Framework.
A Component Framework provided by the OSS is extending the OSS Interface to include the
Component Framework’s own API. An example of a Component Framework is the Java virtual
machine.
The following subsection defines the Component Frameworks for each OSS Profile that can be
optionally included in the OSS.
For requirements on Component Frameworks provided as part of a UoC, see the requirements for
FSC (Section 4.7.14) and the requirements for the segment relevant to the UoC.
1. When an OSS UoC built to the General Purpose Profile supports OSGi, the OSS UoC
OSGi support shall be comprised of the OSGi API described in OSGi Service Platform
Release 7 Core for Java-based systems.
2. When an OSS UoC built to the Safety Profile supports OSGi, the OSS UoC OSGi support
shall be comprised of the OSGi API described in OSGi Service Platform Release 7 Core
for Java-based systems.
A main characteristic of software components developed to the Security Profile is the utilization
of a security-related process for development and verification for the software component and its
execution environment. This results in significantly restricting the Component Framework
features and library functions in support of security-related software objectives.
Run-time configuration involves requests for, receipt of, and processing of configuration
information by an executing software component. The software component’s processing of
configuration information has the effect of changing the software component’s algorithms,
behavior, or communication in one of their predefined ways without modification of the software
component itself.
1. When providing the Configuration Services Interface, a UoC shall provide the
Configuration Services Interface as specified in Section G.2.
2. The configuration parameters of a UoC shall be described in XML conformant to version
1.1 of the XSD standard.
3. When the Configuration Services Interface is implemented, the IDL to Programming
Language Mappings defined in Section 4.14 shall be used.
Figure 8 illustrates the potential relationships between PSSS UoCs and I/O Services. The figure
depicts MIL-STD-1553, Serial and Discrete bus architectures. PSSS UoC A requires the MIL-
STD-1553 and Serial I/O Services. PSSS UoC B requires the Serial and Discrete I/O Services.
The packaging of the I/O Services does not impact either PSSS UoC.
MIL-STD-1553 Discrete
I/O Service I/O Service
Serial
I/O Service
PSSS UoC A
IOSS UoC 1
MIL-STD-1553 Serial
I/O Service I/O Service
An IOSS UoC is constrained to a FACE OSS Profile except when it may need to call non-standard
OS or device driver interfaces of the FACE Computing Environment. The IOSS exists to
encapsulate this behavior so that PSSS UoCs can be constrained to FACE Interfaces, including
the OSS Profiles and the I/O Services Interface.
The IOSS offers two capabilities to the PSSS. The I/O Service Management Capability addresses
initialization, configuration, and status queries. The I/O Data Movement Capability encompasses
communication via an I/O connection.
The functions of the IOS Interface are common for each I/O Service supporting a specific I/O bus
architecture. Some functions have parameter types that are tailored for the corresponding I/O bus
architecture. Refer to Appendix C for details regarding the function signatures and data types for
each defined I/O Service.
The IOS Interface defines functions to configure and query status for both an I/O connection and
its associated bus instance. Appendix C describes the configuration and status fields for each
defined I/O Service. The I/O bus types specified in Appendix C and the bus type-specific APIs
and Configuration Parameters are not intended to be exhaustive. These status and Configuration
Parameters can be extended by the IOSS developer with previously undefined status and
configuration details as needed. These extensions, as well as any previously undefined bus types,
could be submitted for potential inclusion in the FACE Technical Standard going forward as
required during Conformance Verification. Each PSSS UoC creates connections to an IOSS UoC
that supports the corresponding bus type. The connection Configuration Information is defined so
that the I/O Service can correlate a connection with a specific handle. In order to provide
portability of PSSS UoCs across different platforms, the type of connection is identified as an
analogy for each I/O bus architecture as depicted in Table 6. While these analogies are not
requirements, they do represent the perspective from which the IOS Interface is defined and serve
as recommended guidance.
Table 6: I/O Connection Analogies
Only components that meet the requirements of one of these three sub-segments reside within the
PSSS.
The PSCS sub-segment defines a set of service components that may be implemented to include
Logging, Device Protocol Mediation (DPM) Services, Streaming Media Services, Configuration
Services, and System Level Health Monitoring. The PSCS sub-segment contains only service
The PSGS sub-segment provides a set of graphics services to the PCS. The graphics services
provided vary by platform requirements and are selected by the system integrator.
A notional FACE Reference Architecture is shown in Figure 10. The figure includes PSSS sub-
segments, UoCs, and interfaces.
FACE Boundary
Operating
System Portable Components Segment Transport Services
Segment OS TS Segment
Component Component Component Component
Transport Services
Component
TS Capability
OS
Distribution
Platform-Specific Services Segment Capability
IO GPU
API QoS Management
Capability
I/O Services Segment
TPM Capability
OS
Service Service
Operating
System
Interface Hardware
(e.g. MIL-STD-1553, Ethernet) KEY
FACE Defined Interface
External Interface
Platform Platform Platform Platform
Displays Sensors Devices Devices
1. When providing a LCM Services Interface, a PSSS UoC shall do so in accordance with
the requirements of Section 4.13.
2. When using a LCM Services Interface, a PSSS UoC shall do so in accordance with the
requirements of Section 4.13.
FACE requirements allow the use of Component Frameworks as integral parts of PSSS UoCs as
long as the libraries are FACE aligned and the entire Component Framework is provided as part
of a conformant PSSS UoC. There are no specific requirements to use Component Frameworks as
integral parts of PSSS UoCs.
1. When exchanging data using a framework, a PSSS UoC shall use the TS Interface.
2. When accessing framework configuration interfaces, a PSSS UoC shall use the FACE
Configuration Interface.
3. When accessing framework device drivers, a PSSS UoC shall use the IOS Interface.
4. When storing private and checkpoint data, a PSSS UoC shall use the CSP Interface.
5. When accessing framework capabilities not listed in requirements 1-4 (i.e., persistent
storage, time interfaces, logging), a PSSS UoC shall use the TS Interface.
Note: A PSSS UoC must use the FACE TS Interface (Send_Message(TS)) to access
framework persistent storage create and update interfaces.
Note: A PSSS UoC must use the FACE TS Interface (Send_Message(TS)) to access
framework persistent storage request interfaces.
Note: A PSSS UoC must use the FACE TS Interface (Receive_Message(TS)) to access
framework persistent storage response interfaces.
Note: A PSSS UoC must use the FACE TS Interface (Receive_Message(TS) to access
framework time get time interfaces.
Note: A PSSS UoC must use the FACE TS Interface (Send_Message(TS)) to access
framework time set time interfaces.
Note: A PSSS UoC must use the FACE TS Interface to access framework error and
logging interfaces.
6. When a Component Framework is implemented as part of a PSSS UoC, the Component
Framework shall use the Initializable Capability of the LCM Services to initialize an
instance of a PSSS UoC.
7. When a Component Framework is implemented as part of a PSSS UoC, the Component
Framework shall use the Initializable Capability of the LCM Services to finalize an
instance of a PSSS UoC.
PSDS UoCs communicate with platform devices using data as defined by the associated ICD and
may possess the ability to resequence the messages.
1. A PSDS UoC shall perform the translation of data between the TS Interface and IOS
Interface.
2. A PSDS UoC shall use the IOS Interface to access an I/O device.
Note: The functionality on either side of the IOS Interface is dependent on developer and
integrator implementation. I/O Device control can be allocated to the I/O Service, thus
making the PSDS more portable.
3. When a PSDS UoC communicates with a DPM Service, it shall use the IOS Interface
defined in Appendix C.
1. A PSCS UoC shall use the IOS Interface to access an I/O device.
Note: The functionality on either side of the IOS Interface is dependent on developer and
integrator implementation. I/O Device control can be allocated to the I/O Service, thus
making the PSCS more portable.
2. Communication between a PSCS UoC and an IOSS UoC shall use the IOS Interface.
3. Communication between a PSCS UoC and software components of the PSSS, TSS, and
PCS shall use the TS Interface.
[Link].1 Logging Services Requirements
1. When a centralized logging service is provided, it shall exchange data over the TS
Interface formatted in accordance with IETF RFC 5424: The Syslog Protocol.
2. When a centralized logging service is provided, it shall exchange data over the IOS
Interface formatted in accordance with IETF RFC 5424: The Syslog Protocol.
Note: Faults are logged by the Health Monitoring and Fault Manager described in Section
4.1.3.
[Link].1.2 Localized Logging
Localized logging is handled within the UoC according to the individual UoC’s implementation.
Software suppliers may choose to implement a localized logging method.
[Link].2 Device Protocol Mediation Requirements
DPM services are UoCs of the PSCS sub-segment acting as a protocol mediator for platform
devices using transport protocols (e.g., SNMP, SNMP V3, HTTP, HTTPS, FTP, and SFTP)
supported by the OSS Interface. The DPM Service is only accessible by UoCs of the PSDS sub-
segment of the PSSS. See Figure 11 for a visual depiction of DPM services.
1. The DPM Service shall communicate with UoCs of the PSDS sub-segment of the PSSS
through the IOS Interface defined in Appendix C.
I/O Interface
(Ethernet Message Payload Format)
Data is defined by
Protocol -> SNMP the device ICD.
Data is not
Ethernet required to be in
the FACE
I/O Lib
I/O
message format
format.
I/O Services Segment MIL-STD-1553
Service
OS
Streaming Media Services are UoCs of the PSCS sub-segment acting as a streaming media adapter
for platform imaging devices using media protocols (e.g., MPEG Formats, SMPTE-292). See
Figure 12 for a visual depiction of Streaming Media Services.
1. A Streaming Media Service UoC shall exchange data over the TS Interface.
Data is defined by
the device ICD.
Data is not
Ethernet required to be in
the FACE
I/O Lib
I/O
message format.
I/O Services Segment MIL-STD-1553
OS
Service
The primary purpose of the System Level Health Monitor is monitoring and reporting system and
application faults and failures. The System Level Health Monitor configuration may be
administratively viewable at run-time. The System Level Health Monitor may support one or more
redundancy models as fault recovery and avoidance mechanisms. The System Level Health
Monitor may support the “repair” option, such that HMFM attempts to resurrect failed or faulted
resources. The System Level Health Monitor may monitor/manage the instantiation and
termination of components. The System Level Health Monitor may generate alarms and
notifications to indicate internal state transitions experienced by the components.
1. The System Level Health Monitor shall use the HMFM Interface defined in Section 4.2.2.
1. When communicating with the graphics driver, the Graphics Services UoC shall do so in
accordance with requirements in Section 4.12.9.
Figure 13 depicts the TSS support capabilities, and the inter-segment and intra-segment interfaces.
Portable
Components
Segment TA API
TPM API
TRANSPORT PROTOCOL MODULE
CAPABILITY
optional
OSS API
Operating
System
Segment
TSS UoCs support data access to a variety of common technical services. The TSS UoCs provide
these common technical services to a PSSS or PCS UoC through the TSS Inter-segment Interfaces:
Transport Service (TS) API, and the Component State Persistence (CSP) API. TSS UoCs provide
data transport between PCS/PSSS UoCs, as well as mediation between messages with different
data models. TSS UoCs support a variety of data transport protocols and messaging patterns.
Additionally, TSS UoCs provide access to persistent Data Stores and the ability for UoCs to
checkpoint their internal state. The TSS includes support for the capabilities identified below, and
shown in Figure 13:
• Transport Service Capability (Section 4.7.3)
• Distribution Capability (Section 4.7.4)
• Configuration Capability (Section 4.7.5)
• Type Abstraction Capability (Section 4.7.6)
• QoS Management Capability (Section 4.7.7)
• Message Association Capability (Section 4.7.8)
• Data Transformation Capability (Section 4.7.9)
• Message Pattern Translation Capability (Section 4.7.10)
• Transport Protocol Module (TPM) Capability (Section 4.7.11)
• Data Store Support Capability (Section 4.7.12)
Within a system composed from UoCs, it is not a requirement that all TSS capabilities be
supported. Different TSS UoCs may provide the whole set or a subset of TSS capabilities including
but not limited to Quality of Service (QoS) Management, Message Association, Data
Transformation, and Message Pattern Translation. The TSS capabilities help isolate PCS/PSSS
data architecture variances and messaging to the TSS. To achieve the minimum capability set
required to function as a TSS, the UoCs collectively comprising the TSS provide Transport Service
Capability (TS Capability) with the type-specific interface, the Distribution Capability, and the
TSS Configuration Capability. Providing additional TSS capabilities depends on requirements for
a given instance of the TSS UoCs.
The TSS Intra-segment Interfaces are provided and used by modules, libraries, or software
components that form TSS UoCs. Intra-segment interfaces provide points of conformance testing
that support the creation of UoCs implementing those interfaces. A TSS then can be composed of
independently created TSS UoCs which interoperate. The TSS Intra-segment Interfaces cannot be
used by PCS or PSSS UoCs.
The Intra-segment Interfaces that may be used to form a proper subset of capabilities into TSS
UoCs include:
• Type Abstraction (TA) API
• Transport Protocol Module (TPM) API
Section [Link] provides the sets of TSS Capabilities that can be used to form a TSS UoC.
PCS and PSSS UoCs define messages within the FACE Data Architecture to derive a type-specific
interface for the TSS. The FACE Data Architecture is described in Section 4.9.
A TSS provides TSS Inter-segment Interfaces such as the type-specific interface used by PCS or
PSSS UoCs and the Component State Persistence Interface to control PCS or PSSS UoCs. A TSS
UoC can base its implementation on providing only the Inter-segment Interfaces. However, to
enable portability of TSS libraries, TSS UoCs can also be built against subsets of TSS segment
requirements when they provide intra-segment interfaces. UoCs providing intra-segment
interfaces do not provide the complete set of TSS capabilities required for the intended system
design.
For example, a UoC can realize the Type Abstraction capability and provide the TA API. This
UoC, a Type Abstraction UoC, does not provide the type-specific interface nor realize the
Transport Service Capability. To incorporate this Type Abstraction UoC, the system design would
also include a type-specific Transport Service to Type Abstraction (TS-TA) Interface Adapter
UoC.
As another example, a UoC can provide the TPM API and realize the Transport Protocol Module
Capability to support interoperability between non-homogeneous TSS implementations in the
system. Table 7 summarizes the sets of TSS Capabilities used to form different TSS UoCs.
Units of Conformance
TS-TA
Interface
TSS Capabilities TS TA Adapter TPM CSP FS
Note: “Required” indicates the capability is required by the UoC. “Optional” indicates the
capability is optional for the UoC.
Note: As discussed in Section 4.11.3, TSS UoCs provide an Injectable Interface for each FACE
Interface declared by IDL that it uses.
Figure 14 describes the Configuration Information elements internal to the TSS. The information
definition used is specific to a TSS UoC implementation and used to configure QoS, message
routing, and message conversions. The integration model, described in Section [Link], can
DISTRIBUTION PATH
TRANSFORMATION MAP
ASSOCIATION
KEY
1. When a TSS UoC provides the Distribution Capability, the TSS UoC shall contain the
following Configuration Information elements:
a. Distribution Path Association (Section [Link].2)
b. Distribution Path Definition (Section [Link].3)
2. When a TSS UoC provides QoS Management Capability, the TSS UoC shall contain the
following Configuration Information elements:
a. QoS Definition (Section [Link].4)
3. When a TSS UoC provides Data Transformation Capability, the TSS UoC shall contain
the following Configuration Information elements:
b. Transformation Map (Section [Link].5)
Note: Configuration associated with the Configuration Information elements is achieved
through Configuration Services (defined in Section 4.2.5) or by statically defining the
Configuration Data within the TSS.
[Link].2 Distribution Path Association
The Distribution Path Association defines the routing of messages within an instance of a TSS
UoC.
Note: This is not intended to imply any particular implementation inside the TSS.
Implementation details within the TSS are not standardized and are intentionally left as
an area of variability within the architecture.
1. The Configuration Information shall associate a Distribution Path Definition to a pair of
data endpoints.
Note: A data endpoint can be a USM connection, TPM channel, transport connection,
transport shared memory, etc.
1. The Distribution Path Definition Configuration Information shall consist of the following
elements:
a. Distribution Path Configuration Parameters
[Link].4 QoS Definition
1. The QoS Definition Configuration Information shall consist of the following elements:
a. QoS Policy
b. QoS Attributes
[Link].5 Transformation Map
The Transformation Map configuration information provides the means to define conversions to
be used by the TSS on a given Message Parameter Interface’s definition entity.
1. When a TSS UoC implements Transformation Map configuration, the Transformation
Map Configuration Information shall consist of the following elements:
a. Transformation Type
b. Transformation Configuration Parameters
Note: Items a and b are repeated for as many transformations as are needed. Message types may
be an integrator-defined transport message, a USM message type, or other.
TA UoC TA UoC
The TA Interface is a TSS intra-segment interface and cannot be used by PCS or PSSS UoCs. The
TA Interface is used by modules, libraries, or software components within the TSS layer.
1. The TA Interface shall meet the FACE::TSS::TypeAbstraction::TypeAbstractionTS
interface specification of Section E.4.1.
In the FACE Technical Standard, the semantic understanding is provided by the FACE Data
Architecture. The syntactic and technical interoperability is provided, not by an interoperability
protocol, but by abstracting the interface used to access protocols. This allows for flexibility and
specialization of protocols to meet the varied system requirements that are imposed upon systems
intended to be built from UoCs. The FACE TPM Capability allows the selection between multiple
protocols depending on the connectivity requirements. The TPM Capability supports multiple
protocols, such as TCP, UDP, RTPS, IIOP, Queues, Inter-Process Communication, and inter-
partition communication as well as physical transports such as Internet Protocol and Shared
Memory using the OS Interface. Additional physical transports and protocols may be supported
through device drivers as described in Section 4.3.
1. A TPM Capability shall provide one or more TPM(s) to form Distribution Path(s) to
transport type(s).
Note: TPMs were first introduced to provide data exchanges between TS Domains where
data was to be transported between one instance of a TSS UoC implementation and
another instance of a different TSS UoC implementation. However, TPMs are not limited
to inter-TS Domain exchange and can also be used for intra-TS Domain data exchange.
2. A TPM shall be configured using information provided by the TSS Configuration
Capability.
3. TPM Configuration Parameters shall be specified in accordance with the Configuration
Services requirements in Section 4.2.5.
4. When external message serialization is used, a TPM shall serialize data in accordance
with Section [Link].
Note: A TPM may use its own serialization function or an external function using the
serialization interfaces defined in Section [Link]. Some transports do not require
serialization of messages.
5. When external message deserialization is used, a TPM shall deserialize data in accordance
with Section [Link]
Note: A TPM may use its own deserialization function or an external function using the
deserialization interfaces defined in Section [Link]. Some transports do not require
deserialization of messages.
6. A TPM Capability channel parameter shall be a case-insensitive named entity.
7. A TPM Capability shall provide the Transport Protocol Module Interface as specified in
Section [Link]
The TSS Intra-segment Interfaces are provided and used by modules, libraries, or software
components within the TSS layer. Intra-segment Interfaces support the creation of UoCs
implementing those interfaces. The TSS Intra-segment Interfaces cannot be used by PCS or PSSS
UoCs.
TSS UoCs provide a TPM Interface to enable the reuse of transport protocol plugin modules which
support interoperability between different implementations of TSS UoCs.
Note: Neither Checkpoint nor Private data need to be modeled in the FACE Data Architecture.
All other types of data are modeled in the FACE Data Architecture and use the TS
Interface for IO operations.
The data passing through the CSP interface is exempt from being modeled in the FACE Data
Architecture. To limit the use of this interface to a single UoC, the interface and the data store
contain a reference to the UoC that created the stored data. In order to ensure portability of UoCs
across systems, the file locations and permissions are described in a configuration file passed into
the CSP Capability at initialization.
1. A CSP Capability shall be configured through information provided by the TSS
Configuration Capability.
2. The CSP Capability Configuration Parameters shall be specified in accordance with the
Configuration Services requirements in Section 4.2.5.
3. A CSP Capability shall provide the CSP Interface as defined in Section [Link].
4. A CSP Capability shall provide access to the Checkpoint data when the UUID passed in
matches the UUID associated with the Checkpoint data requested.
5. A CSP Capability shall store Checkpoint data and its associated UUID.
6. A CSP Capability shall provide access to the Private data when the UUID passed in
matches the UUID associated with the Private data requested.
7. A CSP Capability shall store Private data and its associated UUID.
8. A CSP Capability shall supply a library for PCS or PSSS UoCs to use.
Many different commercial software components and industry product line frameworks exist
today. These frameworks perform software infrastructure functions such as Life Cycle
This abstraction strategy places a framework software component in the PCS or PSSS layer, and
the container in the TSS layer. The use of FACE Interfaces to provide abstractions between the
modules and the container isolate the integration changes needed to port the software components
across component and product line frameworks.
Figure 16 depicts the FACE abstraction strategy for a PCS UoC. The PCS UoC is intended to be
a component within a framework container.
Figure 17 depicts the FACE abstraction strategy for a PSSS UoC. The PSSS UoC is intended to
be a component within a framework container.
The FSC may call the native interfaces of a Component Framework for core SW Infrastructure
functions. The typical SW Infrastructure function interfaces provided by a Component Framework
container may include (but are not limited to):
• Life Cycle Management
• Error Reporting
• Logging
• Persistent Storage to Data Stores
• Persistent Storage of PCS or PSSS UoC Private data or internal state
• Get/Set Time
To promote portability, the interfaces provided by a framework are accessed through interfaces
defined by the FACE Technical Standard. The LCM functions are accessed through the LCM
Services Interface provided by PCS, PSSS, or TSS UoCs. If Inversion of Control is desired, the
PCS or PSSS UoC provides an execute operation in the UoC Interface. Other functions provided
by the framework are accessed through TSS Inter-segment Interfaces. The Logging and System
Error Reporting Framework functions are accessed through the TS Interface, run-time errors are
accessed through the FACE HMFM Interface, the persistence of PCS/PSSS UoC internal state
uses the CSP Interface, and the remaining framework functions are accessed through the TS
Interface using data types specified by the FACE Data Architecture.
1. When a TSS UoC uses external serialization support, a TSS UoC shall use the
FACE::TSS::Message_Serialization interface specification in E.4.3.
Note: When serializing, Message_Serialization interface returns a buffer with each element
of the message having been serialized in the order of the structure defined by the associated
UoPModel Template as specified in Section J.2.5.
Note: When deserializing, Message_Serialization interface returns a message type with each
element from the buffer deserialized in the order of the structure defined by the associated
UoPModel Template as specified in Section J.2.5.
Primitive marshalling is provided to the message serialization’s serialize and deserialize calls to
provide protocol-specific marshalling and unmarshalling functions.
1. When a TSS UoC provides external primitive marshalling, a TSS UoC shall provide the
FACE::TSS::Primitive_Marshalling interface specification in Section E.4.4.
Note: Primitive marshalling can be used to encapsulate intellectual property for the
marshalling/unmarshalling of a specific transport or to create common encoding/decoding
functions for the IDL defined types in an effort to improve a TSS UoCs portability.
Memory buffers are provided to the serialize and deserialize calls to hold the serialized and
deserialized messages respectively. External buffer management allows those buffers to be
formatted to the specific message types separate from the UoC requiring to use them.
1. When a TSS UoC uses external buffer management, a TSS UoC shall use the
FACE::TSS::Message_Type_Utility interface specification in Section E.4.5.
Note: When using external buffer management, buffers are formatted in the required data type.
2. When a TSS UoC uses FACE::TSS::Message_Type_Utility, a TSS UoC shall use the
FACE::TSS::MT_Utility_IF_Lookup interface specification in Section E.4.5 E to retrieve the
reference to buffer management functions specific to the typed data message.
3. When a TSS UoC provides external buffer management, a TSS UoC shall provide the
FACE::TSS::MT_Utility_IF_Lookup interface specified in Section E.4.5.
The TSS Inter-segment Interfaces are provided by TSS UoCs to be used by the PCS, and PSSS
UoCs to access common technical functions provided by the SW Infrastructure such as data
transport, access to reference data, or CSP information. As defined in Section [Link], a TSS may
be composed of UoCs which implement the inter-segment interfaces.
Note: Data Store uses the TS Interface to access Data Stores, so it is not a unique interface
provided to users of TS components.
To ensure portability of PCS and PSSS UoCs, and to enable conformance verification, the TS
Interface is strongly typed per the PCS or PSSS UoP Supplied Model (USM). The TS Interface
uses declared and structured data. The Transport Services Capability implemented as a TSS library
provides the TS Interface. The Transport Services Capability manages the TS Interface, and the
Distribution Capability provides for the distribution of information according to Configuration
Parameters from the TSS Configuration Capability.
The Inter-segment Transport Services Interfaces support the communication and message services
required to meet the system performance (e.g., throughput, latency, delivery guarantees) for the
associated data exchanges. These interfaces support data transport industry standards. Examples
of standards that may be used to implement the TS Interface include, but are not limited to, POSIX,
ARINC 653, CORBA, and DDS.
1. The TS Interface shall meet the TypedTS interface specification of Section E.3.2.
2. The TS Typed module as defined in Section E.3.2 shall be parameterized with the
DATATYPE_TYPE as described in a USM and in accordance with the IDL to
Programming Language Mappings, defined in Section 4.14.
3. The fully qualified name of the created TS Typed module shall be
FACE::TSS::<UOP_MODEL_NAME>::<DATATYPE_TYPE>::TypedTS.
Note: DATATYPE_TYPE is the short name of a Template or CompositeTemplate, not a
fully qualified name. UOP_MODEL_NAME is the name of the root UoPModel in which
1. The Base Interface shall meet the FACE::TSS::Base interface specification of Section
E.3.1.
Note: When using a Type Abstraction component, only one implementation of the Base
interface specified by Section E.3.1 is required.
2. The Initialize(Base) function shall be non-blocking regardless of the underlying transport
mechanism.
Note: Initialize(Base) may need to complete asynchronously after Initialize(Base) returns
if the time to complete exceeds some threshold.
3. The Create_Connection(Base) function shall limit its blocking behavior as indicated by
the timeout parameter regardless of the underlying transport mechanism.
Receive Message
Operation
MESSAGE TIMESTAMP
HEADER INSTANCE
MESSAGE HEADER
An instance of the Message in Figure 18 is the basic element of data exchange between the TSS
and PSSS/PCS segments. The message instance is a concrete instantiation of the message
parameter type for the TSS. Data exchanged between TSS endpoints at runtime are used to
populate the message instance. Other TSS parameters may or may not be populated by data
exchanged between TSS endpoints.
1. The TS Interface shall provide content for the following parameters:
a. Header parameter as specified in Section [Link]
b. Message parameter as specified in Section [Link]
2. When QoS Management is performed, the TS Interface shall provide content for the QoS
parameter as specified in Section [Link].
1. The context and frame of reference shall be defined for the following header parameters:
a. Message Instance UID
b. Message Source UID
c. Message Timestamp
2. Instances of the header parameter shall be a language-specific data structure consistent with
the definition provided.
1. The context and frame of reference shall be defined for the following QoS parameters:
a. QoS Key
b. QoS Attribute Values
Note: A QoS Key may have multiple possible values, but an instance must have one value
for one key.
2. Instances of the QoS parameter shall be a language-specific data structure consistent with
the definition provided.
The FACE Data Model Language leverages the Open Universal Domain Description Language
(Open UDDL), the Meta Object Facility (MOF) metamodel language, the Template Language,
and constraints defined in the OMG Object Constraint Language (OCL) that further defines the
structure and rules for construction of model elements, rules for the interaction of model elements,
and rules for software code generation.
The Shared Data Model (SDM) establishes a foundation of core data elements used as building
blocks to create all other data models. The SDM is Configuration Control Board (CCB) managed
per the FACE SDM Governance Plan providing confidence in the core modeling elements and
utility of reuse and potential of reduced data conversion needs.
Software code generation is defined through a set of Template Language rules and IDL Type
bindings that map FACE Data Model Language elements to IDL and from IDL to each of the
supported programming languages.
Figure 19 extends Figure 1 from the Open UDDL Technical Standard and illustrates several
aspects of the Modeling Language. Groupings of Modeling Language elements, roughly aligned
to the model groupings introduced in Section 4.9, are shown as boxes with rounded corners;
relationships between elements as short, stubbed arrows. Grouping of Modeling Language
elements is shown vertically, from top to bottom, showing definition of data model, interface
model, and integration model elements respectively. Horizontally, from left to right, levels (or
perspectives) show refinement of model elements from a more abstract level, to a more concrete
one.
Traceability Model Elements are not shown in order to avoid diagram clutter. While not part of
the Modeling Language, artifact generation and code and configuration are shown for context.
Figure 19 shows the various constituent models that make up the FACE Data Architecture and the
relationships between the models. The progression from left to right is from abstract to concrete.
With each level of refinement, the degree of specificity increases, moving the model closer to a
complete definition of the software application solution required for generation of code.
The first of the Architectural model elements, the datamodel, is used to define data elements with
unambiguous specificity for use in the FACE Technical Standard. The datamodel is divided into
three different data elements with unambiguous specificity for use by FACE Units of Portability
(UoP) or Domain-Specific Data Models (DSDM) as defined by the FACE Technical Standard.
• The Conceptual Data Model provides the semantic definition of the entities and their
relationships characterized by Observables
• The Logical Data Model adds measurement information to each characterization by
defining value type, units, measurement, and frame of reference (through the
measurement system)
• The Platform Data Model adds physical data type information to the logical measurement
characterization
• The UoPModel provides the definition of a software component and its defined interfaces
• The IntegrationModel provides a mechanism to describe the Transport Services Segment
(TSS) integration details between two or more UoPs
The following sections give an overview of each Data Model Language element grouping.
The Conceptual Data Model (CDM) is defined by the Open UDDL Technical Standard. A CDM
is comprised of entities, characteristics, and associations that provide definitions of concepts, their
characteristics, and the context relating them. Observables that are fundamental to the domain and
have no further decomposition are used to specify these defining features. Domain concepts can
be captured in the CDM through the definition of basis entities. A basis entity represents a unique
domain concept and establishes a foundation from which conceptual entities can be specialized.
Basis entities are axiomatic. This allows for separation of concerns, allowing multiple domains to
be modeled.
The Logical Data Model (LDM) is defined by Open UDDL Technical Standard. An LDM consists
of entities, characteristics, and associations that realize their definition from the CDM. An LDM
provides terms of measurement systems, coordinate systems, reference points, value domains, and
units. The principal level of detail added in an LDM is provided through frames of reference for
representing characteristic values. Multiple LDM elements may realize a single CDM element.
The Platform Data Model (PDM) is defined by the Open UDDL Technical Standard. A PDM
consists of entities, characteristics, and associations that realize their counterpart definition from
an LDM. In a PDM, specific representation details such as data type and precision are provided to
represent characteristics. Multiple PDM elements may realize a single LDM element.
Additionally, the PDM specifies how data is presented across the TS Interface using views.
A UoP Data Model consists of elements that provide the means to formally specify the interfaces
of a UoP. The interfaces are specified using reference to PDM elements to allow “message typing”
of the interface. Abstract UoP elements support a platform-independent specification of the UoP
and its interfaces through references to LDM and CDM elements. Connection model elements are
representations of “logical” connections and do not necessarily correspond to the actual
communication channels for exchanging data. The UoP Data Model is specific to the FACE
Technical Standard.
An Integration Model consists of elements that provide the means to model the exchange of
information between UoPs. An Integration Model captures data exchanges, view transformations,
and integration of UoPs for documentation of integration efforts. An Integration Model relies on
UoP Models for expressing interconnectivity. The focus is on documenting UoP data exchange
details. The Integration Model is specific to the FACE Technical Standard.
Section J.8 details the FACE Data Model Language IDL bindings.
C++
FACE
USM/DSDM
Ada
Java
[Link] Specification
The first part of the language bindings specifies a mapping from a USM or DSDM to IDL. The
second portion of the language bindings defines the map from IDL to each of the supported
programming languages as specified in Section 4.14. These two parts form the FACE Data Model
Language IDL bindings.
The language bindings define the rules for mapping from PDM elements to programming language
definition of the data types. A specific tool is not required to be used in implementing these rules.
Note: A software supplier may directly generate or manually create the data structures from a
PDM without leveraging IDL as an intermediate format.
[Link].1 IDL to Programming Language Mappings
The FACE Data Architecture follows the IDL to Programming Language Mappings detailed in
Section 4.14 and the FACE Data Model Language IDL bindings detailed in Section J.8.
4.9.3 Definitions
[Link] FACE Shared Data Model
The FACE Shared Data Model (SDM) is the primary point of interaction between software
suppliers and system integrators as it is the common foundation for all USMs. The FACE SDM
provides the core extensible elements from which USMs are built. The FACE SDM Governance
Software suppliers develop USMs from the SDM using the Data Model Language to represent
information about each UoP, including the data each UoP sends and receives. The Data Model
Language provides and promotes common understanding and meaning of data exchanged.
A Domain-Specific Data Model (DSDM) is a data model designed to the FACE Data Architecture
Requirements. It captures domain-specific semantics and generally does not contain UoP Models.
Single Observable Modeling is when the SDM, a DSDM, or a USM is developed to follow the
Single Observable Constraint in Section J.7.1. The Single Observable Constraint limits
Conceptual Entities to composing at most one element of a single Observable type. Models that
follow the Single Observable Constraint provide a clearer understanding of Entities by reducing
the likelihood of semantic information being embedded in the multiple composition of
Observables. This is considered a data modeling best practice.
Entity Uniqueness Modeling is when each conceptual Entity in a DSDM or USM is unique. An
Entity’s Uniqueness is defined as each Entity must have a different Identity from all other Entities
in the model. An Entity’s Identity is defined by the complete set of the Entity’s characteristics.
This is considered data modeling best practice and is encouraged as it helps in Entity clarity and
integration between different USM and DSDM models.
A valid USM conforms to the metamodel, OCL constraints, template grammar, and template
constraints.
1. Each UoC using the TS Interface shall be accompanied by a USM.
2. The USM shall be an XMI file conforming to the EMOF 2.0 metamodel specified in
Appendix J.
3. The USM shall conform to the Open UDDL requirements.
4. The USM shall use the “xmi:id” attribute with a unique UUID as the ID for all elements.
5. The USM shall adhere to the OCL constraints in Section J.6.
6. When developed to Single Observable Modeling, the USM shall adhere to the conditional
OCL constraint in Section J.7.1.
Note: This is considered data modeling best practice and is encouraged but may not be
required of all USMs.
The Portable Components Segment (PCS) logically contains a wide range of software
components. Software components are considered to be PCS UoCs when they share the following
properties:
• The software component provides software capabilities or services
• The software component is capable of executing in varying instantiations of FACE
infrastructures
• The software component exclusively uses the TS Interface for data exchanges
• The software component exclusively uses the OSS Interface for OS support
• The software component adheres to the requirements of the PCS
1. When using OSS Health Monitoring, a PCS UoC defined to operate in a POSIX
operational environment shall use the FACE Health Monitoring APIs described in Section
4.2.2.
2. A PCS UoC shall conform to the requirements in Section 4.2.4 when using OSGi.
1. When providing a LCM Services Interface, a PCS UoC shall do so in accordance with the
requirements of Section 4.13.
2. When using a LCM Services Interface, a PCS UoC shall do so in accordance with the
requirements of Section 4.13.
FACE requirements allow the use of Component Frameworks as integral parts of PCS UoCs as
long as the libraries are FACE aligned and the entire Component Framework is provided as part
of an aligned PCS UoC. There are no specific requirements to use Component Frameworks as
integral parts of PCS UoCs.
1. When exchanging data using a framework, a PCS UoC shall use the TS Interface.
Once the UoCs are instantiated, the communications between the UoCs can be established using
the Injectable Interface.
Capability Capability
Use
Useofofthe
theFACE
FACETS
Interface is
Transport optional
Interface is
for INTRA-UoC
optional for INTRA-
FACE Transport Services Segment communications
UoC communications
FACE Interfaces declared by IDL have the feature of supporting more than one interface provider
in the same address space. This allows UoCs to be deployed to the same partition using different
interface providers as needed to satisfy system requirements. In order to leverage this feature,
integration software is responsible for associating the desired instance of the interface provider to
the interface user during initialization of the partition, after all the UoC instances have been
created. The Injectable Interface provides the mechanism for that association.
Table 8 lists, for each FACE segment UoC, the potentially used FACE Interfaces declared by IDL.
When a segment UoC uses one of these interfaces, it must provide the corresponding Injectable
Interface. The user of that Injectable Interface is the integration software. Note that while the
Injectable Interface itself is declared by IDL, it is not used by a segment UoC and is thus not listed.
TSS TPM UoC Transport Services Component State Persistence (Section E.3.4)
Serialization (Section E.3.2.5)
Primitive Marshalling (Section E.4.4)
Message Type Utilities (section E.4.5)
1
This interface is instantiated for each specific message type, and each instantiation requires a
separate instantiation of Injectable.
2
This interface is instantiated for each state representation, and each instantiation requires a
separate instantiation of Injectable.
1. A UoC shall provide an instance of the Injectable Interface for each FACE Interface
declared by IDL that it uses. (See Table 8 for the list of IDL Defined interfaces.)
2. Instances of the Injectable Interface provided by a UoC shall be in accordance with
Appendix I.
1. A UoC Package shall be composed of UoCs from one of the following combinations of
FACE segments:
a. TSS and PCS
b. PSSS and TSS
c. IOSS and PSSS
d. IOSS, PSSS, and TSS
e. Multiple UoCs within same FACE segment
Note: Figure 22 depicts an example of different combinations of UoC Packages.
Note: PCS UoCs and PSSS UoCs must not be part of the same UoC Package.
Note: PCS UoCs and IOSS UoCs must not be part of the same UoC Package.
2. All UoCs in a UoC Package shall be designed to operate in the same partition.
TS
Transport
Services UoC UoC UoC UoC UoC UoC
Segment
TS TS
OS
Platform-
Specific
Services
UoC UoC UoC UoC UoC UoC
Segment
IO IO
I/O
Services UoC UoC UoC UoC UoC
Segment
OS
OS
There are two classifications of Graphics Services within the FACE Reference Architecture:
Graphics Rendering Services and Graphics Display Management Services. Graphics Rendering
Services are appropriate for platforms where a single graphics standard needs to be implemented
and a single service controls access to the display. Graphics Display Management Services provide
for shared display resources and display management.
FACE Boundary
Operating Portable Components Segment
System ARINC 661 ARINC 739
Vulkan OpenGL TS Transport
Segment OS
Graphics Graphics
UA Client
Graphics Graphics Services
UoC UoC
UoC UoC Segment
Vulkan
Vulkan API
Device Driver Distribution
OpenG L/EGL API Capability
OpenGL Platform-Specific Services Segment
Device Driver TS
Configuration
Graphics Services Capability
OS
ARINC 739 ARINC 661 Vulkan OpenGL
Server CDS Graphics Graphics Graphics
Graphics UoC UoC UoC UoC
Proprietary
Graphics GPU API
Driver
IO
Interface Hardware
(e.g., MIL-STD-1553, Ethernet)
KEY
FACE Defined Interface
Platform Platform Platform External Interface
Displays Sensors Devices
Figure 23: Graphics Services UoCs in the FACE Reference Architecture Context
Facilitated screen ARINC 661 provides Graphics Display ARINC 661 UAs +
sharing system support for the Management Services CDS, plus any of
A separate function sharing of the display screen OpenGL + EGL
needs to facilitate the between Graphics UoCs.
Vulkan
sharing of the screen Graphics Services UoCs can
without an application be used on a platform with ARINC 739A
requiring knowledge. Graphics Display
Management Services,
providing the platform
implements the standards
required by all Graphics
Services UoCs.
The ARINC 661 standard defines interface protocols between an ARINC 661 Cockpit Display
System (CDS) and a User Application (UA). UAs transmit data to the CDS, which is responsible
for managing the rendering of the widgets defined in the ARINC 661 Definition File (DF) using
the graphics infrastructure available on the rendering platform.
Figure 24 provides a visual representation of the relationship of the various ARINC 661 software
components in a generic rendering environment. ARINC 661 UAs incorporate the logic which
drives run-time changes to the ARINC 661 CDS.
ARINC 661
ARINC 661 Server (CDS) Definition
File (DF)
ARINC 661 includes a very large set of widgets which are not all necessary in every
implementation. In order to reduce the requirement for every implementation to support all
widgets, a minimum set of widgets required to be supported by the CDS is defined in Table 10.
Table 10: ARINC 661-5 Widget Subset
ActiveArea
BasicContainer x
BlinkingContainer x
BufferFormat x
CheckButton
ComboBox
Connector x
CursorPosOverlay
EditBoxMasked
EditBoxNumeric
EditBoxText
GpArcEllipse x
GpArcCircle x
GpCrown x
GpLine x
GpLinePolar x
GpRectangle x
GpTriangle x
Picture x
Label x
LabelComplex x
MapHorz_ItemList
MapHorz_Source
MapHorz
MaskContainer x
Panel x
PicturePushButton
PictureToggleButton
PopUpPanel
PopUpMenu
PopUpMenuButton
PushButton
RadioBox
RotationContainer x
ScrollPanel
ScrollList
Symbol x
TabbedPanel
TabbedPanelGroup
ToggleButton
TranslationContainer x
MapGrid
ExternalSource x
MapVert
MapVertSource
MapVertItemList
EditBoxMultiLine
ComboBoxEdit
MenuBar
MutuallyExclusiveContainer x
ProxyButton
WatchdogContainer x
Slider
PictureAnimated
SymbolAnimated
SelectionListButton
EditBoxNumericBCD
CursorRef
CursorOver
FocusLink
FocusIn
FocusOut
SizetoFitContainer
ShuffleToFitContainer
SymbolPushButton
SymbolToggleButton
PopUpPanelButton
GpPolyline x
PagingContainer x
NumericReadout
MapHorzContainer
MapHorzPanel
DataScalingLong x
DataScalingUlong x
DataScalingFR180 x
BroadcastReceiver
NoServiceMonitor x
ARINC 739A defines a message-oriented interface between avionics subsystems and a Multi-
purpose Control and Display Unit (MCDU) through an ARINC 429 serial data bus. An MCDU
provides a keyboard and a display with line select keys for the display and control of connected
subsystems within a hierarchical menu-based structure. ARINC 739A was based on ARINC 739
and included changes to allow for a smaller form factor and included considerations for the MCDU
display and dual subsystems installations.
Only the subsystem serial data communication and the related MCDU display functionality may
be part of the ARINC 739A Server in the PSSS.
Function Specification
Single Subsystems Specification ARINC 739-1: Multi-purpose Control and Display Unit (MCDU)
Dual Subsystems Specification ARINC 739A-1: Multi-purpose Control and Display Unit (MCDU)
The FACE General Purpose, Safety, and Security OSS Profile implementations of this graphics
interface are identical.
[Link] OpenGL
The Khronos Open Graphics Language (OpenGL) is a cross-language, cross-platform API for
rendering 2D and 3D vector graphics. OpenGL is typically used with a Graphics Processing Unit
(GPU) to achieve hardware-accelerated rendering. The Khronos Native Platform Graphics
Interface (EGL) is an interface between OpenGL APIs and the underlying native platform
windowing system. The Khronos Group manages the OpenGL and EGL specifications. The FACE
Technical Standard specifies the use of EGL, OpenGL Safety-Critical (SC), or OpenGL
Embedded Systems (ES) profiles.
Graphics Services UoCs using OpenGL make direct calls to the OpenGL and EGL drivers to
render graphics content from either the PCS or PSSS segments. Figure 25 illustrates this.
Khronos’ Vulkan is a low-level, cross language, cross platform API that removes many of the
abstractions used in other Graphical APIs. As such Vulkan enables using GPUs for both graphics
as well as compute. Many other accelerators such as those for Machine Learning and Artificial
Intelligence also use the Vulkan API as an interface to those devices. Being a low-level API,
applications using Vulkan can fine tune their performance and execution characteristics. Fine
tuning can include direct control over submissions across the bus to the GPU, allowing control
over bus utilization windows.
Vulkan was ratified in 2016 and has since grown in popularity in the commercial graphics software
industry. Vulkan is defined with growth in mind and has been adopted by all COTS GPU
manufactures to architect their products around. In 2022 Khronos released a Safety Critical variant
of Vulkan to enable its use in applications requiring safety certification such RTCA DO-178C
Level A / EASA ED-12C Level A (avionics); IEC 61508 (industrial), IEC 62304 (Medical), and
ISO 26262 ASIL D (automotive).
Use of Vulkan for creating UoCs is allowed in the PCS and PSSS.
[Link].1 Vulkan Applicability in FACE Profiles
Display Management is the ability to allocate and control parts of, or the whole display, to a
specific Graphic Services UoC. Display Management aims to provide the ability to add Graphics
Services UoCs to a system with minimal integration relative to the existing software components.
In order to allow future additions of Graphics Services UoCs, the concept of a display manager
was created. This method allows most existing Graphics Services UoCs to remain unchanged
when adding new Graphics Services UoCs to the system.
ARINC 661 is used for Display Management. This allows OpenGL or Vulkan software
components to co-exist with ARINC 661 UA software components. It also provides an enforceable
display space partitioning scheme similar to the memory and space partitioning of the operating
system. The ARINC 661 CDS provides a standardized interface to control window positioning,
The FACE Technical Standard defines Graphics Display Management Services where an ARINC
661 Display Management UA UoC is responsible for display manager logic. The ARINC 661
Display Management UA is the only software component that needs to be updated to add
additional Graphics Services UoCs to a system. An example of a simple display management UA
UoC is one which provides the whole screen to a single OpenGL or Vulkan Graphics Services
UoC. A complex display management software component may allow several Graphics Services
UoCs to share the screen.
[Link].1 The Display Management Environment
In the Graphics Display Management Services, the ARINC 661 CDS “owns” the display, and is
responsible for layout and visibility of everything drawn on the screen, and, in general, is the only
software capable of drawing on the screen. ARINC 661 defines the External Source widget as a
way to position a video source at a specific location on a display surface. The External Source
widget provides a portable means to composite multiple Graphics Services UoCs on a single
screen. The External Source widget has defined interfaces to control which Graphics Services
UoCs outputs are visible at a given time, the Graphics Services UoC’s outputs location and size
on the screen, as well as the stacking order of the windows.
The ARINC 661 CDS uses the EGL_EXT_compositor extension to set the size of and allocate
off-screen buffers for the OpenGL Graphics Services UoCs. The extension allows for the
composition of multiple OpenGL/EGL graphics contexts within a multi-partitioned EGL system.
The extension allows a primary EGLContext to be created with multiple off-screen windows. The
extension provides for asynchronous off-screen window updates and information assurance by the
compositor using the primary EGLContext. The extension prevents OpenGL Graphics UoC from
interfering with other rendering contexts within the system and from rendering to the primary
EGLContext.
Therefore, an OpenGL Graphics Services UoC renders using the local OpenGL and EGL APIs.
OpenGL Graphics Services UoCs using standard EGL functions are able to query the screen size
the ARINC 661 CDS set for the given OpenGL Graphics Service UoC, and have no need to know
of any of the other Graphics Services UoCs sharing the same display surface. The OpenGL
Graphics Services UoCs render as they normally would; either periodically or event-driven. When
an OpenGL Graphics Services UoC finishes rendering a frame, the Graphics Services UoC calls
the standard OpenGL and EGL APIs to flush the buffer to the screen. This allows the OpenGL
Graphics Services UoC to maintain the highest level of portability.
Figure 26 shows some of the data flows and APIs used to allow OpenGL, ARINC 661, and ARINC
739 to co-exist on the same system. OpenGL Graphics Services UoCs only use OpenGL and EGL
APIs to render graphics, which are then placed on the display by the ARINC 661 CDS. ARINC
661 UAs use the ARINC 661 data stream to communicate directly with the ARINC 661 CDS
using the TS Interface. The ARINC 661 CDS also communicates window sizing and positioning
to the EGL driver such that OpenGL Graphics Services UoCs have correct sizing data using the
EGL_EXT_compositor extension.
Figure 26 also shows an ARINC 739 Server Graphics Services UoC using a proprietary interface
to the GPU to render its graphic. The ARINC 739-rendered frames are then placed on the display
surface by the ARINC 661 CDS according to any display management that may be applied. The
TS TS
ARINC 661 external source widgets are used to provide window control for rendering objects
outside of the other ARINC 661 widgets. Windows are made available to OpenGL via an EGL
driver that includes the EGL_EXT_compositor extension. The ARINC 661 CDS uses the same
EGL driver to control the OpenGL rendering areas. In this environment, an ARINC 661 DF file
for window management consists of standard ARINC 661 graphics widgets including some
number of external source widgets. The windows are then managed by the Display Management
UA UoC using the standard ARINC 661 object stacking, location, and visibility rules. The ARINC
661 CDS configures the EGL driver such that OpenGL Graphics Services UoCs can correctly use
the screen.
The External Source widget using the EGL_EXT_compositor extension provides a standard
interface to specify window location and dimensions for OpenGL frame buffers used by the
OpenGL Graphics Services UoCs. This provides a means to control specialized hardware designed
to composite external video, or similar software components of non-ARINC 661-generated images
or video. The ARINC 661 CDS works with the EGL driver such that OpenGL Graphics Services
UoCs can share the screen space. An OpenGL Graphics Services UoC using this EGL API may
exist in the PCS or PSSS.
Note: An OpenGL or EGL driver can be provided as part of the OSS. OpenGL and EGL drivers
expected to support Graphics UoCs in the PCS or PSSS will need to be able to support
OpenGL SC 1.0.1 or OpenGL SC 2.0, or OpenGL ES 2.0 or EGL 1.4, or EGL 1.4 with
EGL_EXT_compositor extensions.
4. When supporting Vulkan, an OSS UoC shall provide Vulkan driver compatible with
Vulkan 1.2 or Vulkan SC 1.0
5. When supporting Vulkan SC 1.0, the OSS UoC shall provide a Vulkan SC driver with the
following extensions: VK_EXT_application_parameters, VK_KHR_display,
VK_KHR_object_refresh, VK_KHR_surface, VK_KHR_swapchain.
6. When supporting Vulkan 1.2, the OSS UoC shall provide a Vulkan driver with the
following extensions: VK_KHR_surface, VK_KHR_swapchain.
Note: Operating systems that include a window manager, such as X11 for Linux or
Android’s window manager will require the use of additional extensions to access display
surfaces, those are outside the scope of this standard, and UoCs should be written to
isolate that outside of the UoC boundary.
7. When supporting video decoding with Vulkan, the OSS UoC shall provide a Vulkan
driver with the VK_KHR_video_queue, and VK_KHR_video_decode_queue extensions.
8. When supporting H.264 video decoding with Vulkan, the OSS UoC shall provide a
Vulkan driver with the VK_KHR_video_decode_h264 extension.
9. When supporting H.265 video decoding with Vulkan, the OSS UoC shall provide a
Vulkan driver with the VK_KHR_video_decode_h265 extension.
10. When supporting video encoding with Vulkan, the OSS UoC shall provide a Vulkan
driver with the VK_KHR_video_queue and VK_KHR_video_encode_queue extensions.
11. When supporting H.264 video encoding with Vulkan, the OSS UoC shall provide a
Vulkan driver with the VK_KHR_video_encode_h264 extension.
12. When supporting H.265 video encoding with Vulkan, the OSS UoC shall provide a
Vulkan driver with the VK_KHR_video_encode_h265 extension.
The FACE General Purpose, Safety, and Security Profile requirements for the ARINC 661
standard are identical and defined here.
[Link].1 PCS User Application Requirements
1. A Graphics Services UoC implementing ARINC 661 UAs in the PCS shall satisfy the
requirements in Section 4.10.
2. A Graphics Services UoC implementing an ARINC 661 UA shall use the TS Interface to
communicate ARINC 661 data.
1. The ARINC 661 CDS UoC shall provide OpenGL windowing using the external source
widget when configured to support Graphics Display Management Services.
2. A Graphics Services UoC implementing an ARINC 661 CDS in the PCS shall support the
logic specified in ARINC 661-5 for widgets it provides.
3. A Graphics Services UoC implementing an ARINC 661 CDS in the PCS shall provide the
minimum widget subset as specified in Table 10.
Note: The ARINC 661 CDS may provide additional widgets.
4. A Graphics Services UoC implementing an ARINC 661 CDS in the PCS shall satisfy the
requirements in Section 4.10.
5. A Graphics Services UoC implementing an ARINC 661 CDS shall use the TS Interface to
communicate ARINC 661 data.
6. A Graphics Services UoC implementing an ARINC 661 CDS shall use the XSD defined
in Section H.2 for its style data configuration.
7. A Graphics Services UoC implementing an ARINC 661 CDS shall use the XSD defined
in Section H.3 for its display management Configuration Parameters.
8. A Graphics Services UoC implementing an ARINC 661 CDS shall document the set of
ARINC 661 widgets it provides.
1. A Graphics Services UoC shall use ARINC 739A messages defined in Section 3.7 of
ARINC 739-1 or ARINC 739A-1 when communicating with the ARINC 739A Services.
2. ARINC 739 Client UoCs deployed to the PCS shall satisfy the requirements in Section
4.10.
1. A Graphics Services UoC using OpenGL shall also use EGL, Version 1.4.
Note: A Graphics Services UoC may only use extended EGL as specified in the OSS
graphics requirements.
2. A Graphics Services UoC using OpenGL in the:
a. General Purpose Profile shall use OpenGL SC 1.0.1, OpenGL SC 2.0, or OpenGL
ES 2.0.
b. Safety Profile shall use OpenGL SC 1.0.1 or OpenGL SC 2.0.
1. The ARINC 661 CDS UoC shall provide OpenGL windowing using the external source
widget when configured to support Graphics Display Management Services.
2. A Graphics Services UoC implementing an ARINC 661 CDS in the PSSS shall support
the logic specified in ARINC 661-5 for widgets it provides.
3. A Graphics Services UoC implementing an ARINC 661 CDS in the PSSS shall provide
the minimum widget subset as specified in Table 10.
Note: The ARINC 661 CDS may provide additional widgets.
4. A Graphics Services UoC implementing an ARINC 661 CDS shall use the TS Interface to
communicate ARINC 661 data.
5. A Graphics Services UoC implementing an ARINC 661 CDS shall use the XSD defined
in Section H.2 for its style data configuration.
6. A Graphics Services UoC implementing an ARINC 661 CDS shall use the XSD defined
in Section H.3 for its display management Configuration Parameters.
Note: The Graphics Services UoC implementing an ARINC 661 CDS in the PSSS may
have direct access to any proprietary graphics hardware drivers and APIs.
7. A Graphics Services UoC implementing an ARINC 661 Display Management UA shall
have an associated ARINC 661 DF.
8. A Graphics Services UoC implementing an ARINC 661 CDS shall document the set of
ARINC 661 widgets it provides.
1. A Graphics Services UoC implementing an ARINC 661 UA shall use the TS Interface to
communicate ARINC 661 data.
2. A Graphics Services UoC implementing an ARINC 661 UA shall document the set of
ARINC 661 widgets it uses.
3. A Graphics Services UoC implementing an ARINC 661 UA shall use the XSD defined in
Section H.2 for its style data configuration.
1. A Graphics Services UoC shall use ARINC 739A messages defined in Section 3.7 of
ARINC 739-1 or ARINC 739A-1 when communicating with the ARINC 739A Services.
The requirements for OpenGL apply to both PCS and PSSS subsections of the FACE Technical
Standard.
1. A Graphics Services UoC using OpenGL shall also use EGL, Version 1.4.
Note: A Graphics Services UoC may only use extended EGL as specified in the OSS
graphics requirements.
2. A Graphics Services UoC using OpenGL in the:
a. General Purpose Profile shall use OpenGL SC 1.0.1, OpenGL SC 2.0, or OpenGL
ES 2.0.
b. Safety Profile shall use OpenGL SC 1.0.1 or OpenGL SC 2.0.
c. Security Profile shall use OpenGL SC 1.0.1 or OpenGL SC 2.0.
Note: Graphics Services UoC may not use extended OpenGL and be conformant.
3. A Graphics Services UoC shall be restricted to the core profile for the OpenGL version
being used.
Note: This does not preclude use of dynamic binding to use OpenGL extensions; however,
the UoC must not rely on the existence of any OpenGL extensions.
4. A Graphics Services UoC using eglGetDisplay shall use a configurable parameter for the
display_id input argument.
Note: The configurable parameter, for example, could be read from a file or passed in at
startup of the software component. See Configuration Services.
5. When using EGL_EXT_compositor as off-screen windows, a Graphics Services UoC
using eglCreateWindowSurface shall use a configurable parameter for the win input
argument.
Note: The configurable parameter, for example, could be read from a file or passed in at
startup of the software component. See Configuration Services.
6. When calling eglCreateContext and not using the
EGL_PRIMARY_COMPOSITOR_CONTEXT_EXT attribute, a Graphics Services UoC
shall use a configurable parameter for the EGL_EXTERNAL_REF_ID_EXT attribute.
7. A Graphics Services UoC using OpenGL shall document its OpenGL version.
[Link] Goals
The LCM Services are defined to provide a consistent approach for software suppliers and system
integrators to address several complexities that come with integrating UoCs into a system. Some
of the Life Cycle integration complexities include:
• An instance of the UoC is initialized and finalized at execution points that are highly
dependent on the system design
• An instance of the UoC is configured at execution points that are highly dependent on the
system design
• An instance of the UoC is integrated when a component framework solution is used,
where characteristics of that component framework solution are highly dependent on the
system design
• An instance of the UoC is integrated with state management algorithms that are highly
dependent on the system design
• The system coordinates the state of multiple UoC instances, where the possible states and
valid transitions are highly dependent upon each UoC
[Link] Approach
The Capabilities are independent and optional. Each Capability is defined by a corresponding
Interface. A UoC that provides one or more of the LCM Capabilities is referred to as a Managed
UoC in this context.
LCM Services does not define an interface to create or destroy instances. Section 4.14 addresses
the syntax for those operations. LCM Services assumes an existent software object that
implements one or more of the interfaces defined.
The Stateful capability uses parameterized data types for state representation, allowing each
Managed UoC to define its own valid state values. The FACE Technical Standard need not,
therefore, require any specific state representations or transitions. The state of the system becomes
a function in part of the states of managed UoCs, and appropriate state transition behavior remains
an aspect of system design. The SDM does define a state representation that may be suitable for
adoption by a Managed UoC when additional states are not required.
The capabilities provided by LCM Services coincide with cross-cutting security and safety
assurance concerns. The existence of LCM Services in the FACE Technical Standard does not
change the continued need for assurance case analysis. Factors involved include, but are not
limited to, the assurance level of the system and its constituent UoCs, the criticality requirements
of the system and consequent design decisions, and criteria established by the designated
assurance authority.
In Real Time Safety-Critical (RTSC) systems, reliable operation and integrity of safeguards during
post-startup operation must be assured. Use of LCM Services Interfaces is constrained to preclude
In security-critical systems, employing LCM Services needs to be assured as part of the system
design to minimize vulnerabilities. Any of the LCM Services Capabilities could be exploited by
malicious or unstable software which could compromise the proper behavior of the system.
This section describes language mappings from this profile to several programming languages.
Note: Throughout this section, the phrase “IDL compiler” is used to refer to an IDL compiler
that supports these Language Mappings.
Note: The FACE Data Architecture and IDL differ in the scoping rules applied to enumerators.
In order to accommodate use cases where state/sub-state representations with
enumerations result in colliding identifiers in the same IDL scope, the FACE Technical
Standard permits IDL enumerators in the same module scope to have the same name.
This is an exception to the identifier uniqueness rule in IDL 4.1 Section [Link]. The
programming language mapping rules ensure enumerators are distinct fully scoped
identifiers.
4.14.1 Exceptions
IDL exceptions map to nothing in every target language. IDL interface attributes or operations
that raise exceptions map to every target language as if they did not raise an exception.
module B {
module A<long> MyModuleA;
};
4.14.3 Constants
These mappings do not support IDL constants whose constant expression evaluates to a string or
fixed-point. In such cases, an IDL compiler emits a diagnostic indicating the use of an unsupported
construct.
// Permissible mapping to C
2
Note: An IDL constant definition is invalid if its expression is outside its type’s range. In such
cases, an IDL compiler emits a diagnostic indicating the error.
All C header declarations are in an extern “C” block. It allows C interface declarations to be
compiled using a C++ compiler and referenced by a C client. This concept is called language
linking and it encompasses name mangling of library symbols. The beginning and end of the extern
“C” block must be within an #ifdef __cplusplus conditional compilation guard since extern is not
a C keyword. The extern “C” block begins following the last #include preprocessor directive and
preceding the first type declaration, then ends following the last type declaration. An example of
the result in relation to other mapping results is shown below.
#include <stdlib.h>
#include “projectlib.h”
#ifdef __cplusplus
extern “C” {
#endif /* __cplusplus */
#ifdef __cplusplus
}
#endif /* __cplusplus */
/* EXAMPLE_HEADER_H */
[Link] Names
Names in IDL generally obey C naming conventions, with exceptions described below. Unless
otherwise excepted below, unscoped names in IDL appear in the generated source code character-
for-character.
IDL provides a scoping mechanism similar to C++: modules map roughly to namespaces and
interfaces can open new scopes similar to C++ classes. As the C programming language lacks
these features, any name that is not in the global scope is constructed to ensure uniqueness. The
enclosing scope of a particular name is prepended to that name with an underscore.
Because of these constructed names, using underscores in IDL identifiers may result in duplicate
symbols in C. In the following example, both “foo_bar” and “bar” typedefs map to “foo_bar” in
C, because “bar” is in the “foo” module. An IDL compiler emits an error if such a conflict occurs.
An IDL source file maps to a C header file with the same base name and an “.h” extension. The
header file is in a subdirectory tree which reflects the subdirectory tree for the IDL source file. For
example, if the input IDL file is Foo/Bar/[Link], then the generated C header file will be
Foo/Bar/Sample.h.
Note: A subdirectory tree for an input IDL source file and an output C header file is relative to
a base directory that is not specified. The base directory for the source IDL file may be
different from the base directory for the output C header file.
A #ifndef include guard is always present in a C header file generated from IDL. The identifier
used in the guard is in capital letters. It consists of the IDL subdirectory tree with the components
capitalized, separated by an underscore, followed by the capitalized base name of the resulting C
header file, and ending with “_H”. For example, Foo/Bar/[Link] will have an include guard
of FOO_BAR_SAMPLE_H.
[Link] Modules
Modules have no corresponding C language construct and thus do not appear directly as generated
code. Instead, modules influence the scoped name generated for any contained elements as
described in Section [Link]. Scoped names are used when resolving definitions from other
modules.
Modules Example
// IDL
module A {
typedef long MyLong;
module B {
typedef MyLong MyOtherLong;
};
};
module C {
typedef A::MyLong MyOtherLong;
};
// C
typedef FACE_long A_MyLong;
typedef A_MyLong A_B_MyOtherLong;
typedef A_MyLong C_MyOtherLong;
[Link] Typedefs
An IDL typedef creates an alias for a type; it maps directly to a C typedef. The C typedef’s alias
is the scoped name of the IDL typedef, as described in Section [Link]; the C typedef type’s
mapping is specified in the IDL type’s relevant section below. Multiple declarators in IDL map to
the same in C.
Typedef Example 1
// IDL
typedef long Foo, Bar;
module A {
typedef Bar Baz;
};
// C
typedef FACE_long Foo, Bar;
typedef Bar A_Baz;
Structures, unions, and enumerations can be declared within a typedef in IDL, which is logically
equivalent to a type declaration immediately followed by a typedef.
[Link] Constants
A constant in IDL is mapped to a #define in C. The #define identifier is the fully scoped name of
the IDL constant, as specified in Section [Link]. If the IDL constant’s value expression is a
scoped name, then the #define replacement is mapped from that scoped name as specified in
Section [Link]. Otherwise, the #define replacement is a C expression mapped from the IDL
constant expression as specified in Section 4.14.4. In all cases, the #define replacement includes
a cast to the fully-qualified type mapped from the IDL constant’s type as specified elsewhere.
Constants Example
// IDL
typedef long MyLong;
enum Color {RED, GREEN, BLUE};
module A {
const long FooLong = 1 + 65535;
const boolean FooBool = TRUE;
const MyLong FooMyLong = FooLong;
const Color clr = RED;
};
// C
typedef FACE_long MyLong;
typedef enum Color {Color_RED, Color_GREEN, Color_BLUE} Color;
#define A_FooLong ((FACE_long)65536)
#define A_FooBool ((FACE_boolean)true)
#define A_FooMyLong ((MyLong)A_FooLong)
#define A_clr ((Color)Color_RED)
IDL Basic Types map to C types according to Table 12. Implementations provide definitions for
these C types that align with the given size and range requirements. The file containing these
definitions is “FACE/types.h”, as specified in Section K.1.1.
Table 12: IDL Basic Type C Mapping
boolean FACE_boolean 1 0 to 1 0
[Link].2 Sequences
Bounded and unbounded sequences map to a typedef FACE_sequence and a set of macros that
wrap FACE_sequence functions. There is one macro per FACE_sequence function. The #define
identifier for each macro is <derived function name>(<derived parameter list>), and the
replacement is “(“<FACE_sequence function name>(<parameter list>)”)”, where:
• <derived function name> is <FACE_sequence function name>, with “FACE_sequence”
replaced by the fully-scoped name of the IDL sequence
• <derived parameter list> is <parameter list>, with sizeof(<element type>) omitted from
the list, and without parenthesis enclosing each parameter name
• The entire replacement is enclosed in parenthesis to preserve the macro definition when
substituted
• <FACE_sequence function name> is the name of the FACE_sequence function
• <parameter list> is a comma-separated list of all the FACE_sequence function’s parameter
names, each prepended with an underscore and enclosed in parentheses
Any FACE_sequence parameter named sizeof_T is handled differently, becoming
sizeof(<element type>) in this list, where <element type> is mapped from the IDL
sequence’s type as specified elsewhere.
// C
typedef FACE_short TYPE;
#define Foo_init_managed_unbounded(_seq) \
FACE_sequence_init_managed_unbounded((_seq), sizeof(TYPE))
#define Foo_free(_seq) \
FACE_sequence_free((_seq))
#define Foo_clear(_seq) \
FACE_sequence_clear((_seq))
#define Foo_buffer(_seq) \
(TYPE *) FACE_sequence_buffer((_seq))
#define Bar_init_managed_unbounded(_seq) \
FACE_sequence_init_managed_unbounded((_seq), sizeof(TYPE))
#define Bar_free(_seq) \
FACE_sequence_free((_seq))
#define Bar_clear(_seq) \
FACE_sequence_clear((_seq))
#define Bar_buffer(_seq) \
(TYPE *) FACE_sequence_buffer((_seq))
Bounded and unbounded strings map to a typedef FACE_string and a #define in C, where the
#define identifier is the string’s fully-scoped name appended with “_bound_value”, and the
#define’s replacement is the string’s maximum size cast to a FACE_unsigned_long. To indicate
that a string is unbounded, the sentinel value FACE_STRING_UNBOUNDED_SENTINEL is
used as the replacement value. Full specification for FACE_string is in Section K.1.4.
String Example
// IDL
typedef string Foo;
typedef string<8> Bar;
// C
typedef FACE_string Foo;
[Link].4 Fixed
A fixed type maps to a typedef FACE_fixed and two #defines to represent the type’s digits and
scale. For the digits #define, the identifier is the fixed type’s fully-scoped name appended with
“_digits”, and the replacement is the type’s total number of digits cast to a FACE_unsigned_short.
For the scale #define, the identifier is the fixed type’s fully-scoped name appended with “_scale”,
and the replacement is the type’s scale cast to a FACE_unsigned_short. Implementations are
responsible for initializing a fixed type using these constants. Full specification for FACE_fixed
is in Section K.1.5.
// C
typedef FACE_fixed Foo;
#define Foo_digits ((FACE_unsigned_short) 5)
#define Foo_scale ((FACE_unsigned_short) 2)
[Link].1 Structures
An IDL structure maps to a C structure typedef. The C structure and typedef alias names are the
scoped name of the IDL structure, as specified in Section [Link]. The structure’s members occur
in the same order as in IDL; each member's type and identifier are mapped as specified elsewhere.
struct A {
long X;
MyLong Y;
char Z;
};
// C
typedef FACE_long MyLong;
typedef struct A {
FACE_long X;
MyLong Y;
FACE_char Z;
} A;
Structures Example 2
// IDL
typedef string ub_str;
typedef string<10> b_str_10;
typedef sequence<short> ub_seq_short;
typedef sequence<short,10> b_seq_short_10;
typedef fixed<5,2> fxd;
struct B {
short i;
ub_str str1;
b_str_10 str2;
ub_seq_short seq1;
b_seq_short_10 seq2;
fxd fxd1;
};
// C
typedef FACE_string ub_str;
#define ub_str_bound_value FACE_STRING_UNBOUNDED_SENTINEL
#define ub_seq_short_init_managed_unbounded(_seq) \
FACE_sequence_init_managed_unbounded((_seq), sizeof(FACE_short))
#define ub_seq_short_free(_seq) \
FACE_sequence_free((_seq))
#define ub_seq_short_clear(_seq) \
FACE_sequence_clear((_seq))
#define ub_seq_short_buffer(_seq) \
(FACE_short *) FACE_sequence_buffer((_seq))
#define b_seq_short_10_init_managed_unbounded(_seq) \
FACE_sequence_init_managed_unbounded((_seq), sizeof(FACE_short))
#define b_seq_short_10_free(_seq) \
FACE_sequence_free((_seq))
#define b_seq_short_10_clear(_seq) \
FACE_sequence_clear((_seq))
#define b_seq_short_10_buffer(_seq) \
(FACE_short *) FACE_sequence_buffer((_seq))
typedef struct B {
FACE_short i;
ub_str str1;
b_str_10 str2;
ub_seq_short seq1;
b_seq_short_10 seq2;
fxd fxd1;
} B;
Structures Example 3
// IDL
struct Foo {
int i;
};
// C
struct Foo {
int i;
};
struct C {
Foo f;
};
[Link].2 Enumerations
An IDL enum maps to a C enum typedef. The C enum and typedef alias names are the scoped
name of the IDL enum, as specified in Section [Link]. Enum literals map one-to-one from IDL;
enum literal names are the same as in IDL, prepended with <fully-scoped enum name>_.
Enumeration Example
// IDL
enum Color {RED, GREEN, BLUE};
// C
typedef enum Color {Color_RED, Color_GREEN, Color_BLUE} Color;
[Link].3 Unions
An IDL union maps to a C structure typedef. The C structure and typedef alias names are the IDL
union’s scoped name, as described in Section [Link].1. The structure contains two members: a
discriminator named “discriminator” and a union named “values”. The type of the discriminator
is derived from the type of the IDL union’s discriminator as specified elsewhere. Each IDL union
member maps to one member in the C union. Each member’s type and identifier are mapped as
specified elsewhere.
Note: Implementations are responsible for consistently modifying the discriminator and union.
It is recommended that comments be used to document which C union member
corresponds to which discriminator value.
Union Example
// IDL
enum CASES { FOO, BAR, BAZ };
// C
typedef enum CASES { CASES_FOO, CASES_BAR, CASES_BAZ } CASES;
[Link] Arrays
An array in IDL maps to a C-style array of the same dimension. The name of the array is the
scoped name of the IDL array as described in Section [Link]; the C array type’s mapping is
specified in the IDL type’s relevant section.
Array Example
// IDL
typedef short Foo[10];
// C
typedef FACE_short Foo[10];
[Link] Interfaces
[Link].1 Declaration
An IDL interface definition is mapped to a pair of C struct typedefs: one whose name is the fully
scoped name of the IDL interface (see Section [Link]), acting as the main data structure for the
interface; another whose name is constructed by appending _ops to the previous name, acting as
an operation lookup table for the interface.
An IDL interface definition is also mapped to two typedefs for function pointers – one for
initialization of the interface and one for cleanup. The typedef alias for the initialization function
pointer is <fully-scoped interface name>_ctor_t; the typedef alias for the cleanup function pointer
is <fully-scoped interface name>_dtor_t. Both function pointers return FACE_interface_return
and have one parameter named this_obj whose type is a pointer to the interface struct. An
interface’s behavior is implementation-defined if its initialization function does not return
FACE_INTERFACE_NO_ERROR. FACE_interface_return is defined in “FACE/interface.h”, as
specified in Section K.1.2.
An IDL interface is also mapped to a #define macro for each of these two function pointers. These
macros hide the operation table lookup, allowing simpler code in business logic that uses the
interface. The #define identifier for the initialization function is <fully-scoped interface
The main interface struct contains an operations table struct named ops, followed by a void pointer
named data for private data. The operations table struct contains an initialization function pointer,
followed by a cleanup function pointer – both members have the same name as their respective
function pointer type.
An interface may also be declared with a forward declaration, in which case it maps to a forward
declaration of a struct in C.
// C
struct Bar;
struct Foo;
// initialize this_obj->data
typedef FACE_interface_return (*Foo_ctor_t)(struct Foo* this_obj);
// clean up this_obj->data
typedef FACE_interface_return (*Foo_dtor_t)(struct Foo* this_obj);
typedef struct Foo_ops {
Foo_ctor_t ctor;
Foo_dtor_t dtor;
} Foo_ops;
typedef struct Foo {
Foo_ops ops;
void* data;
} Foo;
#define Foo_ctor(_this_obj) \
((_this_obj)->[Link])((_this_obj))
#define Foo_dtor(_this_obj) \
((_this_obj)->[Link])((_this_obj))
struct Bar;
// initialize this_obj->data
typedef FACE_interface_return (*Bar_ctor_t)(struct Bar* this_obj);
// clean up this_obj->data
typedef FACE_interface_return (*Bar_dtor_t)(struct Bar* this_obj);
typedef struct Bar_ops {
Bar_ctor_t ctor;
Bar_dtor_t dtor;
} Bar_ops;
typedef struct Bar {
Bar_ops ops;
void* data;
} Bar;
#define Bar_ctor(_this_obj) \
((_this_obj)->[Link])((_this_obj))
#define Bar_dtor(_this_obj) \
((_this_obj)->[Link])((_this_obj))
[Link].2 Operations
These function pointers, the operations table struct, and the main interface struct are effectively
analogous to a C++ abstract class. Keeping the C++ analogy, these functions are effectively “pure
virtual”.
// C
struct Foo;
#define Foo_ctor(_this_obj) \
((_this_obj)->[Link])((_this_obj))
#define Foo_dtor(_this_obj) \
((_this_obj)->[Link])((_this_obj))
A parameter’s directionality in IDL affects the parameter’s type in C, as summarized in Table 13.
The return type of a C function pointer corresponding to an operation is always
FACE_interface_return.
Table 13: IDL Operation Parameter C Mapping
Basic Type T T* T*
Enumeration T T* T*
Sequence const T * T* T*
String const T * T* T*
Fixed const T * T* T*
Structure const T * T* T*
Union const T * T* T*
Interface const T * T* T **
Array const T T T
The following outlines the ownership and memory management responsibilities of parameter
passing based on an IDL parameter’s directionality:
• IDL in parameters – the caller is responsible for providing all storage (either dynamically
or statically allocated)
• IDL out parameters – the caller is responsible for providing storage (either dynamically or
statically allocated) for the top-level type
For strings and sequences (whether as parameters themselves or as a component of a
compound type), the callee is permitted to re-size or re-allocate the contained buffer,
provided the instance of the object in question is managed. As a consequence of this, the
Attributes in IDL logically map to an accessor operation for both mutable and readonly attributes,
and a mutator operation for mutable attributes. The accessor operation is named get_<attribute
name>, takes no parameters, and returns the same type as the attribute. The mutator operation is
named set_<attribute name>, takes an in parameter with the same type and identifier as the
attribute, and returns void. These operations then map according to Section [Link].2. Both
operations are declared at the same point the attribute was declared, and the set operation
immediately follows its corresponding get operation.
[Link].4 Declarations
Types and constants declared in an interface map to C in the same way they would if declared in
the same scope as the interface, except their name is also scoped by the interface in which they are
declared.
// C
/* (constructs for Foo specified in earlier example */
typedef FACE_char Foo_MyChar;
It is important to note that inheritance in IDL does not imply anything about the implementation
of that interface in a particular programming language. A derived interface in IDL is logically
equivalent to an interface that contains the attributes and operations of its base interface. The base
interface attributes and operations occur before the derived interface operations and in the same
order as in the base interface.
In the case of multiple inheritance, base interfaces are considered in the order they are specified,
using depth-first traversal if multiple levels of inheritance exist. (Interface derivation order is
semantically insignificant in IDL, but it is significant when mapping to C, because operations
generate members in a struct, and the order of members in a struct matters in C.)
[Link].6 Implementation
An interface implementation is responsible for initializing the private data in the “ctor” function,
cleaning up the private data in the “dtor” function, and setting the primary interface struct’s “data”
member appropriately.
#define Foo_ctor(_this_obj) \
((_this_obj)->[Link])((_this_obj))
#define Foo_dtor(_this_obj) \
((_this_obj)->[Link])((_this_obj))
#define Foo_go(_this_obj) \
((_this_obj)->[Link])((_this_obj))
return 0;
}
There is no general mapping for a native type. Each native type declaration is accompanied by a
mapping to C which covers all instances in which the native type might be used, including but not
limited to type definitions and operation parameters (in, inout, out).
[Link] Names
Names in IDL generally obey C++ naming conventions, with exceptions described below. Unless
otherwise excepted below, unscoped names in IDL appear in the generated source code character-
for-character.
An IDL source file maps to a C++ header file with the same base name and an “.hpp” extension.
The header file is in a subdirectory tree which reflects the subdirectory tree for the IDL source
file. For example, if the input IDL file is Foo/Bar/[Link], then the generated C++ header file
will be Foo/Bar/[Link].
Note: A subdirectory tree for an input IDL source file and an output C++ header file is relative
to a base directory that is not specified. The base directory for the source IDL file may
be different from the base directory for the output C++ header file.
A #ifndef include guard is always present in a C++ header file generated from IDL. The identifier
used in the guard is in capital letters. It consists of the IDL subdirectory tree with the components
capitalized, separated by an underscore, followed by the capitalized base name of the resulting
C++ header file, and ending with “_HPP”. For example, Foo/Bar/[Link] will have an include
guard of FOO_BAR_SAMPLE_HPP.
Other IDL preprocessor directives do not map to anything in the C++ representation.
[Link] Modules
Scope resolution operators, used when resolving definitions from other modules, map to the same
in C++.
Modules Example
// IDL
module A {
typedef long MyLong;
module B {
typedef MyLong MyOtherLong;
};
};
module C {
typedef A::MyLong MyOtherLong;
};
// C++
namespace A {
typedef FACE::Long MyLong;
namespace B {
typedef MyLong MyOtherLong;
}
}
namespace C {
typedef A::MyLong MyOtherLong;
[Link] Typedefs
An IDL typedef creates an alias for a type; it maps directly to a C++ typedef. The C++ typedef’s
alias is the name of the IDL typedef; the C++ typedef type’s mapping is specified in the IDL type’s
relevant section below. Multiple declarators in IDL map to the same in C++.
Typedef Example 1
// IDL
typedef long Foo, Bar;
module A {
typedef Bar Baz;
};
// C++
typedef FACE::Long Foo, Bar;
namespace A {
typedef Bar Baz;
}
Structures, unions, and enumerations can be declared within a typedef in IDL, which is logically
equivalent to a type declaration immediately followed by a typedef.
Typedef Example 2
// IDL
typedef struct Foo_struct { long x; } Foo;
[Link] Constants
A constant maps to a #define in C++. The #define identifier is the fully scoped name of the IDL
constant, as specified in Section [Link].1. If the IDL constant’s value expression is a scoped
name, then the #define replacement is mapped from that scoped name as specified in Section
[Link]. Otherwise, the #define replacement is a C++ expression mapped from the IDL constant
expression as specified in Section 4.14.4. In all cases, the #define replacement includes a cast to
the fully-qualified type mapped from the IDL constant’s type as specified elsewhere.
Constants Example
// IDL
typedef long MyLong;
enum Color {RED, GREEN, BLUE};
module A {
const long FooLong = 1 + 65535;
const boolean FooBool = TRUE;
const MyLong FooMyLong = FooLong;
const Color clr = RED;
};
// C++
typedef FACE::Long MyLong;
struct Color {
IDL Basic Types map to C++ types according to Table 14 below. Implementations provide
definitions for these C++ types that align with the given size and range requirements. The file
containing these definitions is “FACE/[Link]”, specified in Section K.2.1.
Table 14: IDL Basic Type C++ Mapping
[Link].2 Sequences
Bounded and unbounded sequences map to a typedef FACE::Sequence specialization with the
appropriate element type and a #define in C++, where the #define identifier is the fully-scoped
Sequence Example
// IDL
typedef short TYPE;
typedef sequence<TYPE> Foo;
typedef sequence<TYPE,8> Bar;
// C++
typedef FACE::Short TYPE;
typedef FACE::Sequence<TYPE> Foo;
#define Foo_bound_value FACE::Sequence<TYPE>::UNBOUNDED_SENTINEL
typedef FACE::Sequence<TYPE> Bar;
#define Bar_bound_value ((FACE::UnsignedLong) 8)
[Link].3 Strings
Bounded and unbounded strings map to a typedef FACE::String and a #define in C++, where the
#define identifier is the fully-scoped name of the string (as specified in Section [Link]) appended
with “_bound”, and the #define’s replacement is the string’s maximum size cast to a
FACE::UnsignedLong. To indicate that a string is unbounded, the sentinel value
FACE::String::UNBOUNDED_SENTINEL is used as the replacement value. Full specification
for FACE::String is in Section K.2.3.
String Example
// IDL
typedef string Foo;
typedef string<8> Bar;
// C++
typedef FACE::String Foo;
#define Foo_bound_value FACE::String::UNBOUNDED_SENTINEL
typedef FACE::String Bar;
#define Bar_bound_value ((FACE::UnsignedLong) 8)
[Link].4 Fixed
A fixed type maps to a typedef FACE::Fixed and two #defines to represent the type’s digits and
scale. For the digits #define, the identifier is the fully-scoped name of the fixed type (as specified
in Section [Link]) appended with “_digits”, and the replacement is the type’s total number of
digits cast to a FACE::UnsignedShort. For the scale #define, the identifier is the fully-scoped name
of the fixed type (as specified in Section [Link]) appended with “_scale”, and the replacement is
the type’s scale cast to a FACE::UnsignedShort. Implementations are responsible for initializing
a fixed type using these constants. Full specification for FACE::Fixed is in Section K.2.4.
// C++
#define Foo_digits ((FACE::UnsignedShort) 5)
#define Foo_scale ((FACE::UnsignedShort) 2)
typedef FACE::Fixed<Foo_digits,Foo_scale> Foo;
[Link].1 Structures
An IDL structure maps to a C++ structure with the same name. The structure’s members occur in
the same order as in IDL; each member’s type and identifier are mapped as specified elsewhere.
A forward declaration of a structure in IDL maps to a forward declaration of a structure with the
same name in C++.
Structure Example 1
// IDL
typedef long MyLong;
struct A {
long X;
MyLong Y;
char Z;
};
// C++
typedef FACE::Long MyLong;
struct A {
FACE::Long X;
MyLong Y;
FACE::Char Z;
};
A C++ struct requires a default constructor to properly assign the bound values of string or
sequence members, or to properly assign the digits and scale values of fixed members. Bounded
string and sequence members are default-constructed and then assigned bound instances using the
corresponding bound_value macro constant. Fixed types require a set of macro constants that
define both digits and scale. All other members, including unbounded strings and sequences,
remain default-constructed when a constructor is declared.
Structure Example 2
// IDL
typedef string ub_str;
typedef string<10> b_str_10;
typedef sequence<short> ub_seq_short;
typedef sequence<short,10> b_seq_short_10;
typedef fixed<5,2> fxd;
struct B {
short i;
ub_str str1;
b_str_10 str2;
ub_seq_short seq1;
// C++
typedef FACE::String ub_str;
#define ub_str_bound_value FACE::String::UNBOUNDED_SENTINEL
typedef FACE::String b_str_10;
#define b_str_10_bound_value ((FACE::UnsignedLong) 10)
struct B {
int i;
ub_str str1;
b_str_10 str2;
ub_seq_int seq1;
b_seq_int_10 seq2;
fxd fxd1;
B() {
b_str_10::RETURN_CODE str2_rc(b_str_10::NO_ERROR);
str2 = b_str_10(b_str_10_bound_value,str2_rc);
b_seq_int_10::RETURN_CODE seq2_rc(b_seq_int_10::NO_ERROR);
seq2 = b_seq_int_10(b_seq_int_10_bound_value,seq2_rc);
}
};
[Link].2 Enumerations
An IDL enumeration maps to a C++ enum whose literals are specified with the same name and in
the same order as in IDL. The C++ enum is named Value and is wrapped in a struct with the same
name as the IDL enum. The struct provides an encapsulating scope in order to reduce the chance
for enumerator collisions in scopes with many enumeration declarations, as may occur with TSS
message types contained in a USM. The struct has a private constructor declaration with no
definition to prohibit construction.
Enumeration Example
// IDL
enum Color {RED, GREEN, BLUE};
// C++
struct Color {
enum Value {RED, GREEN, BLUE};
private:
Color ();
};
[Link].3 Unions
An IDL union maps to a C++ class of the same name. Implementations are responsible for
supplying the definition of this class, and are permitted to define class members beyond what is
specified here. The class contains the following:
• Default constructor – initializes all members to their appropriate default value
The class contains a public enum RETURN_CODE with two literals in the following order:
• NO_ERROR – indicating no error has occurred
• INVALID_STATE – indicating an operation cannot occur given the union’s current state
Each IDL union member maps to public mutator and accessor methods that have the same name
as the union member. For a member of type T, where T is mapped from the IDL union member’s
type as specified elsewhere:
• The first mutator returns void and has a single parameter whose type is T for basic types
and enumerations and const T& for all other types
• The accessor is const, returns void, and has two parameters of type T& and of type
RETURN_CODE&
Calling the mutator sets the value of the union member, possibly releasing storage associated with
the member’s old value, and sets the discriminator to the appropriate value. If multiple cases exist
for the same member, the discriminator is set to the value of the first case listed for that member.
Calling the accessor sets its parameter to the member’s value and returns NO_ERROR if the
discriminator is set appropriately; otherwise, the parameter is not modified and
INVALID_STATE is returned.
The IDL union discriminator maps to a public accessor method. For a discriminator of type T,
where T is mapped from the IDL discriminator’s type as specified elsewhere:
• The accessor is const, takes no parameters, and returns T
The discriminator accessor returns the current value of the discriminator. The value returned from
the accessor immediately after the class is constructed depends on the union’s default case:
• Default case explicitly defined – return explicit default case
• No default case defined – return first case
Note: C++ unions are not used in this mapping, because C++ unions cannot contain certain
types as members – specifically, those types mapped to from IDL strings, sequences,
and fixed types.
Union Example
// IDL
enum CASES { FOO, BAR, BAZ };
class FooUnion {
public:
enum RETURN_CODE {
NO_ERROR,
INVALID_STATE
};
FooUnion();
FooUnion(const FooUnion&);
FooUnion& operator=(const FooUnion&);
~FooUnion();
void a(FACE::Short);
void a(FACE::Short&, RETURN_CODE&);
void b(FACE::Long);
void b(FACE::Long &, RETURN_CODE&);
// implementation-specific members
};
[Link] Arrays
An array in IDL maps to a typedef C-style array of the same name and dimension. The array type’s
mapping is specified in the IDL type’s relevant section.
Array Example
// IDL
typedef short Foo[10];
// C++
typedef FACE::Short Foo[10];
[Link] Interfaces
[Link].1 Declaration
An IDL interface definition is mapped to an abstract class with the same name in C++. The class
has a protected default constructor with empty inline definition, a private copy constructor with
no definition, a private assignment operator with no definition, and a public pure virtual destructor
with empty inline definition. An interface may also be declared with a forward declaration, in
which case it maps to a forward declaration of a class in C++.
// C++
class Bar;
class Foo {
protected:
Foo() {}
private:
Foo(const Foo&);
Foo& operator=(const Foo&);
public:
virtual ~Foo() {};= 0;
};
class Bar {
protected:
Bar() {}
private:
Bar(const Bar&);
Bar& operator=(const Bar&);
public:
virtual ~Bar() {};= 0;
};
[Link].2 Operations
An interface operation in IDL maps to a public pure virtual member function declaration with the
same name in C++. The member function’s parameters map from the IDL parameters in the same
order, each with the same name as its corresponding IDL parameter and with a type mapped from
its corresponding IDL parameter as specified elsewhere. The return type of the C++ member
function is always void. If the IDL operation has a non-void return type, then the C++ member
function maps as if the IDL operation had an additional “out” parameter named retval whose type
is the non-void return type.
// C++
class Foo {
protected:
Foo() {}
private:
Foo(const Foo&);
Foo& operator=(const Foo&);
public:
virtual ~Foo() {};
virtual void go() = 0;
virtual void stop(FACE::Short x, FACE::Long& retval) = 0;
};
The following outlines the ownership and memory management responsibilities of parameter
passing based on an IDL parameter’s directionality:
• IDL in parameters – the caller is responsible for providing all storage (either dynamically
or statically allocated)
• IDL out parameters – the caller is responsible for providing storage (either dynamically or
statically allocated) for the top-level type
For strings and sequences (whether as parameters themselves or as a component of a
compound type), the callee is permitted to re-size or re-allocate the contained buffer,
provided the instance of the object in question is managed. As a consequence of this, the
caller may choose to simply initialize a string or sequence and rely on the callee to
allocate storage for that object.
• IDL inout parameters – the caller is responsible for providing storage (either dynamically
or statically allocated) for the top-level type
For strings and sequences (whether as parameters themselves or as a component of a
compound type), the callee is permitted to re-size or re-allocate the contained buffer,
provided the instance of the object in question is managed. As a consequence of this, the
caller may choose to simply initialize a string or sequence and rely on the callee to
allocate storage for that object.
[Link].3 Attributes
Attributes in an IDL interface map to mutator and accessor methods. The methods are public, pure
virtual, and have the same name as their respective IDL attribute. For an attribute of type T, where
T is mapped from the IDL attribute’s type as specified elsewhere:
• The first mutator returns void and has a single parameter whose type is T for basic types
and const T& for all other types
• The second mutator returns T& and takes no parameters
• The accessor is const, takes no parameters, and returns T for basic types and const T& for
all other types
// C++
class Foo {
protected:
[Link].4 Declarations
Types declared in an IDL interface map public typedef declarations in the scope of the class the
interface maps to. The typedef maps to C++ according to Section [Link].
// C++
class Foo {
protected:
Foo() {}
private:
Foo(const Foo&);
Foo& operator=(const Foo&);
public:
typedef FACE::Char MyChar;
virtual ~Foo() {};
};
[Link].5 Inheritance
A derived interface maps to a C++ class that inherits (publicly) from its base interfaces’ classes.
// C++
class Base { /* (contents as specified elsewhere) */ };
class Foo : public Base { /* (contents as specified elsewhere */ };
In the case of multiple inheritance, base interfaces are considered in the order they are specified,
using depth-first traversal if multiple levels of inheritance exist. (Interface derivation order is
semantically insignificant in IDL, but it is significant when mapping to C++, because it dictates
construction and cleanup ordering.)
// C++
class A { /* (contents as specified elsewhere) */ };
class B : public A { /* (contents as specified elsewhere) */ };
class C : public A { /* (contents as specified elsewhere) */ };
class D : public B,C { /* (contents as specified elsewhere) */ };
class E : public C,B { /* (contents as specified elsewhere) */ };
[Link].6 Implementation
There is no general mapping for a native type. Each native type declaration is accompanied by a
mapping to C++ which covers all instances in which the native type might be used, including but
not limited to type definitions and operation parameters (in, inout, out).
This section may be modified in subsequent releases. Prior to implementing, please ensure you
are using the latest revision of FACE Technical Standard, Edition 3.x, and you have checked to
see if any minor releases, corrigenda, or approved corrections have been published.
This language mapping does not support IDL in which a parent module depends on a child module
or two sibling modules are co-dependent.
[Link] Names
[Link].1 Identifiers
An identifier in IDL maps to the same identifier in Ada, with the following exceptions (applied in
order):
• Leading underscores are prepended with “U”
• Identifiers ending in an underscore are appended with “U”
• Multiple consecutive underscores are all replaced with “U”, except the first one
• Identifiers that conflict with a reserved Ada keyword are prepended with “FACE_”
Any language in the remainder of this section indicating that an Ada construct has the “same
name” as its IDL counterpart takes into account these exceptions.
Table 15: Identifier Mapping Example
_T U_T
T_ T_U
T___T T_UUT
package FACE_package
Using leading, trailing, or consecutive underscores in an IDL identifier may cause a conflict when
mapping to Ada. An IDL compiler emits an error if such a conflict occurs.
There is no associative mapping of an IDL source file into an Ada source file. Each Ada package
created by the IDL to Ada mapping rules defined throughout Section 4.14.9 is subject to the
following file naming convention:
• Each Ada package specification is to be contained within a single file
The name of that file is determined by the name of the package which the file contains.
The name is formed by taking the fully qualified name of the package and replacing the
separating dots with hyphens and using lowercase for all letters.
• An exception arises if the file name generated by the above rules starts with one of the
characters a, g, i, or s, and the second character is a hyphen
In this case, the character tilde (~) is used in place of the hyphen. The reason for this
special rule is to avoid clashes with the standard names for child units of the system
packages commonly provided with the compiler.
• The file extension for all Ada specification files created by the IDL mapping is “.ads”
Note: A subdirectory tree for an input IDL source file and output Ada specification file(s) is
relative to a base directory that is not specified. The base directory for the source IDL
file may be different from the base directory for the output Ada specification file(s).
[Link] Modules
A module declared in a global scope maps to a library package; a nested module (one declared
inside another module) maps to a child package of the package mapped from its enclosing module.
Similarly, an interface declared in a module maps to a child package of the package mapped from
its enclosing module (see Section [Link]).
is mapped either directly according to Section [Link] or indirectly to a sequence of n Ada subtype
declarations:
subtype T1 is <old-type>;
subtype T2 is T1;
subtype Tn-1 is Tn-2;
subtype <new-type> is Tn-1;
The last subtype declaration in the sequence appears in the package mapped by the module; the
other subtype declarations appear in auxiliary packages that the IDL-to-Ada compiler may
construct.
The subtypes <old-type>, T1, … Tn-1, and <new-type> are said to be equivalent since the effect of
the application program is independent of which one is referenced.
where <package_name> is the “with’d” Ada package that declares the base <enum_type>.
In this case each enumeration literal is mapped to a corresponding parameterless Ada function in
the “with’ing” package:
function <enumerator> return <package_name>.<enum_type>
renames <package_name>.<enumerator>;
The last declaration in the sequence appears in the package mapped by the module; the other
declarations appear in auxiliary packages that the IDL-to-Ada compiler may construct. The
expression <ada_const_expr> and the constants C1, C2, … <new-constant> are said to be
equivalent since they all evaluate to the same result. In the mapping of <const_expr> to
<ada_const_expr> each name is mapped to the same name or an equivalent name.
Notes
A nested module can refer to entities declared earlier in its enclosing scope, and entities declared
in a nested module may be referenced by subsequent declarations in the enclosing scope. The
effect of these declarations must be preserved in the parent package and child package to which
the modules map. The implementation can generate an auxiliary package structure (not visible to
application code), coupled with indirect mappings to declarations in these packages, to achieve
this effect.
Modules may have mutual interdependencies induced by reopenings. Each such module needs to
map to an Ada package; the declarations in the module are mapped to declarations in the package.
The Ada packages do not have to reflect the same interdependencies as the original modules (and
when modules are mutually interdependent their relationships cannot be preserved). As above, the
implementation can generate an auxiliary package structure, coupled with indirect mappings, to
achieve a correct effect.
module B {
typedef [Link] Bar;
};
—- Ada
with FACE;
package A is
with A;
package B is
subtype Bar is [Link];
end B;
with B1;
package B is
subtype Bar is [Link];
end B;
The names of the auxiliary packages are not defined by this Technical Standard and are transparent
to FACE application code.
[Link] Typedefs
An IDL typedef creates an alias for a type; it maps to an Ada subtype whose name is the same as
the IDL alias and whose type is specified in the IDL type’s relevant section below. Multiple
declarators in IDL are logically equivalent to multiple IDL typedefs.
Typedef Example 1
// IDL
module A {
typedef long Foo, Bar;
typedef Foo Baz;
};
-- Ada
package A is
subtype Foo is [Link];
subtype Bar is [Link];
subtype Baz is Foo;
end A;
Structures, unions, and enumerations can be declared within a typedef in IDL, which is logically
equivalent to a type declaration immediately followed by a typedef.
Typedef Example 2
// IDL
typedef struct Foo_struct { long x; } Foo;
[Link] Constants
A constant in IDL maps to a constant of the same name in Ada. The type of the Ada constant is
mapped as specified elsewhere. The value of the Ada constant is mapped from the IDL constant
expression as specified in Section 4.14.4.
If the IDL expression is an enumeration literal, the Ada constant’s value is the appropriate
enumeration literal in Ada.
Constants Example
// IDL
module A {
typedef long MyLong;
enum Color {RED, GREEN, BLUE};
const long FooLong = 1 + 65535;
const boolean FooBool = TRUE;
const MyLong FooMyLong = FooLong;
const Color clr = RED;
};
-- Ada
package A is
subtype MyLong is [Link];
type Color is (RED, GREEN, BLUE);
IDL Basic Types map to Ada (sub)types according to Table 18, for which implementations provide
the given definitions.
Table 18: IDL Basic Type Ada Mapping
IDL Subtype/
Basic Type Ada Type Derived Ada Base Type
[Link].2 Sequences
The first use of a bounded sequence in a scope maps to an instantiation (in the same scope) of the
generic [Link] package named “FACE_Bounded_Sequence_<type>”, where
<type> is the name of the sequence’s element type. The actual for the formal parameter “Element”
is mapped from the sequence’s type as specified elsewhere. All references to the bounded
sequence within the same scope map to the “Sequence” type defined in this instantiation.
When constructing a sequence package instantiation’s name, if the IDL sequence’s element type
is a basic type, <type> is the IDL typename; otherwise, <type> is the typename as mapped to Ada.
Full specification for these packages is in Section K.3.1.1, Section K.3.1.2, and Section K.3.1.3.
Sequence Example
// IDL
module A {
typedef sequence< short, 8> Foo;
typedef sequence< Foo > Bar;
};
-- Ada
with [Link];
with [Link];
package A is
[Link].3 Strings
An IDL unbounded string maps to Ada as if it were an IDL unbounded sequence of characters.
An IDL bounded string maps to Ada as if it were an IDL bounded sequence of characters with the
same bound.
String Example
// IDL
module A {
typedef string Foo;
};
[Link].4 Fixed
The first use of an IDL fixed type in a scope maps to a definition (in the same scope) of a decimal
fixed-point type named Fixed_<digits>_<scale>, where <digits> and <scale> are the digits and
scale of the fixed type as specified in IDL. The decimal fixed-point type definition has the same
number of digits as the IDL fixed type, and a delta value equal to 10-<scale>. All references to the
fixed type within the same scope map to subtypes of this type definition.
Fixed Example
// IDL
module A {
typedef fixed<5,2> Foo;
};
-- Ada
package A is
type Fixed_5_2 is delta 0.01 digits 5;
subtype Foo is Fixed_5_2;
end A;
[Link].1 Structures
An IDL structured type maps to an Ada record. Each structured type member maps to a record
component with the same name, in the same order. The type of each component is mapped as
specified elsewhere.
-- Ada
package A is
type Foo is record
X : [Link];
Y : [Link];
end record;
end A;
[Link].2 Unions
An IDL union maps to an Ada discriminated (variant) record with the same name. The record’s
discriminant is named “Switch”, its type is mapped from the IDL union’s discriminator type as
specified elsewhere, and its default value is the first value of its type. Each union member maps
to a variant in the discriminated record, as specified in Section [Link].1. The discrete choice list
for each variant is mapped from the constant expression(s) of the corresponding IDL case label,
as specified in Section 4.14.4, with expressions “or”ed together if a member has multiple case
labels. The discrete choice for the “default” case is “others”. If there is no “default” case in the
IDL, the Ada variant record declaration includes a default choice “others => null”.
Union Example 1
// IDL
module A {
enum Direction {UP, LEFT, RIGHT, DOWN};
union UnionExample switch (Direction) {
case UP: long myUp;
case LEFT:
case RIGHT: short myWay;
default: boolean myDefault;
};
};
-- Ada
package A is
type Direction is (UP, LEFT, RIGHT, DOWN);
type UnionExample (Switch : [Link] := [Link]'First) is record
case Switch is
when UP =>
myUp : [Link];
when LEFT | RIGHT =>
myWay : [Link];
when others =>
myDefault : [Link];
end case;
end record;
end A;
Union Example 2
// IDL (No default specified)
module B {
enum Direction {UP, LEFT, RIGHT, DOWN};
union UnionExample switch (Direction) {
case UP: long myUp;
case LEFT: short otherWay;
case RIGHT: short myWay;
-- Ada
package B is
type Direction is (UP, LEFT, RIGHT, DOWN);
type UnionExample (Switch : Direction := Direction'First) is record
case Switch is
when UP =>
myUp : [Link];
when LEFT =>
otherWay : [Link];
when RIGHT =>
myWay : [Link];
when others =>
null;
end case;
end record;
end B;
[Link].3 Enumerations
An IDL enumeration maps to an Ada enumerated type with the same name and with literals
specified with the same name and in the same order as in IDL.
Enumeration Example
// IDL
module A {
enum Color {RED, GREEN, BLUE};
};
-- Ada
package A is
type Color is (RED, GREEN, BLUE);
end A;
[Link] Arrays
The first use of an IDL array in a scope maps to a definition (in the same scope) of an array type.
The type’s name is Array_<dimensionality>_<type> where <type> is the name of the sequence’s
type, and <dimensionality> is the underscore-separated sequence of dimensions as specified in
IDL. The array’s element type is mapped as specified elsewhere; each of its dimensions is over
the range from 0 to 1 less than its corresponding dimension in IDL. All references to the array
within the same scope map to subtypes of this type definition.
When constructing the array type definition’s name, if the IDL array’s element type is a basic type,
<type> is the IDL typename; otherwise, <type> is the typename as mapped to Ada.
Array Example
// IDL
module A {
typedef short Foo[10];
typedef short Bar[4][5];
};
-- Ada
package A is
[Link] Interfaces
[Link].1 Declaration
An IDL interface maps to a package in Ada (an “interface package”) with the same name. If the
IDL interface is declared inside a module, the interface package is a child package of the package
mapped from the module; otherwise the interface package is a root library package.
The interface package contains either an abstract tagged null record type (Ada 95) or an interface
type (Ada 2012) named Interface_T (the “interface type”) and a class-wide general access type for
Interface_T named Interface_T_Ptr. Any reference to the interface (e.g., as an operation parameter
or structure member) maps to this type Interface_T (or Interface_T'Class in some cases).
-- Ada 95
package Foo is
type Interface_T is abstract tagged null record;
type Interface_T_Ptr is access all Interface_T'Class;
end Foo;
-- Ada 2012
package Foo is
type Interface_T is interface;
type Interface_T_Ptr is access all Interface T'Class;
end Foo;
An IDL interface declared with a forward declaration maps to a package with the same name,
appended with “_Forward”. The package contains either an abstract tagged null record type (Ada
95) or an interface type (Ada 2012) named Interface_T (the “interface forward type”). Any
reference to the forward declared interface before its full declaration maps to this type Interface_T
(or Interface_T'Class in some cases).
If an interface is forward declared, the interface package for the full declaration also contains a
nested package named “Convert” for converting between the interface type and the interface
forward type. This package contains two abstract functions – the first is named From_Forward,
takes a single in parameter of the interface forward type named “Forward”, and returns the
interface type; the second is named To_Forward, takes a single in parameter of the interface type
named “Full”, and returns the interface forward type.
-- Ada 95
package Foo_Forward is
package Foo is
type Interface_T is abstract tagged null record;
type Interface_T_Ptr is access all Interface_T'Class;
package Convert is
function From_Forward (Forward : in Foo_Forward.Interface_T)
return Foo.Interface_T is abstract;
function Interface_To_Forward (Full : in Foo.Interface_T)
return Foo_Forward.Interface_T is abstract;
end Convert;
end Foo;
-- Ada 2012
package Foo_Forward is
type Interface_T is interface;
end Foo_Forward;
package Foo is
type Interface_T is interface;
type Interface_T_Ptr is access all Interface_T'Class;
package Convert is
function From_Forward (Forward : in Foo_Forward.Interface_T)
return Foo.Interface_T is abstract;
function Interface_To_Forward (Full : in Foo.Interface_T)
return Foo_Forward.Interface_T is abstract;
end Convert;
end Foo;
[Link].2 Operations
An interface operation in IDL maps to an abstract primitive subprogram of the interface type with
the same name as the operation. The first parameter of the subprogram is an access parameter
named “Self” of the interface type.
Each parameter in the operation maps to a parameter in the subprogram with the same name and
mode, in the same order, following the “Self” parameter.
If the operation has a non-void return type and only in parameters, it maps to an abstract function
whose return type is mapped from the operation’s return type. Otherwise, the operation maps to
an abstract procedure. If the operation has a non-void return type, but maps to an abstract
procedure, then the return type maps to an out parameter named “Returns” that follows all other
parameters.
Except for the “Self” parameter, the type of each subprogram parameter or return type is mapped
from the operation parameter’s type or return type, respectively, except when that type is the
interface itself, in which case it maps to the class of the interface type (i.e., Interface_T’Class).
(This prevents multiple controlling parameters, making it clear that the “Self” parameter controls
dispatching.)
-- Ada 2012
package Foo is
type Interface_T is interface;
type Interface_T_Ptr is access all Interface_T'Class;
procedure op1 (Self : access Interface_T) is abstract;
function op2 (Self : access Interface_T)
return [Link] is abstract;
procedure op3 (Self : access Interface_T;
A : out [Link];
Result : out [Link]) is abstract;
end Foo;
[Link].3 Attributes
Attributes in IDL logically map to an accessor operation, for both mutable and readonly attributes,
and a mutator operation for mutable attributes. The accessor operation is named Get_<attribute
name>, takes no parameters, and returns the same type as the attribute. The mutator operation is
named Set_<attribute name>, takes an in parameter with the same type and identifier as the
attribute, and returns void. These operations then map according to Section [Link].2.
[Link].4 Inheritance
In the IDL mapping to Ada 95, the interface type of a derived interface is derived from the interface
type of the first listed base interface. (The operations and attributes of that base interface are then
inherited through tagged type inheritance.) The operations and attributes of all other direct and
indirect base interfaces map explicitly to primitive subprograms of the derived interface’s interface
type.
In the IDL mapping to Ada 2012, the interface type of a derived interface is derived from each of
the base interfaces listed in the interface_inheritance_spec. The operations and attributes of the
direct and indirect base interfaces are then inherited through interface inheritance and are
-- Ada 95
-- mapping for Base1 and Base2 as specified elsewhere
package Foo is
type Interface_T is abstract new Base1.Interface_T with null record;
type Interface_T_Ptr is access all Interface_T'Class;
procedure slow(Self : access Interface_T) is abstract;
procedure go(Self : access Interface_T) is abstract;
end Foo;
-- Ada 2012
-- mapping for Base1 and Base2 as specified elsewhere
package Foo is
type Interface_T is new Base1.Interface_T and Base2.Interface_T;
type Interface_T_Ptr is access all Interface_T'Class;
-- stop, slow inherited
procedure go(Self : access Interface_T) is abstract;
end Foo;
[Link].5 Implementation
};
There is no general mapping for a native type. Each native type declaration is accompanied by a
mapping to Ada which covers all instances in which the native type might be used, including but
not limited to type definitions and operation parameters (in, inout, out).
This section may be modified in subsequent releases. Prior to implementing, please ensure you
are using the latest revision of FACE Technical Standard, Edition 3.x, and you have checked to
see if any minor releases, corrigenda, or approved corrections have been published.
Module Package
Interface Interface
Exception No mapping
[Link] Names
Names in IDL generally obey Java naming conventions, with exceptions described below. Unless
otherwise excepted below, unscoped names in IDL appear in the generated source code character-
for-character.
In addition, cases exist where a name that is legal in IDL may conflict with the corresponding Java
source. When this occurs, the name for that symbol is constructed by prefixing it with “FACE_”.
The following is a list of potential naming conflicts:
• Keywords in the Java language (e.g., abstract, boolean, if, etc.)
• Java literals (e.g., true, false, null)
• IDL declarations that collide with methods on [Link] (e.g., clone, equals,
hashCode, etc.)
• IDL declarations that collide with class, interface, and method names as defined by this
section
Any language in the remainder of this section indicating that a Java construct has the “same name”
as its IDL counterpart takes this conflict resolution into account.
There is no associative mapping of an IDL source file into a Java source file. Each Java package
and public class created by the IDL to Java mapping rules defined throughout Section 4.14.10 is
subject to the following file naming conventions:
Note: A subdirectory tree for an input IDL source file and output Java source file(s) is relative
to a base directory that is not specified. The base directory for the source IDL file may
be different from the base directory for the output Java source file(s).
[Link] Modules
Modules map to Java packages with the same name, lower-cased. Scope resolution operators, used
when resolving definitions from other modules, map to the same package in Java and are replaced
by a Java scope resolution operator.
Modules Example
// IDL
module A {
module B {
struct Foo{ long i;};
};
};
// Java
package a.b;
public interface Foo {
int geti();
void seti(int i);
}
[Link] Typedefs
An IDL typedef does not have an equivalent in Java. An IDL typedef aliases a type. When a
typedef alias is used, it is equivalent to using the original type.
[Link] Constants
Constants map differently depending on scope. In all cases, the value of the Java constant is
mapped from the IDL constant expression as specified in Section 4.14.4, and its type is mapped
as specified elsewhere. If a constant appears within an interface, the IDL constant is mapped to a
final qualified member of the same name in the resulting Java interface.
Constant Example 1
// IDL
module Example {
interface FooInterface {
const long aFooConstant = 32;
};
};
// Java
package Example;
public interface FooInterface{
final int aFooConstant = 32;
}
If a constant is declared outside of an interface scope, it maps to a Java interface with the same
name as the constant with a final qualified member named “value” for assigning the constant’s
value.
Constants Example 2
// IDL
module Example {
const long aBarConstant = -42;
};
// Java
package Example;
public interface aBarConstant {
final int value = -42;
}
Table 20 shows the mapping of IDL basic types to Java. Care should be taken when using unsigned
types in the IDL as Java does not support usage of unsigned types.
short short
long int
float float
double double
char char
octet byte
boolean boolean
[Link].2 Sequences
An IDL sequence maps to a [Link] for both bounded and unbounded cases. Bounds are
enforced by the implementation of a method that uses the type, as specified in Section
[Link].5.
All values specifying the length of a sequence get removed when the IDL maps to Java. If the
value of the sequence length is desired to be represented in the Java representation, then the value
is represented as a constant value in IDL.
Sequence Example
// IDL
struct Foo_struct{ long i;};
typedef Foo_struct AnotherFoo_struct;
struct Bar_struct {
long myLong;
sequence<Foo_struct, 32> myFoo;
sequence<AnotherFoo_struct> myAnotherFoo;
};
// Java
public interface Foo_struct {
int geti();
void seti(int i);
}
[Link]<Foo_struct> getmyFoo();
void setmyFoo([Link]<Foo_struct> myFoo);
[Link]<Foo_struct> getmyAnotherFoo();
void setmyAnotherFoo([Link]<Foo_struct> myAnotherFoo);
}
[Link].3 Strings
IDL strings map to a Java String for both bounded and unbounded cases. Bounds are enforced by
the implementation of a method that uses the type, as specified in Section [Link].5.
Any values restricting the length of an IDL string are removed when mapping to Java. If a value
restricting the length of a string is desired to be represented in the Java representation, then the
value should be represented as a constant value in IDL.
[Link].4 Fixed
Any value restrictions are removed when IDL maps to Java and no limiting of the fixed type is
done in Java. If a value restricting the IDL fixed type is desired to be represented in the Java
representation, then the value should be represented as a constant value in IDL.
An IDL struct maps to a Java interface with the same name that contains mutator and accessor
methods for each IDL member. The accessor method for an IDL member is named “get” followed
by the name of the IDL member, takes no parameters, and has a return type mapped from the IDL
member’s type as specified elsewhere. The mutator method for an IDL member is named “set”
followed by the name of the IDL member, returns void, and has a single parameter whose name
is the same as the IDL member and whose type is mapped from the IDL member’s type as specified
elsewhere. An IDL struct defined in an IDL interface maps to a nested Java interface.
Structure Example
// IDL
typedef long long Foo;
typedef Foo AnotherFoo;
struct Foo_struct { AnotherFoo x; };
typedef Foo_struct AnotherFoo_struct;
struct Bar_struct {
Foo myFoo;
AnotherFoo myAnotherFoo;
AnotherFoo_struct myAFstruct;
};
// Java
public interface Foo_struct {
long getx();
void setx(long x);
}
long getmyAnotherFoo();
void setmyAnotherFoo(long myAnotherFoo);
Foo_struct getmyAFStruct();
void setmyAFStruct(Foo_struct myAFStruct);
}
[Link].2 Unions
An IDL union is mapped to a Java interface with the same name that contains the following:
• An accessor method for the discriminator that is named “getDiscriminator”, takes no
parameters, and has a return type mapped from the IDL discriminator’s type as specified
elsewhere
• An accessor method for each member that is named “get” followed by the name of the
IDL member, takes no parameters, and has a return type mapped from the IDL member’s
type as specified elsewhere
• A mutator method for each member that is named “set” followed by the name of the IDL
member, returns void, and has a single parameter whose name is the same as the IDL
member and whose type is mapped from the IDL member’s type as specified elsewhere
If the IDL union has multiple cases for the same union member, then a mutator is also defined for
the discriminator. The mutator is named “setDiscriminator”, returns void, and has a single
parameter named “Discriminator” whose type is mapped from the IDL discriminator’s type as
specified elsewhere. The mutator may only change the discriminator to a different value for the
same union member; any other use results in UnsupportedOperationException being raised.
The value returned from the discriminator’s accessor immediately after the class is constructed
depends on the union’s default case:
• Default case explicitly defined – return explicit default case
• No default case defined – return first case
Calling a member mutator sets the value of the member and sets the discriminator to the
appropriate value. If multiple cases exist for the same member, the discriminator is set to the first
case listed for that member.
Calling a member accessor returns the member’s value if the discriminator is set appropriately;
any other use results in UnsupportedOperationException being raised.
If the IDL union is defined within an interface, then the resulting Java interface maps to a nested
Java interface.
Union Example
// IDL
enum Direction{up,down,left,right};
union UnionExample switch (Direction) {
case up: long myUp;
case left:
// Java
public enum Direction {
up, down, left, right
}
int getmyUp();
void setmyUp(int val);
short getmyWay();
void setmyWay(short val);
boolean getmyDefault();
void setmyDefault(boolean myDefault);
}
[Link].3 Enumerations
An IDL enum is mapped to a public enum with the same name in Java.
If the IDL enum is defined within an interface, then the resulting Java class resides in the
corresponding Java interface.
Enumeration Example
// IDL
module Example{
enum Direction{up, down, left, right};
};
// Java
package Example;
public enum Direction {
up, down, left, right
}
[Link] Arrays
An IDL array is mapped to a Java array. Bounds are enforced by the implementation of a method
that uses the type, as specified in Section [Link].5.
// Java
package example;
public interface X {
short[] getfoo();
void setfoo(short[] foo);
short[][] getbar();
void setbar(short[][] bar);
}
[Link] Interfaces
[Link].1 Declaration
An IDL interface definition maps to an interface with the same name in Java.
An IDL interface may also be declared with a forward declaration. This syntax does not map to
Java.
// Java
public interface Foo {}
[Link].2 Operations
An interface operation in IDL maps to a public member method declaration with the same name
in Java.
An operation parameter’s directionality in IDL affects the parameter’s type in Java. An IDL in
parameter of type T is passed as a T for all types. An IDL inout or out parameter of type T whose
corresponding Java type is mutable is passed as a T. An IDL inout or out parameter of type T
whose corresponding Java type is immutable is passed using the [Link] class
(specified in Section K.4.1) parameterized with the corresponding Java type. Primitive wrapper
classes are used to parameterize the Holder class when the corresponding Java type is a Java
primitive.
The object parameter passing mechanism in Java requires care on both the caller and callee to
abide by the expectation implied in IDL. The following outlines the ownership responsibilities of
object passing based on an IDL parameter’s directionality:
• IDL in parameters – Java objects passed as IDL in parameters are created and owned by
the caller
The callee does not modify or retain a reference to this object beyond the duration of the
call. Violation of these rules can result in unpredictable behavior.
• IDL out and return parameters – Java objects returned as IDL out parameters are created
and owned by the callee
// Java
public interface Foo{
void go (
/*in*/ int arg1,
/*inout*/ [Link]<Short> arg2
);
}
[Link].3 Attributes
Attributes in an IDL interface map to a pair of methods for each attribute: one mutator method and
one accessor method. The exceptional case is readonly attributes map only to an accessor method.
The methods have the same name as the attribute. Mutator methods have a void return type and
accept a parameter of the corresponding attribute type. Accessor methods take no parameters and
have a return type matching the attribute type.
// Java
public interface Foo{
int getx();
void setx(int x);
int gety();
}
[Link].4 Inheritance
An IDL derived interface maps to a Java interface that extends from the base interface. In the case
of multiple inheritance, the resulting Java interface extends multiple base interfaces.
[Link].5 Implementation
// Java
public interface Foo {
void go();
}
IDL definitions and accompanying documentation are used to specify language-agnostic structural
and behavioral requirements for interface operations. Some IDL requirements are implied by a
parameter’s type but cannot be enforced by the Java language. For example, an IDL unsigned
short maps to a Java short, which has a wider range of values than dictated by IDL. Because the
Java language does not enforce these requirements, interface implementations are responsible for
enforcing them at run-time.
There is no general mapping for a native type. Each native type declaration is accompanied by a
mapping to Java which covers all instances in which the native type might be used, including but
not limited to type definitions and operation parameters (in, inout, out).
Military and civilian airborne systems with security considerations are engineered to meet rigorous
security standards specified by the authorizing official and evaluation authority. The FACE
Technical Standard defines the Security Profile to support security-relevant UoCs. While the
Security Profile is targeted for UoCs that actively enforce or contribute to security requirements,
other OSS Profiles may work together with the Security Profile to provide protection against
specific threats and vulnerabilities. The FACE Reference Architecture allows for evaluation of
UoCs providing secure capabilities. The following sections provide basic security considerations
expected of a UoC.
5.1 Scope
Security in the context of the FACE Technical Standard:
• Recognizes that procuring agencies and their designated approval authorities define the
requirements for addressing systems security and processes to achieve Authority to
Operate
• Provides context for processes that capture best principles to be used in developing “high-
assurance” security software
• Specifies Security Profile API sets to facilitate security assessment
• Supports partitioning to address isolation of security functions
• Is agnostic to security processes (e.g., DIARMF, NIST RMF)
• Does not assert a UoC is automatically assessed to some evaluation assurance level
• Recognizes UoCs are a part of the platform security architecture and are evaluated with
the larger system
Requirements for Security Transformations are included in each applicable segment (Sections
[Link], 4.7.9, and [Link], and use of the TS Interface).
It is important to reiterate that the Security Profile is defined for all the FACE segments: OSS,
IOSS, PSSS, TSS, and the PCS. For each of the segments, the Security Profile limits the set of
APIs to those that are robust and necessary to develop security-related software components.
There are security engineering practices that are important but are outside the domain of the FACE
Technical Standard. The specific engineering practices and design constraints vary depending on
your platform security requirements but an overview of some accepted security design constraints,
Military and civilian airborne systems with safety considerations are engineered to meet rigorous
airworthiness standards specified by the respective airworthiness authorities. The FACE Technical
Standard defines Safety Profile to support UoCs with safety implications.
There are safety engineering practices that are important but are outside the domain of the FACE
Technical Standard. The specific engineering practices and design constraints vary depending on
your platform safety requirements but an overview of some accepted safety design constraints,
general guidance, and examples of safety considerations associated with implementing the FACE
Technical Standard are included in the FACE Reference Implementation Guide.
Table 21 also contains all the library functions defined in ANSI/ISO/IEC [Link]
Programming Languages – C. For POSIX operational environments, the C Library functions
applicable to each FACE Profile are as defined in Table 21Table 21. For ARINC 653 operational
environments, the C Library functions applicable to each FACE Profile are as defined in Section
A.8.
Explanation for POSIX Call Table Format for the OSS Profile Columns
Note: Blank items may be included in future editions of the FACE Technical Standard.
The Inter-UoC column includes a “YES” for those APIs whose Inter-UoC usages are restricted to
Transport Services and I/O Services.
Table 21: FACE OSS Profile APIs
General Purpose
Safety Extended
Safety Base
Inter-UoC
Security
optarg POSIX_C_LIB_EXT
opterr POSIX_C_LIB_EXT
optind POSIX_C_LIB_EXT
optopt POSIX_C_LIB_EXT
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
signgam XSI_C_LANG_SUPPORT
timezone XSI_C_LANG_SUPPORT
daylight XSI_C_LANG_SUPPORT
posix_fadvise() _POSIX_ADVISORY_INFO
posix_fallocate() _POSIX_ADVISORY_INFO
posix_memalign() _POSIX_ADVISORY_INFO
pthread_barrierattr_setpshared() POSIX_BARRIERS
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
msync() _POSIX_SYNCHRONIZED_IO
mlockall() _POSIX_MEMLOCK
munlockall() _POSIX_MEMLOCK
mlock() _POSIX_MEMLOCK_RANGE
munlock() _POSIX_MEMLOCK_RANGE
sched_getparam() MP MP _POSIX_PRIORITY_SCHEDULIN
G
sched_getscheduler() MP MP _POSIX_PRIORITY_SCHEDULIN
G
sched_setparam() MP MP _POSIX_PRIORITY_SCHEDULIN
G
sched_setscheduler() MP MP _POSIX_PRIORITY_SCHEDULIN
G
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
posix_madvise() _POSIX_ADVISORY_INFO
posix_spawn() MP MP _POSIX_SPAWN
posix_spawn_file_actions_init() MP _POSIX_SPAWN
posix_spawnattr_destroy() MP MP _POSIX_SPAWN
posix_spawnattr_getflags() MP MP _POSIX_SPAWN
posix_spawnattr_getpgroup() MP _POSIX_SPAWN
posix_spawnattr_getsigdefault() MP MP _POSIX_SPAWN
posix_spawnattr_getsigmask() MP MP _POSIX_SPAWN
posix_spawnattr_init() MP MP _POSIX_SPAWN
posix_spawnattr_setflags() MP MP _POSIX_SPAWN
posix_spawnattr_setpgroup() MP _POSIX_SPAWN
posix_spawnattr_setsigdefault() MP MP _POSIX_SPAWN
posix_spawnattr_setsigmask() MP MP _POSIX_SPAWN
posix_spawnp() MP _POSIX_SPAWN
pthread_spin_destroy() POSIX_SPIN_LOCKS
pthread_spin_init() POSIX_SPIN_LOCKS
pthread_spin_lock() _POSIX_SPIN_LOCKS
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
pthread_spin_trylock() _POSIX_SPIN_LOCKS
pthread_spin_unlock() _POSIX_SPIN_LOCKS
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
posix_trace_attr_destroy() _POSIX_TRACE
posix_trace_attr_getclockres() _POSIX_TRACE
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
posix_trace_attr_ _POSIX_TRACE
getmaxsystemeventsize()
posix_trace_attr_ _POSIX_TRACE
getmaxusereventsize()
posix_trace_attr_getname() _POSIX_TRACE
posix_trace_attr_init() _POSIX_TRACE
posix_trace_attr_setname() _POSIX_TRACE
posix_trace_attr_setstreamsize() _POSIX_TRACE
posix_trace_clear() _POSIX_TRACE
posix_trace_create() _POSIX_TRACE
posix_trace_event() _POSIX_TRACE
posix_trace_eventid_equal() _POSIX_TRACE
posix_trace_eventid_open() _POSIX_TRACE
posix_trace_eventtypelist_ _POSIX_TRACE
getnext_id()
posix_trace_get_attr() _POSIX_TRACE
posix_trace_get_status() _POSIX_TRACE
posix_trace_getnext_event() _POSIX_TRACE
posix_trace_shutdown() _POSIX_TRACE
posix_trace_start() _POSIX_TRACE
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
posix_trace_stop() _POSIX_TRACE
posix_trace_trygetnext_event() _POSIX_TRACE
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
posix_mem_offset() _POSIX_TYPED_MEMORY_
OBJECTS
posix_typed_mem_get_info() _POSIX_TYPED_MEMORY_
OBJECTS
posix_typed_mem_open() _POSIX_TYPED_MEMORY_
OBJECTS
crypt() _XOPEN_CRYPT
encrypt() _XOPEN_CRYPT
setkey() _XOPEN_CRYPT
fattach() _XOPEN_STREAMS
fdetach() _XOPEN_STREAMS
getmsg() _XOPEN_STREAMS
getpmsg() _XOPEN_STREAMS
ioctl() _XOPEN_STREAMS
isastream() _XOPEN_STREAMS
putmsg() _XOPEN_STREAMS
putpmsg() _XOPEN_STREAMS
posix_devctl() INCL INCL INCL INCL IEEE Std 1003.26, device control
getdate_err XSI_C_LANG_SUPPORT
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
ctime() POSIX_C_LANG_SUPPORT
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
asctime() POSIX_C_LANG_SUPPORT
btowc() POSIX_C_LANG_WIDE_CHAR
iswalnum() POSIX_C_LANG_WIDE_CHAR
iswalpha() POSIX_C_LANG_WIDE_CHAR
iswblank() POSIX_C_LANG_WIDE_CHAR
iswcntrl() POSIX_C_LANG_WIDE_CHAR
iswctype() POSIX_C_LANG_WIDE_CHAR
iswdigit() POSIX_C_LANG_WIDE_CHAR
iswgraph() POSIX_C_LANG_WIDE_CHAR
iswlower() POSIX_C_LANG_WIDE_CHAR
iswprint() POSIX_C_LANG_WIDE_CHAR
iswpunct() POSIX_C_LANG_WIDE_CHAR
iswspace() POSIX_C_LANG_WIDE_CHAR
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
iswupper() POSIX_C_LANG_WIDE_CHAR
iswxdigit() POSIX_C_LANG_WIDE_CHAR
mblen() POSIX_C_LANG_WIDE_CHAR
mbrlen() POSIX_C_LANG_WIDE_CHAR
mbrtowc() POSIX_C_LANG_WIDE_CHAR
mbsinit() POSIX_C_LANG_WIDE_CHAR
mbsrtowcs() POSIX_C_LANG_WIDE_CHAR
mbstowcs() POSIX_C_LANG_WIDE_CHAR
mbtowc() POSIX_C_LANG_WIDE_CHAR
swprintf() POSIX_C_LANG_WIDE_CHAR
swscanf() POSIX_C_LANG_WIDE_CHAR
towctrans() POSIX_C_LANG_WIDE_CHAR
towlower() POSIX_C_LANG_WIDE_CHAR
towupper() POSIX_C_LANG_WIDE_CHAR
vswprintf() POSIX_C_LANG_WIDE_CHAR
vswscanf() POSIX_C_LANG_WIDE_CHAR
wcrtomb() POSIX_C_LANG_WIDE_CHAR
wcscat() POSIX_C_LANG_WIDE_CHAR
wcschr() POSIX_C_LANG_WIDE_CHAR
wcscmp() POSIX_C_LANG_WIDE_CHAR
wcscoll() POSIX_C_LANG_WIDE_CHAR
wcscpy() POSIX_C_LANG_WIDE_CHAR
wcscspn() POSIX_C_LANG_WIDE_CHAR
wcsftime() POSIX_C_LANG_WIDE_CHAR
wcslen() POSIX_C_LANG_WIDE_CHAR
wcsncat() POSIX_C_LANG_WIDE_CHAR
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
wcsncmp() POSIX_C_LANG_WIDE_CHAR
wcsncpy() POSIX_C_LANG_WIDE_CHAR
wcspbrk() POSIX_C_LANG_WIDE_CHAR
wcsrchr() POSIX_C_LANG_WIDE_CHAR
wcsrtombs() POSIX_C_LANG_WIDE_CHAR
wcsspn() POSIX_C_LANG_WIDE_CHAR
wcsstr() POSIX_C_LANG_WIDE_CHAR
wcstod() POSIX_C_LANG_WIDE_CHAR
wcstof() POSIX_C_LANG_WIDE_CHAR
wcstoimax() POSIX_C_LANG_WIDE_CHAR
wcstok() POSIX_C_LANG_WIDE_CHAR
wcstol() POSIX_C_LANG_WIDE_CHAR
wcstold() POSIX_C_LANG_WIDE_CHAR
wcstoll() POSIX_C_LANG_WIDE_CHAR
wcstombs() POSIX_C_LANG_WIDE_CHAR
wcstoul() POSIX_C_LANG_WIDE_CHAR
wcstoull() POSIX_C_LANG_WIDE_CHAR
wcstoumax() POSIX_C_LANG_WIDE_CHAR
wcsxfrm() POSIX_C_LANG_WIDE_CHAR
wctob() POSIX_C_LANG_WIDE_CHAR
wctomb() POSIX_C_LANG_WIDE_CHAR
wctrans() POSIX_C_LANG_WIDE_CHAR
wctype() POSIX_C_LANG_WIDE_CHAR
wmemchr() POSIX_C_LANG_WIDE_CHAR
wmemcmp() POSIX_C_LANG_WIDE_CHAR
wmemcpy() POSIX_C_LANG_WIDE_CHAR
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
wmemmove() POSIX_C_LANG_WIDE_CHAR
wmemset() POSIX_C_LANG_WIDE_CHAR
gets() POSIX_DEVICE_IO
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
setbuf() POSIX_DEVICE_IO
cfgetispeed() POSIX_DEVICE_SPECIFIC
cfgetospeed() POSIX_DEVICE_SPECIFIC
cfsetispeed() POSIX_DEVICE_SPECIFIC
cfsetospeed() POSIX_DEVICE_SPECIFIC
ctermid() POSIX_DEVICE_SPECIFIC
isatty() POSIX_DEVICE_SPECIFIC
tcdrain() POSIX_DEVICE_SPECIFIC
tcflow() POSIX_DEVICE_SPECIFIC
tcflush() POSIX_DEVICE_SPECIFIC
tcgetattr() POSIX_DEVICE_SPECIFIC
tcsendbreak() POSIX_DEVICE_SPECIFIC
tcsetattr() POSIX_DEVICE_SPECIFIC
ttyname() POSIX_DEVICE_SPECIFIC
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
ttyname_r() POSIX_DEVICE_SPECIFIC_R
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
fchdir() POSIX_FILE_SYSTEM
fstatvfs() POSIX_FILE_SYSTEM
mkstemp() POSIX_FILE_SYSTEM
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
statvfs() POSIX_FILE_SYSTEM
S_ISBLK() POSIX_FILE_SYSTEM
S_ISCHR() POSIX_FILE_SYSTEM
S_ISLNK() POSIX_FILE_SYSTEM
S_ISSOCK() POSIX_FILE_SYSTEM
S_TYPEISMQ() POSIX_FILE_SYSTEM
S_TYPEISSEM() POSIX_FILE_SYSTEM
S_TYPEISSHM() POSIX_FILE_SYSTEM
S_TYPEISTMO() POSIX_FILE_SYSTEM
tmpnam() POSIX_FILE_SYSTEM
truncate() POSIX_FILE_SYSTEM
utime() POSIX_FILE_SYSTEM
utimes()
glob() POSIX_FILE_SYSTEM_GLOB
globfree() POSIX_FILE_SYSTEM_GLOB
setpgid() POSIX_JOB_CONTROL
tcgetpgrp() POSIX_JOB_CONTROL
tcsetpgrp() POSIX_JOB_CONTROL
_Exit() MP MP POSIX_MULTI_PROCESS
_exit() MP MP POSIX_MULTI_PROCESS
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
assert() MP POSIX_MULTI_PROCESS
atexit() MP MP POSIX_MULTI_PROCESS
clock() MP MP POSIX_MULTI_PROCESS
execl() MP MP POSIX_MULTI_PROCESS
execle() MP MP POSIX_MULTI_PROCESS
execlp() POSIX_MULTI_PROCESS
execv() MP MP POSIX_MULTI_PROCESS
execve() MP MP POSIX_MULTI_PROCESS
execvp() POSIX_MULTI_PROCESS
exit() MP MP POSIX_MULTI_PROCESS
fork() MP MP POSIX_MULTI_PROCESS
getpgid() POSIX_MULTI_PROCESS
getpgrp() POSIX_MULTI_PROCESS
getpid() MP MP POSIX_MULTI_PROCESS
getppid() MP MP POSIX_MULTI_PROCESS
getsid() POSIX_MULTI_PROCESS
setsid() P POSIX_MULTI_PROCESS
sleep() MP MP POSIX_MULTI_PROCESS
times() MP MP POSIX_MULTI_PROCESS
wait() MP POSIX_MULTI_PROCESS
waitid() POSIX_MULTI_PROCESS
waitpid() MP MP POSIX_MULTI_PROCESS
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
pipe() MP MP POSIX_PIPE
regerror() POSIX_REGEXP
regexec() POSIX_REGEXP
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
regfree() POSIX_REGEXP
pclose() POSIX_SHELL_FUNC
popen() POSIX_SHELL_FUNC
system() POSIX_SHELL_FUNC
wordexp() POSIX_SHELL_FUNC
wordfree() POSIX_SHELL_FUNC
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
fnmatch() POSIX_C_LIB_EXT
getopt() POSIX_C_LIB_EXT
readlink() POSIX_SYMBOLIC_LINKS
symlink() POSIX_SYMBOLIC_LINKS
getgrgid() POSIX_SYSTEM_DATABASE
getgrnam() POSIX_SYSTEM_DATABASE
getpwnam() POSIX_SYSTEM_DATABASE
getpwuid() POSIX_SYSTEM_DATABASE
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
getgrgid_r() POSIX_SYSTEM_DATABASE_R
getgrnam_r() POSIX_SYSTEM_DATABASE_R
getpwnam_r() POSIX_SYSTEM_DATABASE_R
getpwuid_r() POSIX_SYSTEM_DATABASE_R
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
getlogin() POSIX_USER_GROUPS
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
fgetwc() POSIX_WIDE_CHAR_
DEVICE_IO
fgetws() POSIX_WIDE_CHAR_
DEVICE_IO
fputwc() POSIX_WIDE_CHAR_
DEVICE_IO
fputws() POSIX_WIDE_CHAR_
DEVICE_IO
fwide() POSIX_WIDE_CHAR_
DEVICE_IO
fwprintf() POSIX_WIDE_CHAR_
DEVICE_IO
fwscanf() POSIX_WIDE_CHAR_
DEVICE_IO
getwc() POSIX_WIDE_CHAR_
DEVICE_IO
getwchar() POSIX_WIDE_CHAR_
DEVICE_IO
putwc() POSIX_WIDE_CHAR_
DEVICE_IO
putwchar() POSIX_WIDE_CHAR_
DEVICE_IO
ungetwc() POSIX_WIDE_CHAR_
DEVICE_IO
vfwprintf() POSIX_WIDE_CHAR_
DEVICE_IO
vfwscanf() POSIX_WIDE_CHAR_
DEVICE_IO
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
vwprintf() POSIX_WIDE_CHAR_
DEVICE_IO
vwscanf() POSIX_WIDE_CHAR_
DEVICE_IO
wprintf() POSIX_WIDE_CHAR_
DEVICE_IO
wscanf() POSIX_WIDE_CHAR_
DEVICE_IO
_tolower() XSI_C_LANG_SUPPORT
_toupper() XSI_C_LANG_SUPPORT
a64l() XSI_C_LANG_SUPPORT
drand48() XSI_C_LANG_SUPPORT
erand48() XSI_C_LANG_SUPPORT
ffs() XSI_C_LANG_SUPPORT
getdate() XSI_C_LANG_SUPPORT
getsubopt() POSIX_C_LIB_EXT
hcreate() XSI_C_LANG_SUPPORT
hdestroy() XSI_C_LANG_SUPPORT
hsearch() XSI_C_LANG_SUPPORT
iconv() POSIX_I18N
iconv_close() POSIX_I18N
iconv_open() POSIX_I18N
initstate() XSI_C_LANG_SUPPORT
insque() XSI_C_LANG_SUPPORT
isascii() XSI_C_LANG_SUPPORT
jrand48() XSI_C_LANG_SUPPORT
l64a() XSI_C_LANG_SUPPORT
lcong48() XSI_C_LANG_SUPPORT
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
lfind() XSI_C_LANG_SUPPORT
lrand48() XSI_C_LANG_SUPPORT
lsearch() XSI_C_LANG_SUPPORT
memccpy() XSI_C_LANG_SUPPORT
mrand48() XSI_C_LANG_SUPPORT
nrand48() XSI_C_LANG_SUPPORT
random() XSI_C_LANG_SUPPORT
remque() XSI_C_LANG_SUPPORT
seed48() XSI_C_LANG_SUPPORT
setstate() XSI_C_LANG_SUPPORT
srand48() XSI_C_LANG_SUPPORT
srandom() XSI_C_LANG_SUPPORT
strcasecmp() POSIX_C_LIB_EXT
strdup() POSIX_C_LIB_EXT
strfmon() POSIX_C_LIB_EXT
strncasecmp() POSIX_C_LIB_EXT
strptime() XSI_C_LANG_SUPPORT
swab() XSI_C_LANG_SUPPORT
tdelete() XSI_C_LANG_SUPPORT
tfind() XSI_C_LANG_SUPPORT
toascii() XSI_C_LANG_SUPPORT
tsearch() XSI_C_LANG_SUPPORT
twalk() XSI_C_LANG_SUPPORT
dbm_clearerr() XSI_DBM
dbm_close() XSI_DBM
dbm_delete() XSI_DBM
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
dbm_error() XSI_DBM
dbm_fetch() XSI_DBM
dbm_firstkey() XSI_DBM
dbm_nextkey() XSI_DBM
dbm_open() XSI_DBM
dbm_store() XSI_DBM
fmtmsg() XSI_DEVICE_IO
poll() POSIX_DEVICE_IO
pread() POSIX_DEVICE_IO
pwrite() POSIX_DEVICE_IO
readv() XSI_DEVICE_IO
writev() XSI_DEVICE_IO
grantpt() XSI_DEVICE_SPECIFIC
posix_openpt() XSI_DEVICE_SPECIFIC
ptsname() XSI_DEVICE_SPECIFIC
unlockpt() XSI_DEVICE_SPECIFIC
dlclose() POSIX_DYNAMIC_LINKING
dlerror() POSIX_DYNAMIC_LINKING
dlopen() POSIX_DYNAMIC_LINKING
dlsym() POSIX_DYNAMIC_LINKING
basename() XSI_FILE_SYSTEM
dirname() XSI_FILE_SYSTEM
ftw() XSI_FILE_SYSTEM
lchown() POSIX_SYMBOLIC_LINKS
lockf() XSI_FILE_SYSTEM
mknod() XSI_FILE_SYSTEM
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
nftw() XSI_FILE_SYSTEM
realpath() XSI_FILE_SYSTEM
seekdir() XSI_FILE_SYSTEM
sync() XSI_FILE_SYSTEM
telldir() XSI_FILE_SYSTEM
tempnam() XSI_FILE_SYSTEM
catclose() POSIX_I18N
catgets() POSIX_I18N
catopen() POSIX_I18N
msgctl() XSI_IPC
msgget() XSI_IPC
msgrcv() XSI_IPC
msgsnd() XSI_IPC
nl_langinfo() POSIX_I18N
semctl() XSI_IPC
semget() XSI_IPC
semop() XSI_IPC
shmat() XSI_IPC
shmctl() XSI_IPC
shmdt() XSI_IPC
shmget() XSI_IPC
ftok() XSI_IPC
tcgetsid() POSIX_JOB_CONTROL
_longjmp() XSI_JUMP
_setjmp() XSI_JUMP
j0() XSI_MATH
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
j1() XSI_MATH
jn() XSI_MATH
y0() XSI_MATH
y1() XSI_MATH
yn() XSI_MATH
getpriority() XSI_MULTI_PROCESS
getrlimit() XSI_MULTI_PROCESS
getrusage() XSI_MULTI_PROCESS
nice() XSI_MULTI_PROCESS
setpgrp() XSI_MULTI_PROCESS
setpriority() XSI_MULTI_PROCESS
setrlimit() XSI_MULTI_PROCESS
ulimit() XSI_MULTI_PROCESS
killpg() XSI_SIGNALS
sigaltstack() XSI_SIGNALS
sighold() XSI_SIGNALS
sigignore() XSI_SIGNALS
siginterrupt() XSI_SIGNALS
sigpause() XSI_SIGNALS
sigrelse() XSI_SIGNALS
sigset() XSI_SIGNALS
gethostid() XSI_SINGLE_PROCESS
gettimeofday() XSI_SINGLE_PROCESS
putenv() XSI_SINGLE_PROCESS
endpwent() XSI_SYSTEM_DATABASE
getpwent() XSI_SYSTEM_DATABASE
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
setpwent() XSI_SYSTEM_DATABASE
closelog() XSI_SYSTEM_LOGGING
openlog() XSI_SYSTEM_LOGGING
setlogmask() XSI_SYSTEM_LOGGING
syslog() XSI_SYSTEM_LOGGING
LOG_MASK() XSI_SYSTEM_LOGGING
pthread_getconcurrency() XSI_THREADS_EXT
pthread_setconcurrency() XSI_THREADS_EXT
getitimer() XSI_TIMERS
setitimer() XSI_TIMERS
endgrent() XSI_USER_GROUPS
endutxent() XSI_USER_GROUPS
getgrent() XSI_USER_GROUPS
getutxent() XSI_USER_GROUPS
getutxid() XSI_USER_GROUPS
getutxline() XSI_USER_GROUPS
pututxline() XSI_USER_GROUPS
setgrent() XSI_USER_GROUPS
setregid() XSI_USER_GROUPS
setreuid() XSI_USER_GROUPS
setutxent() XSI_USER_GROUPS
wcswidth() XSI_WIDE_CHAR
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
wcwidth() XSI_WIDE_CHAR
alphasort() POSIX_FILE_SYSTEM_EXT
dirfd() POSIX_FILE_SYSTEM_EXT
dprintf() POSIX_DEVICE_IO_EXT
duplocale() POSIX_MULTI_CONCURRENT_
LOCALES
faccessat() POSIX_FILE_SYSTEM_FD
fchmodat() POSIX_FILE_ATTRIBUTES_FD
fchownat() POSIX_FILE_ATTRIBUTES_FD
fdopendir() POSIX_FILE_SYSTEM_FD
fexecve() POSIX_MULTI_PROCESS_FD
fmemopen() POSIX_DEVICE_IO_EXT
freelocale() POSIX_MULTI_CONCURRENT_
LOCALES
fstatat() POSIX_FILE_SYSTEM_FD
futimens() POSIX_FILE_SYSTEM_FD
getdelim() POSIX_FILE_SYSTEM_EXT
getline() POSIX_FILE_SYSTEM_EXT
isalnum_l() POSIX_MULTI_CONCURRENT_
LOCALES
isalpha_l() POSIX_MULTI_CONCURRENT_
LOCALES
isblank_l() POSIX_MULTI_CONCURRENT_
LOCALES
iscntrl_l() POSIX_MULTI_CONCURRENT_
LOCALES
isdigit_l() POSIX_MULTI_CONCURRENT_
LOCALES
isgraph_l() POSIX_MULTI_CONCURRENT_
LOCALES
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
islower_l() POSIX_MULTI_CONCURRENT_
LOCALES
isprint_l() POSIX_MULTI_CONCURRENT_
LOCALES
ispunct_l() POSIX_MULTI_CONCURRENT_
LOCALES
isspace_l() POSIX_MULTI_CONCURRENT_
LOCALES
isupper_l() POSIX_MULTI_CONCURRENT_
LOCALES
iswalnum_l() POSIX_MULTI_CONCURRENT_
LOCALES
iswalpha_l() POSIX_MULTI_CONCURRENT_
LOCALES
iswblank_l() POSIX_MULTI_CONCURRENT_
LOCALES
iswcntrl_l() POSIX_MULTI_CONCURRENT_
LOCALES
iswctype_l() POSIX_MULTI_CONCURRENT_
LOCALES
iswdigit_l() POSIX_MULTI_CONCURRENT_
LOCALES
iswgraph_l() POSIX_MULTI_CONCURRENT_
LOCALES
iswlower_l() POSIX_MULTI_CONCURRENT_
LOCALES
iswprint_l() POSIX_MULTI_CONCURRENT_
LOCALES
iswpunct_l() POSIX_MULTI_CONCURRENT_
LOCALES
iswspace_l() POSIX_MULTI_CONCURRENT_
LOCALES
iswupper_l() POSIX_MULTI_CONCURRENT_
LOCALES
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
iswxdigit_l() POSIX_MULTI_CONCURRENT_
LOCALES
isxdigit_l() POSIX_MULTI_CONCURRENT_
LOCALES
linkat() POSIX_FILE_SYSTEM_FD
mbsnrtowcs() POSIX_C_LANG_WIDE_CHAR_
EXT
mkdirat() POSIX_FILE_SYSTEM_FD
mkdtemp() POSIX_FILE_SYSTEM_EXT
mkfifoat() POSIX_FIFO_FD
mknodat() POSIX_FIFO_FD
newlocale() POSIX_MULTI_CONCURRENT_
LOCALES
nl_langinfo_l() POSIX_I18N
open_memstream() POSIX_DEVICE_IO_EXT
open_wmemstream() POSIX_C_LANG_WIDE_CHAR
openat() POSIX_FILE_SYSTEM_FD
psiginfo() POSIX_SIGNALS_EXT
psignal() POSIX_SIGNALS_EXT
pthread_mutex_consistent() _POSIX_ROBUST_MUTEXES
pthread_mutexattr_getrobust() _POSIX_ROBUST_MUTEXES
pthread_mutexattr_setrobust() _POSIX_ROBUST_MUTEXES
readlinkat() POSIX_SYMBOLIC_LINKS_FD
renameat() POSIX_FILE_SYSTEM_FD
scandir() POSIX_FILE_SYSTEM_EXT
stpcpy() POSIX_C_LIB_EXT
stpncpy() POSIX_C_LIB_EXT
strcasecmp_l() POSIX_MULTI_CONCURRENT_
LOCALES
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
strcoll_l() POSIX_MULTI_CONCURRENT_
LOCALES
strerror_l() POSIX_MULTI_CONCURRENT_
LOCALES
strfmon_l() POSIX_MULTI_CONCURRENT_
LOCALES
strftime_l() POSIX_MULTI_CONCURRENT_
LOCALES
strncasecmp_l() POSIX_MULTI_CONCURRENT_
LOCALES
strndup() POSIX_C_LIB_EXT
strnlen() POSIX_C_LIB_EXT
strsignal() POSIX_SIGNALS_EXT
strxfrm_l() POSIX_MULTI_CONCURRENT_
LOCALES
symlinkat() POSIX_SYMBOLIC_LINKS_FD
tolower_l() POSIX_MULTI_CONCURRENT_
LOCALES
toupper_l() POSIX_MULTI_CONCURRENT_
LOCALES
towctrans_l() POSIX_MULTI_CONCURRENT_
LOCALES
towlower_l() POSIX_MULTI_CONCURRENT_
LOCALES
towupper_l() POSIX_MULTI_CONCURRENT_
LOCALES
unlinkat() POSIX_FILE_SYSTEM_FD
uselocale() POSIX_MULTI_CONCURRENT_
LOCALES
utimensat() POSIX_FILE_SYSTEM_FD
vdprintf() POSIX_DEVICE_IO_EXT
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
wcpcpy() POSIX_C_LANG_WIDE_CHAR_
EXT
wcpncpy() POSIX_C_LANG_WIDE_CHAR_
EXT
wcscasecmp() POSIX_C_LANG_WIDE_CHAR_
EXT
wcscasecmp_l() POSIX_MULTI_CONCURRENT_
LOCALES
wcscoll_l() POSIX_MULTI_CONCURRENT_
LOCALES
wcsdup() POSIX_C_LANG_WIDE_CHAR_
EXT
wcsncasecmp() POSIX_C_LANG_WIDE_CHAR_
EXT
wcsncasemcp_l() POSIX_MULTI_CONCURRENT_
LOCALES
wcsnlen() POSIX_C_LANG_WIDE_CHAR_
EXT
wcsnrtombs() POSIX_C_LANG_WIDE_CHAR_
EXT
wcsxfrm_l() POSIX_MULTI_CONCURRENT_
LOCALES
wctrans_l() POSIX_MULTI_CONCURRENT_
LOCALES
wctype_l() POSIX_MULTI_CONCURRENT_
LOCALES
Inter-UoC
Security
IEEE Std 1003.1-2008 API POSIX Functionality Categories
In order to limit the amount of APIs certified within the Safety Profile API, substitutions were
made. The substituted APIs perform an equivalent operation. The following list details which APIs
were substituted:
• ctime() was substituted by ctime_r()
• gmtime() was substituted by gmtime_r()
• asctime() was substituted by asctime_r()
• localtime() was substituted by localtime_r()
• rand() was substituted by rand_r()
• srand() was substituted by rand_r()
• sprintf() was substituted by snprintf()
• strerror() was substituted by strerror_r()
• rewind() was substituted by fseek()
• strtok() was substituted by strtok_r()
• setjmp() was substituted by sigsetjmp()
• longjmp() was substituted by siglongjmp()
• sigprocmask() was substituted by pthread_sigmask()
• fdatasync() was substituted by fsync()
• vsprintf() was substituted by vsnprintf()
• printf() was substituted by fprintf()
• signal() was substituted by sigaction()
Note: Blank items may be included in future editions of the FACE Technical Standard.
The enumerations for the POSIX thread detach state enumeration constants are supported in the
following FACE Profiles:
Table 22: POSIX Thread Detach State Values
Safety General
Enumeration Security Safety Base Extended Purpose
The enumerations for the POSIX thread inherit scheduler enumeration constants are supported in
the following FACE Profiles:
Table 23: POSIX Thread Inherit Scheduler Values
Safety General
Enumeration Security Safety Base Extended Purpose
The enumerations for the POSIX thread inherit scheduler enumeration constants are supported in
the following FACE Profiles:
Table 24: POSIX Thread Scheduler Policy Values
Safety General
Enumeration Security Safety Base Extended Purpose
SCHED_SPORADIC
SCHED_OTHER
The enumerations for the POSIX thread inherit scope enumeration constants are supported in the
following FACE Profiles:
Table 25: POSIX Thread Scope Values
Safety General
Attribute Security Safety Base Extended Purpose
PTHREAD_SCOPE_SYSTEM MP MP
The enumerations for POSIX synchronization object visibility constants are supported in the
following FACE Profiles:
Table 26: POSIX Mutex Scope Values
Safety General
Attribute Security Safety Base Extended Purpose
PTHREAD_PROCESS_SHARED MP
PTHREAD_PROCESS_PRIVATE MP
The enumerations for POSIX mutex type constants are supported in the following FACE Profiles:
Table 27: POSIX Mutex Type Attribute Values
Safety General
Attribute Security Safety Base Extended Purpose
PTHREAD_MUTEX_DEFAULT INCL
PTHREAD_MUTEX_ERRORCHECK INCL
PTHREAD_MUTEX_NORMAL INCL
PTHREAD_MUTEX_RECURSIVE INCL
PTHREAD_MUTEX_ROBUST
PTHREAD_MUTEX_STALLED
Safety General
Attribute Security Safety Base Extended Purpose
PTHREAD_PRIO_INHERIT INCL
PTHREAD_PRIO_NONE INCL
The enumerations for POSIX robust mutex constants are supported in the following FACE
Profiles:
Table 29: POSIX Mutex Robustness Values
Safety General
Attribute Security Safety Base Extended Purpose
PTHREAD_MUTEX_STALLED
PTHREAD_MUTEX_ROBUST
The enumerations for POSIX clock and timer source constants are supported in the following
FACE Profiles:
Table 30: POSIX Clock and Timer Source Values and FACE Profiles
Safety General
POSIX.1-2013 ConstantConstant Security Safety Base Extended Purpose
CLOCK_PROCESS_CPUTIME_ID MP
CLOCK_THREAD_CPUTIME_ID
Note: Only CLOCK_MONOTONIC and CLOCK_REALTIME are available for use with
POSIX condition variables.
The enumerations for setting and obtaining socket options are supported in the following FACE
Profiles:
Safety General
POSIX.1-2013 Option Value Security Safety Base Extended Purpose
SO_ACCEPTCONN
SO_BROADCAST INCL
SO_DEBUG
SO_DONTROUTE INCL
SO_ERROR INCL
SO_KEEPALIVE INCL
SO_LINGER
SO_OOBINLINE
SO_RCVLOWAT
SO_RCVTIMEO INCL
SO_SNDLOWAT
SO_SNDTIMEO INCL
SO_TYPE
Note: The IP_xxx constants are not defined by POSIX but commonly supported and explicitly
required by the FACE Technical Standard.
Safety General
POSIX.1-2013 Option Value Security Safety Base Extended Purpose
IPV6_JOIN_GROUP INCL
IPV6_LEAVE_GROUP INCL
IPV6_MULTICAST_HOPS
IPV6_UNICAST_HOPS INCL
IPV6_V6ONLY
The POSIX functions getsockopt() and setsockopt() are included in all FACE Profiles but the
associated constants are supported in the FACE OSS Profiles as follows:
Table 33: POSIX Set Socket (Use over Internet Protocols) Option Values
Safety General
POSIX.1-2013 Option Value Security Safety Base Extended Purpose
SOCK_RAW INCL
SOCK_SEQPACKET
The enumerations for POSIX mmap() constants are supported in the following FACE Profiles:
Table 34: POSIX mmap() Constant Values and FACE Profiles
Safety General
POSIX.1-2013 Constant Security Safety Base Extended Purpose
MAP_FIXED INCL
MAP_PRIVATE INCL
Safety General
POSIX.1-2013 Option Value Security Safety Base Extended Purpose
SA_NOCLDSTOP MP
SA_ONSTACK
SA_RESTART MP
SA_NOCLDWAIT
SA_NODEFER
The following constants are associated with the POSIX process spawn attribute set:
Table 36: POSIX Spawn Attribute Flags
Safety General
Attribute Security Safety Base Extended Purpose
POSIX_SPAWN_RESETIDS MP MP
POSIX_SPAWN_SETPGROUP MP
POSIX_SPAWN_SETSIGDEF MP MP
POSIX_SPAWN_SETSIGMASK MP MP
POSIX_SPAWN_SETSCHEDPARAM MP
POSIX_SPAWN_SETSCHEDULER MP
The following constants are associated with the POSIX process trace attribute set:
Table 37: POSIX Trace Attribute Flags
Safety General
Attribute Security Safety Base Extended Purpose
POSIX_TRACE_ALL_EVENTS
POSIX_TRACE_APPEND
POSIX_TRACE_CLOSE_FOR_CHILD
POSIX_TRACE_FILTER
POSIX_TRACE_FLUSH
POSIX_TRACE_FLUSH_START
POSIX_TRACE_FLUSH_STOP
POSIX_TRACE_FLUSHING
POSIX_TRACE_FULL
POSIX_TRACE_LOOP
POSIX_TRACE_NO_OVERRUN
POSIX_TRACE_NOT_FLUSHING
POSIX_TRACE_NOT_FULL
POSIX_TRACE_INHERITED
POSIX_TRACE_NOT_TRUNCATED
POSIX_TRACE_OVERFLOW
POSIX_TRACE_OVERRUN
POSIX_TRACE_RESUME
POSIX_TRACE_RUNNING
POSIX_TRACE_START
POSIX_TRACE_STOP
POSIX_TRACE_SUSPENDED
POSIX_TRACE_SYSTEM_EVENTS
POSIX_TRACE_TRUNCATED_READ
POSIX_TRACE_TRUNCATED_RECORD
POSIX_TRACE_UNNAMED_USER_EVENT
POSIX_TRACE_UNTIL_FULL
POSIX_TRACE_WOPID_EVENTS
Note: The DoD standards above define overlapping and somewhat inconsistent groups of
mandatory requirements for network standards. The defined standards divide into IPv4
requirements (which is the basis for ARINC 664), and IPv6 requirements providing a
natural separation of the requirements into two independent network profiles. IPv4
networks represent the majority of the existing embedded network platforms currently
in service, while IPv6 networks represent the emerging standards for future platforms.
The decision to support an IPv4 only or an IPv6 only network is an implementation decision.
Table 38: Basic Internetwork Capabilities
Standard Description
Standard Description
Standard Description
Standard Description
RFC 4213 Basic Transition Mechanisms for IPv6 Hosts and Routers
These capabilities can also be utilized for intra-partition communications (along with other
capabilities restricted to intra-partition use only). The inter-partition use of these capabilities is
restricted for use only by the Transport Services and I/O Services. The ARINC 653 Part 2
Sampling Port Extension APIs are available in all FACE profiles except for the Security Profile.
For all FACE Profiles, the following C Library functions are supported for ARINC 653 operational
environments:
For Safety Base, Safety Extended, and General Purpose FACE Profiles, the following C Library
functions are supported for ARINC 653 operational environments:
B.1 Introduction
The FACE Technical Standard defines multiple APIs and those APIs are designed to have a
common appearance. Elements such as the return status codes from FACE services used by more
than one API are described in this appendix.
Note: The code in this document is formatted to align with the formatting constraints of the
printed document.
FACE/[Link]
//! Source file: FACE/[Link]
#ifndef FACE_COMMON
#define FACE_COMMON
//! This enumeration defines the possible set of status codes which may be
//! returned by a method defined in the FACE API.
//! The first set of codes (through TIMED_OUT) is constrained to match the
//! set defined in the ARINC 653 standard.
enum RETURN_CODE_TYPE {
NO_ERROR, //! request valid and operation performed
NO_ACTION, //! status of system unaffected by request
NOT_AVAILABLE, //! no message was available
INVALID_PARAM, //! invalid parameter specified in request
INVALID_CONFIG, //! parameter incompatible with configuration
INVALID_MODE, //! request incompatible with current mode
TIMED_OUT, //! the time expired before the request could be
//! filled
ADDR_IN_USE, //! address currently in use
PERMISSION_DENIED, //! no permission to send or connecting to wrong
//! partition
MESSAGE_STALE, //! current time - timestamp exceeds configured limits
IN_PROGRESS, //! asynchronous connection in progress
CONNECTION_CLOSED, //! connection was closed
DATA_BUFFER_TOO_SMALL, //! Data Buffer was too small for message
DATA_OVERFLOW, //! A loss of messages due to data buffer overflow
RESOURCE_LIMIT_REACHED //! The maximum number of resources has been used
};
};
C.1 Introduction
The IOS Interface includes nine supported I/O bus architectures. An I/O Service for a supported
I/O bus architecture addresses both the common declarations and the declarations specific for that
bus architecture. Each I/O Service provides a normalized interface for PSSS UoCs to communicate
with I/O devices of the same bus architecture.
Declarations are provided using an IDL syntax that is mapped to a Programming Language, as
described in Section 4.14.
Note: The code in this document is formatted to align with the formatting constraints of the
printed document.
This appendix also describes the manner in which extended I/O bus architectures declarations can
be provided with an IOS UoC. Extended declarations are supported to address undefined
capabilities of supported I/O bus architectures. They are also used to implement an unsupported
I/O bus architecture consistent with the I/O Services Interface.
#ifndef FACE_IOSS_IOS
#define FACE_IOSS_IOS
#include <FACE/[Link]>
module FACE {
module IOSS {
//! The status of the I/O device bus, separate from the status of a
//! single I/O connection or of a device attached to that bus.
//!
//! NOTE: Bus-specific status constants are defined in their respective
//! namespaces.
typedef unsigned short BUS_STATUS_TYPE;
//! Notification events are generated when the PSSS UoC has
//! registered a handler callback
//! (see Register_Notification_Event_Handler(I/O)).
interface IO_Service {
//! The Initialize(I/O) function allows the PSSS UoC to provide a
//! configuration resource to use when initializing an I/O Service.
void Initialize (
in CONFIGURATION_RESOURCE config_resource,
out RETURN_CODE_TYPE return_code);
//! This structure defines the data payload format for reads.
//! received_time is the time stamp most closely associated with
//! the last byte going into the buffer. If received_time is set to
//! IGNORE_RECEIVED_TIME, it should be ignored.
const SYSTEM_TIME_TYPE IGNORE_RECEIVED_TIME = 0;
struct READ_PAYLOAD_TYPE {
SYSTEM_TIME_TYPE received_time;
PAYLOAD_DATA_MSG_TYPE payload;
};
//! This structure defines the data payload format for writes.
struct WRITE_PAYLOAD_TYPE {
PAYLOAD_DATA_MSG_TYPE payload;
};
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
The return code value returned from Initialize(I/O) is one of the following:
• NO_ERROR to indicate the I/O Service was successfully initialized according to the
config_resource
• NO_ACTION to indicate the I/O Service should be initialized through the LCM interface
• NOT_AVAILABLE to indicate config_resource is not accessible
• INVALID_CONFIG to indicate config_resource has an error
• IN_PROGRESS to indicate the operation is still in progress and the I/O Service has not
yet transitioned to a normal state
Note: To support minimal blocking at startup, the function may return before it transitions from
an initial state to a normal state. Subsequent calls return IN_PROGRESS until it
transitions out of its initial state to either its normal state or an error state. Once the
transition occurs, the next call returns NO_ERROR for success or either
NOT_AVAILABLE or INVALID_CONFIG dependent upon the error condition.
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
The return code value returned from Open_Connection(I/O) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• INVALID_CONFIG to indicate that name is not valid, not configured, or an underlying
operating system resource is not present
• TIMED_OUT to indicate that opening a connection took longer than the specified timeout
• INVALID_PARAM to indicate that the timeout parameter is out of range
• NO_ACTION to indicate that an underlying operating system API call failed
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
The return code value returned from Close_Connection(I/O) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• INVALID_PARAM to indicate that handle does not refer to an existing connection
• CONNECTION_CLOSED to indicate that handle refers to an existing connection that is
closed
• INVALID_MODE to indicate that the connection was configured in a manner that does
not allow it to be closed
• NO_ACTION to indicate that an underlying operating system API call failed
//! This structure defines the data payload format for reads.
//! received_time is the time stamp most closely associated with
//! the last byte going into the buffer. If received_time is set to
//! IGNORE_RECEIVED_TIME, it should be ignored.
const SYSTEM_TIME_TYPE IGNORE_RECEIVED_TIME = 0;
struct READ_PAYLOAD_TYPE {
SYSTEM_TIME_TYPE received_time;
PAYLOAD_DATA_MSG_TYPE payload;
};
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
The return code value returned from Read(I/O) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• NOT_AVAILABLE to indicate there is no data and timeout is NO_WAIT
• TIMED_OUT to indicate the operation took longer than the specified timeout
• DATA_OVERFLOW to indicate the underlying read buffer has dropped received
messages
• INVALID_MODE to indicate that the connection is configured in a manner that does not
allow reading
• INVALID_PARAM to indicate that handle does not refer to an existing connection
• CONNECTION_CLOSED to indicate that handle refers to an existing connection that is
closed
• INVALID_PARAM to indicate that the timeout parameter is out of range
The [Link] is recorded for use in the status call when required.
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
The return code value returned from Write(I/O) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• TIMED_OUT to indicate the operation took longer than the specified timeout
The I/O Service processes all I/O parameters as one transaction that succeeds or fails. If the
transaction fails, the I/O parameter values are unchanged upon return.
If the operation results in a connection configuration change, then the I/O Service dispatches a
CONNECTION_CONFIG_CHANGE_EVENT to each PSSS UoC with a registered notification
callback on that connection.
If the operation results in a connection status change, then the I/O Service dispatches a
CONNECTION_STATUS_CHANGE_EVENT to each PSSS UoC with a registered notification
callback on that connection.
module FACE {
module IOSS {
module IO_Service_Module<struct PAYLOAD_DATA_MSG_TYPE> {
interface IO_Service {
//! The Configure_Connection_Parameters(I/O) function allows the
//! PSSS UoC to assign I/O parameters for a connection.
void Configure_Connection_Parameters (
in CONNECTION_HANDLE_TYPE handle,
in TIMEOUT_TYPE timeout,
in IO_PARAMETER_TRANSACTION_TYPE parameters,
out RETURN_CODE_TYPE return_code);
}; // interface IO_Service
}; // module IO_Service_Module<>
}; // module IOSS
}; // module FACE
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
The I/O Service supports this operation after the connection is closed.
module FACE {
module IOSS {
module IO_Service_Module<struct PAYLOAD_DATA_MSG_TYPE> {
interface IO_Service {
//! The Get_Connection_Configuration(I/O) function allows the PSSS
//! UoC to query I/O parameters for a connection.
void Get_Connection_Configuration (
in CONNECTION_HANDLE_TYPE handle,
in TIMEOUT_TYPE timeout,
inout IO_PARAMETER_TRANSACTION_TYPE parameters,
out RETURN_CODE_TYPE return_code);
}; // interface IO_Service
}; // module IO_Service_Module<>
}; // module IOSS
}; // module FACE
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
The return code value returned from Get_Connection_Configuration(I/O) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• TIMED_OUT to indicate the operation took longer than the specified timeout
• INVALID_PARAM to indicate that handle does not refer to an existing connection
• INVALID_PARAM to indicate that the timeout parameter is out of range
• INVALID_PARAM to indicate that an I/O parameter ID in parameters is unknown
• NO_ACTION to indicate that an underlying operating system API call failed
The I/O Service processes all I/O parameters as one transaction that succeeds or fails. If the
transaction fails, the I/O parameter values are unchanged upon return.
The I/O Service supports this operation when called with a closed I/O connection.
If the operation results in a bus configuration change, then the I/O Service dispatches a
BUS_CONFIG_CHANGE_EVENT to each PSSS UoC with a registered notification callback on
an open connection of the configured bus. If the operation results in a bus status change of the
configured bus, then the I/O Service dispatches a BUS_STATUS_CHANGE_EVENT to each
PSSS UoC with a registered notification callback on an open connection of the configured bus.
If the operation results in a bus status change of the configured bus, then the I/O Service dispatches
a BUS_STATUS_CHANGE_EVENT to each PSSS UoC with a registered notification callback
on an open connection of the configured bus.
If the operation results in a connection parameter change on an open connection of the configured
bus, then the I/O Service dispatches a CONNECTION_CONFIG_CHANGE_EVENT to each
PSSS UoC with a registered notification callback on that connection.
If the operation results in a connection status change on an open connection of the configured bus,
then the I/O Service dispatches a CONNECTION_STATUS_CHANGE_EVENT to each PSSS
UoC with a registered notification callback on that connection.
module FACE {
module IOSS {
module IO_Service_Module<struct PAYLOAD_DATA_MSG_TYPE> {
interface IO_Service {
//! The Configure_Bus_Parameters(I/O) function allows the PSSS UoC
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
The return code value returned from Configure_Bus_Parameters(I/O) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• TIMED_OUT to indicate the operation took longer than the specified timeout
• INVALID_PARAM to indicate that handle does not refer to an existing connection
• INVALID_PARAM to indicate that the timeout parameter is out of range
• INVALID_PARAM to indicate that an I/O parameter ID in parameters is unknown
• INVALID_PARAM to indicate parameters was not assigned as one transaction
• NO_ACTION to indicate that an underlying operating system API call failed
• INVALID_ CONFIG to indicate that an I/O parameter value in parameters is invalid
The I/O Service supports this operation when called with a closed I/O connection.
module FACE {
module IOSS {
module IO_Service_Module<struct PAYLOAD_DATA_MSG_TYPE> {
interface IO_Service {
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
The return code value returned from Get_Bus_Configuration(I/O) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• TIMED_OUT to indicate the operation took longer than the specified timeout
• INVALID_PARAM to indicate that handle does not refer to an existing connection
• INVALID_PARAM to indicate that the timeout parameter is out of range
• INVALID_PARAM to indicate that an I/O parameter ID in parameters is unknown
• NO_ACTION to indicate that an underlying operating system API call failed
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
The return code value returned from Get_Connection_Status(I/O) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• INVALID_PARAM to indicate that handle does not refer to an existing connection
• CONNECTION_CLOSED to indicate that handle refers to an existing connection that is
closed
• NO_ACTION to indicate that an underlying operating system API call failed
The I/O Service supports this operation when called with a closed I/O connection.
module FACE {
module IOSS {
module IO_Service_Module<struct PAYLOAD_DATA_MSG_TYPE> {
interface IO_Service {
//! The Get_Bus_Status(I/O) function allows the PSSS UoC to query
//! for status information of the bus underlying an I/O connection.
void Get_Bus_Status (
in CONNECTION_HANDLE_TYPE handle,
out BUS_STATUS_TYPE status,
out RETURN_CODE_TYPE return_code);
}; // interface IO_Service
}; // module IO_Service_Module<>
}; // module IOSS
}; // module FACE
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
A PSSS UoC is not required to process notification events of any type, and in such case would not
call Register_Notification_Event(I/O).
A PSSS UoC is not required to process every notification event type, and in such case would
implement callback behavior for the events of interest and allow the other events to fall through.
The I/O Service maintains only one notification callback per handle. A subsequent call to
Register_Notification_Event(I/O) replaces the registered callback function. The I/O Service
invokes the same registered callback function for every event on the connection as long as the
connection is open or until Unregister_Notification_Event(I/O) is called.
module FACE {
module IOSS {
module IO_Service_Module<struct PAYLOAD_DATA_MSG_TYPE> {
interface IO_Service {
//! The Register_Notification_Event(I/O) function is used by
//! the PSSS UoC to register a callback function that is called by
//! the I/O Service when an event occurs on the given connection.
//!
//! Note: The io_callback parameter is semantically an in parameter
//! but is inout to avoid an undesirable mapping in C++.
void Register_Notification_Event (
in CONNECTION_HANDLE_TYPE handle,
inout IO_Callback io_callback,
out RETURN_CODE_TYPE return_code);
}; // interface IO_Service
}; // module IO_Service_Module<>
}; // module IOSS
}; // module FACE
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
The I/O Service supports this operation when called with a closed I/O connection.
module FACE {
module IOSS {
module IO_Service_Module<struct PAYLOAD_DATA_MSG_TYPE> {
interface IO_Service {
//! The Unregister_Notification_Event(I/O) function is used
//! by the PSSS UoC to unregister the callback previously
//! associated with the connection.
void Unregister_Notification_Event (
in CONNECTION_HANDLE_TYPE handle,
out RETURN_CODE_TYPE return_code);
}; // interface IO_Service
}; // module IO_Service_Module<>
}; // module IOSS
}; // module FACE
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
The return code value returned from Unregister_Notification_Event(I/O) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• INVALID_PARAM to indicate that handle does not refer to an existing connection
• NO_ACTION to indicate that there was not a handler registered to this connection
FACE/IOSS/[Link]
IOSS/[Link]
#ifndef FACE_IOSS_GENERIC
#define FACE_IOSS_GENERIC
#include <FACE/IOSS/[Link]>
IOSS {
//! Declarations for the defined bus status types for the I/O
//! Service.
//!
//! Note there are no defined bus status types for the Generic
//! I/O Service.
};
//! Instantiate the template module into the namespace for the I/O
//! Service. This results in fully-qualified types in that namespace
//! distinct to the I/O Service.
module IO_Service_Module<Generic::ReadWriteBuffer> Generic;
};
};
FACE/IOSS/[Link]
//! Source file: FACE/IOSS/[Link]
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
//! Declarations for the defined bus status types for the I/O
//! Service.
//!
//! Note there are no defined bus status types for the Analog
//! I/O Service.
};
//! Instantiate the template module into the namespace for the I/O
//! Service. This results in fully-qualified types in that namespace
//! distinct to the I/O Service.
module IO_Service_Module<Analog::ReadWriteBuffer> Analog;
};
};
FACE/IOSS/[Link]
//! Source file: FACE/IOSS/[Link]
#ifndef FACE_IOSS_ARINC429
#define FACE_IOSS_ARINC429
#include <FACE/IOSS/[Link]>
//! Declarations for the defined bus status types for the I/O
//! Service.
const BUS_STATUS_TYPE HW_OPERATIONAL = 0;
const BUS_STATUS_TYPE HW_FIFO_OVERFLOW = 1;
const BUS_STATUS_TYPE SW_CIRCULAR_BUFF_OVERFLOW = 2;
const BUS_STATUS_TYPE HW_ADDRESS_ERROR = 3;
const BUS_STATUS_TYPE HW_SEQUENCE_ERROR = 4;
const BUS_STATUS_TYPE HW_PARITY_ERROR = 5;
const BUS_STATUS_TYPE CLOCK_LOSS = 6;
const BUS_STATUS_TYPE UNKNOWN_ERROR = 7;
};
//! Instantiate the template module into the namespace for the I/O
//! Service. This results in fully-qualified types in that namespace
//! distinct to the I/O Service.
module IO_Service_Module<ARINC429::ReadWriteBuffer> ARINC429;
};
};
FACE/IOSS/[Link]
//! Source file: FACE/IOSS/[Link]
#ifndef FACE_IOSS_DISCRETE
#define FACE_IOSS_DISCRETE
//! Declarations for the defined bus status types for the I/O
//! Service.
//!
//! Note there are no defined bus status types for the Discrete
//! I/O Service.
};
//! Instantiate the template module into the namespace for the I/O
//! Service. This results in fully-qualified types in that namespace
//! distinct to the I/O Service.
module IO_Service_Module<Discrete::ReadWriteBuffer> Discrete;
};
};
FACE/IOSS/[Link]
//! Source file: FACE/IOSS/[Link]
#ifndef FACE_IOSS_PRECISIONSYNCHRO
#define FACE_IOSS_PRECISIONSYNCHRO
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
//! Declarations for the defined bus status types for the I/O
//! Service.
//!
//! Note there are no defined bus status types for the
//! PrecisionSynchro I/O Service.
};
//! Instantiate the template module into the namespace for the I/O
//! Service. This results in fully-qualified types in that namespace
//! distinct to the I/O Service.
module IO_Service_Module<PrecisionSynchro::ReadWriteBuffer>
PrecisionSynchro;
};
};
FACE/IOSS/[Link]
//! Source file: FACE/IOSS/[Link]
#ifndef FACE_IOSS_I2C
#define FACE_IOSS_I2C
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
//! Declarations for the defined bus status types for the I/O
//! Service.
const BUS_STATUS_TYPE DEVICE_OPERATIONAL = 0;
const BUS_STATUS_TYPE OVERRUN_ERROR = 1;
const BUS_STATUS_TYPE PARITY_ERROR = 2;
const BUS_STATUS_TYPE FRAMING_ERROR = 3;
const BUS_STATUS_TYPE ADDRESS_ERROR = 4;
};
//! Instantiate the template module into the namespace for the I/O
//! Service. This results in fully-qualified types in that namespace
//! distinct to the I/O Service.
module IO_Service_Module<I2C::MASTER_COMMAND_TYPE> I2C;
//! Extend the I2C I/O Service interface for atomic combined
//! read/write.
module I2C {
enum COMMAND_KIND_TYPE {
READ,
The Perform_Combined_Commands(I2C) function is used by the PSSS UoC to request that the
I2C master perform a set of write and/or read commands as one transaction.
module FACE {
module IOSS {
module I2C {
//! The Perform_Combined_Commands function allows the PSSS UoC to
//! request a set of write and/or read commands be performed by a
//! master.
interface Combined_RW_IO_Service : I2C::IO_Service {
void Perform_Combined_Commands (
in CONNECTION_HANDLE_TYPE handle,
in TIMEOUT_TYPE timeout,
inout MASTER_COMMANDS_TYPE payload,
out RETURN_CODE_TYPE return_code);
}; // interface Combined_IO_Service
}; // module I2C
}; // module IOSS
}; // module FACE
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason.
FACE/IOSS/[Link]
//! Source file: FACE/IOSS/[Link]
#ifndef FACE_IOSS_M1553
#define FACE_IOSS_M1553
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
struct ReadWriteBuffer {
octet bus_id; // identify the MIL-STD-1553 bus
// (valid values: 0 - 31)
octet rt_number_1; // remote Terminal Address
// (valid values: 0 - 31)
octet sa_number_1; // sub Address Number
// (valid values: 0 - 31)
octet rt_number_2; // remote Terminal Address used for RT-to-RT
// (value values: 0 - 31)
octet sa_number_2; // sub Address Number used for RT-to-RT
// (value values: 0 - 31)
TRANSMISSION_TYPE t_r;
DATA_BUFFER_TYPE data;
};
//! Declarations for the defined bus status types for the I/O
//! Service.
const BUS_STATUS_TYPE BC_IO_NO_RESPONSE = 0;
const BUS_STATUS_TYPE BC_IO_LOOP_TEST_FAIL = 1;
const BUS_STATUS_TYPE BC_IO_MSG_RETRIED = 2;
const BUS_STATUS_TYPE BC_IO_BAD_DATA_BLOCK = 3;
const BUS_STATUS_TYPE BC_IO_ADDRESS_ERROR = 4;
const BUS_STATUS_TYPE BC_IO_WORD_COUNT_ERROR = 5;
const BUS_STATUS_TYPE BC_IO_SYNC_ERROR = 6;
const BUS_STATUS_TYPE BC_IO_INVALID_WORD = 7;
const BUS_STATUS_TYPE RT_IO_TERMINAL_FLAG = 8;
const BUS_STATUS_TYPE RT_IO_SUBSYSTEM_FLAG = 9;
const BUS_STATUS_TYPE RT_IO_SERVICE_REQUEST = 10;
const BUS_STATUS_TYPE RT_IO_BUSY = 11;
const BUS_STATUS_TYPE RT_IO_DYNAMIC_BC = 12;
const BUS_STATUS_TYPE RT_IO_NO_RESPONSE = 13;
const BUS_STATUS_TYPE RT_IO_LOOP_TEST_FAIL = 14;
const BUS_STATUS_TYPE RT_IO_ILLEGAL_COMMAND_WORD = 15;
const BUS_STATUS_TYPE RT_IO_WORD_COUNT_ERROR = 16;
const BUS_STATUS_TYPE RT_IO_SYNC_ERROR = 17;
const BUS_STATUS_TYPE RT_IO_INVALID_WORD = 18;
const BUS_STATUS_TYPE RT_IO_RT_RT_GAP_SYNC_ADDR_ERROR = 19;
const BUS_STATUS_TYPE RT_IO_RT_RT_2ND_CMD_ERROR = 20;
//! Instantiate the template module into the namespace for the I/O
//! Service. This results in fully-qualified types in that namespace
//! distinct to the I/O Service.
module IO_Service_Module<M1553::ReadWriteBuffer> M1553;
};
};
C.3.7.2 FACE::IOSS::M1553_Mk2
FACE/IOSS/M1553_Mk2.idl
//! Source file: FACE/IOSS/M1553_Mk2.idl
#ifndef FACE_IOSS_M1553_MK2
#define FACE_IOSS_M1553_MK2
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
CommandWordData cw2; // Two command words and two status words for
StatusWordData sw2; // RT-to-RT transmission per [3.11]
//! Declarations for the defined bus status types for the I/O
//! Service.
//! Instantiate the template module into the namespace for the I/O
//! Service. This results in fully-qualified types in that namespace
//! distinct to the I/O Service.
module IO_Service_Module<M1553_Mk2::ReadWriteBuffer> M1553_Mk2;
};
};
FACE/IOSS/[Link]
//! Source file: FACE/IOSS/[Link]
#ifndef FACE_IOSS_SERIAL
#define FACE_IOSS_SERIAL
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
//! Declarations for the defined bus status types for the I/O
//! Service.
const BUS_STATUS_TYPE DEVICE_OPERATIONAL = 0;
const BUS_STATUS_TYPE OVERRUN_ERROR = 1;
const BUS_STATUS_TYPE PARITY_ERROR = 2;
const BUS_STATUS_TYPE FRAMING_ERROR = 3;
const BUS_STATUS_TYPE BREAK_ERROR = 4;
};
//! Instantiate the template module into the namespace for the I/O
//! Service. This results in fully-qualified types in that namespace
//! distinct to the I/O Service.
module IO_Service_Module<Serial::ReadWriteBuffer> Serial;
};
};
FACE/IOSS/[Link]
//! Source file: FACE/IOSS/[Link]
#ifndef FACE_IOSS_SYNCHRO
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
//! Declarations for the defined bus status types for the I/O
//! Service.
//!
//! Note there are no defined bus status types for the Synchro
//! I/O Service.
};
//! Instantiate the template module into the namespace for the I/O
//! Service. This results in fully-qualified types in that namespace
//! distinct to the I/O Service.
module IO_Service_Module<Synchro::ReadWriteBuffer> Synchro;
};
};
FACE/IOSS/[Link]
//! Source file: FACE/IOSS/[Link]
#ifndef FACE_IOSS_ARINC825
#define FACE_IOSS_ARINC825
#include <FACE/IOSS/[Link]>
module ARINC825 {
//! Buffer for Data Field. The buffer length corresponds to DLC in
//! Control Field. The Classical CAN Extended Data Frame
//! (Section [Link]) can carry up to 8 bytes, while the CAN FD
//! Extended Data Frame (Section [Link]) can carry up to 64 bytes.
//! The buffer is therefore bound to the larger of the two.
//! ARINC 825 Write(I/O) returns INVALID_PARAM when framing a
//! Classical CAN Extended Data Frame if the buffer is longer than
//! 8 bytes.
const octet CAN_MAX_DLC = 8;
const octet CAN_FD_MAX_DLC = 64;
typedef sequence<octet,CAN_FD_MAX_DLC> CAN_BUFFER_TYPE;
struct DataFrameAbstraction {
//! Maps to Base Identifier and Identifier Extension of
//! Arbitration Field.
//! ARINC 825 Write(I/O) encodes CAN Identifier to Arbitration
//! Field. ARINC 825 Read(I/O) decodes CAN Identifier from
//! Arbitration Field.
CAN_IDENTIFIER_TYPE id;
//! ACK Field is not part of the Data Frame abstraction. ACK
//! errors are handled as a fault type.
};
//! Fault types (Section 4.5.1). These faults are detected by a CAN
//! controller, so different CAN nodes can report different fault
//! conditions. Since these are not CAN bus fault conditions, they
//! must be reportable to the PSSS UoC per I/O connection. And, since
//! Get_Connection_Status(I/O) cannot return a fault code these
//! declarations support ARINC 825 Get_Connection_Configuration(I/O).
//! ARINC 825 Read(I/O) triggers DEGRADED
//! CONNECTION_STATUS_CHANGE_EVENT on these fault conditions, and the
//! PSSS UoC can query for fault conditions in the event handler.
//! Fault condition cannot be assigned, so ARINC 825
//! Configure_Connection_Parameters(I/O) returns INVALID_PARAM if
//! QUERY_CAN_FAULT is part of the parameter set.
typedef octet CAN_FAULT_TYPE;
const CAN_FAULT_TYPE CAN_FAULT_NONE = 0;
const CAN_FAULT_TYPE CAN_FAULT_BIT_ERROR = 1;
const CAN_FAULT_TYPE CAN_FAULT_BIT_STUFFING = 2;
const CAN_FAULT_TYPE CAN_FAULT_CRC_ERROR = 3;
const CAN_FAULT_TYPE CAN_FAULT_FORM_ERROR = 4;
const CAN_FAULT_TYPE CAN_FAULT_ACK_ERROR = 5;
const IO_PARAMETER_ID_TYPE QUERY_CAN_FAULT = 2; // FACE_OCTET
}; // module ARINC825
//! Instantiate the template module into the namespace for the I/O
//! Service. This results in fully-qualified types in that namespace
//! distinct to the I/O Service.
module IO_Service_Module<ARINC825::DataFrameAbstraction> ARINC825;
}; // module IOSS
}; // module FACE
There are two scenarios for extending these declarations to provide an I/O Service with additional
capabilities. The intent for these scenarios is to allow the Software Supplier of an IOS UoC
containing such an I/O Service to achieve FACE Conformance to a published standard while using
extensions to that standard.
In the first scenario, additional configurable parameters and/or status values are defined for a
supported I/O Service because its declarations are technically insufficient. In the second scenario,
a new I/O Service is declared for an unsupported I/O bus architecture. In both scenarios, the
extended declarations need to be unique from supported I/O Service declarations:
In both scenarios, the FACE PR/CR process is used to submit a change request with the extended
declarations for consideration in a future version of the FACE Technical Standard. The change
request is analyzed to confirm the extended declarations do not conflict with the published
standard.
D.1 Introduction
This appendix specifies the Interface for the Life Cycle Management (LCM) Services. Each LCM
Capability has a corresponding IDL module containing an IDL interface. As the LCM Services
Capabilities are independent and optional, only the interface declarations pertaining to supported
Capabilities are relevant for the providing UoC.
Declarations are provided using an IDL syntax that is mapped to a Programming Language as
described in Section 4.14.
Note: The code in this document is formatted to align with the formatting constraints of the
printed document.
It is common in embedded systems and safety-critical systems to have a phase of execution for
resource acquisition behavior, such as memory allocation, that is prohibited in later phases. LCM
Services supports a two-stage resource acquisition process. The first stage, associated with the
initialization execution point and hence the Initialize(LCM::Initializable) function, supports
resource acquisition that does not require the Configuration Interface. The second stage, associated
with the configuration execution point and hence the Configure(LCM::Configurable) function,
supports leveraging the Configuration Interface when acquiring resources. Between the two
execution points is when dependencies are resolved between interface users and interface
providers via the Injectable Interface.
A Managed UoC with no designed behaviors at this execution point may still have this function
called. As the FACE Technical Standard prescribes no particular behavior, it would be appropriate
to return immediately.
module FACE {
module LCM {
}; // interface InitializableInstance
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason. The return code value is one of the following:
• NO_ERROR to indicate successful completion of the operation
• NOT_AVAILABLE to indicate that one or more resources could not be acquired
• IN_PROGRESS to indicate that a previous operation is still in progress
D.2.2 Finalize(LCM::Initializable)
The Finalize(LCM::Initializable) function supports the distinct execution point of finalization.
This function is an entry point into a Managed UoC instance, providing the instance with a thread
of control to perform any appropriate behaviors at this execution point. It is intended to be called
once transactionally, meaning called until a return code other than IN_PROGRESS is returned.
After this execution point the Managed UoC instance exists but may have released its resources.
A Managed UoC with relevant safety-critical requirements may be designed to never release its
resources, and it would be appropriate to return immediately.
A Managed UoC designed to release its resources at the destruction execution point, with no
designed behaviors at the finalization execution point, may still have this function called. As the
FACE Technical Standard prescribes no particular behavior, it would be appropriate to return
immediately.
module FACE {
module LCM {
}; // interface InitializableInstance
}; // module Initializable
};// module LCM
}; // module FACE
}; // interface ConfigurableInstance
}; // module Configurable
};// module LCM
}; // module FACE
It is common in embedded systems and safety-critical systems to have a phase of execution for
resource acquisition behavior, such as memory allocation, that is prohibited in later phases. LCM
Services supports a two-stage resource acquisition process. The first stage, associated with the
initialization execution point and hence the Initialize(LCM::Initializable) function, supports
resource acquisition that does not require the Configuration Interface. The second stage, associated
with the configuration execution point and hence the Configure(LCM::Configurable) function,
supports leveraging the Configuration Interface when acquiring resources. Between the two
execution points is when dependencies are resolved between interface users and interface
providers via the Injectable Interface.
A Managed UoC with no designed behaviors at this execution point may still have this function
called by the Component Framework. As the FACE Technical Standard prescribes no particular
behavior, it would be appropriate to return immediately.
module FACE {
module LCM {
}; // interface ConnectableInstance
}; // module Connectable
};// module LCM
}; // module FACE
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason. The return code value is one of the following:
D.4.2 Framework_Disconnect(LCM::Connectable)
The Framework_Disconnect(LCM::Connectable) function supports the distinct execution point
of Component Framework teardown. Component Frameworks commonly have a teardown phase
where the various component instances each in turn become disconnected from the framework.
Following this execution point, the component instance exists but cannot use framework services.
This function is an entry point into a Managed UoC instance, providing the instance with a thread
of control to perform any appropriate behaviors at this execution point, and also serving as
notification that framework services are henceforth unavailable to the Managed UoC instance. It
is intended to be called once transactionally, meaning called until a return code other than
IN_PROGRESS is returned, by the Component Framework.
A Managed UoC with no designed behaviors at this execution point may still have this function
called by the Component Framework. As the FACE Technical Standard prescribes no particular
behavior, it would be appropriate to return immediately.
module FACE {
module LCM {
}; // interface ConnectableInstance
}; module Connectable
};// module LCM
}; // module FACE
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason. The return code value is one of the following:
• NO_ERROR to indicate successful completion of the operation, or that the instance is
already disconnected
• IN_PROGRESS to indicate that a previous operation is still in progress
}; // interface StatefulInstance
}; // module Stateful
};// module LCM
}; // module FACE
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason. The return code value is one of the following:
• NO_ERROR to indicate successful completion of the operation
• NOT_AVAILABLE to indicate that the state could not be returned because it was not in a
steady state
D.5.2 Request_State_Transition(LCM::Stateful)
The Request_State_Transition(LCM::Stateful) function is a request to change the state of an
instance of a Managed UoC.
module FACE {
module LCM {
// The Stateful module corresponds to the Stateful Capability.
module Stateful<typename REQUESTED_STATE_VALUE_TYPE,
typename REPORTED_STATE_VALUE_TYPE> {
interface StatefulInstance {
}; // interface StatefulInstance
}; // module Stateful
};// module LCM
Upon return, the return_code output parameter contains a value indicating that the function
executed successfully or failed for a specific reason. The return code value is one of the following:
• NO_ERROR to indicate successful completion of the operation, or that the component is
already in the requested state
• IN_PROGRESS to indicate that a previous operation is still in progress
• NOT_AVAILABLE to indicate that the requested state transition could not be executed
because it was not in an appropriate state
#ifndef FACE_LCM_INITIALIZABLE
#define FACE_LCM_INITIALIZABLE
#include <FACE/[Link]>
module FACE {
module LCM {
//! FACE does not define an interface to create or destroy instances. The
//! IDL language bindings address the syntax for those operations. The
//! LCM Interface assumes an existent software object that implements
//! one or more of the interfaces defined.
}; // interface InitializableInstance
}; // module Initializable
};
#ifndef FACE_LCM_CONFIGURABLE
#define FACE_LCM_CONFIGURABLE
#include <FACE/[Link]>
module FACE {
module LCM {
//! FACE does not define an interface to create or destroy instances. The
//! IDL language bindings address the syntax for those operations. The
//! LCM Interface assumes an existent software object that implements
//! one or more of the interfaces defined.
}; // interface ConfigurableInstance
}; // module Configurable
};
};
#ifndef FACE_LCM_CONNECTABLE
#define FACE_LCM_CONNECTABLE
#include <FACE/[Link]>
module FACE {
module LCM {
//! FACE does not define an interface to create or destroy instances. The
//! IDL language bindings address the syntax for those operations. The
//! LCM Interface assumes an existent software object that implements
//! one or more of the interfaces defined.
}; // interface ConnectableInstance
}; // module Connectable
};
};
#ifndef FACE_LCM_STATEFUL
#define FACE_LCM_STATEFUL
#include <FACE/[Link]>
module FACE {
module LCM {
//! FACE does not define an interface to create or destroy instances. The
//! IDL language bindings address the syntax for those operations. The
//! LCM Interface assumes an existent software object that implements
//! one or more of the interfaces defined.
}; // interface StatefulInstance
}; // module Stateful
};
};
E.1 Introduction
The TS Interface is defined by an abstraction interface allowing portable software components to
access transport mechanisms used by the TSS library. These mechanisms include queues, sockets,
sampling ports, etc. The goal of the TS Interface is to enhance portability by abstracting multiple
transport mechanism interfaces from the portable software component. The TS Interface and TSS
are described in Section 4.7 and Section 4.8, respectively.
Declarations are provided using an IDL syntax that is mapped to a Programming Language, as
described in Section 4.14.
Note: The IDL in this document is formatted to align with the formatting constraints of the
printed document.
#ifndef FACE_TSS_COMMON
#define FACE_TSS_COMMON
#include <FACE/[Link]>
module FACE {
module TSS {
//! String containing the connection name used in the TSS
//! create_connection function.
typedef STRING_TYPE CONNECTION_NAME_TYPE;
//! UID Type is scoped to be unique within a system rather than global
typedef long long UID_TYPE;
#ifndef FACE_TSS_BASE
#define FACE_TSS_BASE
#include <FACE/TSS/[Link]>
module FACE {
module TSS {
//! Base interface provides the common TSS functions
interface Base {
//! The Initialize( Base) function allows for the PCS and PSSS
//! UoC to trigger the initialization of the TS Interface.
void Initialize (
in CONFIGURATION_RESOURCE configuration,
out RETURN_CODE_TYPE //! The TSS provides an interface to create a
connection. This
//! interface allows the use of DDS, CORBA, ARINC 653, and POSIX
void Destroy_Connection (
in CONNECTION_ID_TYPE connection_id,
out RETURN_CODE_TYPE return_code);
};
};
};
The Initialize(Base) function allows for the PCS and PSSS UoC to trigger the initialization of the
TSS UoC.
/* IDL declaration */
module FACE {
module TSS {
//! The Initialize(Base) function allows for the PCS and PSSS
//! UoC to trigger the initialization of the TS Interface.
void Initialize (
in CONFIGURATION_RESOURCE configuration,
out RETURN_CODE_TYPE return_code);
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Initialize(Base) is one of the following:
• NO_ERROR to indicate TS was successfully initialized according to its configuration
from this or a previous invocation of Initialize(Base).
• NO_ACTION to indicate TS should be initialized through the LCM interface
• NOT_AVAILABLE to indicate the configuration is not accessible
• INVALID_CONFIG to indicate the configuration has an error
• IN_PROGRESS to indicate the Initialize(Base) is still in progress and the TSS has not yet
transitioned to a normal state
The create connection call allows for a PCS and/or PSSS UoC to establish a TSS connection (TS-
UoP Connection). The TSS may use underlying transports such as DDS, CORBA, ARINC 653,
and/or POSIX function calls. Additionally, the behavior is unspecified for whether or not messages
received on the transport prior to connections being created as available to PCS/PSSS UoCs. The
parameters for the transport’s connections are determined through the TSS Configuration
Capability.
/* IDL declaration */
module FACE {
module TSS {
//! Base interface provides the common TSS functions
interface Base {
Upon successfully creating the connection, the connection_id returned contains a value associated
with the connection_name. After a successful Create_Connection(Base), if a PCS/PSSS UoC
makes subsequent calls to Create_Connection(Base) with the same connection_name and without
an intervening Destroy_Connection(Base) on the same connection_id, the PCS/PSSS UoC
instance is returned an INVALID_PARAM error.
Note: Multiple PCS/PSSS UoCs can be deployed to the same address space which creates potential
connection name conflicts (e.g. same data model used amongst UoCs, unexpected name collisions,
multiple instances of the same PCS/PSSS UoC, etc). Special TSS handling is required to resolve
connection name conflicts such that the underlying distribution capability can be presented with
unique names for connections. It is considered an error within the TSS deployment and/or
integration configuration if the underlying distribution capability cannot assume unique names for
connections.
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Create_Connection(Base) is one of the following:
• NO_ERROR to indicate the TS-UoP connection was successfully created from this or a
previous invocation of Create_Connection(Base)
• NO_ACTION to indicate a failure due to unknown reasons
• NOT_AVAILABLE to indicate the TS is not yet initialized or the underlying technology
is unavailable and cannot return a valid connection_id. If NOT_AVAILABLE is returned,
the caller should retry Create_Connection(Base).
• INVALID_PARAM to indicate one or more parameters supplied is null or not in range
• INVALID_CONFIG to indicate the internal TSS Configuration Data does not match one
or more supplied parameter
The Destroy_Connection(Base) function frees up any resources allocated to the connection. This
can be an empty function if no cleanup is required.
/* IDL declaration */
module FACE {
module TSS {
//! Base interface provides the common TSS functions
interface Base {
void Destroy_Connection (
in CONNECTION_ID_TYPE connection_id,
out RETURN_CODE_TYPE return_code);
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Destroy_Connection(Base) is one of the following:
• NO_ERROR to indicate the TS-UoP connection was successfully destroyed
• NO_ACTION to indicate a failure due to unknown reasons
• NOT_AVAILABLE to indicate the TS is not yet initialized or the underlying technology
is unavailable
• INVALID_PARAM to indicate connection_id supplied is null or not in range
#ifndef FACE_TSS_TYPED
#define FACE_TSS_TYPED
#include <FACE/TSS/[Link]>
module FACE {
module TSS {
//! Template provides the operations for a given data type
//! Unique modules are instantiated to accommodate UoCs in the same
//! memory space
module Typed<typename DATATYPE_TYPE> {
interface TypedTS {
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Callback_Handler(TS) is one of the following:
• NO_ERROR to indicate the Callback_Handler(TS) method was successful
• DATA_OVERFLOW to indicate the rate of received messages sent via callback exceeds
the ability of the UoP to process those messages
Note: PCS/PSSS UoCs which rely on the TSS to take action in response to
DATA_OVERFLOW are considered less portable and may experience issues when interfacing
to many different TSS implementations.
void Receive_Message (
in CONNECTION_ID_TYPE connection_id,
in TIMEOUT_TYPE timeout,
out TRANSACTION_ID_TYPE transaction_id,
inout DATATYPE_TYPE message,
out HEADER_TYPE header,
out QoS_EVENT_TYPE qos_parameters,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Receive_Message(TS) is one of the following:
• NO_ERROR to indicate the Receive_Message(TS) method was successful
• NO_ACTION to indicate a failure to complete the requested action due to unknown
reasons
• NOT_AVAILABLE to indicate the TS is not yet initialized or the connection for the
underlying technology is unavailable
• INVALID_PARAM to indicate one or more parameters supplied is null, not in range or
the connection_id is unknown to the TSS implementation
• INVALID_MODE to indicate a callback function has been registered for this connection
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Send_Message(TS) is one of the following:
• NO_ERROR to indicate the Send_Message(TS) method was successful
• NO_ACTION to indicate a failure to complete the requested action due to unknown
reasons
• NOT_AVAILABLE to indicate the TS is not yet initialized, the underlying technology is
unavailable, or a message cannot be sent. If NOT_AVAILABLE is returned, the caller
should retry Send_Message(TS).
• INVALID_PARAM to indicate one or more parameters supplied is null, not in range or
the connection_id is unknown to the TSS implementation
• CONNECTION_CLOSED to indicate the TS-UoP connection is not open/available
• DATA_OVERFLOW to indicate the rate of messages to send exceeds the ability of the
transport to send the message
Note: DATA_OVERFLOW may never be returned by the underlying TSS implementation
because of the protocols and transport types used. If supported and a DATA_OVERFLOW
condition exists, the caller is not guaranteed its messge was distributed due to its underlying
cause being associated with buffer overflows. A DATA_OVERFLOW is returned each time the
Send_Message(TS) fails and for as long as the buffer overflow condition persists.
• RESOURCE_LIMIT_REACHED – to indicate the maximum number of TSS resources
has been used by the calling PCS/PSSS UoC. Example uses for
RESOURCE_LIMIT_REACHED includes when a maximum number of outstanding
client requests has been reached or a maximum number of transport connections has been
exceeded.
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Register_Callback(TS) is one of the following:
• NO_ERROR to indicate the Register_Callback(TS) method was successful
• NO_ACTION to indicate a callback has already been registered for the connection_id
given
• NOT_AVAILABLE to indicate the TS is not yet initialized
• INVALID_PARAM to indicate one or more parameters supplied is null, not in range or
the connection_id is unknown to the TSS implementation.
• CONNECTION_CLOSED to indicate the TS-UoP connection is not open/available
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Unregister_Callback(TS) is one of the following:
• NO_ERROR to indicate the Unregister_Callback(TS) method was successful
• NOT_AVAILABLE to indicate the TS is not yet initialized
• INVALID_PARAM to indicate the connection_id supplied is null, not in range, or did not
have a callback registered
• CONNECTION_CLOSED to indicate the TS-UoP connection is not open/available
#ifndef FACE_TSS_EXTENDED
#define FACE_TSS_EXTENDED
#include <FACE/TSS/[Link]>
module FACE {
module TSS {
module Typed<typename DATATYPE_TYPE, typename RESPONSE_DATATYPE> {
interface Read_Callback {
void Callback_Handler (
in CONNECTION_ID_TYPE connection_id,
in TRANSACTION_ID_TYPE transaction_id,
in RESPONSE_DATATYPE message,
in HEADER_TYPE header,
in QoS_EVENT_TYPE qos_parameters,
out RETURN_CODE_TYPE return_code);
};
interface TypedTS {
interface Read_Callback {
void Callback_Handler (
in CONNECTION_ID_TYPE connection_id,
in TRANSACTION_ID_TYPE transaction_id,
in RESPONSE_DATATYPE message,
in HEADER_TYPE header,
in QoS_EVENT_TYPE qos_parameters,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Callback_Handler(TS) is one of the following:
• NO_ERROR to indicate the Callback_Handler(TS) method was successful
• DATA_OVERFLOW to indicate the rate of received messages sent via callback exceeds
the ability of the UoP to process those messages
Note: PCS/PSSS UoCs which rely on the TSS to take action in response to
DATA_OVERFLOW are considered less protable and may experience issues when interfacing
to may different TSS implementations.
The Send_Message_Blocking(TS) function is used to send data to a destination when the sender
requires a response. The response to the sent data is returned in the same call.
Send_Message_Blocking(TS) is used in conjunction with client/server connection types for client
roles. Clients should only have one outstanding request at a time.
/* IDL declaration */
module FACE {
module TSS {
module Typed<typename DATATYPE_TYPE, typename RESPONSE_DATATYPE> {
interface TypedTS {
void Send_Message_Blocking (
in CONNECTION_ID_TYPE connection_id,
in TIMEOUT_TYPE timeout,
in DATATYPE_TYPE message,
out HEADER_TYPE header,
out QoS_EVENT_TYPE qos_parameters,
inout RESPONSE_DATATYPE return_data,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Send_Message_Blocking(TS) is one of the following:
• NO_ERROR to indicate the Send_Message_Blocking(TS) method was successful
• NO_ACTION to indicate a failure to complete the requested action due to unknown
reasons
• NOT_AVAILABLE to indicate the TS is not yet initialized or the connection for the
underlying technology is unavailable
• INVALID_PARAM to indicate one or more parameters supplied is null, not in range or
the connection_id is unknown to the TSS implementation
• TIMED_OUT to indicate a timeout was specified and exceeded
• CONNECTION_CLOSED to indicate the TS-UoP connection is not open/available
• DATA_OVERFLOW to indicate rate of messages to send exceeds the ability of the
transport to send the message
Note: DATA_OVERFLOW may never be returned by the underlying TSS implementation
because of the protocols and transport types used. If supported and a DATA_OVERFLOW
condition exists, the caller is not guaranteed its message was distributed due to its underlying
cause being associated with buffer overflows. A DATA_OVERFLOW is returned each time the
Send_Message_Blocking(TS) fails and for as long as the buffer overflow condition persists.
• DATA_BUFFER_TOO_SMALL to indicate the message received exceeds the message
size given on a single transaction
The return code value returned from Send_Message_Async(TS) is one of the following:
• NO_ERROR to indicate the Send_Message_Async(TS) method was successful
• NO_ACTION to indicate a failure to complete the requested action due to unknown
reasons
• NOT_AVAILABLE to indicate the TS is not yet initialized or the connection for the
underlying technology is unavailable
• NOT_AVAILABLE to indicate the TS is not yet initialized, the underlying technology is
unavailable, or a message cannot be sent
If NOT_AVAILABLE is returned, the caller should retry Send_Message_Async(TS).
• INVALID_PARAM to indicate one or more parameters supplied is null or not in range or
the connection_id is unknown to the TSS implementation
• CONNECTION_CLOSED to indicate the TS-UoP connection is not open/available
• DATA_OVERFLOW to indicate the rate of messages to send exceeds the ability of the
transport to send the message
• CONNECTION_CLOSED to indicate the TS-UoP connection is not open/available
• DATA_OVERFLOW to indicate the rate of messages to send exceeds the ability of the
transport to send the message
Note: DATA_OVERFLOW may never be returned by the underlying TSS implementation
because of the protocols and transport types used. If supported and a DATA_OVERFLOW
condition exists, the caller is not guaranteed its message was distributed due to its underlying
cause being associated with buffer overflows. A DATA_OVERFLOW is returned each time the
Send_Message_Async(TS) fails and for as long as the buffer overflow condition persists.
#ifndef FACE_TSS_CSP
#define FACE_TSS_CSP
#include <FACE/TSS/[Link]>
module FACE {
module TSS {
module CSP {
enum DATA_STORE_KIND_TYPE {
PRIVATE_DATA_STORE,
//! The Initialize(CSP) function call allows for the PCS, PSSS,
//! and TSSS UoC to trigger the initialization of the CSP
//! Interface.
void Initialize (
in CONFIGURATION_RESOURCE configuration,
out RETURN_CODE_TYPE return_code);
//! The Open(CSP) function allows the PCS or PSSS UoC to open
//! a data store that is associated with checkpoint or private
//! data. The data store is associated with a configuration name
//! and referenced by a token returned from the function.
void Open (
in GUID_TYPE uop_id,
in STRING_TYPE configuration_name,
in DATA_STORE_KIND_TYPE type,
out DATA_STORE_TOKEN_TYPE token,
out RETURN_CODE_TYPE return_code);
//! The Close(CSP) function allows the PCS or PSSS UoC to close
//! a data store.
void Close (
in GUID_TYPE uop_id,
in DATA_STORE_TOKEN_TYPE token,
out RETURN_CODE_TYPE return_code);
//! The Create(CSP) function allows the PCS or PSSS UoC to create
//! a data store entry.
void Create (
in GUID_TYPE uop_id,
in DATA_STORE_TOKEN_TYPE token,
in DATA_ID_TYPE data_id,
in DATA_BUFFER_TYPE data,
out RETURN_CODE_TYPE return_code);
//! The Read(CSP) function allows the PCS or PSSS UoC to read
//! a data store entry.
void Read (
in GUID_TYPE uop_id,
in DATA_STORE_TOKEN_TYPE token,
in DATA_ID_TYPE data_id,
inout DATA_BUFFER_TYPE data,
out RETURN_CODE_TYPE return_code);
//! The Update(CSP) function allows the PCS or PSSS UoC to update
//! a data store entry.
void Update (
in GUID_TYPE uop_id,
in DATA_STORE_TOKEN_TYPE token,
in DATA_ID_TYPE data_id,
in DATA_BUFFER_TYPE data,
out RETURN_CODE_TYPE return_code);
//! The Delete(CSP) function allows the PCS or PSSS UoC to delete
The Initialize(CSP) function call allows for the PCS and PSSS UoC to trigger the initialization of
the CSP interface.
/* IDL declaration */
module FACE {
module TSS {
module CSP {
//! The CSP Interface
interface CSP {
//! The Initialize(CSP) function call allows for the PCS, PSSS,
//! and TSSS UoC to trigger the initialization of the CSP
//! Interface.
void Initialize (
in CONFIGURATION_RESOURCE configuration,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The Open(CSP) function call allows for the PCS and PSSS UoC open a data store associated with
checkpoint and/or private data.
/* IDL declaration */
module FACE {
module TSS {
module CSP {
//! The CSP Interface
interface CSP {
//! The Open(CSP) function allows the PCS or PSSS UoC to open
//! a data store that is associated with checkpoint or private
//! data. The data store is associated with a configuration name
//! and referenced by a token returned from the function.
void Open (
in GUID_TYPE uop_id,
in STRING_ TYPE configuration_name,
in DATA_STORE_KIND_TYPE type,
out DATA_STORE_TOKEN_TYPE token,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The Close(CSP) function call allows for the PCS and PSSS UoC to close a Data Store.
/* IDL declaration */
module FACE {
module TSS {
module CSP {
//! The CSP Interface
interface CSP {
//! The Close(CSP) function allows the PCS or PSSS UoC to close
//! a data store.
void Close (
in GUID_TYPE uop_id,
in DATA_STORE_TOKEN_TYPE token,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The Create(CSP) function call allows for the PCS and PSSS UoC to create a Data Store entry.
/* IDL declaration */
module FACE {
module TSS {
module CSP {
//! The CSP Interface
interface CSP {
//! The Create(CSP) function allows the PCS or PSSS UoC to create
//! a data store entry.
void Create (
in GUID_TYPE uop_id,
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The Read(CSP) function call allows for the PCS and PSSS UoC to read a Data Store entry.
/* IDL declaration */
module FACE {
module TSS {
module CSP {
//! The CSP Interface
interface CSP {
//! The Read(CSP) function allows the PCS or PSSS UoC to read
//! a data store entry.
void Read (
in GUID_TYPE uop_id,
in DATA_STORE_TOKEN_TYPE token,
in DATA_ID_TYPE data_id,
inout DATA_BUFFER_TYPE data,
out RETURN_CODE_TYPE return_code);
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The Update(CSP) function call allows for the PCS and PSSS UoC to update an existing Data Store
entry.
/* IDL declaration */
module FACE {
module TSS {
module CSP {
//! The CSP Interface
interface CSP {
//! The Update(CSP) function allows the PCS or PSSS UoC to update
//! a data store entry.
void Update (
in GUID_TYPE uop_id,
in DATA_STORE_TOKEN_TYPE token,
in DATA_ID_TYPE data_id,
in DATA_BUFFER_TYPE data,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The Delete(CSP) function call allows for the PCS and PSSS UoC to delete a Data Store entry.
/* IDL declaration */
module FACE {
module TSS {
module CSP {
//! The CSP Interface
interface CSP {
//! The Delete(CSP) function allows the PCS or PSSS UoC to delete
//! a data store entry.
void Delete (
in GUID_TYPE uop_id,
in DATA_STORE_TOKEN_TYPE token,
in DATA_ID_TYPE data_id,
out RETURN_CODE_TYPE return_code);
};
};
};
};
#ifndef FACE_TSS_TYPEABSTRACTION
#define FACE_TSS_TYPEABSTRACTION
#include <FACE/TSS/[Link]>
module FACE {
module TSS {
module TypeAbstraction {
void Callback_Handler (
in CONNECTION_ID_TYPE connection_id,
in TRANSACTION_ID_TYPE transaction_id,
in MESSAGE_TYPE message,
in HEADER_TYPE header,
in QoS_EVENT_TYPE qos_parameters,
out RETURN_CODE_TYPE return_code);
};
void Receive_Message (
in CONNECTION_ID_TYPE connection_id,
in TIMEOUT_TYPE timeout,
out TRANSACTION_ID_TYPE transaction_id,
in MESSAGE_SIZE_TYPE size_limit,
inout MESSAGE_TYPE message,
out HEADER_TYPE header,
out QoS_EVENT_TYPE qos_parameters,
out RETURN_CODE_TYPE return_code);
//! If the TS-TA Interface Adapter UoC sets the message’s GUID to
//! CALLEE_PROVIDES_GUID on this connection, then the TA UoC uses
//! an internal value for GUID to associate with the
//! message to send; else the TA UoC associates the provided
//! GUID with the message to send.
//!
void Send_Message (
in CONNECTION_ID_TYPE connection_id,
in TIMEOUT_TYPE timeout,
inout TRANSACTION_ID_TYPE transaction_id,
in MESSAGE_TYPE message,
out MESSAGE_SIZE_TYPE size_sent,
out RETURN_CODE_TYPE return_code);
//! If the TS-TA Interface Adapter UoC sets the message’s GUID to
//! CALLEE_PROVIDES_GUID,
//! then the TA UoC uses an internal value for GUID to associate
//! with the message to send; else the TA UoC associates the provided
//! GUID value with the message to send.
//! If the TS-TA Interface Adapter UoC sets the return_data’s GUID to
//! CALLEE_PROVIDES_GUID, then the TA UoC uses an internal value for
//! return_data GUID and provides the internal GUID value
//! upon return; else the TA UoC uses the provided
//! GUID value within the return_data.
//!
void Send_Message_Blocking (
in CONNECTION_ID_TYPE connection_id,
};
};
};
};
#ifndef FACE_TSS_TPM
#define FACE_TSS_TPM
#include <FACE/TSS/[Link]>
module FACE {
module TSS {
module TPM {
typedef UID_TYPE CHANNEL_ID_TYPE;
enum EVENT_TYPE {
INIT_COMPLETE, //initialization has completed
XPORT_DEGRADED, //a failure, such as being oversubscribed, is
//degrading transport performance
CBIT_FAIL, //continuous built-in-test failure
IBIT_FAIL, //initiated built-in-test failure
CHANNEL_FAIL, //a particular failure has occurred in a channel
LOST_LINK, //the transport link cannot detect wire activity
TRANSMIT_COMPLETE //the last transmission has completed
};
//! One callback interface with two callback methods are provided to
receive data or events.
//! Callbacks registered to receive events get called when changes
//! in the channel(e.g. a disruption in the channel), transports
//! (e.g. lost link, a degradation in network performance, a cbit
//! failure), as well as notification when datagrams have completed
//! transmission on the wire)
interface TPM_Callback {
typedef long EVENT_CODE_TYPE;
typedef STRING_TYPE DIAGNOSTIC_MSG_TYPE;
enum CALLBACK_KIND_TYPE{
DATA, //callback kind for a message incoming from the transport
EVENT, //callback kind for a change in event status
BOTH //callback kind for both a message and change in event
//status
};
void Data_Callback_Handler (
in CHANNEL_ID_TYPE channel_id,
in TRANSACTION_ID_TYPE transaction_id,
in MESSAGE_TYPE message,
in HEADER_TYPE tss_header,
in QoS_EVENT_TYPE qos_parameters,
out RETURN_CODE_TYPE return_code);
void Event_Callback_Handler (
in CHANNEL_ID_TYPE channel_id,
in TRANSACTION_ID_TYPE transaction_id,
in EVENT_TYPE event,
in EVENT_CODE_TYPE event_code,
in DIAGNOSTIC_MSG_TYPE diagnostic_msg,
out RETURN_CODE_TYPE return_code);
};
};
enum LEVEL_OF_TEST_TYPE {
CBIT,
IBIT,
PBIT
};
case SECURE:
CHANNEL_ID_SEQ_TYPE channels_to_clear;
};
void Close_Channel (
in CHANNEL_ID_TYPE channel_id,
out RETURN_CODE_TYPE return_code);
void Is_Data_Available (
in CHANNEL_ID_SEQ_TYPE channel_ids,
in TIMEOUT_TYPE timeout,
out CHANNEL_ID_SEQ_TYPE available_ids,
out RETURN_CODE_TYPE return_code);
The Initialize(TPM) function allows for the TSS UoC to trigger the initialization of the TPM
software component. It provides the entry point for the TPM at startup.
/* IDL declaration */
module FACE {
module TSS {
module TPM {
//! The TPM Interface
interface TPMTS {
//! Initialize provides a method for use during startup to
//! initialize the transport hardware and the protocol.
//! Initialize would be called after each of the protocol binding
//! module’s functions are registered with the service interface.
void Initialize (
in CONFIGURATION_RESOURCE configuration,
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Initialize(TPM) is one of the following:
• NO_ERROR to indicate TPM was successfully initialized according to its configuration
from this or a previous invocation of Initialize(TPM)
• NO_ACTION to indicate TPM should be initialized through the LCM interface
• NOT_AVAILABLE to indicate the configuration is not accessible
• INVALID_CONFIG to indicate the configuration has an error
Note: To support minimal blocking at startup, the initialize may return before it transitions
from an initialize state to a normal state. Subsequent calls to initialize returns
IN_PROGRESS until it transitions out of its initial state. Once the transition occurs, the
next call to initialize returns NO_ERROR.
The Open_Channel(TPM) function allows for a TSS UoC to establish a connection for the
transport managed by the TPM using attributes required by the TSS for the transport, security and
QoS.
/* IDL declaration */
module FACE {
module TSS {
module TPM {
//! The TPM Interface
interface TPMTS {
//! Open_Channel establishes an endpoint connection with another
//! TS domain. The primary TS can establish a contract with the
//! underlying protocol and transport for security and quality of
//! service.
void Open_Channel (
in CONNECTION_NAME_TYPE endpoint_name,
in DATA_BUFFER_TYPE transport_config,
in DATA_BUFFER_TYPE security_config,
out CHANNEL_ID_TYPE channel_id,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon successfully opening the channel, the channel_id returned contains a value associated with
the endpoint_name. After a successful Open_Channel(TPM), subsequent calls to
Open_Channel(TPM) with the same endpoint_name and without an intervening
Close_Channel(TPM) on the same channel_id returns an INVALID_PARAM error.
The Close_Channel(TPM) function frees up any resources allocated to the channel. This can be
an empty function if no cleanup is required.
/* IDL declaration */
module FACE {
module TSS {
module TPM {
//! The TPM Interface
interface TPMTS {
void Close_Channel (
in CHANNEL_ID_TYPE channel_id,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The Get_TPM_Status(TPM) function is used to monitor the health and availability of the transport
or get the current state of the TPM, and whether it remains active and can communicate to its
remote endpoint.
/* IDL declaration */
module FACE {
module TSS {
module TPM {
//! The TPM Interface
interface TPMTS {
//! Used to monitor the health and availability of the transport.
//! The status would allow the user to continue to use the
};
};
};
};
The Read_From_Transport(TPM) function provides an interface for a TSS UoC to read a message
from the TPM that has been received on the transport. This can be used as a non-blocking read
with or without making use of the Is_Data_Available(TPM) function or a blocking read using the
timeout parameter. The TSS and TPM use the same message UID and TSS header as defined by
the TS Interface. The TPM can re-construct them if the protocol optimizes them.
/* IDL declaration */
module FACE {
module TSS {
module TPM {
//! The TPM Interface
interface TPMTS {
//! Read_From_Transport allows the primary TS to read incoming
//! datagrams. If a non-zero timeout is used, the call blocks
//! until data is received and processed by the protocol or the
//! timeout is reached. If used with Is_Data_Available(TPM), a timeout
//! of 0 returns the datagram already processed by the protocol
//! otherwise if no data was received returns 0 bytes in the
//! message.
void Read_From_Transport (
in CHANNEL_ID_TYPE channel_id,
in TIMEOUT_TYPE timeout,
out TRANSACTION_ID_TYPE transaction_id,
inout MESSAGE_TYPE message,
out HEADER_TYPE TSS_header,
out QoS_EVENT_TYPE qos_parameters,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The Write_To_Transport(TPM) function provides an interface for a TSS UoC to write a message
to the TPM for protocol processing and transmission on the transport. Max delay of zero indicates
immediate processing by the TPM. Otherwise, the TSS can establish a pipeline of datagrams and
track they were successfully transmitted from the TPM notification. Once notification is received
by the TSS the message has completed transmission, the TSS can free the message buffer. The
TSS and TPM use the same message UID and TSS header as defined by the TS Interface. The
TPM may optimize them for transmission.
/* IDL declaration */
module FACE {
module TSS {
module TPM {
//! The TPM Interface
interface TPMTS {
//! Write_To_Transport provides the ability to write a datagram
//! to the binding module for protocol processing and transport.
//! The TPM transmits the message within this call with a
//! max_delay of 0 or establish a pipeline of messages.
//! A Event_Callback_Handler is used to release the buffers used by the
//! primary TS.
void Write_To_Transport (
in CHANNEL_ID_TYPE channel_id,
in TIMEOUT_TYPE max_delay,
in MESSAGE_TYPE message,
in HEADER_TYPE TSS_header,
in TRANSACTION_ID_TYPE transaction_id,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
Data callback handlers are provided by users of the TPM interface. The handler is supplied to the
TPM through the Register_TPM_Callback(TPM) function. Once a callback is registered for a
channel, the Data_Callback_Handler(TPM) is invoked by the TPM on receipt of data.
/* IDL declaration */
module FACE {
module TSS {
module TPM {
interface TPM_Callback {
void Data_Callback_Handler (
in CHANNEL_ID_TYPE channel_id,
in TRANSACTION_ID_TYPE transaction_id,
in MESSAGE_TYPE message,
in HEADER_TYPE tss_header,
in QoS_EVENT_TYPE qos_parameters,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
Event callback handlers are provided by users of the TPM interface. The handler is supplied to the
TPM through the Register_TPM_Callback(TPM) function. Once a callback is registered for a
channel, the Event_Callback_Handler(TPM) is invoked by the TPM on changes in the TPM state
or channel state.
/* IDL declaration */
module FACE {
module TSS {
module TPM {
interface TPM_Callback {
void Event_Callback_Handler (
in CHANNEL_ID_TYPE channel_id,
in TRANSACTION_ID_TYPE transaction_id,
in EVENT_TYPE event,
in EVENT_CODE_TYPE event_code,
in DIAGNOSTIC_MSG_TYPE diagnostic_msg,
out RETURN_CODE_TYPE return_code);
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
};
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
#ifndef __FACE_TSS_SERIALIZE
#define __FACE_TSS_SERIALIZE
#include <FACE/TSS/[Link]>
module FACE {
module TSS {
interface Message_Serialization {
void Serialize (
in MESSAGE_TYPE message,
inout DATA_BUFFER_TYPE buffer,
inout TPMTSS::Primitive_Marshalling marshalling_interface,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void DeSerialize (
in DATA_BUFFER_TYPE buffer,
inout MESSAGE_TYPE message,
inout TPMTSS::Primitive_Marshalling marshalling_interface,
out BYTE_SIZE_TYPE bytes_consumed,
interface Serialization {
//! The TSS UoC gets the serialization interface for the message type
//! from the transport services
void Get_Serialization (
in GUID_TYPE message_type_id,
out Message_Serialization serialization,
out RETURN_CODE_TYPE return_code);
};
};
};
#endif //! __FACE_TSS_SERIALIZE
Prototype of the serialize function for messages of a given data type. Used by a TSS UoC to help
serialize complex message structures. Implemented as a helper function within a TSS UoC.
/* IDL declaration */
module FACE {
module TSS {
interface Message_Serialization {
void Serialize (
in MESSAGE_TYPE message,
inout DATA_BUFFER_TYPE buffer,
inout TSS::Primitive_Marshalling marshalling_interface,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
};
};
};
Prototype of the deserialize function for messages of a given data type. Used by a TSS UoC to
help deserialize complex message structures. Implemented as a helper function within a TSS UoC.
/* IDL declaration */
module FACE {
module TSS {
interface Message_Serialization {
void DeSerialize (
in DATA_BUFFER_TYPE buffer,
inout MESSAGE_TYPE message,
inout TSS::Primitive_Marshalling marshalling_interface,
out BYTE SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
Provided by a TSS UoC, Get_Serialization(TS) allows the using TSS UoC to get the location of
the message serialization helper function from the implementation. One instance of the
Serialization interface is used for all of its queries.
module FACE {
module TSS {
interface Serialization {
//! The TSS UoC gets the serialization interface for the message type
from the transport services
void Get_Serialization (
in GUID_TYPE message_type_id,
out Message_Serialization serialization,
out RETURN_CODE_TYPE return_code);
};
}; }; //end TSS
}; //end FACE
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
#ifndef __FACE_TSS_Primitive_Marshal
#define __FACE_TSS_Primitive_Marshal
module FACE {
module TSS {
void Unmarshal_short (
in DATA_BUFFER_TYPE buffer,
out short data,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Marshal_long (
in long data,
in DATA_BUFFER_TYPE buffer,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Unmarshal_long (
in DATA_BUFFER_TYPE buffer,
out long data,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Marshal_long_long (
in long long data,
in DATA_BUFFER_TYPE buffer,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Unmarshal_long_long (
in DATA_BUFFER_TYPE buffer,
out long long data,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Marshal_unsigned_short (
in unsigned short data,
in DATA_BUFFER_TYPE buffer,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Unmarshal_unsigned_short (
in DATA_BUFFER_TYPE buffer,
out unsigned short data,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Marshal_unsigned_long (
in unsigned long data,
void Unmarshal_unsigned_long (
in DATA_BUFFER_TYPE buffer,
out unsigned long data,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Marshal_unsigned_long_long (
in unsigned long long data,
in DATA_BUFFER_TYPE buffer,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Unmarshal_unsigned_long_long (
in DATA_BUFFER_TYPE buffer,
out unsigned long long data,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Marshal_float (
in float data,
in DATA_BUFFER_TYPE buffer,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Unmarshal_float (
in DATA_BUFFER_TYPE buffer,
out float data,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Marshal_double (
in double data,
in DATA_BUFFER_TYPE buffer,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Unmarshal_double (
in DATA_BUFFER_TYPE buffer,
out double data,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Marshal_long_double (
in long double data,
in DATA_BUFFER_TYPE buffer,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Unmarshal_long_double (
in DATA_BUFFER_TYPE buffer,
out long double data,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Marshal_char (
in char data,
in DATA_BUFFER_TYPE buffer,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Marshal_boolean (
in boolean data,
in DATA_BUFFER_TYPE buffer,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Unmarshal_boolean (
in DATA_BUFFER_TYPE buffer,
out boolean data,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Marshal_octet (
in octet data,
in DATA_BUFFER_TYPE buffer,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Unmarshal_octet (
in DATA_BUFFER_TYPE buffer,
out octet data,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Marshal_string (
in UNBOUNDED_STRING_TYPE data,
in DATA_BUFFER_TYPE buffer,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
void Unmarshal_string (
in DATA_BUFFER_TYPE buffer,
out UNBOUNDED_STRING_TYPE data,
out BYTE_SIZE_TYPE bytes_consumed,
out RETURN_CODE_TYPE return_code);
};
};
};
#endif __FACE_TSS_Primitive_Marshal
Each marshalling and unmarshalling function follows the same pattern, for each primitive type.
Only one example for marshalling is provided.
/* IDL declaration */
module FACE {
module TSS {
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
#ifndef __FACE_TSS_MESSAGE_TYPE_UTILITIES
#define __FACE_TSS_MESAAGE_TYPE_UTILITIES
#include <FACE/TSS_common.idl>
module FACE {
module TSS {
interface Message_Type_Utility {
//! Create allocates memory and returns a buffer pointer in the TSS
//! MESSAGE_TYPE aligned with the USM (PCS, PSSS, or TSS) data view type. Data
//! view types are generally unique (C/C++/ada/java language, strings,
//! sequences, etc).
//! If GUID is set to CALLEE_PROVIDES_GUID, create returns a message_buffer
void Create (
inout MESSAGE_TYPE message_buffer,
out RETURN_CODE_TYPE return_code);
//! Copy creates a deep copy of source buffer to provide another instance of
//! the same data view type. Destination buffer is created prior to calling
//! copy with the GUID of the dest_buffer set to CALLEE_PROVIDES_GUID.
void Copy (
in MESSAGE_TYPE src_buffer,
inout MESSAGE_TYPE dest_buffer,
out RETURN_CODE_TYPE return_code);
interface MT_Utility_IF_Lookup{
//! Used to retrieve the interface for allocating and reclaiming memory and
//! copying a data view type.
void Get_Message_Helper(
in GUID_TYPE message_type_id,
out Message_Type_Utility message_helper,
out RETURN_CODE_TYPE return_code);
};
};
};
#endif // __FACE_TSS_MESSAGE_TYPE_UTILITIES
Create (TS) provides a function to pre-allocate a shallow or deep pool of memory for a message
of a particular PCS/PSSS data view type.
module FACE {
module TSS {
interface Message_Type_Utility {
void Create (
inout MESSAGE_TYPE message_buffer,
out RETURN_CODE_TYPE return_code);
};
};
};
The return_code value returned from Create (TS) is one of the following:
• NO_ERROR to indicate Create (TS) was successful
• INVALID_PARAM to indicate the message_buffer GUID supplied is not consistent with
this instance Create (TS).
• RESOURCE_LIMIT_REACHED to indicate Create (TS) was unable to allocate memory
Copy (TS) provides a deep copy of a source buffer into a destination buffer managed by the
function calling it. A Copy (TS) may resize a shallow buffer returned from the Create (TS)
function. Messages are not necessarily stored in contiguous memory and can be affected by
different software coding languages used by PCS/PSSS UoCs. The Copy(TS) function is intended
to abstract those from TSS UoCs to enable TSS portability across system implementations.
module FACE {
module TSS {
interface Message_Type_Utility {
void Copy (
in MESSAGE_TYPE src_buffer,
inout MESSAGE_TYPE dest_buffer,
out RETURN_CODE_TYPE return_code);
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return_code value returned from Copy (TS) is one of the following:
• NO_ERROR to indicate Copy (TS) was successful
• INVALID_PARAM to indicate the src_buffer supplied is incongruous with this instance
of Copy (TS). Incongruity occurs when the src_buffer GUID and/or memory reference in
any combination does not align with this instance of Copy (TS).
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return_code value returned from Destroy (TS) is one of the following:
• NO_ERROR to indicate Destroy (TS) was successful
• INVALID_PARAM to indicate the message_buffer supplied does not reference a
message_buffer previously created for this GUID.
Get_Message_Helper (TS) allows a TSS UoC to get the location of the helper function that creates,
copies, and destroys buffers in the format of the USM data type. A TSS UoC instance uses one
instance of the MT_Utility_IF_Lookup interface for all of its queries.
module FACE {
module TSS {
interface MT_Utility_IF_Lookup {
void Get_Message_Helper(
in GUID_TYPE message_type_id,
out Message_Type_Utility message_helper,
out RETURN_CODE_TYPE return_code);
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Get_Message_Helper (TS) is one of the following:
• NO_ERROR to indicate Get_Message_Helper (TS) was successful
F.1 Introduction
The Health Monitoring and Fault Management (HMFM) Services API provides a normalized
interface to manage and respond to faults, and report them in a portable manner. The HMFM
Services API is part of the OSS. The FACE HMFM API is designed to directly map to ARINC
653 services when those are available. This direct mapping is only possible if the API is defined
in C.
Note: The code in this document is formatted to align with the formatting constraints of the
printed document.
#ifndef FACE_HMFM_H
#define FACE_HMFM_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef enum {
FACE_HMFM_NO_ERROR,
FACE_HMFM_NO_ACTION,
FACE_HMFM_NOT_AVAILABLE,
FACE_HMFM_INVALID_PARAM,
FACE_HMFM_INVALID_CONFIG,
FACE_HMFM_INVALID_MODE,
FACE_HMFM_TIMED_OUT
} FACE_HMFM_RETURN_CODE_TYPE;
#define FACE_HMFM_FAULT_MESSAGE_MAXIMUM_SIZE \
((FACE_HMFM_FAULT_MESSAGE_SIZE_TYPE) 128)
typedef FACE_HMFM_char
FACE_HMFM_FAULT_MESSAGE_TYPE[FACE_HMFM_FAULT_MESSAGE_MAXIMUM_SIZE];
typedef struct {
FACE_HMFM_FAULT_CODE_TYPE CODE;
FACE_HMFM_FAULT_MESSAGE_SIZE_TYPE LENGTH;
FACE_HMFM_THREAD_ID_TYPE FAILED_THREAD_ID;
FACE_HMFM_SYSTEM_ADDRESS_TYPE FAILED_ADDRESS;
FACE_HMFM_FAULT_MESSAGE_TYPE MESSAGE;
} FACE_HMFM_FAULT_STATUS_TYPE;
void FACE_HMFM_Initialize (
/* out */ FACE_HMFM_RETURN_CODE_TYPE *return_code
);
void FACE_HMFM_Create_Fault_Handler (
/* in */ FACE_HMFM_FAULT_HANDLER_ENTRY_TYPE entry_point,
/* in */ FACE_HMFM_STACK_SIZE_TYPE stack_size,
/* out */ FACE_HMFM_RETURN_CODE_TYPE *return_code
);
void FACE_HMFM_Report_Application_Message (
/* in */ FACE_HMFM_FAULT_MESSAGE_ADDRESS_TYPE fault,
/* in */ FACE_HMFM_FAULT_MESSAGE_SIZE_TYPE length,
/* out */ FACE_HMFM_RETURN_CODE_TYPE *return_code
);
void FACE_HMFM_Get_Fault_Status (
/* out */ FACE_HMFM_FAULT_STATUS_TYPE *fault,
/* out */ FACE_HMFM_RETURN_CODE_TYPE *return_code
);
void FACE_HMFM_Raise_Application_Fault (
/* in */ FACE_HMFM_FAULT_CODE_TYPE code,
/* in */ FACE_HMFM_FAULT_MESSAGE_ADDRESS_TYPE message,
/* in */ FACE_HMFM_FAULT_MESSAGE_SIZE_TYPE length,
/* out */ FACE_HMFM_RETURN_CODE_TYPE *return_code
);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* FACE_HMFM_H */
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from FACE_HMFM_Initialize is one of the following:
• FACE_HMFM_NO_ERROR to indicate successful completion of the operation
• FACE_HMFM_INVALID_CONFIG to indicate that an underlying operating system API
call failed
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The FACE_HMFM_Get_Fault_Status method is used by the fault handler to determine the fault
type, faulty thread, the address at which the fault occurred, and the message associated with the
fault. The parameters to this method are as follows:
• fault – upon return, contains a message describing the fault
• return_code – upon return, contains a status code indicating success or failure
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from FACE_HMFM_Get_Fault_Status is one of the following:
• FACE_HMFM_NO_ERROR to indicate successful completion of the operation
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
G.1 Introduction
The Configuration Services API provides a normalized interface to obtain configuration
information from either a local or centralized configuration service in a portable manner. The
Configuration Services API is part of the OSS.
Declarations are provided using an IDL syntax that is mapped to a Programming Language, as
described in Section 4.14.
Note: The code in this document is formatted to align with the formatting constraints of the
printed document.
FACE/[Link]
//! Source file: FACE/[Link]
#ifndef FACE_CONFIGURATION
#define FACE_CONFIGURATION
#include <FACE/[Link]>
module FACE {
//! This type is used to represent the handle used during a session
//! with a configuration container.
typedef long HANDLE_TYPE;
//! This type is used to represent the desired offset used with
//! Seek().
typedef long OFFSET_TYPE;
//! The @a Seek method is used to set the current position indicator
};
};
The return_code output parameter contains a value indicating that the method executed
successfully or failed for a specific reason.
The return code value returned from Initialize(CONFIG) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• INVALID_CONFIG to indicate that the initialization_information parameter(in
appropriate languages) is invalid, or does not identify a known configuration
};
};
The return_code output parameter contains a value indicating that the method executed
successfully or failed for a specific reason.
The return code value returned from Open(CONFIG) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• INVALID_CONFIG to indicate that the configuration container specified is invalid
• INVALID_PARAM to indicate that the handle or return_code pointer (in appropriate
languages) is invalid
• INVALID_MODE to indicate that the caller does not have permission to access the
configuration container
The handle parameter contains the session handle returned by a previous call to Open(CONFIG).
The set_name parameter contains the name of the configuration element to obtain the value of or
one of the following special configuration element names:
• “all” to indicate that the intent is to read all data from the configuration container as a
stream
Upon successful return, the length of the requested configuration set_name is returned in size and
indicates the number of octets in length.
The return_code output parameter contains a value indicating that the method executed
successfully or failed for a specific reason.
The return code value returned from Get_Size(CONFIG) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• INVALID_CONFIG to indicate that the handle specified is invalid
• INVALID_PARAM to indicate that either the buffer or return_status pointer (in
appropriate languages) is invalid
• NOT_AVAILABLE to indicate that the size of the set is not available based on the
backend media adapter used for this configuration information
The handle parameter contains the session handle returned by a previous call to Open(CONFIG).
The set_name parameter contains the name of the configuration set to obtain the value of or can
be one of the following special configuration element names:
• “all” to indicate that the intent is to read all data from the configuration container as a
stream
Upon successful return, the memory specified by buffer contains the contents of the requested
configuration set_name. This value is bytes_read octets in length. When reading the special
set_name “all” to indicate that the data is to be read as a stream, it is possible that the entire contents
cannot be read into the buffer provided. In the event, the size of the buffer provided is not large
enough to contain the entire value and bytes_read is equal to buffer_size and subsequent Read()
operations may be performed to obtain the remainder of the data. When there is no more data to
obtain, bytes_read may contain zero or larger up to buffer_size and the return_code is set to
FACE_NOT_AVAILABLE.
The return_code output parameter contains a value indicating that the method executed
successfully or failed for a specific reason.
The return code value returned from Read(CONFIG) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• INVALID_CONFIG to indicate that the handle specified is invalid
• INVALID_PARAM to indicate that either the buffer or return_status pointer (in
appropriate languages) is invalid
The whence parameter is used to indicate whether the offset parameter is to be relative to the
beginning of the configuration session, an arbitrary position, or relative to the end of the
configuration session. The whence parameter is of an enumerated type which can have the
following values:
• SEEK_FROM_START – indicates that the offset value is to be interpreted as an offset
from the beginning of the file – the offset should be a positive number and represent a
position in the file
• SEEK_FROM_CURRENT – indicates that the offset value is to be interpreted as an offset
from the current position in the file – the offset may be a positive or negative number to
seek backward or forward in the file
• SEEK_FROM_END – indicates that the offset value is to be interpreted as an offset from
the end of the file – the offset should be a negative number and represent how many bytes
to backup
The return_code output parameter contains a value indicating that the method executed
successfully or failed for a specific reason.
The return code value returned from Seek(CONFIG) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• INVALID_CONFIG to indicate that the handle specified is invalid
Note: This method may not be supported by all underlying configuration media.
The return_code output parameter contains a value indicating that the method executed
successfully or failed for a specific reason.
The return code value returned from Close(CONFIG) is one of the following:
• NO_ERROR to indicate successful completion of the operation
• INVALID_CONFIG to indicate that the handle specified is invalid
H.1 Introduction
Graphics Services provide normalized interfaces for PSSS Graphics UoCs and other UoCs
providing graphics capabilities. Composition of multiple graphics contexts within a multi-
threaded Embedded Graphics Library (EGL) system is enabled by the compositor extension.
Cockpit Display Systems (CDS) and User Applications (UA) use the ARINC 661 standardized
interface protocols. Adding Graphics UoCs with minimal integration is enabled by Display
Management.
<xs:simpleType name="a661_byte">
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="255"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="a661_ushort">
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="65535"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="colorReference">
<xs:union memberTypes="a661_byte xs:string" />
</xs:simpleType>
<xs:complexType name="stippleReference">
<xs:attribute name="name" type="xs:string" />
<xs:attribute name="index" type="xs:integer" use="required"/>
<xs:attribute name="scale" type="xs:float" use="required"/>
</xs:complexType>
<xs:complexType name="colorTableEntry">
<xs:sequence>
<xs:element name="RGBA">
<xs:complexType>
<xs:attribute name="r" type="a661_byte" use="required"/>
<xs:attribute name="g" type="a661_byte" use="required"/>
<xs:attribute name="b" type="a661_byte" use="required"/>
<xs:attribute name="a" type="a661_byte"/>
<xs:complexType name="fillStyle">
<xs:sequence>
<xs:element name="lineStyle" type="lineStyle"/>
<!--integrator only-->
<xs:element name="textureFlags" type="textureEntry"/>
<xs:element name="fillHints" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="ID" type="a661_ushort"/>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
<xs:complexType name="lineStyle">
<xs:sequence>
<xs:element name="stippleRef" type="stippleReference" minOccurs="0"/>
<xs:element name="textureFlags" type="textureEntry" minOccurs="0"/>
<xs:element name="lineHints" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="ID" type="a661_ushort" use="required"/>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="width" type="xs:float" use="required"/>
<xs:attribute name="endCap" type="xs:boolean" default="false" />
</xs:complexType>
<xs:complexType name="textureTableEntry">
<xs:sequence>
<xs:element name="filepath" type="xs:string"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="ID" type="xs:integer" use="required"/>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="width" type="xs:integer" use="required"/>
<xs:attribute name="height" type="xs:integer" use="required"/>
</xs:complexType>
<xs:complexType name="pictureTableEntry">
<xs:sequence>
<xs:element name="filepath" type="xs:string"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="ID" type="a661_ushort" use="required"/>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
<xs:complexType name="lineStippleTableEntry">
<xs:attribute name="ID" type="xs:integer" use="required"/>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="pattern" type="xs:string" use="required"/>
<xs:attribute name="halo" type="xs:boolean" default="false"/>
</xs:complexType>
<xs:complexType name="labelStyleSet">
<xs:attribute name="ID" type="a661_ushort"/>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="backgroundColor" type="colorReference"/>
<xs:complexType name="mapItemStyleEntry">
<xs:attribute name="ID" type="xs:integer" use="required"/>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="fontRef" type="a661_byte" use="required"/>
<xs:attribute name="lineStyleRef" type="a661_ushort" use="required"/>
<xs:attribute name="fillStyleRef" type="a661_ushort" use="required"/>
<xs:attribute name="colorRef" type="colorReference" use="required"/>
<xs:attribute name="labelStyleRef" type="a661_ushort" use="required"/>
<xs:attribute name="halo" type="xs:boolean" default="false"/>
</xs:complexType>
<xs:element name="configuration">
<xs:complexType>
<xs:all>
<xs:element name="metadata" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:any minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="constants">
<xs:complexType>
<xs:sequence>
<xs:element name="constant" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="value" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="colortable" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="color" type="colorTableEntry" minOccurs="0"
maxOccurs="256"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="fontTable" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="font" type="fontTableEntry" minOccurs="0"
maxOccurs="256"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="fillStyleTable" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="fillStyle" type="fillStyle" minOccurs="0"
maxOccurs="65536"/>
</xs:sequence>
<xs:simpleType name="a661_ushort">
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="65535"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Units">
<xs:restriction base="xs:string">
<xs:enumeration value="inch"/>
<xs:enumeration value="mm"/>
<xs:enumeration value="screen"/>
<xs:enumeration value="pixel"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Rectangle">
<xs:attribute name="x" type="xs:integer" use="required"/>
<xs:attribute name="y" type="xs:integer" use="required"/>
<xs:attribute name="width" type="xs:integer" use="required"/>
<xs:attribute name="height" type="xs:integer" use="required"/>
</xs:complexType>
<xs:complexType name="Scale">
<xs:attribute name="xScale" type="xs:decimal" use="required"/>
<xs:attribute name="yScale" type="xs:decimal" use="required"/>
<xs:attribute name="baseUnit" type="Units" default="screen" />
<xs:attribute name="perUnit" type="Units" default="pixel" />
</xs:complexType>
<xs:complexType name="Size">
<xs:attribute name="width" type="xs:integer" use="required"/>
<xs:attribute name="height" type="xs:integer" use="required"/>
<xs:attribute name="units" type="Units" default="pixel"/>
</xs:complexType>
<xs:complexType name="UserApplication">
<xs:anotation>
</xs:anotation>
<xs:attribute name="applicationId" type="xs:integer" use="required" />
<xs:attribute name="dFPath" type="xs:string" use="required" />
<xs:attribute name="mapSourceLayer" type="xs:boolean" default="false"/>
<xs:attribute name="styleFilePath" type="xs:string" />
<xs:attribute name="visible" type="xs:boolean" default="false"/>
<xs:attribute name="window" type="xs:integer" user="required"/>
</xs:complexType>
<xs:complexType name="Window">
<xs:anotation>
</xs:anotation>
<xs:sequence>
<xs:element name="description" type="xs:string" />
<xs:element name="pixelArea" type="Rectangle" />
<xs:complexType name="Screen">
<xs:anotation>
</xs:anotation>
<xs:sequence>
<xs:element name="pixelSize" type="Size" >
</xs:element>
<xs:element name="physicalDimensions" type="Size" >
</xs:element>
<xs:element name="layout" maxOccurs="65535" >
<xs:anotation>
</xs:anotation>
<xs:complexType>
<xs:sequence>
<xs:element name="window" type="Window" maxOccurs="65535" />
</xs:sequence>
<xs:attribute name="id" type="xs:integer" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:integer" use="required"/>
</xs:complexType>
</xs:anotation>
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="65535"/>
</xs:sequence>
<xs:attribute name="id" type="a661_ushort" use="required"/>
<xs:attribute name="name" type="xs:string" />
<xs:attribute name="type" type="xs:string" />
</xs:complexType>
</xs:anotation>
<xs:complexType>
<xs:attribute name="path" type="xs:string" />
<xs:attribute name="input" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="configuration">
<xs:anotation>
This is the root element of the configuration file.
</xs:anotation>
<xs:complexType>
<xs:sequence>
<xs:element name="metaData" type="xs:string" minOccurs="0" />
<xs:element name="screen" type="Screen" maxOccurs="65535"/>
H.3.1 UserApplication
The UserApplication element is used to define which Definition Files (DF) or UAs are placed into
which windows. It also defines which DFs are visible by default and the configuration file which
defines the style tables used for that DF file, including color tables, style set parameters, and other
similar attributes. The application ID attribute is used to specify the UA ID as specified in the
ARINC 661 standard, and it helps to make sure that the UA ID is unique in a complex system.
H.3.2 Window
The Window element defines a section of the screen in which one or more DFs are placed with
their origin at the bottom left of the window area. More information on the concept of a window
is in the ARINC 661 standard.
H.3.3 Screen
The Screen element defines a physical display surface which has both physical dimensions and a
defined pixel size. Within a screen a number of windows are defined in the ARINC 661 server’s
screen space. Within each screen space an ARINC 661 DF is used to define what is in that area of
the screen.
The “id” attribute is used by the EGL layer to define to which display output this information
refers.
H.3.4 pixelSize
The pixelSize element is used to let the ARINC 661 server know how many pixels are in the area.
It simply has a width and height attribute of the rectangular area of the screen. The assumption
that the screen is rectangular is being made here as a general case. If the physical screen can be
expressed as a set of rectangles it is recommended that multiple screen elements are used.
H.3.5 physicalDimensions
The physicalDimensions element defines the physical size of the screen. This is used to determine
the default scaling factor of all ARINC 661 applications to work as specified by the ARINC 661
standard which defined the 0.01 mm = 1 ARINC 661 display unit. It can also be used to supply
the physical dimensions to the EGL layer used by the OpenGL applications for their use.
H.3.6 Layout
The Layout element is used to define a layout of windows. This allows for the server to be able to
change between different layouts as needed.
H.3.8 Properties
The Properties element is a set of name, value pairs that are used by the external source driver to
configure the driver for proper use to provide the requested external source data.
I.1 Introduction
During startup, each UoC in a memory address space requires a reference to the IDL interfaces it
uses during run-time. The Injectable Interface provides a basic Set_Reference interface for an
external executive to provide references to UoCs. The instantiations make each Set_Reference
function unique by the type of Injectable Interface. If more than one reference to an interface is
used, the Set_Reference is called for each instance required.
Declarations are provided using an IDL syntax that is mapped to a Programming Language, as
described in Section 4.14.
Note: The code in this document is formatted to align with the formatting constraints of the
printed document.
#ifndef FACE_INJECTABLE
#define FACE_INJECTABLE
#include <FACE/[Link]>
module FACE {
module Injectable<interface INTERFACE_TYPE> {
interface Injectable {
//! The Set_Reference(Injectable) function assigns an instance
//! of an interface provider specified by interface_reference.
//!
//! Note: The interface_reference parameter is semantically an
//! in parameter but is inout to avoid an undesirable
//! mapping in C++.
void Set_Reference (
in STRING_TYPE interface_name,
inout INTERFACE_TYPE interface_reference,
in GUID_TYPE id,
out RETURN_CODE_TYPE return_code);
};
};
};
Upon return, the return_code output parameter contains a value indicating that the method
executed successfully or failed for a specific reason.
The return code value returned from Set_Reference is one of the following:
• NO_ERROR to indicate the operation was successful
• INVALID_PARAM to indicate the interface_reference parameter supplied is null or not
in range
• NO_ACTION to indicate the reference is a duplicate to one already set
• INVALID_MODE to indicate Set_Reference was invoked at an execution point later than
the UoC is able to reassign interface dependencies
• INVALID_CONFIG to indicate that the id or interface_name does not correspond to an
expected value for an instance of the interface supplied by interface_reference
• NOT_AVAILABLE to indicate the calling function cannot set more than one reference of
this interface type for this UoC
Three FACE Interfaces do vary by type and thus cannot be listed: TS Typed Interface, TS Typed-
Extended Interface, and LCM Stateful Interface.
I.3.1 FACE::Configuration_Injectable
// Source file: FACE/Configuration_Injectable.idl
#ifndef FACE_CONFIGURATION_INJECTABLE
#define FACE_CONFIGURATION_INJECTABLE
#include <FACE/[Link]>
#include <FACE/[Link]>
module FACE {
}; // module FACE
#endif // FACE_CONFIGURATION_INJECTABLE
I.3.2 FACE::IOSS::Analog::IO_Service_Injectable
// Source file: FACE/IOSS/Analog_Injectable.idl
#ifndef FACE_IOSS_ANALOG_INJECTABLE
#include <FACE/[Link]>
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
module Analog {
}; // module Analog
}; // module IOSS
}; // module FACE
#endif // FACE_IOSS_ANALOG_INJECTABLE
I.3.3 FACE::IOSS::ARINC429::IO_Service_Injectable
// Source file: FACE/IOSS/ARINC429_Injectable.idl
#ifndef FACE_IOSS_ARINC429_INJECTABLE
#define FACE_IOSS_ARINC429_INJECTABLE
#include <FACE/[Link]>
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
module ARINC429 {
}; // module ARINC429
}; // module IOSS
}; // module FACE
#endif // FACE_IOSS_ARINC429_INJECTABLE
I.3.4 FACE::IOSS::ARINC825::IO_Service_Injectable
// Source file: FACE/IOSS/ARINC825_Injectable.idl
#ifndef FACE_IOSS_ARINC825_INJECTABLE
#define FACE_IOSS_ARINC825_INJECTABLE
#include <FACE/[Link]>
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
module ARINC825 {
#endif // FACE_IOSS_ARINC825_INJECTABLE
I.3.5 FACE::IOSS::Discrete::IO_Service_Injectable
// Source file: FACE/IOSS/Discrete_Injectable.idl
#ifndef FACE_IOSS_DISCRETE_INJECTABLE
#define FACE_IOSS_DISCRETE_INJECTABLE
#include <FACE/[Link]>
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
module Discrete {
}; // module Discrete
}; // module IOSS
}; // module FACE
#endif // FACE_IOSS_DISCRETE_INJECTABLE
I.3.6 FACE::IOSS:Generic::IO_Service_Injectable
// Source file: FACE/IOSS/Generic_Injectable.idl
#ifndef FACE_IOSS_GENERIC_INJECTABLE
#define FACE_IOSS_GENERIC_INJECTABLE
#include <FACE/[Link]>
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
module Generic {
}; // module Generic
}; // module IOSS
}; // module FACE
#endif // FACE_IOSS_GENERIC_INJECTABLE
I.3.7 FACE::IOSS::I2C::Combined_RW_IO_Service_Injectable
// Source file: FACE/IOSS/I2C_Injectable.idl
#ifndef FACE_IOSS_I2C_INJECTABLE
#include <FACE/[Link]>
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
module I2C {
}; // module I2C
}; // module IOSS
}; // module FACE
#endif // FACE_IOSS_I2C_INJECTABLE
I.3.8 FACE::IOSS::M1553::IO_Service_Injectable
// Source file: FACE/IOSS/M1553_Injectable.idl
#ifndef FACE_IOSS_M1553_INJECTABLE
#define FACE_IOSS_M1553_INJECTABLE
#include <FACE/[Link]>
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
module M1553 {
};
}; // module IOSS
}; // module FACE
#endif // FACE_IOSS_M1553_INJECTABLE
I.3.9 FACE::IOSS::M1553_Mk2::IO_Service_Injectable
// Source file: FACE/IOSS/M1553_Mk2_Injectable.idl
#ifndef FACE_IOSS_M1553_MK2_INJECTABLE
#define FACE_IOSS_M1553_MK2_INJECTABLE
#include <FACE/[Link]>
#include <FACE/IOSS/M1553_Mk2.idl>
module FACE {
module IOSS {
module M1553_Mk2 {
#endif // FACE_IOSS_M1553_Mk2_INJECTABLE
I.3.10 FACE::IOSS::PrecisionSynchro::IO_Service_Injectable
// Source file: FACE/IOSS/PrecisionSynchro_Injectable.idl
#ifndef FACE_IOSS_PRECISIONSYNCHRO_INJECTABLE
#define FACE_IOSS_PRECISIONSYNCHRO_INJECTABLE
#include <FACE/[Link]>
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
module PrecisionSynchro {
}; // module PrecisionSynchro
}; // module IOSS
}; // module FACE
#endif // FACE_IOSS_PRECISIONSYNCHRO_INJECTABLE
I.3.11 FACE::IOSS::Serial::IO_Service_Injectable
// Source file: FACE/IOSS/Serial_Injectable.idl
#ifndef FACE_IOSS_SERIAL_INJECTABLE
#define FACE_IOSS_SERIAL_INJECTABLE
#include <FACE/[Link]>
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
module Serial {
}; // module Serial
}; // module IOSS
}; // module FACE
#endif // FACE_IOSS_SERIAL_INJECTABLE
I.3.12 FACE::IOSS::Synchro::IO_Service_Injectable
// Source file: FACE/IOSS/Synchro_Injectable.idl
#include <FACE/[Link]>
#include <FACE/IOSS/[Link]>
module FACE {
module IOSS {
module Synchro {
}; // module Synchro
}; // module IOSS
}; // module FACE
#endif // FACE_IOSS_SYNCHRO_INJECTABLE
I.3.13 FACE::LCM::Configurable::ConfigurableInstance_Injectable
// Source file: FACE/LCM/Configurable_Injectable.idl
#ifndef FACE_CONFIGURABLE_INJECTABLE
#define FACE_CONFIGURABLE_INJECTABLE
#include <FACE/[Link]>
#include <FACE/LCM/[Link]>
module FACE {
module LCM {
module Configurable {
}; // module Configurable
}; // module LCM
}; // module FACE
#endif // FACE_CONFIGURABLE_INJECTABLE
I.3.14 FACE::LCM::Connectable::ConnectableInstance_Injectable
// Source file: FACE/LCM/Connectable_Injectable.idl
#ifndef FACE_LCM_CONNECTABLE_INJECTABLE
#define FACE_LCM_CONNECTABLE_INJECTABLE
#include <FACE/[Link]>
#include <FACE/LCM/[Link]>
module FACE {
module LCM {
module Connectable {
}; // module Connectable
}; // module LCM
}; // module FACE
#endif // FACE_LCM/CONNECTABLE_INJECTABLE
I.3.15 FACE::LCM::Initializable::InitializableInstance_Injectable
// Source file: FACE/LCM/Initializable_Injectable.idl
#ifndef FACE_LCM_INITIALIZABLE_INJECTABLE
#define FACE_LCM_INITIALIZABLE_INJECTABLE
#include <FACE/[Link]>
#include <FACE/LCM/[Link]>
module FACE {
module LCM {
module Initializable {
}; // module Initializable
}; // module LCM
}; // module FACE
#endif // FACE_LCM/INITIALIZABLE_INJECTABLE
I.3.16 FACE::TSS::Base_Injectable
// Source file: FACE/TSS/Base_Injectable.idl
#ifndef FACE_TSS_BASE_INJECTABLE
#define FACE_TSS_BASE_INJECTABLE
#include <FACE/[Link]>
#include <FACE/TSS/[Link]>
module FACE {
module TSS {
}; // module TSS
}; // module FACE
#endif // FACE_TSS_BASE_INJECTABLE
I.3.17 FACE::TSS::CSP::CSP_Injectable
// Source file: FACE/TSS/CSP_Injectable.idl
#ifndef FACE_TSS_CSP_INJECTABLE
#define FACE_TSS_CSP_INJECTABLE
module FACE {
module TSS {
module CSP {
}; // module CSP
}; // module TSS
}; // module FACE
#endif // FACE_TSS_CSP_INJECTABLE
I.3.18 FACE::TSS::Serialization_Injectable
// Source file: FACE/TSS/Serialization_Injectable.idl
#ifndef FACE_TSS_SERIALIZATION_INJECTABLE
#define FACE_TSS_SERIALIZATION_INJECTABLE
#include <FACE/[Link]>
#include <FACE/TSS/[Link]>
module FACE {
module TSS {
}; // module TSS
}; // module FACE
#endif // FACE_TSS_SERIALIZATION_INJECTABLE
I.3.19 FACE::TSS::TPM::TPMTS_Injectable
// Source file: FACE/TSS/TPM_Injectable.idl
#ifndef FACE_TSS_TPM_INJECTABLE
#define FACE_TSS_TPM_INJECTABLE
#include <FACE/TSS/[Link]>
module FACE {
module TSS {
module TPM {
}; // module TPM
}; // module TSS
}; // module FACE
I.3.20 FACE::TSS::TypeAbstraction::TypeAbstractionTS_Injectable
// Source file: FACE/TSS/TypeAbstraction_Injectable.idl
#ifndef FACE_TSS_TYPEABSTRACTION_INJECTABLE
#define FACE_TSS_TYPEABSTRACTION_INJECTABLE
#include <FACE/[Link]>
#include <FACE/TSS/[Link]>
module FACE {
module TSS {
module TypeAbstraction {
}; // module TypeAbstraction
}; // module TSS
}; // module FACE
I.3.21 FACE::TSS::Primitive_Marshalling_Injectable
////! Source file: FACE/TSS/Primitive_Marshalling_Injectable.idl
#ifndef FACE_TSS_PRIMITIVE_MARSHALLING_INJECTABLE
#define FACE_TSS_PRIMITIVE_MARSHALLING_INJECTABLE
#include <FACE/[Link]>
#include <FACE/TSS/Primitive_Marshalling.idl>
module FACE {
module TSS {
}; // module TSS
}; // module FACE
#ifndef FACE_TSS_MT_UTILITY_IF_LOOKUP_INJECTABLE
#define FACE_TSS_MT_UTILITY_IF_LOOKUP_INJECTABLE
#include <FACE/[Link]>
#include <FACE/TSS/Message_Type_Utilities.idl>
}; // module TSS
}; // module FACE
J.1 Introduction
The FACE Data Model Language is defined by a Meta-Object Facility (MOF) metamodel. This
appendix includes the EMOF XMI representation of the metamodel and serves as the normative
version of the FACE Data Model Language. In addition to the EMOF XMI, this appendix includes
normative OCL constraints which also define the FACE Data Model Language. The FACE Data
Model Language is described in detail in Section 3.3.2, Section 4.9.1, and Section J.2. Section J.2
includes descriptions of the elements in the metamodel. These descriptions have been removed
from the included EMOF XMI.
Description
Description
An Element is the root type for defining all named elements in the ArchitectureModel. The “name”
attribute captures the name of the Element in the model. The “description” attribute captures a
description for the element. The attributes for the Element meta-class are listed in Table 43.
Table 43: [Link] Attributes
Description
The literals for the ClientServerRole enumeration are listed in Table 44.
Table 44: [Link] Literals
Name
Client
Server
Description
The FaceProfile enumeration captures the OS API subsets for a UoP as defined by the OSS. The
literals for the FaceProfile enumeration are listed in Table 45.
Table 45: [Link] Literals
Name
GeneralPurpose
Security
SafetyBase
SafetyExtended
Description
The literals for the DesignAssuranceLevel enumeration are listed in Table 46.
Table 46: [Link] Literals
Name
A
B
C
D
E
Description
The literals for the DesignAssuranceStandard enumeration are listed in Table 47.
Table 47: [Link] Literals
Name
DO_178B_ED_12B
DO_178C_ED_12C
Description
The MessageExchangeType enumeration captures the options for the message exchange type of a
UoP port as defined by the TS Interface. The literals for the MessageExchangeType enumeration
are listed in Table 48.
Table 48: [Link] Literals
Name
InboundMessage
OutboundMessage
Description
The PartitionType enumeration captures the OS API types for a UoP as defined by the OSS. The
literals for the PartitionType enumeration are listed in Table 49.
Table 49: [Link] Literals
Name
POSIX
ARINC653
Description
The ProgrammingLanguage enumeration captures the options for programming language API
bindings as defined by Section 4.14. The literals for the ProgrammingLanguage enumeration are
listed in Table 50.
Table 50: [Link] Literals
Name
C
CPP
Java
Ada
Description
The SynchronizationStyle enumeration captures the options for the synchronization style of a UoP
port as defined by the TS Interface. The literals for the SynchronizationStyle enumeration are
listed in Table 51.
Table 51: [Link] Literals
Name
Blocking
NonBlocking
Description
The literals for the ThreadType enumeration are listed in Table 52.
Table 52: [Link] Literals
Name
Foreground
Background
Description
A UoPModel is a container for UoC Elements. The relationships for the UoPModel meta-class are
listed in Table 53.
Table 53: [Link] Relationships
Description
A uop Element is the root type for defining the component elements of the ArchitectureModel.
The relationships for the Element meta-class are listed in Table 54.
Description
Description
A LanguageRunTime is a language run-time as defined in Section 4.2.3. The relationships for the
LanguageRunTime meta-class are listed in Table 57.
Table 57: [Link] Relationships
Description
Description
An AbstractUoP is used to capture the specification of a UoP. The relationships for the
AbstractUoP meta-class are listed in Table 59.
Table 59: [Link] Relationships
Description
Description
Description
A PortableComponent is a software component as defined by the PCS. The relationships for the
PortableComponent meta-class are listed in Table 63.
Table 63: [Link] Relationships
Description
Description
A Thread defines the properties for the scheduling of a thread. The attributes for the Thread meta-
class are listed in Table 65.
Table 65: [Link] Attributes
Description
Description
Description
Description
Description
Description
Description
A LifeCycleManagementPort is used to define the life-cycle interface for the component. The
“messageExchangeType” attribute defines the direction of the life-cycle message relative to the
UoP. The attributes for the LifeCycleManagementPort meta-class are listed in Table 76, and its
relationships are shown in Table 77.
Table 76: [Link] Attributes
Description
A uop MessageType is a uop Template or a uop CompositeTemplate. The relationships for the
MessageType meta-class are listed in Table 78.
Table 78: [Link] Relationships
Description
Description
Description
Description
Description
An integration Element is the root type for defining the integration elements of the
ArchitectureModel. The relationships for the Element meta-class are listed in Table 86.
Table 86: [Link] Relationships
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
A ViewFilter represents of an instance of a filter of data allowing a view to either pass through a
filter, or to be filtered out (i.e., not passed through). A ViewFilter performs no transformation of
data. The relationships for the ViewFilter meta-class are listed in Table 99.
Table 99: [Link] Relationships
Description
A ViewSource is a TransportNode that only provides a View. The relationships for the
ViewSource meta-class are listed in Table 100.
Table 100: [Link] Relationships
Description
A ViewSink is a TransportNode that only receives a View. The relationships for the ViewSink
meta-class are listed in Table 101.
Description
Description
A ViewTransporter represents the use of a TransportChannel with the intent of moving a view
over it. The relationships for the ViewTransporter meta-class are listed in Table 103.
Table 103: [Link] Relationships
Description
Description
Description
A traceability Element is the root type for defining the traceability elements of the FACE
Architecture Model. The relationships for the Element meta-class are listed in Table 106.
Table 106: [Link] Relationships
Description
A TraceableElement is used to capture traceability to other models. The relationships for the
TraceableElement meta-class are listed in Table 107.
Table 107: [Link] Relationships
Description
Description
Description
Description
The relationships for the ConceptualEntityTrace meta-class are listed in Table 111.
Table 111: [Link] Relationships
Description
The relationships for the ConceptualViewTrace meta-class are listed in Table 112.
Table 112: [Link] Relationships
Description
The relationships for the LogicalEntityTrace meta-class are listed in Table 113.
Table 113: [Link] Relationships
Description
The relationships for the LogicalViewTrace meta-class are listed in Table 114.
Table 114: [Link] Relationships
Description
The relationships for the PlatformEntityTrace meta-class are listed in Table 115.
Table 115: [Link] Relationships
Description
The relationships for the PlatformViewTrace meta-class are listed in Table 116.
Table 116: [Link] Relationships
This section may be modified in subsequent releases. Prior to implementing, please ensure you
are using the latest revision of FACE Technical Standard, Edition 3.x, and you have checked to
see if any minor releases, corrigenda, or approved corrections have been published.
structured_template_element_type_decl = main_template_method_decl |
supporting_template_method_decl | union_type_decl ;
main_template_method_decl = main_entity_type_template_method_decl |
main_equivalent_entity_type_template_method_decl ;
primary_entity_type_template_method_parameter =
entity_type_template_method_parameter ;
entity_type_template_method_parameter =
entity_type_structured_template_element_declared_parameter_expression ;
main_equivalent_entity_type_template_method_decl = kw_main ,
equivalent_entity_type_template_method_decl ;
supporting_template_method_decl = supporting_entity_type_template_method_decl |
supporting_equivalent_entity_type_template_method_decl ;
supporting_entity_type_template_method_decl = template_element_type_name ,
left_paren , primary_entity_type_template_method_parameter , right_paren ,
entity_type_template_method_body ;
supporting_equivalent_entity_type_template_method_decl =
template_element_type_name , equivalent_entity_type_template_method_decl ;
entity_type_template_method_body = left_brace ,
entity_type_template_method_member , { entity_type_template_method_member } ,
right_brace ;
entity_type_template_method_member =
entity_type_structured_template_element_member ;
equivalent_entity_type_template_method_decl = left_angle_bracket ,
equivalent_entity_type_template_method_parameter_list , right_angle_bracket ,
equivalent_entity_type_template_method_body ;
equivalent_entity_type_template_method_parameter_list =
equivalent_entity_type_template_method_parameter , { comma ,
equivalent_entity_type_template_method_parameter } ;
equivalent_entity_type_template_method_body = left_brace ,
equivalent_entity_type_template_method_member , {
equivalent_entity_type_template_method_member } , right_brace ;
equivalent_entity_type_template_method_member =
equivalent_entity_type_template_element_member_statement , semicolon ;
equivalent_entity_type_template_element_member_statement = [
optional_annotation ] ,
designated_equivalent_entity_non_entity_type_characteristic_reference , [
deref , idlstruct_member_reference ] , [ kw_as ,
structured_template_element_member_name ] ;
union_parameter =
entity_type_structured_template_element_declared_parameter_expression ;
case_label_literal = enum_literal_reference_expression |
idldiscriminator_type_literal ;
union_member = entity_type_structured_template_element_member ;
entity_type_structured_template_element_member =
entity_type_structured_template_element_member_statement , semicolon ;
entity_type_structured_template_element_member_statement =
designated_entity_characteristic_reference_statement |
structured_template_element_type_reference_statement ;
designated_entity_characteristic_reference_statement =
explicit_designated_entity_non_entity_type_characteristic_reference_expression
| designated_entity_non_entity_type_characteristic_wildcard_reference ;
explicit_designated_entity_non_entity_type_characteristic_reference_expression
= [ optional_annotation ] ,
designated_entity_non_entity_type_characteristic_reference , [ deref ,
idlstruct_member_reference ] , [ kw_as ,
structured_template_element_member_name ] ;
structured_template_element_type_reference_statement = inline_annotation ,
structured_template_element_type_reference_expression | [ optional_annotation ]
, structured_template_element_type_reference_expression ,
structured_template_element_member_name ;
structured_template_element_type_reference_expression =
entity_type_structured_template_element_type_reference , left_paren ,
structured_template_element_type_reference_parameter_list , right_paren |
equivalent_entity_type_template_method_reference , left_angle_bracket ,
structured_template_element_type_reference_parameter_list , right_angle_bracket
;
structured_template_element_type_reference_parameter_list =
primary_structured_template_element_type_reference_parameter , { comma ,
optional_structured_template_element_type_reference_parameter } ;
primary_structured_template_element_type_reference_parameter =
structured_template_element_type_reference_parameter ;
optional_structured_template_element_type_reference_parameter =
structured_template_element_type_reference_parameter ;
structured_template_element_type_reference_parameter = [
entity_type_structured_template_element_declared_parameter_reference , equals
] , designated_entity_type_reference_path ;
external_template_type_reference = identifier ;
entity_type_structured_template_element_type_reference = identifier ;
entity_type_structured_template_element_declared_parameter_expression =
entity_type_reference , [
entity_type_structured_template_element_declared_parameter_alias ] ;
entity_type_structured_template_element_declared_parameter_alias = identifier ;
structured_template_element_member_name = identifier ;
template_element_type_name = identifier ;
equivalent_entity_type_template_method_reference = identifier ;
equivalent_entity_type_template_method_parameter = identifier ;
designated_equivalent_entity_non_entity_type_characteristic_reference =
equivalent_entity_type_template_method_parameter_reference , period ,
equivalent_entity_type_template_method_characteristic_reference ;
equivalent_entity_type_template_method_parameter_reference = identifier ;
equivalent_entity_type_template_method_characteristic_reference = identifier ;
designated_entity_non_entity_type_characteristic_reference =
designated_entity_type_reference_path , period ,
query_projected_non_entity_type_characteristic_reference |
query_projected_non_entity_type_characteristic_reference_or_alias ;
designated_entity_non_entity_type_characteristic_wildcard_reference = [
designated_entity_type_reference_path , period ] , asterisk ;
designated_entity_enumeration_type_characteristic_reference =
designated_entity_type_reference_path , period ,
query_projected_enumeration_type_characteristic_reference |
query_projected_enumeration_type_characteristic_reference_or_alias;
designated_entity_type_reference_path = [
explicit_entity_type_reference_join_path ] , designated_entity_type_reference ;
explicit_entity_type_reference_join_path = ( join_path_entity_type_reference ,
period ) , { join_path_entity_type_reference , period };
join_path_entity_type_reference = qualified_entity_type_reference ;
designated_entity_type_reference = qualified_entity_type_reference ;
qualified_entity_type_reference = entity_type_reference , [
entity_characteristic_value_qualifier ] ;
entity_type_reference = query_selected_entity_type_reference_or_alias ;
entity_characteristic_value_qualifier = query_where_clause_criteria ;
idlstruct_member_reference = identifier ;
enumeration_type_reference = identifier ;
enumeration_literal_reference = identifier ;
query_projected_non_entity_type_characteristic_reference_or_alias = identifier
;
query_projected_non_entity_type_characteristic_reference = identifier ;
query_projected_enumeration_type_characteristic_reference_or_alias = identifier
;
query_projected_enumeration_type_characteristic_reference = identifier ;
query_selected_entity_type_reference_or_alias = identifier ;
idlboolean = kw_boolean ;
kw_true = "TRUE" ;
kw_false = "FALSE" ;
deref = "->" ;
asterisk = "*" ;
left_brace = "{" ;
right_brace = "}" ;
left_paren = "(" ;
right_paren = ")" ;
left_bracket = "[" ;
right_bracket = "]" ;
left_angle_bracket = "<" ;
right_angle_bracket = ">" ;
comma = "," ;
colon = ":" ;
semicolon = ";" ;
period = "." ;
at_symbol = "@" ;
equals = "=" ;
char_literal = "a" | "b"| "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" |
"l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" |
"y" | "z" | "A" | "B"| "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" |
"L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" |
"Y" | "Z" | "_" ;
zero_digit_literal = "0" ;
Legend
term The name of a term in the Template grammar. A set of rules may follow a term.
These rules apply to all instances of this term in a modeled [Link].
This term is referred to as the rule’s “context term” in this legend.
template_term_name The name of a term in the Template grammar. In a rule, it represents an instance
of the named term in a modeled [Link]. (Rules reference the
context term as well as other terms in its expression.)
QUERY _ TERM _ NAME The name of a term in the Query grammar. In a rule, it represents an instance of
the named term in the specification of the [Link]
(which itself is a QUERY _ SPECIFICATION) that is the boundQuery of the
[Link] whose specification is the template_specification to which
the rules below are being applied.
property_name The name of metatype’s property. In a rule, it represents a value associated with
the named property of an instance of a metatype in a model.
template_specification
If an entity_type_structured_template_element_member is
structured_template_element_type_reference_statement, then:
• If entity_type_structured_template_element_type_reference is specified, then
entity_type_structured_template_element_type_reference must match by name:
— The template_element_type_name of a
supporting_entity_type_template_method_decl or a union_type_decl of this
template_specification, or
— An external_template_type_reference that is the name of the [Link]
whose main_template_method_decl is main_entity_type_template_method_decl
• If equivalent_entity_type_template_method_reference is specified, then
equivalent_entity_type_template_method_reference must match by name:
— The template_element_type_name of a
supporting_equivalent_entity_type_template_method_decl of this
template_specification, or
— An external_template_type_reference that is the name of the [Link]
whose main_template_method_decl is
main_equivalent_entity_type_template_method_decl
using_external_template_statement
structured_template_element_type_decl
main_entity_type_template_method_decl
If entity_type_structured_template_element_member is
explicit_designated_entity_non_entity_type_characteristic_reference_expression:
• If designated_entity_non_entity_type_characteristic_reference is
query_projected_non_entity_type_characteristic_reference_or_alias, then:
— One of the conditions below must be satisfied, resolving it to the
[Link] identified by the first rule satisfied in
priority order:
▪ query_projected_non_entity_type_characteristic_reference_or_alias
matches the rolename of a [Link]
that is in the PROJECTED_CHARACTERISTIC _LIST of the outermost
QUERY _STATEMENT and is a composition of the SELECTED _ENTITY
referenced by the primary_entity_type_template_method_parameter’s
query_selected_entity_type_reference_or_alias
▪ query_projected_non_entity_type_characteristic_reference_or_alias
matches by name a PROJECTED_CHARACTERISTIC _ALIAS of an
EXPLICIT _SELECTED _ENTITY _CHARACTERISTIC _REFERENCE in the
PROJECTED _CHARACTERISTIC _LIST of the outermost
QUERY _STATEMENT
▪ query_projected_non_entity_type_characteristic_reference_or_alias
matches the rolename of one and only one
[Link] in the
PROJECTED _CHARACTERISTIC _LIST of the outermost
QUERY _STATEMENT
If entity_type_structured_template_element_member is
designated_entity_non_entity_type_characteristic_wildcard_reference:
• If designated_entity_type_reference_path is specified:
— If the first query_selected_entity_type_reference_or_alias in
explicit_entity_type_reference_join_path matches by name the
primary_entity_type_template_method_parameter’s
query_selected_entity_type_reference_or_alias or, if specified, its
entity_type_structured_template_element_declared_parameter_alias, then:
▪ There must at least one [Link] in
the PROJECTED_CHARACTER _LIST of the outermost
QUERY _STATEMENT that is a composition of the SELECTED _ENTITY
referenced by the designated_entity_type_reference_path’s
designated_entity_type_reference’s
query_selected_entity_type_reference_or_alias
— Otherwise, the first query_selected_entity_type_reference_or_alias in
explicit_entity_type_reference_join_path does not match by name the
primary_entity_type_template_method_parameter’s
query_selected_entity_type_reference_or_alias or, if specified, its
entity_type_structured_template_element_declared_parameter_alias, then:
▪ There must be an unambiguous designated_entity_type_reference_path
(inferred from the ENTITY_EXPRESSION of the outermost
QUERY _STATEMENT ) from the SELECTED _ENTITY referenced by the
If entity_type_structured_template_element_member is
structured_template_element_type_reference_statement, then:
• If entity_type_structured_template_element_type_reference is specified, then:
— An entity_type_structured_template_element_declared_parameter_reference must
not be specified
— An optional_structured_template_element_type_reference_parameter must not be
specified
• If entity_type_structured_template_element_type_reference matches by name the
template_element_type_name of a supporting_entity_type_template_method_decl, then:
— The SELECTED_ENTITY referenced by the
structured_template_element_type_reference_expression’s
primary_structured_template_element_type_reference_parameter’s
designated_entity_type_reference_path’s designated_entity_type_reference’s
query_selected_entity_type_reference_or_alias must be the same as the
SELECTED _ENTITY referenced by the supporting_template_method_decl’s
primary_entity_type_template_method_parameter’s
query_selected_entity_type_reference_or_alias
• If inline_annotation is specified, then:
— For each adjacent pair of query_selected_entity_type_reference_or_aliases in the
primary_structured_template_element_type_reference_parameter’s explicitly
specified or unambiguously inferred designated_entity_type_reference_path:
▪ Let L = the SELECTED_ENTITY referenced by the left
query_selected_entity_type_reference_or_alias of the pair
— If J is a participant of R, then:
▪ The upper bound is the sourceUpperBound of J
▪ If L is a SELECTED_ENTITY that is the
SELECTED _ENTITY _REFERENCE of a
SELECTED _ENTITY _CHARACTERISTIC _REFERENCE
CHARARACTERISTIC _BASIS , then the lower bound for J is 0
primary_entity_type_template_method_parameter
optional_entity_type_template_method_parameter_list
entity_type_template_method_parameter
main_equivalent_entity_type_template_method_decl
supporting_entity_type_template_method_decl
If entity_type_structured_template_element_member is
explicit_designated_entity_non_entity_type_characteristic_reference_expression:
• If designated_entity_non_entity_type_characteristic_reference is
query_projected_non_entity_type_characteristic_reference_or_alias, then:
— One of the conditions below must be satisfied, resolving it to the
[Link] identified by the first rule satisfied in
priority order:
▪ query_projected_non_entity_type_characteristic_reference_or_alias
matches the rolename of a [Link]
that is in the PROJECTED_CHARACTERISTIC _LIST of the outermost
QUERY _STATEMENT and is a composition of the SELECTED _ENTITY
referenced by the primary_entity_type_template_method_parameter’s
query_selected_entity_type_reference_or_alias
▪ query_projected_non_entity_type_characteristic_reference_or_alias
matches by name a PROJECTED_CHARACTERISTIC _ALIAS of an
EXPLICIT _SELECTED _ENTITY _CHARACTERISTIC _REFERENCE in the
PROJECTED _CHARACTERISTIC _LIST of the outermost
QUERY _STATEMENT
▪ query_projected_non_entity_type_characteristic_reference_or_alias
matches the rolename of one and only one
[Link] in the
PROJECTED _CHARACTERISTIC _LIST of the outermost
QUERY _STATEMENT
If entity_type_structured_template_element_member is
designated_entity_non_entity_type_characteristic_wildcard_reference:
• If designated_entity_type_reference_path is specified:
— If the first query_selected_entity_type_reference_or_alias in
explicit_entity_type_reference_join_path matches by name the
primary_entity_type_template_method_parameter’s
query_selected_entity_type_reference_or_alias or, if specified, its
entity_type_structured_template_element_declared_parameter_alias, then:
▪ There must at least one [Link] in
the PROJECTED_CHARACTER _LIST of the outermost
QUERY _STATEMENT that is a composition of the SELECTED _ENTITY
referenced by the designated_entity_type_reference_path’s
designated_entity_type_reference’s
query_selected_entity_type_reference_or_alias
— Otherwise, the first query_selected_entity_type_reference_or_alias in
explicit_entity_type_reference_join_path does not match by name the
primary_entity_type_template_method_parameter’s
query_selected_entity_type_reference_or_alias or, if specified, its
entity_type_structured_template_element_declared_parameter_alias, then:
▪ There must be an unambiguous designated_entity_type_reference_path
(inferred from the ENTITY_EXPRESSION of the outermost
QUERY _STATEMENT ) from the SELECTED _ENTITY referenced by the
primary_entity_type_template_method_parameter’s
query_selected_entity_type_reference_or_alias to the
SELECTED_ENTITY referenced by the first
query_selected_entity_type_reference_or_alias in the
designated_entity_non_entity_type_characteristic_wildcard_reference’
s designated_entity_type_reference_path
▪ There must at least one [Link] in
the PROJECTED_CHARACTER _LIST of the outermost
QUERY _STATEMENT that is a composition of the SELECTED _ENTITY
referenced by the fully inferred
If entity_type_structured_template_element_member is
structured_template_element_type_reference_statement, then:
• If entity_type_structured_template_element_type_reference is specified, then:
— An entity_type_structured_template_element_declared_parameter_reference must
not be specified
— An optional_structured_template_element_type_reference_parameter must not be
specified
• If entity_type_structured_template_element_type_reference matches by name the
template_element_type_name of a supporting_entity_type_template_method_decl, then:
— The SELECTED_ENTITY referenced by the
structured_template_element_type_reference_expression’s
primary_structured_template_element_type_reference_parameter’s
designated_entity_type_reference_path’s designated_entity_type_reference’s
query_selected_entity_type_reference_or_alias must be the same as the
SELECTED _ENTITY referenced by the supporting_template_method_decl’s
primary_entity_type_template_method_parameter’s
query_selected_entity_type_reference_or_alias
— If inline_annotation is specified, then:
▪ Let JS = the cumulative set of all “Join_Characteristic”s (as defined in
the rules for term designated_entity_type_reference_path) in the
canonical designated_entity_type_reference_path from the
query_selected_entity_type_reference_or_alias of the
main_entity_type_template_method_decl’s
primary_entity_type_template_method_parameter to the
query_selected_entity_type_reference_or_alias of this
supporting_template_method_decl’s
entity_type_structured_template_element_declared_parameter_exp
ression (constructed by combining head-to-tail the
designated_entity_type_reference_path associated with each
entity_type_structured_template_element_type_reference in
sequence)
— For each adjacent pair of query_selected_entity_type_reference_or_aliases in the
primary_structured_template_element_type_reference_parameter’s explicitly
specified or unambiguously inferred designated_entity_type_reference_path:
supporting_equivalent_entity_type_template_method_decl
entity_type_template_method_body
entity_type_template_method_member
equivalent_entity_type_template_method_decl
equivalent_entity_type_template_method_parameter_list
equivalent_entity_type_template_method_body
equivalent_entity_type_template_method_member
union_type_decl
▪ query_projected_enumeration_type_characteristic_reference_or_alias
matches the rolename of one and only one
[Link] in the
PROJECTED _CHARACTERISTIC _LIST of the outermost
QUERY _STATEMENT
If entity_type_structured_template_element_member is
explicit_designated_entity_non_entity_type_characteristic_reference_expression:
• If designated_entity_non_entity_type_characteristic_reference is
query_projected_non_entity_type_characteristic_reference_or_alias, then:
— One of the conditions below must be satisfied, resolving it to the
[Link] identified by the first rule satisfied in
priority order:
▪ query_projected_non_entity_type_characteristic_reference_or_alias
matches the rolename of a [Link]
that is in the PROJECTED_CHARACTERISTIC _LIST of the outermost
QUERY _STATEMENT and is a composition of the SELECTED _ENTITY
referenced by the union_parameter’s
query_selected_entity_type_reference_or_alias
▪ query_projected_non_entity_type_characteristic_reference_or_alias
matches by name a PROJECTED_CHARACTERISTIC _ALIAS of an
EXPLICIT _SELECTED _ENTITY _CHARACTERISTIC _REFERENCE in the
PROJECTED _CHARACTERISTIC _LIST of the outermost
QUERY _STATEMENT
▪ query_projected_non_entity_type_characteristic_reference_or_alias
matches the rolename of one and only one
[Link] in the
PROJECTED _CHARACTERISTIC _LIST of the outermost
QUERY _STATEMENT
If entity_type_structured_template_element_member is
structured_template_element_type_reference_statement, then:
• If entity_type_structured_template_element_type_reference is specified, then:
— An entity_type_structured_template_element_declared_parameter_reference must not
be specified
— An optional_structured_template_element_type_reference_parameter must not be
specified
• If entity_type_structured_template_element_type_reference matches by name the
template_element_type_name of a supporting_entity_type_template_method_decl, then:
— The SELECTED_ENTITY referenced by the
structured_template_element_type_reference_expression’s
primary_structured_template_element_type_reference_parameter’s
designated_entity_type_reference_path’s designated_entity_type_reference’s
query_selected_entity_type_reference_or_alias must be the same as the
SELECTED _ENTITY referenced by the supporting_template_method_decl’s
union_parameter’s query_selected_entity_type_reference_or_alias
• If entity_type_structured_template_element_type_reference matches by name the
template_element_type_name of a union_type_decl, then:
union_parameter
union_body
union_switch_statement
discriminator_type
case_expression
case_label
case_label_literal
union_member
entity_type_structured_template_element_member
entity_type_structured_template_element_member_statement
optional_annotation
inline_annotation
designated_entity_characteristic_reference_statement
explicit_designated_entity_non_entity_type_characteristic_reference_expression
structured_template_element_type_reference_expression
structured_template_element_type_reference_parameter_list
primary_structured_template_element_type_reference_parameter
optional_structured_template_element_type_reference_parameter
structured_template_element_type_reference_parameter
external_template_type_reference
entity_type_structured_template_element_type_reference
entity_type_structured_template_element_declared_parameter_reference
entity_type_structured_template_element_declared_parameter_expression
entity_type_structured_template_element_declared_parameter_alias
structured_template_element_member_name
template_element_type_name
equivalent_entity_type_template_method_reference
equivalent_entity_type_template_method_parameter
designated_equivalent_entity_non_entity_type_characteristic_reference
equivalent_entity_type_template_method_parameter_reference
equivalent_entity_type_template_method_characteristic_reference
designated_entity_non_entity_type_characteristic_reference
designated_entity_non_entity_type_characteristic_wildcard_reference
designated_entity_type_reference_path
explicit_entity_type_reference_join_path
join_path_entity_type_reference
designated_entity_type_reference
qualified_entity_type_reference
entity_type_reference
entity_characteristic_value_qualifier
idlstruct_member_reference
enum_literal_reference_expression
enumeration_type_reference
enumeration_literal_reference
query_projected_non_entity_type_characteristic_reference_or_alias
A query_projected_non_entity_type_characteristic_reference_or_alias must be a
[Link] in the PROJECTED_CHARACTERISTIC _LIST of the
outermost QUERY_STATEMENT .
A query_projected_non_entity_type_characteristic_reference_or_alias must be a
[Link] whose type is not an ENTITY.
query_projected_non_entity_type_characteristic_reference
A query_projected_non_entity_type_characteristic_reference must be a
[Link] in the PROJECTED_CHARACTERISTIC _LIST of the
outermost QUERY_STATEMENT .
A query_projected_non_entity_type_characteristic_reference must be a
[Link] whose type is not an ENTITY.
query_projected_enumeration_type_characteristic_reference_or_alias
A query_projected_enumeration_type_characteristic_reference_or_alias must be a
[Link] in the PROJECTED_CHARACTERISTIC _LIST of the
outermost QUERY_STATEMENT .
A query_projected_enumeration_type_characteristic_reference_or_alias must be a
[Link] whose type is a [Link]
that realizes a [Link] whose measurementSystem is the
[Link] whose name is
“AbstractDiscreteSetMeasurementSystem”.
query_projected_enumeration_type_characteristic_reference
A query_projected_enumeration_type_characteristic_reference must be a
[Link] in the PROJECTED_CHARACTERISTIC _LIST of the
outermost QUERY_STATEMENT .
A query_projected_enumeration_type_characteristic_reference must be a
[Link] whose type is a [Link]
that realizes a [Link] whose measurementSystem is the
[Link] whose name is
“AbstractDiscreteSetMeasurementSystem”.
query_selected_entity_type_reference_or_alias
idldiscriminator_type
idlunsigned_int
idlunsigned_short
idlunsigned_long
idlunsigned_long_long
idlboolean
idldiscriminator_type_literal
idlinteger_literal
idloctal_literal
idlhex_literal
idlboolean_literal
context Element
/*
* Helper method that determines if a string is a valid identifier.
* An identifier is valid if it consists of alphanumeric characters.
*/
static def: isValidIdentifier(str : String) : Boolean =
/*
* Helper method that determines if a string is an IDL 4.1 keyword.
*/
static def: isReservedWord(str : String) : Boolean =
let strLower : String = [Link]() in
(strLower = 'abstract') or
(strLower = 'alias') or
(strLower = 'any') or
(strLower = 'attribute') or
(strLower = 'bitfield') or
(strLower = 'bitmask') or
(strLower = 'bitset') or
(strLower = 'boolean') or
(strLower = 'case') or
(strLower = 'char') or
(strLower = 'component') or
(strLower = 'connector') or
(strLower = 'const') or
(strLower = 'consumes') or
(strLower = 'context') or
(strLower = 'custom') or
(strLower = 'default') or
(strLower = 'double') or
(strLower = 'emits') or
(strLower = 'enum') or
(strLower = 'eventtype') or
(strLower = 'exception') or
(strLower = 'factory') or
(strLower = 'false') or
(strLower = 'finder') or
(strLower = 'fixed') or
(strLower = 'float') or
(strLower = 'getraises') or
(strLower = 'home') or
(strLower = 'import') or
(strLower = 'in') or
(strLower = 'inout') or
(strLower = 'interface') or
(strLower = 'local') or
(strLower = 'long') or
(strLower = 'manages') or
(strLower = 'map') or
(strLower = 'mirrorport') or
(strLower = 'module') or
(strLower = 'multiple') or
(strLower = 'native') or
(strLower = 'object') or
(strLower = 'octet') or
(strLower = 'oneway') or
(strLower = 'out') or
(strLower = 'port') or
(strLower = 'porttype') or
(strLower = 'primarykey') or
(strLower = 'private') or
(strLower = 'provides') or
(strLower = 'public') or
(strLower = 'publishes') or
(strLower = 'raises') or
(strLower = 'readonly') or
(strLower = 'sequence') or
/*
* The name of an Element is a valid identifier.
*/
inv nameIsValidIdentifier:
Element::isValidIdentifier([Link])
context ArchitectureModel
/*
* Every Element in an ArchitectureModel has a unique name.
*/
inv hasUniqueName:
let children : Bag(String)=
[Link]->collect([Link]())->union(
[Link]->collect([Link]())->union(
[Link]->collect([Link]())->union(
[Link]->collect([Link]())))) in
children->size() = children->asSet()->size()
endpackage
package face::uop
context Element
/*
* All UoP Elements have a unique name.
*/
inv hasUniqueName:
not [Link]()->excluding(self)
->collect(name)
->includes([Link])
context Connection
/*
* Helper method that gets the Views associated with a Connection.
*/
def: getViews() : Set(MessageType) =
if [Link](PubSubConnection) then
[Link](PubSubConnection).[Link]()
else -- [Link](ClientServerConnection)
[Link](ClientServerConnection).requestType
->including([Link](ClientServerConnection).responseType)
/*
* If a Connection realizes an AbstractConnection,
* its requestType or responseType or both (for ClientServerConnections) or
* its messageType (for PubSubConnections) realizes either the
* AbstractConnection's logicalView or a logical View that realizes the
* AbstractConnection's conceptualView.
*/
inv realizationTypeConsistent:
[Link] <> null implies
[Link]()->exists(view |
if [Link](CompositeTemplate) then
let cTemplate
= [Link](CompositeTemplate) in
else -- [Link](Template)
let lbTemplate = [Link](Template) in
context QueuingConnection
/*
* A QueuingConnection's queue depth is greater than zero.
*/
inv depthValid:
[Link] > 0
context AbstractUoP
/*
* An AbstractUoP is entirely logical or entirely conceptual.
* (Its AbstractConnections all have their logicalView set and
* conceptualView not set or all have their conceptualView set and
* logicalView not set.)
*/
inv onlyLogicalOrOnlyConceptual:
[Link]->collect(logicalView)->forAll(lv | lv <> null) xor
[Link]->collect(conceptualView)->forAll(cv | cv <> null)
context UnitOfPortability
context MessageType
/*
* A Platform Element's name is not an IDL reserved word.
*/
inv nameIsNotReservedWord:
not Element::isReservedWord([Link])
context CompositeTemplate
/*
* A TemplateComposition's rolename is unique within a CompositeTemplate.
*/
inv compositionsHaveUniqueRolenames:
[Link]->collect(rolename)
->isUnique(rn | rn)
/*
* A CompositeTemplate does not compose itself.
*/
inv noCyclesInConstruction:
let composedTemplates = [Link]
->collect(type)
->selectByKind(CompositeTemplate)
->closure(composition
->collect(type)
->selectByKind(CompositeTemplate)) in
not composedTemplates->includes(self)
/*
* A CompositeTemplate does not compose the same Template more than once.
*/
inv viewComposedOnce:
[Link]->collect(type)->isUnique(view | view)
/*
* TemplateCompositions in a platform CompositeTemplate realize
* QueryCompositions in the logical CompositeQuery that the platform
* CompositeTemplate realizes.
*/
inv compositionsConsistentWithRealization:
if [Link] = null
then
[Link]->forAll(c | [Link] = null)
else
[Link]->forAll(c |
[Link]->exists(c2 | [Link] = c2)
)
endif
/*
* A CompositeTemplate does not contain two TemplateCompositions
* that realize the same QueryComposition.
*/
inv realizedCompositionsHaveDifferentTypes:
[Link] <> null implies
[Link]->forAll(c1, c2 | c1 <> c2 implies
[Link] <> [Link])
context TemplateComposition
/*
* The rolename of a TemplateComposition is a valid identifier.
*/
inv rolenameIsValidIdentifier:
Element::isValidIdentifier([Link])
/*
* The rolename of a TemplateComposition is not an IDL reserved word.
*/
inv rolenameIsNotReservedWord:
not Element::isReservedWord([Link])
/*
* If TemplateComposition "A" realizes QueryComposition "B", then
* if A's type is a CompositeTemplate, then A's type realizes B's type, and
* if A's type is a Template and defines an effectiveQuery,
* then A's type's effectiveQuery realizes B's type.
*/
inv typeConsistentWithRealization:
[Link] <> null implies
if [Link](CompositeTemplate) then
[Link](CompositeTemplate).realizes
= [Link]
else
[Link](Template).effectiveQuery <> null
implies
[Link](Template).[Link]
= [Link]
endif
endpackage
package face::integration
context Element
/*
* All Integration Elements have a unique name.
*/
inv hasUniqueName:
not [Link]()->excluding(self)
->collect([Link]())
->includes([Link]())
context UoPInstance
/*
* If a UoPInstance "A" realizes an UoP "B", then A has one unique
and
[Link]->collect(connection)
->selectByKind(face::uop::ClientServerConnection)
= [Link]->collect(connection)
->selectByKind(face::uop::ClientServerConnection)
context TSNodePortBase
/*
* Helper method that gets the TransportNode containing a given
* TSNodePortBase
*/
def: getParentTransportNode() : TransportNode =
[Link]()->select(tn | [Link]->includes(self) or
[Link]->includes(self))
->any(true)
/*
* Helper method that gets the View used by a TSNodePortBase.
* If a UoPInputEndPoint's connection is a ClientServerConnection, then
* its View is the connection's responseType.
* If a UoPOutputEndPoint's connection is a ClientServerConnection, then
* its View is the connection's requestType.
*/
def: getView() : uop::MessageType =
if [Link](TSNodePort) then
[Link](TSNodePort).view
else -- [Link](UoPEndPoint)
let uopConnection = [Link](UoPEndPoint).connection in
if [Link](face::uop::PubSubConnection) then
[Link](face::uop::PubSubConnection).messageType
else -- [Link](face::uop::ClientServerConnection)
let clientServerConnection =
[Link](face::uop::ClientServerConnection) in
if [Link] = face::uop::ClientServerRole::Client
then
if [Link](UoPInputEndPoint) then
[Link]
else
[Link]
endif
else -- [Link] = 'Server'
if [Link](UoPInputEndPoint) then
[Link]
else
[Link]
endif
endif
endif
endif
context TSNodeConnection
/*
* A TSNodeConnection uses the same View on its source and destination.
*/
inv sourceViewMatchesDestinationView:
[Link]() = [Link]()
/*
* A TSNodeConnection's source is an output.
*/
inv sourceIsOutput:
[Link](UoPOutputEndPoint) or
[Link](TSNodeOutputPort)
/*
* A TSNodeConnection's destination is an input.
*/
inv destinationIsInput:
[Link](UoPInputEndPoint) or
[Link](TSNodeInputPort)
/*
* A TSNodeConnection connects TransportNodes that
* are in the same IntegrationContext as the TSNodeConnection.
*/
inv connectWithinSameContext:
let parentContext
= [Link]()->any(x | [Link]
->includes(self)) in
let ports = [Link]->collect(inPort)->union(
[Link]->collect(outPort)) in
([Link](TSNodePort)
implies
ports->includes([Link]))
and
([Link](TSNodePort)
implies
ports->includes([Link]))
/*
* There is at least one ViewTransporter on a path
* between any two UoPInstances.
*/
inv transporterOnPath:
[Link](UoPInputEndPoint)
implies
[Link](TSNodeOutputPort) and
[Link]()
->closure(getPreviousNodes())
->exists(n | [Link](ViewTransporter) or
[Link](ViewSource))
context UoPInputEndPoint
/*
* A UoPInputEndPoint's connection is either a ClientServerConnection
* or a PubSubConnection whose messageExchangeType is InboundMessage.
*/
inv uoPEndPointConsistentWithRealization:
[Link](face::uop::ClientServerConnection)
or
([Link](face::uop::PubSubConnection) and
[Link](face::uop::PubSubConnection)
.messageExchangeType
= face::uop::MessageExchangeType::InboundMessage)
/*
* A UoPInputEndPoint is the destination of at most one TSNodeConnection.
*/
inv onlyOneConnection:
[Link]()
->select(x | [Link] = self)->size() <= 1
context UoPOutputEndPoint
/*
* A UoPInputEndPoint's connection is either a ClientServerConnection
* or a PubSubConnection whose messageExchangeType is OutboundMessage.
*/
inv uoPEndPointConsistentWithRealization:
[Link](face::uop::ClientServerConnection)
or
([Link](face::uop::PubSubConnection) and
[Link](face::uop::PubSubConnection)
.messageExchangeType
= face::uop::MessageExchangeType::OutboundMessage)
context TransportNode
/*
* Helper method that gets the set of TransportNodes that are
* "upstream" from a given TransportNode.
*/
def: getPreviousNodes() : Set(TransportNode) =
[Link]()
->select(c | [Link]->includes([Link]))
->collect(source)
->selectByKind(TSNodeOutputPort)
->collect(getParentTransportNode())
->asSet()
/*
* Helper method that gets the set of TransportNodes that are
* "downstream" from a given TransportNode.
*/
def: getNextNodes() : Set(TransportNode) =
/*
* An IntegrationContext has no cycles.
*/
inv noCycles:
not [Link]()->closure(getNextNodes())->includes(self)
/*
* A ViewSource has no inputs.
* A ViewSink, ViewFilter, ViewTransformation, or ViewTransporter
* has one input.
* A ViewAggregation has more than one input.
*/
inv hasCorrectInputCount:
([Link](ViewSource)
implies
[Link]->size() = 0)
and
([Link](ViewSink) or
[Link](ViewFilter) or
[Link](ViewTransformation) or
[Link](ViewTransporter)
implies
[Link]->size() = 1)
and
([Link](ViewAggregation)
implies
[Link]->size() > 1)
/*
* A ViewSink has no outputs.
* A ViewSource, ViewFilter, ViewAggregation, ViewTransformation,
* or ViewTransporter has one output.
*/
inv hasCorrectOutputCount:
([Link](ViewSink)
implies
[Link]->size() = 0)
and
([Link](ViewSource) or
[Link](ViewFilter) or
[Link](ViewAggregation) or
[Link](ViewTransformation) or
[Link](ViewTransporter)
implies
[Link]->size() = 1)
context ViewSource
/*
* A ViewSource is connected to a UoPInputEndPoint.
*/
context ViewSink
/*
* A ViewSink is connected to a UoPOutputEndPoint.
*/
inv viewSinkConnectedToUoPOutputEndPoint:
[Link]()
->select(x | [Link]->includes([Link]))
->collect(source)
->forAll(oclIsTypeOf(UoPOutputEndPoint))
context ViewFilter
/*
* A ViewFilter uses the same View on its input and output.
*/
inv viewIsConsistent:
[Link]->size() = 1 and
[Link]->size() = 1
implies
[Link]->any(true).view = [Link]->any(true).view
context ViewTransporter
/*
* A ViewTransporter uses the same View on its input and output.
*/
inv viewIsConsistent:
[Link]->size() = 1 and
[Link]->size() = 1
implies
[Link]->any(true).view = [Link]->any(true).view
endpackage
package face::traceability
context Element
/*
* All Traceability Elements have a unique name.
*/
inv hasUniqueName:
not [Link]()->excluding(self)
->collect(name)
->includes([Link])
Endpackage
J.6.2 FACE Data Model Language OCL Constraints on Open UDDL Content
package datamodel
context Element
/*
* Helper method that determines if a string is an IDL 4.1 keyword.
*/
static def: isReservedWord(str : String) : Boolean =
let strLower : String = [Link]() in
(strLower = 'abstract') or
(strLower = 'alias') or
endpackage
package datamodel::conceptual
context Entity
/*
* Helper method that gets the Characteristics contained in an Entity.
*/
def: getLocalCharacteristics() : Set(Characteristic) =
if [Link](Association) then
[Link]
->union([Link](Association).participant)
->oclAsType(Set(Characteristic))
else
[Link]->oclAsType(Set(Characteristic))
endif
/*
* Helper method that gets the Characteristics of an Entity,
* including those from specialized Entities.
*/
def: getAllCharacteristics() : Set(Characteristic) =
let allCharacteristics : Set(Characteristic) =
self->closure(specializes)
->collect(getLocalCharacteristics())
->asSet() in
/*
* Helper method that determines whether or not
* an Entity is part of a specialization cycle.
*/
def: isPartOfSpecializationCycle() : Boolean =
[Link]->closure(specializes)->includes(self)
/*
* Helper method to retrieve the BasisEntities of an Entity,
* including those from specialized Entities.
*/
def: getBasisEntities() : Bag(BasisEntity) =
self->closure(specializes)
->collect(basisEntity)
/*
* Helper method that gets the identity of a conceptual Entity.
/*
* A Conceptual Entity contains a Composition whose type
* is an Observable named 'Identifier'.
*/
inv hasUniqueID:
[Link]()
->selectByType(Composition)
->collect(type)
->exists(a | [Link](Observable)
and [Link] = 'Identifier')
context Characteristic
/*
* Helper method that gets the type of a Characteristic.
*/
def: getType() : ComposableElement =
if [Link](Composition) then
[Link](Composition).type
else
[Link](Participant).getResolvedType()
endif
/*
* Helper method that gets the contribution a Characteristic makes
* to an Entity's uniqueness.
*/
def: getIdentityContribution() : Sequence(OclAny) =
if [Link](Composition) then
[Link](Composition).getIdentityContribution()
else
[Link](Participant).getIdentityContribution()
endif
context Composition
/*
* Helper method that gets the contribution a Composition makes
* to an Entity's uniqueness (type and multiplicity).
*/
def: getIdentityContribution() : Sequence(OclAny) =
Sequence{[Link],
[Link],
[Link]}
context Participant
/*
* Helper method that gets a Participant's PathNode sequence.
*/
def: getPathSequence() : OrderedSet(PathNode) =
[Link]
->asOrderedSet()
->closure(pn : PathNode |
let projectedParticipantPath =
if [Link]() then
[Link]().path
else
null
endif in
/*
* Helper method that gets the contribution a Participant makes
* to an Entity's uniqueness (type, path sequence, and multiplicity).
*/
def: getIdentityContribution() : Sequence(OclAny) =
Sequence{[Link],
[Link]()->collect(getProjectedCharacteristic()),
[Link],
[Link]}
/*
* Helper method that determines if a Participant's
* path sequence contains a cycle.
*/
def: hasCycleInPath() : Boolean =
[Link]()
->collect(getProjectedCharacteristic())
->includes(self)
/*
* Helper method that gets the element projected by a Participant.
* Returns a ComposableElement.
*/
def: getResolvedType() : ComposableElement =
if [Link]() then
null
else if [Link] = null then
[Link]
else
[Link]()->last().getNodeType()
endif
endif
context PathNode
/*
* Helper method that determines if a PathNode projects a Participant.
*/
def: projectsParticipant() : Boolean =
[Link](CharacteristicPathNode) and
[Link](CharacteristicPathNode)
.projectedCharacteristic
.oclIsTypeOf(Participant)
/*
* Helper method that gets the Participant projected by a PathNode.
* Returns null if no Participant is projected.
*/
def: projectedParticipant() : Participant =
let pp = [Link](CharacteristicPathNode)
.projectedCharacteristic
.oclAsType(Participant) in
if not [Link]() then
pp
else
null
endif
/*
/*
* Helper method that gets the "node type" of a PathNode. For a
* CharacteristicPathNode, the node type is the type of the projected
* characteristic. For a ParticipantPathNode, the node type is the
* Association containing the projected Participant.
* Returns a ComposableElement.
*/
def: getNodeType() : ComposableElement =
if [Link](CharacteristicPathNode) then
[Link](CharacteristicPathNode)
.projectedCharacteristic
.getType()
else
-- get Association that contains projectedCharacteristic
[Link]()
->select(participant->includes([Link](ParticipantPathNode)
.projectedParticipant))
->any(true)
endif
endpackage
package datamodel::logical
context Enumerated
/*
* An Enumerated's name is not an IDL reserved word.
*/
inv nameIsNotReservedWord:
not Element::isReservedWord([Link])
/*
* An EnumerationLabel's name is unique within an Enumerated.
*/
inv enumerationLabelNameUnique:
[Link]->isUnique(name)
context EnumerationLabel
/*
* An EnumerationLabel's name is not an IDL reserved word.
*/
inv nameIsNotReservedWord:
not Element::isReservedWord([Link])
endpackage
package datamodel::platform
context Element
/*
* A Platform Element's name is not an IDL reserved word.
*/
inv nameIsNotReservedWord:
not Element::isReservedWord([Link])
/*
* The rolename of a Characteristic is not an IDL reserved word.
*/
inv rolenameIsNotReservedWord:
[Link]() <> null implies
(not Element::isReservedWord([Link]()))
endpackage
context Entity
/*
* An Entity does not compose the same Observable more than once.
*/
inv observableComposedOnce:
[Link]()
->selectByKind(Composition)
->collect(getType())
->select(oclIsTypeOf(Observable))
->isUnique(obs | obs)
Endpackage
context Entity
/*
* An Entity is unique in a Conceptual Data Model.
* (An Entity is unique if the set of its Characteristics
* is different from other Entities' in terms of
* type, lowerBound, upperBound, and path (for Participants).
*
* NOTE: If an Entity is part of a specialization cycle, its uniqueness
* is undefined. So, if an Entity is part of a specialization cycle,
* it will not fail entityIsUnique, but will fail noCyclesInSpecialization.
*/
inv entityIsUnique:
endpackage
Rule: The following identifier is the name of a rule. In most cases, the
identifier is the name of a production rule in the Template grammar. A Rule
will either Emit IDL or Return data (to another Rule), such as values or
references to elements.
Emit: Specifies the Rule or Rules to be followed and/or the IDL to be generated
for a construction based on the preceding Expression, Alternate, or Variant
during any pass of applying this binding to a given Template specification or
platform View.
Emit1: A special case of Emit that specifies the IDL to be generated during the
first pass of applying this binding to a given Template specification.
Emit2: A special case of Emit that specifies the IDL to be generated during the
second pass of applying this binding to a given Template specification.
[]: An operator that returns a resolved unambiguous reference (by name) to the
enclosed named meta-model element or to a property of a meta-model element. For
clarity, the element's meta-type is identified before the [], the name of the
%%: An operator that returns the value(s) associated with the enclosed named
element. The element is either 1) a non-terminal symbol in a modeled Template
specification, 2) a Let-bound name, 3) a meta-model element, or 4) a property
of a meta-model element. The enclosing %% characters are not returned.
{V => <Y>}: An operator that invokes Rule Y with value V. If a "+" character
follows the {}, then there is a set of Vs in context (reflected in the
associated Expression), and Rule Y is invoked for each V.
<>: An operator that invokes the enclosed named Rule with the modeled value(s)
associated with the same named non-terminal symbol. It is syntactic sugar for {
%Y% => <Y> }. If a "+" character follows the <>, then there is a set of
instances associated of the named non-terminal in context (reflected in the
associated Expression), and the Rule is invoked for each instance.
"": Represents a string literal value. The enclosing "" characters are not part
of the string literal's value.
// The text following the // and up to the end of the line is (part of) an
informative comment or note.
For each DataModel element referenced, the IDL types generated by this binding
must be defined in an IDL module (in the FACE::DM namespace) whose name is the
same as the DataModel in which the element is a member. The IDL module
declaration for a DataModel is:
For each Template or CompositeTemplate, the IDL types generated by this binding
must be defined in an IDL module (in the FACE::DM namespace) whose name is the
same as the root UoPModel in which the element is a member. The IDL module
declaration for a Template or CompositeTemplate is:
Because the generated IDL types for Templates, CompositeTemplates, and various
DataModel elements may be in different IDL modules, an inter-Model type
reference must manifest in IDL using an IDL module-scoped name.
BINDING SPECIFICATION:
Let:
CURRENT_TEMPLATE = // nil
Let:
CURRENT_STRUCTURED_TEMPLATE_ELEMENT = // nil
CURRENT_STRUCTURED_TEMPLATE_ELEMENT_NAME = // nil
Rule: MessageType
Expression: [Link]
Let:
MESSAGE_TYPE = THIS
Rule: CompositeTemplate
Expression: [Link]
Let:
COMPOSITE_TEMPLATE = THIS
Let:
MEMBER = [Link]
Let:
CASE_NUMBER = 0
Let:
MEMBER = [Link]
Let:
CASE_NUMBER = %CASE_NUMBER% + 1
Expression: [Link]
Let:
PREVIOUS_TEMPLATE = %CURRENT_TEMPLATE%
CURRENT_TEMPLATE = THIS
Let:
CURRENT_TEMPLATE = %PREVIOUS_TEMPLATE%
Rule: TemplateSpecification
Expression: UsingExternalTemplateStatement*
StructuredTemplateElementTypeDecl+
Variant: StructuredTemplateElementTypeDecl+
Emit: <StructuredTemplateElementTypeDecl>+
Emit1: <UsingExternalTemplateStatement>+
Emit: <StructuredTemplateElementTypeDecl>+
Rule: UsingExternalTemplateStatement
Rule: StructuredTemplateElementTypeDecl
Let:
CURRENT_STRUCTURED_TEMPLATE_ELEMENT = %StructuredTemplateElementTypeDecl%
Alternate: MainTemplateMethodDecl
Emit: <MainTemplateMethodDecl>
Alternate: SupportingTemplateMethodDecl
Emit: <SupportingTemplateMethodDecl>
Alternate: UnionTypeDecl
Emit: <UnionTypeDecl>
Let:
CURRENT_STRUCTURED_TEMPLATE_ELEMENT = //nil
Rule: MainTemplateMethodDecl
Let:
CURRENT_STRUCTURED_TEMPLATE_ELEMENT_NAME = %CURRENT_TEMPLATE%.name
Alternate: MainEntityTypeTemplateMethodDecl
Emit: <MainEntityTypeTemplateMethodDecl>
Alternate: MainEquivalentEntityTypeTemplateMethodDecl
Emit: <MainEquivalentEntityTypeTemplateMethodDecl>
Let:
CURRENT_STRUCTURED_TEMPLATE_ELEMENT_NAME = //nil
Rule: MainEntityTypeTemplateMethodDecl
Emit: <EntityTypeTemplateMethodBody>
Emit2: ";"
Rule: MainEquivalentEntityTypeTemplateMethodDecl
Emit1: "<"
Emit1: ","
Emit1: ">"
Rule: SupportingTemplateMethodDecl
Alternate: SupportingEntityTypeTemplateMethodDecl
Emit: <SupportingEntityTypeTemplateMethodDecl>
Alternate: SupportingEquivalentEntityTypeTemplateMethodDecl
Emit: <SupportingEquivalentEntityTypeTemplateMethodDecl>
Rule: SupportingEntityTypeTemplateMethodDecl
Let:
CURRENT_STRUCTURED_TEMPLATE_ELEMENT_NAME = <TemplateElementTypeName>
Emit: <EntityTypeTemplateMethodBody>
Emit2: ";"
Let:
CURRENT_STRUCTURED_TEMPLATE_ELEMENT_NAME = // nil
Let:
CURRENT_STRUCTURED_TEMPLATE_ELEMENT_NAME = <TemplateElementTypeName>
Emit1: "<"
Emit1: ","
Emit1: ">"
Let:
CURRENT_STRUCTURED_TEMPLATE_ELEMENT_NAME = // nil
Rule:
GenerateIDLTemplateModuleDeclFormalParameterFromEquivalentEntityTypeTemplateMet
hodMember
Expression: OptionalAnnotation?
DesignatedEquivalentEntityNonEntityTypeCharacteristicReference ( DEREF
IDLStructMemberReference )? ( KW_AS StructuredTemplateElementMemberName )?
Variant: DesignatedEquivalentEntityNonEntityTypeCharacteristicReference
Variant: OptionalAnnotation
DesignatedEquivalentEntityNonEntityTypeCharacteristicReference
Emit1: "typename" (
%<DesignatedEquivalentEntityNonEntityTypeCharacteristicReference>% , "_type" )
Variant: DesignatedEquivalentEntityNonEntityTypeCharacteristicReference
DEREF IDLStructMemberReference
Variant: OptionalAnnotation
DesignatedEquivalentEntityNonEntityTypeCharacteristicReference DEREF
IDLStructMemberReference
Variant: DesignatedEquivalentEntityNonEntityTypeCharacteristicReference
KW_AS StructuredTemplateElementMemberName
Variant: DesignatedEquivalentEntityNonEntityTypeCharacteristicReference
DEREF IDLStructMemberReference KW_AS StructuredTemplateElementMemberName
Variant: OptionalAnnotation
DesignatedEquivalentEntityNonEntityTypeCharacteristicReference KW_AS
StructuredTemplateElementMemberName
Variant: OptionalAnnotation
DesignatedEquivalentEntityNonEntityTypeCharacteristicReference DEREF
IDLStructMemberReference KW_AS StructuredTemplateElementMemberName
Rule: EntityTypeTemplateMethodBody
Emit2: "{"
Emit: <EntityTypeTemplateMethodMember>+
Emit2: "}"
Rule: EntityTypeTemplateMethodMember
Expression: EntityTypeStructuredTemplateElementMember
Emit: <EntityTypeStructuredTemplateElementMember>
Rule: EquivalentEntityTypeTemplateMethodMember
Emit1: <EquivalentEntityTypeTemplateElementMemberStatement>
Expression: OptionalAnnotation?
DesignatedEquivalentEntityNonEntityTypeCharacteristicReference ( DEREF
IDLStructMemberReference )? ( KW_AS StructuredTemplateElementMemberName )?
Variant: DesignatedEquivalentEntityNonEntityTypeCharacteristicReference
Variant: OptionalAnnotation
DesignatedEquivalentEntityNonEntityTypeCharacteristicReference
Let:
TEMPLATE_MODULE_TYPE_MEMBER_NAME =
<DesignatedEquivalentEntityNonEntityTypeCharacteristicReference>
Variant: DesignatedEquivalentEntityNonEntityTypeCharacteristicReference
DEREF IDLStructMemberReference
Variant: OptionalAnnotation
DesignatedEquivalentEntityNonEntityTypeCharacteristicReference DEREF
IDLStructMemberReference
Let:
TEMPLATE_MODULE_TYPE_MEMBER_NAME =
%<IDLStructMemberReference>%.rolename
Variant: DesignatedEquivalentEntityNonEntityTypeCharacteristicReference
KW_AS StructuredTemplateElementMemberName
Variant: DesignatedEquivalentEntityNonEntityTypeCharacteristicReference
DEREF IDLStructMemberReference KW_AS StructuredTemplateElementMemberName
Variant: OptionalAnnotation
DesignatedEquivalentEntityNonEntityTypeCharacteristicReference KW_AS
StructuredTemplateElementMemberName
Variant: OptionalAnnotation
DesignatedEquivalentEntityNonEntityTypeCharacteristicReference DEREF
IDLStructMemberReference KW_AS StructuredTemplateElementMemberName
Let:
TEMPLATE_MODULE_TYPE_MEMBER_NAME =
<StructuredTemplateElementMemberName>
Rule: UnionTypeDecl
Let:
CURRENT_STRUCTURED_TEMPLATE_ELEMENT_NAME = <TemplateElementTypeName>
Emit: <UnionBody>
Emit2: ";"
Rule: UnionBody
Emit: <UnionSwitchStatement>
Rule: UnionSwitchStatement
Emit: <DiscriminatorType>
Emit2: ")"
Emit: <UnionSwitchBody>
Rule: UnionSwitchBody
Emit2: "{"
Emit: <CaseExpression>+
Emit2: "}"
Rule: DiscriminatorType
Alternate: IDLDiscriminatorType
Emit2: %IDLDiscriminatorType%
Alternate: DesignatedEntityEnumerationTypeCharacteristicReference
Emit1: {
%%<DesignatedEntityEnumerationTypeCharacteristicReference>%.type% =>
<PlatformIDLType> }
Emit2:
%%<DesignatedEntityEnumerationTypeCharacteristicReference>%.[Link]%
Rule: CaseExpression
Emit2: <CaseLabel>+
Emit: <UnionMember>
Rule: CaseLabel
Rule: CaseLabelLiteral
Alternate: IDLDiscriminatorTypeLiteral
Emit2: %IDLDiscriminatorTypeLiteral%
Alternate: EnumLiteralReferenceExpression
Emit2: %<EnumLiteralReferenceExpression>%
Rule: UnionMember
Expression: EntityTypeStructuredTemplateElementMember
Emit: <EntityTypeStructuredTemplateElementMember>
Rule: EntityTypeStructuredTemplateElementMember
Emit: <EntityTypeStructuredTemplateElementMemberStatement>
Rule: EntityTypeStructuredTemplateElementMemberStatement
Alternate: DesignatedEntityCharacteristicReferenceStatement
Emit: <DesignatedEntityCharacteristicReferenceStatement>
Alternate: StructuredTemplateElementTypeReferenceStatement
Emit: <StructuredTemplateElementTypeReferenceStatement>
Rule: DesignatedEntityCharacteristicReferenceStatement
Alternate:
ExplicitDesignatedEntityNonEntityTypeCharacteristicReferenceExpression
Emit:
<ExplicitDesignatedEntityNonEntityTypeCharacteristicReferenceExpression>
Alternate: DesignatedEntityNonEntityTypeCharacteristicWildcardReference
Emit: <DesignatedEntityNonEntityTypeCharacteristicWildcardReference>
Rule: ExplicitDesignatedEntityNonEntityTypeCharacteristicReferenceExpression
Let:
C_TYPE_NAME = { %THIS% =>
<GetExplicitDesignatedEntityNonEntityTypeCharacteristicReferenceMemberIDLType>
}
Variant: DesignatedEntityNonEntityTypeCharacteristicReference
Variant: OptionalAnnotation
DesignatedEntityNonEntityTypeCharacteristicReference
Variant: DesignatedEntityNonEntityTypeCharacteristicReference DEREF
IDLStructMemberReference
Variant: OptionalAnnotation
DesignatedEntityNonEntityTypeCharacteristicReference DEREF
IDLStructMemberReference
Let:
C_ROLE_NAME =
%<DesignatedEntityNonEntityTypeCharacteristicReference>%.rolename
Let:
C_ROLE_NAME = <StructuredTemplateElementMemberName>
Rule: DesignatedEntityNonEntityTypeCharacteristicWildcardReference
// A DesignatedEntityNonEntityTypeCharacteristicWildcardReference is a
"wildcard reference"
// to one or more explicit
DesignatedEntityNonEntityTypeCharacteristicReferences. Each
// DesignatedEntityNonEntityTypeCharacteristicReference is a
// [Link] that is 1) composed in the
// DesignatedEntityTypeReferencePath's DesignatedEntityTypeReference to
which the ASTERISK is
// applied (i.e. the Composition is a member of
<DesignatedEntityTypeReference>.composition),
// and 2) is projected by the Template's corresponding Query.
// Generate a DesignatedEntityNonEntityTypeCharacteristicReference
Template construct for
// this [Link].
Let:
GENERATED_CHARACTERISTIC_REFERENCE = (
%%<DesignatedEntityTypeReference>%.name% , "." ,
%[Link]% )
Rule: StructuredTemplateElementTypeReferenceStatement
Alternate: StructuredTemplateElementTypeMemberReferenceStatement
Emit: <StructuredTemplateElementTypeMemberReferenceStatement>
Alternate: DirectStructuredTemplateElementTypeReferenceStatement
Emit: <DirectStructuredTemplateElementTypeReferenceStatement>
Rule: StructuredTemplateElementTypeMemberReferenceStatement
Alternate: EntityTypeStructuredTemplateElementTypeMemberReferenceStatement
Emit: <EntityTypeStructuredTemplateElementTypeMemberReferenceStatement>
Alternate: EquivalentEntityTypeTemplateMethodMemberReferenceStatement
Emit: <EquivalentEntityTypeTemplateMethodMemberReferenceStatement>
Rule: EntityTypeStructuredTemplateElementTypeMemberReferenceStatement
Emit: <EntityTypeStructuredTemplateElementMember>+
Rule: EquivalentEntityTypeTemplateMethodMemberReferenceStatement
Rule: InlineEquivalentEntityTypeTemplateMethodMemberStatement
Let:
INSTANTIATED_MEMBER_STATEMENT = {
%EquivalentEntityTypeTemplateElementMemberStatement% =>
<GetInstantiatedEquivalentEntityTypeTemplateElementMemberStatement> }
Rule: GetInstantiatedEquivalentEntityTypeTemplateElementMemberStatement
Let:
EquivalentEntityTypeTemplateMethodParameterReference =
%%<DesignatedEntityTypeReference>%.name%
Return: THIS
Rule: DirectStructuredTemplateElementTypeReferenceStatement
Alternate: DirectEntityTypeStructuredTemplateElementTypeReferenceStatement
Emit: <DirectEntityTypeStructuredTemplateElementTypeReferenceStatement>
Alternate: DirectEquivalentEntityTypeTemplateMethodReferenceStatement
Emit: <DirectEquivalentEntityTypeTemplateMethodReferenceStatement>
Rule: DirectEntityTypeStructuredTemplateElementTypeReferenceStatement
Expression: OptionalAnnotation?
EntityTypeStructuredTemplateElementTypeReference LEFT_PAREN
PrimaryStructuredTemplateElementTypeReferenceParameter ( COMMA
OptionalStructuredTemplateElementTypeReferenceParameter )* RIGHT_PAREN
StructuredTemplateElementMemberName
Let:
C_MULTI_UPPER_BOUND = %JOIN_CHARACTERISTIC%.upperBound
C_MULTI_LOWER_BOUND = %JOIN_CHARACTERISTIC%.lowerBound
Otherwise:
Let:
C_MULTI_UPPER_BOUND = 1
C_MULTI_LOWER_BOUND = 1
Let:
C_MULTI_UPPER_BOUND = 1
C_MULTI_LOWER_BOUND = 1
Let:
C_MULTI_UPPER_BOUND = %JOIN_CHARACTERISTIC%.sourceUpperBound
C_MULTI_LOWER_BOUND = %JOIN_CHARACTERISTIC%.sourceLowerBound
Otherwise:
Let:
C_MULTI_UPPER_BOUND = 1
C_MULTI_LOWER_BOUND = 1
Let:
C_MULTI_LOWER_BOUND = 0
The following 4 emit conditional rules are used to determine the IDL type
for a DirectEntityTypeStructuredTemplateElementTypeReferenceStatement's type.
These rules use the C_MULTI_LOWER_BOUND and C_MULTI_UPPER_BOUND determined by
the C_MULTI conditional rule above for each joining Characteristic:
Let:
MEMBER_IDL_TYPE = "sequence" "<" %DE_TYPE_NAME% ">"
MEMBER_TYPE_NAME = ( "Seq_" , %DE_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = "sequence" "<" %DE_TYPE_NAME% ","
%C_UPPERBOUND_PRODUCT_VALUE% ">"
MEMBER_TYPE_NAME = ( "Seq_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%DE_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = %DE_TYPE_NAME%
MEMBER_TYPE_NAME = ( "Array_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%DE_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = %DE_TYPE_NAME%
MEMBER_TYPE_NAME = %MEMBER_IDL_TYPE%
Variant: OptionalAnnotation
EntityTypeStructuredTemplateElementTypeReference LEFT_PAREN
PrimaryStructuredTemplateElementTypeReferenceParameter ( COMMA
OptionalStructuredTemplateElementTypeReferenceParameter )* RIGHT_PAREN
StructuredTemplateElementMemberName
Let:
IDL_TYPE = "sequence" "<" %DE_TYPE_NAME% ">"
IDL_TYPE_NAME = ( "Seq_" , %DE_TYPE_NAME% )
Let:
IDL_TYPE = "sequence" "<" %DE_TYPE_NAME% ","
%C_UPPERBOUND_PRODUCT_VALUE% ">"
IDL_TYPE_NAME = ( "Seq_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%DE_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = %DE_TYPE_NAME%
IDL_TYPE_NAME = ( "Array_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%DE_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = %DE_TYPE_NAME%
IDL_TYPE_NAME = %IDL_TYPE%
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Rule: DirectEquivalentEntityTypeTemplateMethodReferenceStatement
// Instantiate the IDL Template Module. Note that the IDL Template Module
instance is
// specific to the enclosing StructuredTemplateElementType.
Let:
MEMBER_IDLTYPE = { %EquivalentEntityTypeTemplateMethodMember% =>
<GetInstantiatedEquivalentEntityTypeTemplateMethodMemberStatementIDLType> }
Emit1: %MEMBER_IDLTYPE%
Emit1: ">"
Let:
UNDERSCORE_SEPARATED_ENTITY_NAME_LIST = ""
Let:
PARAMETERS_ENTITY_NAME =
%%<StructuredTemplateElementTypeReferenceParameter>%.name%
Let:
IDL_TYPE_NAME = ( %CURRENT_STRUCTURED_TEMPLATE_ELEMENT_NAME% ,
%PARAMETER_LIST_ENTITY_NAMES% , "_Resource" )
IDL_TEMPLATE_MODULE_INST_NAME = ( %IDL_TYPE_NAME% , "_Module" )
Rule: GenerateEquivalentEntityTypeTemplateMethodMemberStatementIDL
Let:
INSTANTIATED_MEMBER_STATEMENT = {
%EquivalentEntityTypeTemplateElementMemberStatement% =>
<GetInstantiatedEquivalentEntityTypeTemplateElementMemberStatement> }
Rule: GetInstantiatedEquivalentEntityTypeTemplateMethodMemberStatementIDLType
Let:
INSTANTIATED_MEMBER_STATEMENT = {
%EquivalentEntityTypeTemplateElementMemberStatement% =>
<GetInstantiatedEquivalentEntityTypeTemplateElementMemberStatement> }
INSTANTIATED_MEMBER_STATEMENT_IDLTYPE = { %INSTANTIATED_MEMBER_STATEMENT%
=>
<GetExplicitDesignatedEntityNonEntityTypeCharacteristicReferenceMemberIDLType>
}
Return: %INSTANTIATED_MEMBER_STATEMENT_IDLTYPE%
Rule: GenerateExplicitDesignatedEntityNonEntityTypeCharacteristicReferenceIDL
Expression: OptionalAnnotation?
DesignatedEntityNonEntityTypeCharacteristicReference ( DEREF
IDLStructMemberReference )? ( KW_AS StructuredTemplateElementMemberName )?
// Behind each
ExplicitDesignatedEntityNonEntityTypeCharacteristicReferenceExpression
// is a DesignatedEntityNonEntityTypeCharacteristicReference, which is a
reference to
// a Characteristic composed into a DesignatedEntityTypeReference, which is
a reference
// to a [Link] (the Entity that composes that
Characteristic.
// A DesignatedEntityNonEntityTypeCharacteristicReference's type is a
always
// [Link].
Let:
C_MULTI_UPPER_BOUND = %JOIN_CHARACTERISTIC%.upperBound
C_MULTI_LOWER_BOUND = %JOIN_CHARACTERISTIC%.lowerBound
Otherwise:
Let:
C_MULTI_UPPER_BOUND = 1
C_MULTI_LOWER_BOUND = 1
Let:
C_MULTI_LOWER_BOUND = 0
Let:
C_MULTI_UPPER_BOUND = 1
C_MULTI_LOWER_BOUND = 1
Let:
C_MULTI_UPPER_BOUND = %JOIN_CHARACTERISTIC%.sourceUpperBound
C_MULTI_LOWER_BOUND = %JOIN_CHARACTERISTIC%.sourceLowerBound
Otherwise:
Let:
C_MULTI_UPPER_BOUND = 1
C_MULTI_LOWER_BOUND = 1
Let:
C_MULTI_LOWER_BOUND = 0
The following 4 emit conditional rules are used to determine the IDL type
for a DesignatedEntityNonEntityTypeCharacteristicReference's type. These rules
Variant: DesignatedEntityNonEntityTypeCharacteristicReference
Let:
C_TYPE_NAME =
%<DesignatedEntityNonEntityTypeCharacteristicReference>%.[Link]
C_ROLE_NAME =
%<DesignatedEntityNonEntityTypeCharacteristicReference>%.rolename
Let:
MEMBER_IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ">"
MEMBER_TYPE_NAME = ( "Seq_" , %C_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ","
%C_UPPERBOUND_PRODUCT_VALUE% ">"
MEMBER_TYPE_NAME = ( "Seq_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = %C_TYPE_NAME%
MEMBER_TYPE_NAME = ( "Array_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = %C_TYPE_NAME%
MEMBER_TYPE_NAME = %MEMBER_IDL_TYPE%
Let:
C_TYPE_NAME =
%<DesignatedEntityNonEntityTypeCharacteristicReference>%.[Link]
C_ROLE_NAME = <StructuredTemplateElementMemberName>
Let:
MEMBER_IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ">"
MEMBER_TYPE_NAME = ( "Seq_" , %C_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ","
%C_UPPERBOUND_PRODUCT_VALUE% ">"
MEMBER_TYPE_NAME = ( "Seq_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = %C_TYPE_NAME%
MEMBER_TYPE_NAME = ( "Array_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = %C_TYPE_NAME%
MEMBER_TYPE_NAME = %MEMBER_IDL_TYPE%
Let:
C_TYPE_NAME =
%<DesignatedEntityNonEntityTypeCharacteristicReference>%.[Link]
C_ROLE_NAME =
%<DesignatedEntityNonEntityTypeCharacteristicReference>%.rolename
Let:
IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ">"
IDL_TYPE_NAME = ( "Seq_" , %C_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ","
%C_UPPERBOUND_PRODUCT_VALUE% ">"
IDL_TYPE_NAME = ( "Seq_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = %C_TYPE_NAME%
IDL_TYPE_NAME = ( "Array_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = %C_TYPE_NAME%
IDL_TYPE_NAME = %IDL_TYPE%
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Variant: OptionalAnnotation
DesignatedEntityNonEntityTypeCharacteristicReference KW_AS
StructuredTemplateElementMemberName
Let:
IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ">"
IDL_TYPE_NAME = ( "Seq_" , %C_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ","
%C_UPPERBOUND_PRODUCT_VALUE% ">"
IDL_TYPE_NAME = ( "Seq_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = %C_TYPE_NAME%
IDL_TYPE_NAME = ( "Array_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = %C_TYPE_NAME%
IDL_TYPE_NAME = %IDL_TYPE%
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
C_TYPE_NAME = %<IDLStructMemberReference>%.[Link]
C_ROLE_NAME = %<IDLStructMemberReference>%.rolename
Let:
MEMBER_IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ">"
MEMBER_TYPE_NAME = ( "Seq_" , %C_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ","
%C_UPPERBOUND_PRODUCT_VALUE% ">"
MEMBER_TYPE_NAME = ( "Seq_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = %C_TYPE_NAME%
MEMBER_TYPE_NAME = ( "Array_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = %C_TYPE_NAME%
MEMBER_TYPE_NAME = %MEMBER_IDL_TYPE%
Let:
C_TYPE_NAME = %<IDLStructMemberReference>%.[Link]
C_ROLE_NAME = <StructuredTemplateElementMemberName>
Let:
MEMBER_IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ">"
MEMBER_TYPE_NAME = ( "Seq_" , %C_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ","
%C_UPPERBOUND_PRODUCT_VALUE% ">"
MEMBER_TYPE_NAME = ( "Seq_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
Let:
MEMBER_IDL_TYPE = %C_TYPE_NAME%
MEMBER_TYPE_NAME = %MEMBER_IDL_TYPE%
Variant: OptionalAnnotation
DesignatedEntityNonEntityTypeCharacteristicReference DEREF
IDLStructMemberReference
Let:
C_TYPE_NAME = %<IDLStructMemberReference>%.[Link]
C_ROLE_NAME = %<IDLStructMemberReference>%.rolename
Let:
IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ">"
IDL_TYPE_NAME = ( "Seq_" , %C_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ","
%C_UPPERBOUND_PRODUCT_VALUE% ">"
IDL_TYPE_NAME = ( "Seq_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = %C_TYPE_NAME%
IDL_TYPE_NAME = ( "Array_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = %C_TYPE_NAME%
IDL_TYPE_NAME = %IDL_TYPE%
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Variant: OptionalAnnotation
DesignatedEntityNonEntityTypeCharacteristicReference DEREF
IDLStructMemberReference KW_AS StructuredTemplateElementMemberName
Let:
C_TYPE_NAME = %<IDLStructMemberReference>%.[Link]
C_ROLE_NAME = <StructuredTemplateElementMemberName>
Let:
IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ">"
IDL_TYPE_NAME = ( "Seq_" , %C_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = "sequence" "<" %C_TYPE_NAME% ","
%C_UPPERBOUND_PRODUCT_VALUE% ">"
IDL_TYPE_NAME = ( "Seq_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = %C_TYPE_NAME%
IDL_TYPE_NAME = ( "Array_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Let:
IDL_TYPE = %C_TYPE_NAME%
IDL_TYPE_NAME = %IDL_TYPE%
MEMBER_IDL_TYPE = "sequence" "<" %IDL_TYPE_NAME% "," "1" ">"
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Rule:
GetExplicitDesignatedEntityNonEntityTypeCharacteristicReferenceMemberIDLType
Expression: OptionalAnnotation?
DesignatedEntityNonEntityTypeCharacteristicReference ( DEREF
IDLStructMemberReference )? ( KW_AS StructuredTemplateElementMemberName )?
Let:
C_MULTI_UPPER_BOUND = %JOIN_CHARACTERISTIC%.upperBound
C_MULTI_LOWER_BOUND = %JOIN_CHARACTERISTIC%.lowerBound
Otherwise:
Let:
C_MULTI_UPPER_BOUND = 1
C_MULTI_LOWER_BOUND = 1
Let:
C_MULTI_LOWER_BOUND = 0
Let:
C_MULTI_UPPER_BOUND = 1
C_MULTI_LOWER_BOUND = 1
Let:
C_MULTI_UPPER_BOUND = %JOIN_CHARACTERISTIC%.sourceUpperBound
C_MULTI_LOWER_BOUND = %JOIN_CHARACTERISTIC%.sourceLowerBound
Otherwise:
Let:
C_MULTI_UPPER_BOUND = 1
C_MULTI_LOWER_BOUND = 1
Let:
C_MULTI_LOWER_BOUND = 0
The following 4 emit conditional rules are used to determine the IDL type
for a DesignatedEntityNonEntityTypeCharacteristicReference's type. These rules
use the C_MULTI_LOWER_BOUND and C_MULTI_UPPER_BOUND determined by the C_MULTI
conditional rule above for each joining Characteristic:
Let:
C_TYPE_NAME =
%<DesignatedEntityNonEntityTypeCharacteristicReference>%.[Link]
Variant: DesignatedEntityNonEntityTypeCharacteristicReference
Variant: DesignatedEntityNonEntityTypeCharacteristicReference KW_AS
StructuredTemplateElementMemberName
Variant: DesignatedEntityNonEntityTypeCharacteristicReference DEREF
IDLStructMemberReference
Variant: DesignatedEntityNonEntityTypeCharacteristicReference DEREF
IDLStructMemberReference KW_AS StructuredTemplateElementMemberName
Let:
MEMBER_TYPE_NAME = ( "Seq_" , %C_TYPE_NAME% )
Return: %MEMBER_TYPE_NAME%
Let:
MEMBER_TYPE_NAME = ( "Seq_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
Return: %MEMBER_TYPE_NAME%
Return: %MEMBER_TYPE_NAME%
Let:
MEMBER_TYPE_NAME = %C_TYPE_NAME%
Return: %MEMBER_TYPE_NAME%
Variant: OptionalAnnotation
DesignatedEntityNonEntityTypeCharacteristicReference
Variant: OptionalAnnotation
DesignatedEntityNonEntityTypeCharacteristicReference KW_AS
StructuredTemplateElementMemberName
Variant: OptionalAnnotation
DesignatedEntityNonEntityTypeCharacteristicReference DEREF
IDLStructMemberReference
Variant: OptionalAnnotation
DesignatedEntityNonEntityTypeCharacteristicReference DEREF
IDLStructMemberReference KW_AS StructuredTemplateElementMemberName
Let:
IDL_TYPE_NAME = ( "Seq_" , %C_TYPE_NAME% )
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Return: %MEMBER_TYPE_NAME%
Let:
IDL_TYPE_NAME = ( "Seq_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Return: %MEMBER_TYPE_NAME%
Let:
IDL_TYPE_NAME = ( "Array_" , %C_UPPERBOUND_PRODUCT_VALUE% , "_" ,
%C_TYPE_NAME% )
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Return: %MEMBER_TYPE_NAME%
Let:
IDL_TYPE_NAME = %C_TYPE_NAME%
MEMBER_TYPE_NAME = ( "Opt_" , %IDL_TYPE_NAME% )
Return: %MEMBER_TYPE_NAME%
Rule: StructuredTemplateElementTypeReferenceParameter
Return: <DesignatedEntityTypeReferencePath>
Rule: ExternalTemplateTypeReference
Expression: IDENTIFIER
Return: [Link][%IDENTIFIER%]
Rule: ExternalTemplateTypeAlias
Expression: IDENTIFIER
Emit1: %IDENTIFIER%
Rule: ExternalStructuredTemplateElementTypeReference
Expression: IDENTIFIER
Emit1: %IDENTIFIER%
Rule: ExternalStructuredTemplateElementTypeAlias
Expression: IDENTIFIER
Emit1: %IDENTIFIER%
Rule: EntityTypeStructuredTemplateElementTypeReference
Expression: IDENTIFIER
Return: IDENTIFIER
Rule: StructuredTemplateElementMemberName
Expression: IDENTIFIER
Return: IDENTIFIER
Rule: TemplateElementTypeName
Expression: IDENTIFIER
Return: IDENTIFIER
Rule: EquivalentEntityTypeTemplateMethodReference
Expression: IDENTIFIER
Return: IDENTIFIER
Rule: DesignatedEquivalentEntityNonEntityTypeCharacteristicReference
Return: <EquivalentEntityTypeTemplateMethodCharacteristicReference>
Rule: EquivalentEntityTypeTemplateMethodCharacteristicReference
Expression: IDENTIFIER
Rule: DesignatedEntityNonEntityTypeCharacteristicReference
Return:
[Link][%<QueryProjectedNonEntityTypeCharacteristicRefer
ence>%]
Alternate: QueryProjectedNonEntityTypeCharacteristicReferenceOrAlias
Return:
[Link][%<QueryProjectedNonEntityTypeCharacteristicRefer
enceOrAlias>%]
Rule: DesignatedEntityEnumerationTypeCharacteristicReference
Return:
[Link][%<QueryProjectedEnumerationTypeCharacteristicRef
erence>%]
Alternate: QueryProjectedEnumerationTypeCharacteristicReferenceOrAlias
Return:
[Link][%<QueryProjectedEnumerationTypeCharacteristicRef
erenceOrAlias>%]
Rule: DesignatedEntityTypeReferencePath
Expression: ExplicitEntityTypeReferenceJoinPath?
DesignatedEntityTypeReference
Return: <DesignatedEntityTypeReference>
Rule: DesignatedEntityTypeReference
Expression: QualifiedEntityTypeReference
Return: <QualifiedEntityTypeReference>
Rule: QualifiedEntityTypeReference
Return: <EntityTypeReference>
Rule: EntityTypeReference
Expression: QuerySelectedEntityTypeReferenceOrAlias
Return:
[Link][%<QuerySelectedEntityTypeReferenceOrAlias>%]
Rule: IDLStructMemberReference
Expression: IDENTIFIER
Rule: EnumLiteralReferenceExpression
Return: %<EnumerationLiteralReference>%.name
Rule: EnumerationLiteralReference
Expression: IDENTIFIER
Return: [Link][%IDENTIFIER%]
Rule: QueryProjectedNonEntityTypeCharacteristicReferenceOrAlias
Expression: IDENTIFIER
Return: IDENTIFIER
Rule: QueryProjectedNonEntityTypeCharacteristicReference
Expression: IDENTIFIER
Return: IDENTIFIER
Rule: QueryProjectedEnumerationTypeCharacteristicReferenceOrAlias
Expression: IDENTIFIER
Return: IDENTIFIER
Rule: QueryProjectedEnumerationTypeCharacteristicReference
Expression: IDENTIFIER
Return: IDENTIFIER
Rule: QuerySelectedEntityTypeReferenceOrAlias
Expression: IDENTIFIER
Return: IDENTIFIER
Rule: PlatformIDLType
Expression: [Link]
Let:
PLATFORM_IDLTYPE = THIS
PLATFORM_IDLTYPE_NAME = %PLATFORM_IDLTYPE%.name
Let:
VTU = %PLATFORM_IDLTYPE%.[Link]
// constaint is [Link]
// valueType is a [Link]
Let:
MEMBER = [Link]
Let:
MEMBER = [Link]
Rule: LogicalEnumerated
Expression: [Link]
Let:
ENUM = THIS
Let:
LABEL = [Link]
Emit1: %%LABEL%.name%
Rule: LogicalEnumerationConstraint
Expression: [Link]
Let:
CONSTRAINT = THIS
Let:
LABEL = [Link]
Emit1: %%LABEL%.name%
#ifndef FACE_TYPES_H
#define FACE_TYPES_H
#endif /* FACE_TYPES_H */
#ifndef FACE_INTERFACE_H
#define FACE_INTERFACE_H
/** @brief Return codes used to report certain runtime errors for
FACE Standardized Interfaces. */
typedef enum FACE_interface_return {
FACE_INTERFACE_NO_ERROR, /**< No error has occurred. */
FACE_INTERFACE_INSUFFICIENT_MEMORY, /**< (ctor only) An implementation is
unable to allocate enough memory
for initialization. */
FACE_INTERFACE_NULL_PARAM, /**< One or more other parameters is a
NULL pointer */
FACE_INTERFACE_LOGIC_ERROR /**< A logical error in declaration or
initialization */
} FACE_interface_return;
#endif // FACE_INTERFACE_H
#ifndef FACE_SEQUENCE_H
#define FACE_SEQUENCE_H
#include <FACE/types.h>
#include <limits.h>
#include <stddef.h>
/**
* @brief Interface for operating on a generic sequence of elements.
* @details A FACE_sequence is defined by three characteristics:
* - length - the current number of elements in the FACE_sequence
* - element size - the size of each element
* - bound - the maximum number of elements the FACE_sequence can ever
* hold. This bound is logical, and is independent from the size
* of any underlying memory. A FACE_sequence's bound is fixed
* throughout the lifetime of the FACE_sequence. An "unbounded"
* FACE_sequence has an infinite bound, represented by
* FACE_SEQUENCE_UNBOUNDED_SENTINEL.
* - capacity - the number of elements a FACE_sequence has currently
* allocated memory for. This may vary by implementation, but
* length <= capacity <= bound is always true.
*
* A "managed" FACE_sequence is responsible for and manages the lifetime of
* the memory for the data it represents. An "unmanaged" FACE_sequence
* essentially wraps a pointer to memory whose lifetime is managed
* elsewhere.
*
* A FACE_sequence is "initialized" if it is in a state that could have
* resulted from successful initialization by one of the "_init" functions.
* Any other state makes the FACE_sequence "uninitialized".
*
* When a memory allocation failure or precondition violation occurs, a
* FACE_sequence is put into a known "invalid state". In this invalid state:
* - length, capacity, and bound are 0
* - FACE_sequence_buffer() will return NULL
* - FACE_sequence_is_managed() and FACE_sequence_is_bounded() will
* return FALSE
* The FACE_sequence_is_valid() function indicates whether or not a
* FACE_sequence is in this state.
*
* Global preconditions:
* - In every function, if the @p this_obj parameter is NULL, the function
* does nothing and returns FACE_SEQUENCE_NULL_THIS.
* - In every _init function, if this_obj is already initialized,
* FACE_SEQUENCE_PRECONDITION_VIOLATED is returned and the state of
* this_obj is not modified.
* - In every non _init function, if this_obj has not been initialized,
* FACE_SEQUENCE_PRECONDITION_VIOLATED is returned and the state of
* this_obj is not modified.
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
/* implementation-specific */
} FACE_sequence;
/**
* @brief Managed unbounded initialization - initializes empty managed
* unbounded FACE_sequence
* @details (see #FACE_string_init_managed_unbounded)
*
* After initialization, FACE_sequence_buffer() will return NULL.
*
* @param this_obj the FACE_sequence to be initialized
* @param sizeof_T the size of each element in @p this_obj
*/
FACE_sequence_return FACE_sequence_init_managed_unbounded(
FACE_sequence* this_obj,
size_t sizeof_T
);
/**
* @brief Managed bounded initialization - initializes empty managed
* FACE_sequence of specified bound
* @details (see #FACE_string_init_managed_bounded)
*
* If allocation is successful, FACE_sequence_buffer() will return NULL.
*
* @param this_obj the FACE_sequence to be initialized
* @param sizeof_T the size of each element in @p this_obj
* @param bound the specified bound for @p this_obj to be initialized with
*/
FACE_sequence_return FACE_sequence_init_managed_bounded(
FACE_sequence* this_obj,
size_t sizeof_T,
FACE_unsigned_long bound
);
/**
* @brief Managed copy initialization
* @details (see #FACE_string_init_managed_copy)
*/
FACE_sequence_return FACE_sequence_init_managed_copy(
FACE_sequence* this_obj,
FACE_sequence* src
);
/**
/**
* @brief Unmanaged initialization
* @details (see #FACE_string_init_unmanaged)
*
* The caller must ensure @p bound * @p sizeof_T is not greater than the
* size of the memory allocated at @p src. If this condition is violated,
* the result is implementation-defined behavior and may result in an
* attempt to access restricted memory.
*
* Preconditions:
* - src != NULL
* - length <= bound
* - bound != 0 (no empty unmanaged sequences)
* - bound != UNBOUNDED_SENTINEL (no unbounded unmanaged sequences)
* - sizeof_T != 0
* When calling this function, if any of these preconditions are false,
* - FACE_SEQUENCE_NULL_PARAM will be returned (if src is NULL) or
* - FACE_SEQUENCE_PRECONDITION_VIOLATED will be returned (if any other
/**
* @brief Reserve storage for @p capacity elements.
* @details (see #FACE_string_reserve)
*/
FACE_sequence_return FACE_sequence_reserve(
FACE_sequence* this_obj,
FACE_unsigned_long capacity
);
/**
* @brief Frees any data managed by @p this_obj.
* @details (see #FACE_string_free)
*/
FACE_sequence_return FACE_sequence_free(FACE_sequence* this_obj);
/**
* @brief Clears @p this_obj's data.
* @details (see #FACE_string_clear)
*/
FACE_sequence_return FACE_sequence_clear(FACE_sequence* this_obj);
/**
* @brief Adds a copy of @p src's data to the @p this_obj's data
* @details (see #FACE_string_append)
*/
FACE_sequence_return FACE_sequence_append(
FACE_sequence* this_obj,
const FACE_sequence* src
);
/**
* @brief Adds a copy of @p src to the @p this_obj's data
* @details (see #FACE_string_append_elem)
*
* Preconditions:
* - src != NULL
* - sizeof_T != 0
* When calling this function, if any of these preconditions are false,
* - FACE_SEQUENCE_NULL_PARAM will be returned (if src is NULL) or
* - FACE_SEQUENCE_PRECONDITION_VIOLATED will be returned (if any other
* preconditions are violated)
* - @p this_obj is put into the invalid state
*
/**
* @brief Gets the element at a given index.
* @details (see #FACE_string_at)
*
* @retval NULL if @p this_obj is null, not initialized, or if index is out
* of range
* @retval a const pointer to the element at the given index otherwise.
*/
const void * FACE_sequence_at(
const FACE_sequence* this_obj,
FACE_unsigned_long index
);
/**
* @brief Returns pointer to @p this_obj's underlying data
* @details To avoid accessing restricted memory, the caller should avoid
* dereferencing memory beyond buffer + length*(the size of each element).
*
* @retval NULL if @p this_obj is null or not initialized
* @retval a pointer to contiguous memory for @p this_obj's data otherwise
*/
const void * FACE_sequence_buffer(const FACE_sequence* this_obj);
/**
* @brief Gets the length of @p this_obj.
* @details (see #FACE_string_length)
*/
FACE_sequence_return FACE_sequence_length(
const FACE_sequence* this_obj,
FACE_unsigned_long* length
);
/**
* @brief Gets the capacity of @p this_obj.
* @details (see #FACE_string_capacity)
*/
FACE_sequence_return FACE_sequence_capacity(
const FACE_sequence* this_obj,
FACE_unsigned_long* capacity
);
/**
* @brief Gets the bound of @p this_obj.
* @details (see #FACE_string_bound)
*/
FACE_sequence_return FACE_sequence_bound(
const FACE_sequence* this_obj,
FACE_unsigned_long* bound
);
/**
* @brief Gets whether or not @p this_obj is managed.
* @details (see #FACE_string_is_managed)
/**
* @brief Gets whether or not @p this_obj is bounded.
* @details (see #FACE_string_is_bounded)
*/
FACE_sequence_return FACE_sequence_is_bounded(
const FACE_sequence* this_obj,
FACE_boolean* is_bounded
);
/**
* @brief Gets whether or not @p this_obj is in the invalid state.
* @details (see #FACE_string_is_valid)
*/
FACE_sequence_return FACE_sequence_is_valid(
const FACE_sequence* this_obj,
FACE_boolean* is_valid
);
#ifdef __cplusplus
}
#endif
#endif /* FACE_SEQUENCE_H */
#ifndef FACE_STRING_H
#define FACE_STRING_H
#include <FACE/types.h>
#include <limits.h>
/**
* @brief Interface for operating on a sequence of characters.
* @details A FACE_string is defined by three characteristics:
* - length - the current number of characters (excluding NUL)
* in the FACE_string
* - bound - the maximum number of characters (excluding NUL)
* the FACE_string can ever hold. This bound is logical, and is
* independent from the size of any underlying memory.
* A FACE_string's bound is fixed throughout the lifetime of the
* FACE_string. An "unbounded" FACE_string has an infinite bound,
* represented by FACE_STRING_UNBOUNDED_SENTINEL.
* - capacity - the number of characters (excluding NUL)
* a FACE_string has currently allocated memory for. This may
* vary by implementation, but length <= capacity <= bound is
* always true.
*
* A "managed" FACE_string is responsible for and manages the lifetime of
* the memory for the data it represents. An "unmanaged" FACE_string
* essentially wraps a pointer to memory whose lifetime is managed
* elsewhere.
*
* A FACE_string is "initialized" if it is in a state that could have
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
/* implementation-specific */
} FACE_string;
/**
* @brief Unmanaged initialization from a C-string literal
* @details After initialization, @p this_obj does not manage its own data,
* but instead serves as a wrapper to the data pointed to by @p src.
*
* This function has exactly the same behavior, preconditions, and possible
* return codes as calling FACE_string_init_unmanaged where the values for
* @p length and &p bound are both strlen(&p src).
*
* The motivation for this function is to initialize a FACE_string from a
/**
* @brief Managed unbounded initialization - initializes empty managed
* unbounded FACE_string
* @details No memory is allocated. After initialization,
* - length will be 0
* - capacity will be 0
* - bound will be FACE_STRING_UNBOUNDED_SENTINEL
* - FACE_string_buffer() will get the empty string
*
* @param this_obj the FACE_string to be initialized.
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is already
* initialized
* @retval FACE_STRING_NO_ERROR otherwise.
*/
FACE_string_return FACE_string_init_managed_unbounded(
FACE_string* this_obj
);
/**
* @brief Managed bounded initialization - initializes empty managed
* FACE_string of specified bound
* @details Memory may or may not be allocated.
*
* Preconditions:
* - bound != 0
* - bound != FACE_STRING_UNBOUNDED_SENTINEL
* When calling this function, if any of these preconditions are false,
* - FACE_STRING_PRECONDITION_VIOLATED will be returned
* - @p this_obj is put into the invalid state
*
* While the implementation does not have to allocate memory equal in
* size to the requested bound, memory allocation may still fail. If no
* preconditions are violated and memory allocation fails:
* - FACE_STRING_INSUFFICIENT_MEMORY will be returned
* - @p this_obj is put into the invalid state
*
* Otherwise:
* - length will be 0
* - capacity will be the current capacity
* - bound will be the specified bound
* - FACE_string_buffer() will get the empty string
*
* @param this_obj the FACE_string to be initialized
* @param bound the specified bound for the @p this_obj to be initialized
* with
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
/**
* @brief Managed copy initialization
* @details After initialization, @p this_obj manages its own data, which is
* a copy of @p src's data, and has the same bound as @p src.
*
* Preconditions:
* - @p src != NULL
* - @p src is initialized
* When calling this function, if any of these preconditions are false,
* - FACE_STRING_NULL_PARAM will be returned (if src is NULL) or
* FACE_STRING_PRECONDITION_VIOLATED will be returned (if src is not
* initialized)
* - @p this_obj is put into the invalid state
*
* If no preconditions are violated and memory allocation fails:
* - FACE_STRING_INSUFFICIENT_MEMORY will be returned
* - @p this_obj is put into the invalid state
*
* @param this_obj the FACE_string to be initialized
* @param src the FACE_string to initialize @p this_obj with
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is already
* initialized or if @p src is not initialized
* @retval FACE_STRING_NULL_PARAM if @p src is null
* @retval FACE_STRING_INVALID_PARAM if @p src is in the invalid state
* @retval FACE_STRING_INSUFFICIENT_MEMORY if memory allocation fails
* @retval FACE_STRING_NO_ERROR otherwise.
*/
FACE_string_return FACE_string_init_managed_copy(
FACE_string* this_obj,
FACE_string* src
);
/**
* @brief Managed C-string initialization
* @details After initialization, @p this_obj manages its own data, which is
* a copy of @p cstr, and the bound of @p this_obj is equal to @p cstr's
* length. This function covers unmanaged-bounded string initialization.
*
* Preconditions:
* - cstr != NULL
* - cstr is not empty
* When calling this function, if any of these preconditions are false,
* - FACE_STRING_NULL_PARAM will be returned (if cstr is NULL) or
* FACE_STRING_PRECONDITION_VIOLATED will be returned (if cstr is not
* empty)
* - @p this_obj is put into the invalid state
*
* If no preconditions are violated and memory allocation fails:
* - FACE_STRING_INSUFFICIENT_MEMORY will be returned
* - @p this_obj is put into the invalid state
*
/**
* @brief Unmanaged initialization
* @details After initialization, @p this_obj does not manage its own data,
* but instead serves as a wrapper to the data pointed to by @p src.
*
* The caller must ensure @p bound (plus space for NUL)
* is not greater than the size of the memory allocated at @p src.
* If this condition is violated, the result is implementation-defined
* behavior and may result in an attempt to access restricted memory.
*
* The capacity of @p this_obj will be equal to its bound, because the
* externally managed memory has a fixed size, which is both a bound and a
* capacity.
*
* Preconditions:
* - src != NULL
* - length <= bound
* - bound != 0 (no empty unmanaged strings)
* - bound != UNBOUNDED_SENTINEL (no unbounded unmanaged strings)
* When calling this function, if any of these preconditions are false,
* - FACE_STRING_NULL_PARAM will be returned (if src is NULL) or
* - FACE_STRING_PRECONDITION_VIOLATED will be returned (if any other
* preconditions are violated)
* - @p this_obj is put into the invalid state
*
* Otherwise:
* - FACE_STRING_NO_ERROR will be returned
* - length will be the specified length
* - capacity will return the specified capacity (bound)
* - bound() will return the specified bound
* - FACE_string_buffer() will return a pointer to the externally managed
* memory
*
* @param this_obj a pointer to the FACE_string to be initialized
* @param src pointer to externally managed memory
* @param length the number of characters (excluding the NUL character) in
* the memory pointed to by @p src
* @param bound the number of characters (excluding the NUL character)
* the externally managed memory can hold. Also serves as a capacity.
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is already
* initialized or any other preconditions are false
* @retval FACE_STRING_NULL_PARAM if @p src is null
* @retval FACE_STRING_NO_ERROR otherwise.
*/
FACE_string_return FACE_string_init_unmanaged(
FACE_string* this_obj,
/**
* @brief Attempt to reserve memory to store @p capacity characters
* @details This function is useful when @p this_obj is initialized
* as a managed-unbounded string with an implementation-defined
* capacity in order to perform potential reallocation at a known
* point of program execution, such as during program initialization.
*
* On success, the implementation can store a string value of capacity
* @p capacity. The function may succeed without reallocation if the
* implementation-defined capacity exceeds @p capacity *and* the
* implementation does not reallocate to a smaller capacity.
*
* If any preconditions are violated, @p this_obj's state remains
* unchanged.
*
* Preconditions:
* - @p this_obj is valid
* - @p this_obj is managed
* - @p this_obj is unbounded
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is not
* initialized or any other preconditions are false
* @retval FACE_STRING_INSUFFICIENT_MEMORY if memory allocation fails
* @retval FACE_STRING_NO_ERROR otherwise.
*/
FACE_string_return FACE_string_reserve(
FACE_string* this_obj,
FACE_unsigned_long capacity
);
/**
* @brief Frees any data managed by @p this_obj.
* @details If any preconditions are violated, @p this_obj's state remains
* unchanged.
*
* Preconditions:
* - @p this_obj is managed
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is not
* initialized or any other preconditions are false
* @retval FACE_STRING_NO_ERROR otherwise.
*/
FACE_string_return FACE_string_free(FACE_string* this_obj);
/**
* @brief Clears @p this_obj's data.
* @details If any preconditions are violated, @p this_obj's state remains
* unchanged.
*
* Otherwise, all data is cleared, and @p this_obj's length will be set
* to 0. Memory allocation remains unchanged.
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is not
* initialized or any other preconditions are false
* @retval FACE_STRING_NO_ERROR otherwise.
/**
* @brief Adds a copy of @p src's data to the @p this_obj's data
* @details This is one of two FACE_string functions that may reallocate
* managed memory. If append is successful, the length of this String
* changes accordingly; capacity may or may not be changed.
* If append is unsuccessful, @p this_obj's state remains unchanged.
*
* Preconditions:
* - @p src != NULL
* - @p src is initialized
* When calling this function, if any of these preconditions are false,
* - FACE_STRING_NULL_PARAM will be returned (if src is NULL) or
* - FACE_STRING_PRECONDITION_VIOLATED will be returned (if any other
* preconditions are violated)
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is not
* initialized or if @p src is not initialized
* @retval FACE_STRING_NULL_PARAM if @p src is null
* @retval FACE_STRING_INSUFFICIENT_BOUND if append would exceed logical
* bound
* @retval FACE_STRING_INSUFFICIENT_MEMORY if append exceeds available
* memory
* @retval FACE_STRING_NO_ERROR otherwise
*/
FACE_string_return FACE_string_append(
FACE_string* this_obj,
const FACE_string* src
);
/**
* @brief Adds a copy of @p elem to the @p this_obj's data
* @details This is one of two FACE_string functions that may reallocate
* managed memory. If append is successful, the length of this String
* changes accordingly; capacity may or may not be changed.
* If append is unsuccessful, @p this_obj's state remains unchanged.
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is not
* initialized
* @retval FACE_STRING_INSUFFICIENT_BOUND if append would exceed logical
* bound
* @retval FACE_STRING_INSUFFICIENT_MEMORY if append exceeds available
* memory
* @retval FACE_STRING_NO_ERROR otherwise
*/
FACE_string_return FACE_string_append_elem(
FACE_string* this_obj,
const FACE_char elem
);
/**
* @brief Gets the character at a given index.
* @details FACE_strings use a zero-based index.
*
* @param this_obj a const pointer to the FACE_string being indexed.
* @param index The index of the element to be retrieved.
*
* @retval NULL if @p this_obj is null or not initialized
* @retval '\0' if index is out of range
/**
* @brief Returns C-string representation of @p this_obj's data
*
* @retval NULL if @p this_obj is null or not initialized
* @retval a pointer to a NUL-terminated (C-style) string equivalent
* to @p this_obj's underlying string data otherwise
*/
const char * FACE_string_buffer(const FACE_string* this_obj);
/**
* @brief Gets the length of @p this_obj.
*
* @param this_obj a const pointer to the FACE_string to get the length of
* @param length A pointer where the length will be stored.
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is not
* initialized
* @retval FACE_STRING_NULL_PARAM if @p length is null
* @retval FACE_STRING_NO_ERROR otherwise.
*/
FACE_string_return FACE_string_length(
const FACE_string* this_obj,
FACE_unsigned_long* length
);
/**
* @brief Gets the capacity of @p this_obj.
*
* @param this_obj a const pointer to the FACE_string to get the capacity of
* @param capacity A pointer where the capacity will be stored.
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is not
* initialized
* @retval FACE_STRING_NULL_PARAM if @p capacity is null
* @retval FACE_STRING_NO_ERROR otherwise.
*/
FACE_string_return FACE_string_capacity(
const FACE_string* this_obj,
FACE_unsigned_long* capacity
);
/**
* @brief Gets the bound of @p this_obj.
*
* @param this_obj a const pointer to the FACE_string to get the capacity of
* @param bound A pointer where the bound will be stored.
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is not
* initialized
* @retval FACE_STRING_NULL_PARAM if @p bound is null
* @retval FACE_STRING_NO_ERROR otherwise.
*/
FACE_string_return FACE_string_bound(
/**
* @brief Gets whether or not @p this_obj is managed.
*
* @param this_obj a const pointer to the FACE_string to check
* @param is_managed A pointer where the result will be stored.
* @p is_managed will be 1 if @p this_obj manages its own memory, and 0
* otherwise.
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is not
* initialized
* @retval FACE_STRING_NULL_PARAM if @p is_managed is null
* @retval FACE_STRING_NO_ERROR otherwise.
*/
FACE_string_return FACE_string_is_managed(
const FACE_string* this_obj,
FACE_boolean* is_managed
);
/**
* @brief Gets whether or not @p this_obj is bounded.
*
* @param this_obj a const pointer to the FACE_string to check
* @param is_bounded A pointer where the result will be stored.
* @p is_bounded will be 1 if @p this_obj is bounded, and 0
* otherwise.
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is not
* initialized
* @retval FACE_STRING_NULL_PARAM if @p is_bounded is null
* @retval FACE_STRING_NO_ERROR otherwise.
*/
FACE_string_return FACE_string_is_bounded(
const FACE_string* this_obj,
FACE_boolean* is_bounded
);
/**
* @brief Gets whether or not @p this_obj is in the invalid state.
* @details (see FACE_string details)
*
* @param this_obj a const pointer to the FACE_string to check
* @param is_valid A pointer where the result will be stored. @p is_valid
* will be 0 if @p this_obj is in the invalid state, and 1 otherwise.
*
* @retval FACE_STRING_NULL_THIS if @p this_obj is null
* @retval FACE_STRING_PRECONDITION_VIOLATED if @p this_obj is not
* initialized
* @retval FACE_STRING_NULL_PARAM if @p is_valid is null
* @retval FACE_STRING_NO_ERROR otherwise.
*/
FACE_string_return FACE_string_is_valid(
const FACE_string* this_obj,
FACE_boolean* is_valid
);
#ifdef __cplusplus
}
#endif /* FACE_STRING_H */
#ifndef FACE_FIXED_H
#define FACE_FIXED_H
#include <stdbool.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Interface for the fixed-precision value type.
* @details This represents the operations of a fixed-precision value,
* rather than a full numerical type with mathematic operators and
* expressions. It corresponds to an element of a TSS message declaration
* in C mapped from a UoP PDM View.
*
* This interface is available to consistently work with instances of
* fixed-precision values that are different types, based on different
* digits or scale values. Serialization is the primary use case.
*
* To facilitate parsing in the Security OSS Profile where sscanf() is
* not available, the string has strict format rules as follows:
* "<+|-><int_base10>.<frac_base10><d|D>".
*/
/**
* @brief Macros to clarify interface declarations
* @detail
* FACE_FIXED_DIGITS_MAX - Consistent with IDL4, 31 digits for decimal
* and fractional parts
* FACE_FIXED_CSTRING_MAX - 31 digits plus sign, decimal, format
* specifier, and null
*/
#ifndef FACE_FIXED_DIGTS_MAX
#define FACE_FIXED_DIGITS_MAX ((unsigned short) 31)
#endif
#ifndef FACE_FIXED_CSTRING_MAX
#define FACE_FIXED_CSTRING_MAX ((unsigned short) 35)
#endif
/**
* @brief Declaration of the value representation
* @details It is implementation-defined behavior if either digits or scale
* are modified after FACE_fixed_init(). It is implementation-defined
* behavior if the string value is modified other than via
* FACE_fixed_from_cstring().
*/
typedef struct {
unsigned short digits;
unsigned short scale;
char str[FACE_FIXED_CSTRING_MAX];
} FACE_fixed;
/**
/**
* @brief Assign from a C-string buffer
* @details Copies @p src if it passes validity checks
*
* @param value - the fixed-precision value "instance"
* @param src - the buffer to copy from
* @param count - the number of characters to copy, including null
*
* @pre value != 0
* @pre src != 0
* @pre count < size of storage
* @pre first character not '+' or '-'
* @pre decimal character not where expected given digits and scale
* @pre characters are digits for integral and fractional parts
* @pre last character not 'd' or 'D'
* @retval false if any precondition is false, else true
*/
bool FACE_fixed_from_cstring(FACE_fixed *value, const char *src, size_t count);
/**
* @brief Copy to a C-string buffer
* @details Copies to @p dest if it passes validity checks
*
* @param value - the fixed-precision value "instance"
* @param dest - the buffer to copy to
* @param count - size of the destination buffer
*
* @pre value != 0
* @pre dest != 0
* @pre count < length of current value
* @retval false if any precondition is false, else true
*/
bool FACE_fixed_to_cstring(FACE_fixed *value, const char *dest, size_t count);
/**
* @brief Query the number of decimal digits represented, both integer
* and fractional. The sign, decimal point, and format specifier are
* not included.
*
* @param value - the fixed-precision value "instance"
*
* @pre value != 0
* @retval 0 if any precondition is false, else digits
*/
unsigned short FACE_fixed_digits(FACE_fixed *value);
/**
* @brief Query the number of decimal fractional digits represented.
#ifdef __cplusplus
}
#endif
#endif /* FACE_FIXED_H */
#ifndef FACE_TYPES_HPP
#define FACE_TYPES_HPP
namespace FACE
{
typedef EDITME Short;
typedef EDITME Long;
typedef EDITME LongLong;
typedef EDITME UnsignedShort;
typedef EDITME UnsignedLong;
typedef EDITME UnsignedLongLong;
typedef EDITME Float;
typedef EDITME Double;
typedef EDITME LongDouble;
typedef EDITME Char;
typedef EDITME Boolean;
typedef EDITME Octet;
}
#endif /* FACE_TYPES_HPP */
#ifndef FACE_SEQUENCE_HPP
#define FACE_SEQUENCE_HPP
#include <FACE/[Link]>
#include <limits.h>
/**
* @brief Default constructor - creates empty managed unbounded Sequence
* @details (see #FACE::String Default constructor)
*
* After construction, the Sequence will be empty.
*/
Sequence()
{ /* insert definition */ }
/**
* @brief Managed copy constructor
* @details (see #FACE::String Managed copy constructor)
*/
Sequence(const Sequence& seq)
{ /* insert definition */ }
/**
* @brief Managed assignment operator
* @details ( see #FACE::String::operator=)
*/
Sequence& operator=(const Sequence& seq)
{ return *this; }
/**
* @brief Managed C-style array constructor
* @details After construction, this Sequence manages its own data,
* which is a copy of the @p length elements pointed to by @p arr, and
* bound() will return @p length.
*
* Preconditions:
* - arr != NULL
* When calling this function, if any of these preconditions are false,
* - return_code will be set to PRECONDITION_VIOLATED
* - this String is put into the invalid state
*
* If no preconditions are violated and memory allocation fails:
* - return_code will be set to INSUFFICIENT_MEMORY
* - this String is put into the invalid state
*
* The caller must ensure @p length * sizeof(T) is not greater than the
* size of the memory allocated at @p arr. If this condition is
* violated, the result is undefined behavior and may result in an
* attempt to access restricted memory.
*
* @param arr A pointer to the C-style array
* @param length The number of elements in the array
* @param return_code (see details)
*/
Sequence(const T * arr,
FACE::UnsignedLong length,
RETURN_CODE& return_code)
{ /* insert definition */ }
/**
* @brief Unmanaged constructor
* @details (see #FACE::String::String)
*
* The caller must ensure @p bound + sizeof(T) is not greater than the
* size of the memory allocated at @p seq. If this condition is
* violated, the result is undefined behavior and may result in an
* attempt to access restricted memory.
*
/**
* @brief Attempt to reserve memory to store @p capacity elements.
* @details (see #FACE::String::reserve)
*/
RETURN_CODE reserve(FACE::UnsignedLong capacity)
{ RETURN_CODE rc; return rc; }
/**
* @brief Frees any data managed by this Sequence.
*/
~Sequence()
{ /* insert definition */ }
/**
* @brief Clears this String's data.
* @details (see #FACE::String::clear)
*/
void clear()
{ /* insert definition */ }
/**
* @brief Adds a copy of @p seq's data to the current data.
* @details (see #FACE::String::append)
*/
RETURN_CODE append(const Sequence& seq)
{ RETURN_CODE rc; return rc; }
/**
* @brief Adds a copy of @p elem to the current data.
* @details (see #FACE::String::append)
*/
RETURN_CODE append(const T& elem)
{ RETURN_CODE rc; return rc; }
/**
* @brief Returns a reference to the element at a given index.
* @details (see #FACE::String::operator[])
*
* If @p index is out of range, the behavior is implementation-defined.
*/
///@{
T& operator[](FACE::UnsignedLong index)
{ T t; return t; }
const T& operator[](FACE::UnsignedLong index) const
{ T t; return t; }
///@}
/**
* @brief Returns pointer to contiguous memory for underlying data
* @details To avoid accessing restricted memory, the caller should
* avoid dereferencing memory beyond buffer() + length() * sizeof(T).
/**
* @brief Returns whether or not this Sequence is managed.
* @details (see #FACE::String::is_managed)
*/
FACE::Boolean is_managed() const
{ return false; }
/**
* @brief Returns whether or not this Sequence is bounded.
* @details (see #FACE::String::is_bounded)
*/
FACE::Boolean is_bounded() const
{ return false; }
/**
* @brief Returns whether or not this Sequence is in the invalid state.
* @details (see class details)
*/
FACE::Boolean is_valid() const
{ return false; }
private:
/* implementation-specific */
};
}
#endif /* FACE_SEQUENCE_HPP */
#ifndef FACE_STRING_HPP
#define FACE_STRING_HPP
#include <FACE/[Link]>
#include <limits.h>
namespace FACE
{
/**
* @brief Class representing a sequence of characters.
/**
* @brief Default constructor - creates empty managed unbounded String
* @details No memory is allocated. After construction,
* - length() will return 0
* - capacity() will return 0
* - bound() will return UNBOUNDED_SENTINEL
* - buffer() will return the empty string
*/
String();
/**
* @brief Managed constructor - creates empty managed bounded String
* of specified bound
* @details Memory may or may not be allocated.
*
* Preconditions:
* - bound != 0
/**
* @brief Unmanaged constructor
* @details After construction, this String does not manage its own
* data, but instead serves as a wrapper to the data pointed to by
* @p str.
*
* The caller must ensure @p str is a NULL terminated string
* If this condition is violated, the result is implementation-defined
* behavior and may result in an attempt to access restricted memory.
*
* The capacity of this String is equal to the length of the NULL
terminated string @p str
* not counting the NULL terminator, because the externally managed memory
has a fixed
* size, which is both a bound and a capacity.
*
* After construction the following are true:
* - length() will return the length of the current string not counting
the NULL terminator
* - capacity() will return the capacity which is equal to the length of
the original string
* not counting the NULL terminator
* - bound() will return the same as capacity()
* - buffer() will return the address specified by @p str
* @param str pointer to externally managed memory (must be NULL
terminated)
*/
String(const char * str);
/**
* @brief Managed copy constructor
* @details After construction, this String manages its own data, which
* is a copy of @p str's data, and has the same bound as @p str.
* If sufficient memory cannot be allocated, this String is put into the
* invalid state.
*/
String(const String& str);
/**
* @brief Managed assignment operator
* @details After assignment, this String's data is a copy of @p str's
* data, and bound() will return @p str's bound. After assignment,
* this String's data is managed.
/**
* @brief Managed C-string constructor
* @details After successful construction, this String manages its own
* data, which is a copy of @p str, and bound() will return @p str's
* length.
*
* Preconditions:
* - str != NULL
* When calling this function, if any of these preconditions are false,
* - return_code will be set to PRECONDITION_VIOLATED
* - this String is put into the invalid state
*
* If no preconditions are violated and memory allocation fails:
* - return_code will be set to INSUFFICIENT_MEMORY
* - this String is put into the invalid state
*
* @param str A NUL-terminated string.
* @param return_code (see details)
*/
String(const char *str, RETURN_CODE& return_code);
/**
* @brief Unmanaged constructor
* @details After construction, this String does not manage its own
* data, but instead serves as a wrapper to the data pointed to by
* @p str.
*
* The caller must ensure @p bound (plus space for NUL)
* is not greater than the size of the memory allocated at @p str.
* If this condition is violated, the result is implementation-defined
* behavior and may result in an attempt to access restricted memory.
*
* The capacity of this String is equal to its bound, because the
* externally managed memory has a fixed size, which is both a bound and
* a capacity.
*
* Preconditions:
* - str != NULL
* - length <= bound
* - bound != 0 (no empty unmanaged strings)
* - bound != UNBOUNDED_SENTINEL (no unbounded unmanaged strings)
* When calling this function, if any of these preconditions are false:
* - return_code will be set to PRECONDITION_VIOLATED
* - this String is put into the invalid state
*
* Otherwise:
* - return_code will be set to NO_ERROR
* - length() will return the specified length
* - capacity() will return the specified capacity (bound)
* - bound() will return the specified bound
* - buffer() will return a pointer to the externally managed memory
*
* @param str pointer to externally managed memory
* @param length the number of characters (excluding the NUL character)
* in the memory pointed to by @p str
* @param bound the number of characters (excluding the NUL character)
/**
* @brief Attempt to reserve memory to store @p capacity characters
* @details This function is useful when @p this_obj is constructed
* as a managed-unbounded string with an implementation-defined
* capacity in order to perform potential reallocation at a known
* point of program execution, such as during program initialization.
*
* On success, the implementation can store a string value of capacity
* @p capacity. The function may succeed without reallocation if the
* implementation-defined capacity exceeds @p capacity *and* the
* implementation does not reallocate to a smaller capacity.
*
* @param capacity number of elements to reserve storage for
*
* Preconditions:
* - is_valid() == true
* - is_managed() == true
* - is_bounded() == false
* When calling this function, if any of these preconditions are false
* this String is put into the invalid state.
/**
* @brief Frees any data managed by this String.
*/
~String();
/**
* @brief Clears this String's data.
* @details All data is cleared, and this String's length will be set
* to 0. Memory allocation remains unchanged.
*/
void clear();
/**
* @brief Adds a copy of @p str's data to the current data
* @details This is one of two String functions that may reallocate
* managed memory. If append is successful, the length of this String
* changes accordingly; capacity may or may not be changed.
* If append is unsuccessful, the state of this String is unchanged.
*
* @retval INSUFFICIENT_BOUND if append would exceed logical bound
* @retval INSUFFICIENT_MEMORY if append exceeds available memory
* @retval NO_ERROR otherwise
*/
RETURN_CODE append(const String& str);
/**
* @brief Adds a copy of @p elem to the current data
/**
* @brief Returns a reference to the character at a given index.
* @details If @p index is out of range, '\0' is returned.
* Strings use a zero-based index.
*
* @param index The index of the element to be retrieved
* @return a reference to the desired element.
*/
///@{
char& operator[](FACE::UnsignedLong index);
const char& operator[](FACE::UnsignedLong index) const;
///@}
/**
* @brief Returns C-string representation of string data
* @details Returns a pointer to a NUL-terminated (C-style) string
* equivalent to this String's underlying string data.
*/
///@{
char * buffer();
const char * buffer() const;
///@}
/**
* @brief Returns whether or not this String is managed.
*
* @retval TRUE if this String manages its own memory
* @retval FALSE otherwise
*/
FACE::Boolean is_managed() const;
/**
* @brief Returns whether or not this String is bounded.
* @details Equivalent to bound() != UNBOUNDED_SENTINEL
* Unmanaged strings are always bounded.
*/
FACE::Boolean is_bounded() const;
/**
* @brief Returns whether or not this String is in the invalid state.
* @details (see class details)
*/
FACE::Boolean is_valid() const;
#endif /* FACE_STRING_HPP */
#ifndef FACE_FIXED_HPP
#define FACE_FIXED_HPP
#include <cstddef>
#include <cctype>
#include <cstring>
namespace FACE
{
/**
* @brief Interface for the fixed-precision value type.
* @details This represents the operations of a fixed-precision value,
* rather than a full numerical type with mathematic operators and
* expressions. It corresponds to an element of a TSS message declaration
* in C++ mapped from a UoP PDM View.
*
* This interface is available to consistently work with instances of
* fixed-precision values that are different types, based on different
* digits or scale values. Serialization is the primary use case.
*
* To facilitate parsing in the Security OSS Profile where sscanf() is
* not available, the string has strict format rules as follows:
* "<+|-><int_base10>.<frac_base10><d|D>".
*/
class Fixed_base {
public:
/**
* @brief Assign from a C-string buffer
* @details Copies @p src if it passes validity checks
*
* @param src - the buffer to copy from
* @param count - the number of characters to copy, including null
*
* @retval false if @p src fail validity checks, else true
*/
virtual bool from_cstr(const char *src, std::size_t count) = 0;
/**
* @brief Copy to a C-string buffer
* @details Copies to @p dest if it passes validity checks
*
* @param dest - the buffer to copy to
* @param count - size of the destination buffer
*
* @retval false if @p dest fail validity checks, else true
*/
virtual bool to_cstr(char *dest, std::size_t count) const = 0;
/**
/**
* @brief Query the number of decimal fractional digits represented.
*/
virtual unsigned short scale() const = 0;
/**
* @brief Fixed-precision decimal value stored in string format.
*
* The template parameters are:
* @param D the total number of decimal digits in the value
* @param S the scale, or number on fractional decimal digits in the
* value
*
* @invariant D < 32, since IDL max digits is 31
* @invariant S < D, since fractional digits must be fewer than total
* @invariant S != 0, there must be fractional digits
**/
template <unsigned short D, unsigned short S>
class Fixed : public Fixed_base {
return true;
}
public:
/**
/**
* @brief See Fixed_base::from_cstr()
*/
bool from_cstr(const char *src, std::size_t count) {
if (!is_valid_cstr(src,count)) return false;
std::memset(val_rep,0,N);
std::strncpy(val_rep,src,count);
return true;
}
/**
* @brief See Fixed_base::to_cstr()
*/
bool to_cstr(char *dest, std::size_t count) const {
if (dest == 0) return false;
if (count < N) return false;
std::strncpy(dest,val_rep,count);
return true;
}
/**
* @brief See Fixed_base::digits()
*/
unsigned short digits() const { return D; }
/**
* @brief See Fixed_base::scale()
*/
unsigned short scale() const { return S; }
};
#endif /* FACE_FIXED_HPP */
The behavior of each subprogram in the [Link] packages mimics the behavior of the
subprogram with the same name and signature in the [Link] package, with the following
modifications and clarifications:
• All references to a Truncation value of Error are considered to be [Link]
• For all subprograms that propagate Index_Error under some conditions, Constraint_Error
is propagated under those conditions instead
• Comparison operators (“=”, “<”, “>”, “<=”, and “>=”) are an element-by-element
comparison
• Get_Element – this function mimics the behavior of the Element function
• Delete – if From <= Through, the deleted elements are replaced with implementation-
defined values representing a null element
• [Link]."*" – if the result would exceed the sequence’s bound,
truncation occurs by dropping elements from the right
• [Link] – this function allocates a new Sequence and copies
the value of Source to the new Sequence
(This supports definitions of the Sequence type where the Ada assignment (:=) operation
would only perform a shallow copy.)
• [Link].Is_Null – this function returns True if the sequence is
uninitialized, and False otherwise
• [Link] – this procedure does not necessarily perform an
unchecked de-allocation
Note: [Link] is only referenced here as a means of specification, and is not intended to
imply the use of that package.
end [Link];
--------------------------------------------------------
-- Conversion, Concatenation, and Selection Functions --
--------------------------------------------------------
function Append
(Left, Right : in Sequence;
Drop : in Truncation := [Link])
return Sequence;
function Append
(Left : in Sequence;
Right : in Element;
Drop : in Truncation := [Link])
return Sequence;
function Append
(Left : in Element;
Right : in Sequence;
Drop : in Truncation := [Link])
return Sequence;
procedure Append
(Source : in out Sequence;
New_Item : in Sequence;
Drop : in Truncation := [Link]);
procedure Append
(Source : in out Sequence;
New_Item : in Element;
Drop : in Truncation := [Link]);
function "&"
(Left, Right : in Sequence)
return Sequence;
function "&"
(Left : in Sequence;
Right : in Element)
return Sequence;
function "&"
(Left : in Element;
Right : in Sequence)
return Sequence;
function Get_Element
(Source : in Sequence;
Index : in Positive)
return Element;
procedure Replace_Element
(Source : in out Sequence;
Index : in Positive;
By : in Element);
function Delete
(Source : in Sequence;
From : in Positive;
Through : in Positive)
return Sequence;
procedure Delete
(Source : in out Sequence;
From : in Positive;
Through : in Positive);
-----------------------------------
-- Sequence selector subprograms --
-----------------------------------
function Head
(Source : in Sequence;
Count : in Natural;
Pad : in Element;
Drop : in Truncation := [Link])
return Sequence;
procedure Head
(Source : in out Sequence;
Count : in Natural;
Pad : in Element;
Drop : in Truncation := [Link]);
function Tail
(Source : in Sequence;
Count : in Natural;
Pad : in Element;
Drop : in Truncation := [Link])
return Sequence;
procedure Tail
(Source : in out Sequence;
Count : in Natural;
Pad : in Element;
Drop : in Truncation := [Link]);
--------------------------------------
-- Sequence constructor subprograms --
--------------------------------------
function "*"
(Left : in Natural;
Right : in Element)
return Sequence;
function "*"
(Left : in Natural;
Right : in Sequence)
return Sequence;
function Replicate
(Count : in Natural;
Item : in Element;
Drop : in Truncation := [Link])
return Sequence;
function Replicate
(Count : in Natural;
Item : in Sequence;
Drop : in Truncation := [Link])
return Sequence;
--------------------------------------------------------
-- Conversion, Concatenation, and Selection Functions --
--------------------------------------------------------
function Copy
(Source : in Sequence)
return Sequence;
function To_Sequence
(Length : in Length_Range)
return Sequence;
procedure Append
(Source : in out Sequence;
New_Item : in Sequence);
procedure Append
(Source : in out Sequence;
New_Item : in Element);
function "&"
(Left, Right : in Sequence)
return Sequence;
function "&"
(Left : in Sequence;
Right : in Element)
return Sequence;
function "&"
(Left : in Element;
Right : in Sequence)
return Sequence;
function Get_Element
(Source : in Sequence;
Index : in Index_Range)
return Element;
procedure Replace_Element
(Source : in out Sequence;
Index : in Index_Range;
By : in Element);
function "="
(Left, Right : in Sequence) return Boolean;
function Delete
(Source : in Sequence;
From : in Index_Range;
Through : in Index_Range)
return Sequence;
procedure Delete
(Source : in out Sequence;
From : in Index_Range;
Through : in Index_Range);
-----------------------------------
-- Sequence selector subprograms --
-----------------------------------
function Head
(Source : in Sequence;
Count : in Length_Range;
Pad : in Element )
return Sequence;
procedure Head
(Source : in out Sequence;
Count : in Length_Range;
Pad : in Element );
function Tail
(Source : in Sequence;
Count : in Length_Range;
Pad : in Element )
return Sequence;
procedure Tail
(Source : in out Sequence;
Count : in Length_Range;
Pad : in Element );
--------------------------------------
-- Sequence constructor subprograms --
--------------------------------------
function "*"
(Left : in Length_Range;
Right : in Element)
return Sequence;
function "*"
(Left : in Length_Range;
Right : in Sequence)
return Sequence;
private
-- implementation-defined
end [Link];
/**
* @brief Class facilitating in and inout parameter passing of immutable types.
* @param <T> The immutable type.
/**
* @brief Value constructor
* @details Constructs a Holder of type T and initializes member attribute
* value with the parameter passed in.
*/
public Holder(T initial) {value = initial;}
}
/** @brief Exception thrown when a parameter violates the IDL semantics. */
public class BAD_PARAM extends Exception
{
/** @brief Constructs a BAD_PARAM exception with a default reason. */
public BAD_PARAM()
{
super("");
}
Acronym Description
2D Two-Dimensional
3D Three-Dimensional
BC Bus Controller
BM Bus Monitor
DF Definition File
DO Document
ES Embedded Systems
FM Fault Management
HM Health Monitor
I/O Input/Output
ID Identification
IP Internet Protocol
IT Information Technology
MSG Message
OS Operating System
RS Recommended Standard
RT Run-Time (Language)
RT Remote Terminal
SW Software
SA Subaddress
SC Safety-Critical
TS Transport Services
UA User Application