Previous Next  

Element: Interface_Subset

Document type

Interface_Subset

Document XPath

/Interface_Subset

Schema XPath

/Shared_Library_API/Interface/Interface_Subset

Description

The Interface_Subset element is the root element of the Interface_Subset document type. The Interface_Subset document defines a subset of an interface for a shared library. An interface definition is made up of one or more interface subsets.

When you create an Interface_Subset document, you should start with the XML declaration:

<?xml version="1.0" encoding="UTF-8"?>
			

Following the XML declaration, create the Interface_Subset root element:

<Interface_Subset xmlns="http://www.windriver.com/vxWorks653/SharedLibraryAPI"
 xmlns:xi="http://www.w3.org/2001/XInclude"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.windriver.com/vxWorks653/SharedLibraryAPI ../target/vthreads/config/comps/xml/SharedLibraryAPI.xsd">
 ...
</ApplicationDescription>
			

The Interface_Subset element must include the required XML attributes that identify the schema and namespace for the document. The first three attributes are standard and should be entered exactly as shown. The xsi:schemaLocation attribute associates the namespace (http://www.windriver.com/vxWorks653/SharedLibraryAPI) with the schema file (SharedLibraryAPI.xsd). You should provide the correct path to your copy of the schema. The location of the schema files in the installation is installDir/vxworks653-2.2/target/vthreads/config/comps/xml.

If you use a schema-aware XML editor to create your files, it will probably create these attributes for you.

You include the Interface_Subset document into your shared library API configuration using an xi:include statement in the Interface element.

You can also include the Interface_Subset element inline in the Interface element.

An interface subset may be defined inline, referred to by name, or included from an external file. The Interface_Subset element is used to define a subset inline or by reference. The Interface_Subset element may also be used as the root element of a separate Interface_Subset document.

To define an interface subset in-line, include the Interface_Subset element directly in the Interface element and define one Routine element for each routine in the subset of the interface that you are defining:

<Shared_Library_API ... Name="vThreads">
 <Interface>
  <Version Name="apexMinimal" /> 
  <Interface_Subset>
   <Routine Name="printf" /> 
   <Routine Name="logMsg" /> 
   <Routine Name="vThreadsEventHandlerRegister" /> 
   <Routine Name="taskDelay" /> 
   <Routine Name="taskSuspend" /> 
   <Routine Name="sysClkRateGet" /> 
   <Routine Name="tick64Get" /> 
   <Routine Name="strcmp" /> 
   <Routine Name="__divdi3" /> 
   <Routine Name="__moddi3" /> 
  </Interface_Subset>
 </Interface>
</Shared_Library_API>
			

To define a named interface subset that can be included by reference, include an Interface_Subset element in the Shared_Library_API element and give it a name using the /Shared_Library_API/Interface_Subset/@Name attribute:

<Shared_Library_API ... Name="vThreads">
 <Interface_Subset Name="apexRoutines">
  <Routine Name="printf"/> 
  <Routine Name="logMsg"/> 
  <Routine Name="vThreadsEventHandlerRegister"/> 
  <Routine Name="taskDelay"/> 
  <Routine Name="taskSuspend"/> 
  <Routine Name="sysClkRateGet"/> 
  <Routine Name="tick64Get"/> 
  <Routine Name="strcmp"/>
  <Routine Name="__divdi3"/> 
  <Routine Name="__moddi3"/> 
 </Interface_Subset>
 ...
</Shared_Library_API>
			

To include named inferface subset in an interface definition, add a Interface_Subset element to the Interface element and use the attribute to identify a named Interface_Subset.

<Shared_Library_API ... Name="vThreads">
 <Interface_Subset Name="apexRoutines">
  ...
 </Interface_Subset>
 <Interface>
  <Version Name="apexMinimal"/> 
  <Interface_Subset NameRef="apexRoutines"/> 
 </Interface>
</Shared_Library_API>
			
Use

Required

Children

Routine

Attributes

NameRef

Restrictions

None

Attribute: NameRef

Document XPath
/Interface_Subset/@NameRef
Schema XPath
/Shared_Library_API/Interface/Interface_Subset/@NameRef
Description

The name of an interface subset to include in the current interface. The interface subset referred to must be one that is defined under /Shared_Library_API/Interface_Subset in the current Shared_Library_API document.

<Interface>
 <Version Name="apexMinimal"/> 
 <Interface_Subset NameRef="apexRoutines"/> 
</Interface>
			
Use

Optional

Target location

None

XML data type

xs:string

Destination data type

N/A

Behavior if not specified

N/A

Values with special meanings

None

Restrictions



Generated on 2007-10-15 17:17:22.