ImageVerifierCode 换一换
格式:PDF , 页数:71 ,大小:3.24MB ,
资源ID:436129      下载积分:10000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
注意:如需开发票,请勿充值!
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-436129.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(ANSI INCITS ISO IEC 14364-1996 Information technology - Open Systems Interconnection (OSI) abstract data manipulation C language interfaces - Binding for Application Program Interf.pdf)为本站会员(diecharacter305)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

ANSI INCITS ISO IEC 14364-1996 Information technology - Open Systems Interconnection (OSI) abstract data manipulation C language interfaces - Binding for Application Program Interf.pdf

1、INTERNATIONAL STANDARD ISO/IEC 14364 First edition 1996-06-01 Information technology - Open Systems Interconnection (03) abstract data manipulation C language interfaces - Binding for Application Program Interface (API) Technologies de /information - Interfaces de langage C pour la manipulation de d

2、on FAX: +1202 728-9614. Introduction vii INTERNATIONAL STANDARD OISO/IEC ISO/IEC 14364:1996(E) 1 Information technology-Open Systems 2 Interconnection (OSI) abstract data 3 manipulation C language 4 interfaces-Binding for Application Program 5 Interface (API) 6 Section 1: General 7 8 This Internatio

3、nal Standard defines an ISO/IEC 9989 (111 C language binding to 9 the language-independent API defined in ISO/IEC 14360 (2). It is intended to sup- 10 port application portability at the source-code level and to be used by application 11 developers, system implementors, test method writers, and user

4、s. 12 1.2 Normative References 13 The following standards contain provisions which, through reference in this text, 14 constitute provisions of this International Standard. At the time of publication, 15 the editions indicated were valid. All standards are subject to revision, and parties 16 to agre

5、ements based on this International Standard are encouraged to investigate 17 the possibility of applying the most recent editions of the standards indicated 18 below. Members of IEC and IS0 maintain registers of currently valid Interna- 19 tional Standards. 20 (11 ISO/IEC 9899: 1990,2 Programming La

6、nguages-C. 21 1) The numbers in curly brackets correspond to those of the references in 1.2. 22 2) ISO/IEC documents can be obtained from the IS0 Central Secretariat, 1 Rue de VarembB, Case 23 Postale 56, CH-1211, Gen see ISO/IEC 8824 249 Bll). 250 251 OISOLIEC ISODEX 14364:1996(E) 2.2.2.59 workspac

7、e: A repository for instances of classes in the closures of one or more packages associated with the workspace. ISOLIEC 14360 a 2.2.3 Abbreviations For the purposes of this International Standard, the following abbreviations apply: 2.2.3.1 API: Application Program Interface. 2.2.3.6 OM: OS1 abstract

8、 data Manipulation. 2.2.3.7 OSI: Open Systems Interconnection. 252 2.2.3.8 UTC: Universal Coordinated Time. 2.2 Definitions 13 0 ISO/IEC ISOLIEC 14364:1996(E) Section 3: Service Interface 2 3.1 Introduction 3 This section defines the C language binding to the service interface. 4 3.2 Datatypes 5 Thi

9、s section defines the datatypes of the C language binding to the service 6 interface. 7 3.2.1 Intermediate Datatypes 8 Some datatypes are defined in terms of the following “intermediate datatypes,” 9 whose precise definitions in C are system defined: 10 11 OM-sin t The positive and negative integers

10、 that can be represented in 16 b. 12 13 OMgintl6 The positive and negative integers that can be represented in 16 b. 14 15 OM-sint32 The positive and negative integers that can be represented in 32 b. 16 17 18 19 20 OM-uint OM-uint16 OM-uint32 OM-double The nonnegative integers that can be represent

11、ed in 16 b. The nonnegative integers that can be represented in 16 b. The nonnegative integers that can be represented in 32 b. The positive and negative floating point numbers representable in 64 b. 21 22 23 24 25 The range of integers for OM-uint shall encompass the range for OM-sint . NOTE: The O

12、M-sint and OM-uint datatypes are defined above by the ranges of integers they have to accommodate. Implementations can define them by the range of integers the word size of the host machine permits. The OM-double datatype is defined by the range and precision of real numbers that it has to accommoda

13、te. The following examples will work on most machines. 3.2 Datatypes 15 ISO/IEX 14364:1996(E) OISO/IEC 26 27 28 29 30 31 32 3.2.2 Boolean 33 34 35 3.2.2.2 C Declaration 36 37 38 39 3.2.2.3 Description 40 A data value of this datatype is a Boolean, i.e., either false or true. 41 In the C interface, f

14、alse is denoted by zero OM-FALSE, and true is denoted by 42 any other integer (although the symbolic constant OM-TRUE refers to the 43 integer one specifically). 44 3.2.3 Descriptor 45 3.2.3.1 Name 46 Descriptor-Type definition for describing an attribute type and value. 47 3.2.3.2 C Declaration 48

15、49 50 51 52 53 typedef int OM-sint; typedef int OM-sintl6; typedef long int OM-sint32; typedef unsigned OM-uint; typedef unsigned OM-uint16; typedef long unsigned OM-uint32; typedef double OM-double; 3.2.2.1 Name Boolean-Type definition for a Boolean data value. typedef OM-uint32 OM-boolean; NOTE: T

16、he type is defined as 32 b in order to facilitate aggregate initialization of the OM-value union. typedef struct OM-descriptor-struct OM-type OM-syntax OM-value OM-descriptor; tme ; syntax; value ; 54 NOTE: Other components are encoded in the syntax member. 16 3 Service Interface OISO/IEC ISOklEC 14

17、364:1996(E) 55 A data value of this datatype is a descriptor, which embodies an attribute value. A 56 sequence of descriptors (an array in C) can represent all the values of all the attri- 57 butes of an object, and is the representation called a Public Object. A descriptor 58 has the following comp

18、onents: 59 60 61 62 63 value (Value) 64 The attribute value. 65 Additional information is encoded in the syntax structure member. The syntax 66 should always be masked with the constant OM-S-SYNTAX) because of this. For 67 example: 68 my-syntax = mygublic_object3.syntax 69 mygublic_object4.syntax =

19、70 my-syntax + (mygublic_object4.syntax 71 Alternatively, the macros OM-SYNTAX(d) and OM-SYNTAX-ASSIGN(d,s) may 72 be used for this purpose: 73 74 75 The additional information can be obtained by masking the syntax with the follow- 76 ing constants: 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93

20、 94 95 96 3.2.3.3 Description type (Type) Identifies the type of the attribute value. syntax (Syntax) Identifies the syntax of the attribute value and contains addi- tional information, as described below. my-syntax = OM-SYNTAX( my_public_object3) ; OM-SYNTAX-ASSIGN( myqublic_object4, my-syntax) ; O

21、M-S-LONG-STRING True (i.e., nonzero) if, and only if, the descriptor is service gen- erated and the length of the value is greater than an implementation-defined limit. The macro OM-IS-LONG-STRING(d) may be used to test this flag. Only true if the descriptor is service generated and the value is not

22、 present because OM-EXCLUDE-VALUES) or OM-EXCLUDE-MULTIPLES was set in the call to om-getf). The macro OM-HAS-VALUE(d) may be used to test this flag. OM-S-LOCAL-STRING Only significant if the Syntax is String(*). True if, and only if, the string is represented in an implementation-defined local char

23、- acter set. The local character set may be more amenable for use as keyboard input or display output than the nonlocal character set, and it may include specific treatment of line termination sequences. Certain interface functions may convert information in string syntaxes to or from the local repr

24、esentation, which may result in a loss of information. 3.2 Datatypes 17 ISO/lEC 14364:1996(E) OISO/IEC 97 The macro OMJS-LOCAL-STRING(d) may be used to test this flag and OM-SET-LONG-STRING(d) to set it. 98 OMSSERVICEGENEIWTED 99 True if, and only if, the descriptor is service-generated and is 100 e

25、ither the first descriptor of a public object or the defined part of a 101 private object (see 4.2). 102 The macro OM-IS-SERVICE-GENERATED(d) may be used to 103 test this flag. 104 105 106 107 OM-S-PRIVATE True if, and only if, the descriptor is in the service-generated pub- lic object and contains

26、a reference to the handle of a private subobject, or is in the defined part of a private object. 108 This applies only when the descriptor is service-generated. The 109 client need not set this bit in a client-generated descriptor con- 110 taining a reference to a private object. 111 The macro OMJS-

27、PRIVATE(d) may be used to test this flag. 112 3.2.4 Enumeration 113 3.2.4.1 Name 114 Enumeration-Type definition for an Enumerated data value. 115 3.2.4.2 C Declaration 116 typedef OM-sint32 OM-enumeration; 117 3.2.4.3 Description 118 A data value of this datatype is an attribute value whose syntax

28、is an Enumeration 119 syntax. 120 NOTE: The type is defined as 32 b in order to facilitate aggregate initialization of the OM-value 121 union. 122 3.2.5 Exclusions 123 3.2.5.1 Name 124 Exclusions-Type definition for the “exclusions” argument of the Get function. 125 3.2.5.2 C Declaration 126 typedef

29、 OM-uint OM-exclusions; 18 3 Service Interface OISO/IEC ISO/IEC 14364:1996(E) 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 3.2.6 Integer 145 3.2.6.1 Name 146 Integer-Type definition for an Integer data value. 147 3.2.6.2 C Declaration 148 typedef OM-sint32 OM-integer; 149

30、150 151 3.2.7 Modification 152 153 3.2.5.3 Description A data value of this datatype is an unordered set of one or more values, all of which are distinct. Each value denotes an exclusion, as defined by the Get function, and is chosen from the following set: - OM-EXCLUDE-ALL-BUT-THESE-TYPES) - OM-EXC

31、LUDE-MULTIPLES) - OM-EXCLUDE-ALL-BUT-THESE-VALUES - OM-EXCLUDE-VALUES - OM-EXCLUDE-SUBOBJECTS - OMEXCLUDEDESCRIPTORS) Alternatively, the single value - OM-NO-EXCLUSIONS) may be chosen, which selects the entire object. Each value except OM-NO-EXCLUSIONS) is represented by a distinct bit, the presence

32、 of the value being represented as one and its absence as zero. Thus, mul- tiple exclusions are requested by adding or, equivalently, or-ing the values that denote the individual exclusions. A symbolic constant (with a name as above) shall be defined for each exclusion. 3.2.6.3 Description A data va

33、lue of this datatype is an attribute value whose syntax is Integer. 3.2.7.1 Name Modification-Type definition for the “modifications” argument of the Put function. 3.2 Datatypes 19 154 typedef OM-uint OM-modification; ISO/IEC 14364:1996(E) OISO/IEC 3.2.7.2 C Declaration 155 3.2.7.3 Description 156 1

34、57 158 159 160 161 162 163 A data value of this datatype denotes a kind of modification, as defined by the Put function. The following values shall be defined, corresponding to the values of om-modification-type of ISO/IEC 14360 (21: - OMJNSERT-AT-BEGINNING) - OMINSERTATCERTAIN_POINT - OM-INSERT-AT-

35、END) - OM-REPLACE-ALL) - (OMREPLACECERTAINVALUES 164 3.2.8 Object 165 3.2.8.1 Name 166 Object-Type definition for a handle to either a private or a public object. 167 3.2.8.2 C Declaration 168 typedef struct OM-descriptor-struct *OM-object; 169 3.2.8.3 Description 170 A data value of this datatype r

36、epresents an object, public or private. It is an 171 ordered sequence of one or more instances of the Descriptor datatype. See the 172 Private Object and Public Object datatypes for constraints upon that sequence. 173 3.2.9 Object Identifier 174 175 176 3.2.9.2 C Declaration 3.2.9.1 Name Object Iden

37、tifier-Type definition for an Object Identifier data value. 177 typedef OM-string OM-object-identifier; 20 3 Service Interface OISO/IEC ISOAEC 14364:1996(E) 178 A data value of this datatype contains an octet string that consists of the contents 179 octets of the BER encoding of an ASN.l object iden

38、tifier. 180 3.2.9.3.1 C Declaration of Object Identifiers 181 Every application program that makes use of a class or other Object Identifier 182 shall explicitly import it into every compilation unit (C! source module) that uses it. 183 Each such class or Object Identifier name shall be explicitly e

39、xported from just one 184 compilation module. Most application programs will find it convenient to export all 185 the names they use from the same compilation unit. Exporting and importing is 186 done by the following two macros: 187 188 189 190 191 OM-EXPORT(class-name) 192 OM-EXPORT(OID-name) 193

40、This macro allocates memory for the constants that represent the class or other 194 Object Identifier. 195 3.2.9.3.2 Use of Object Identifiers in C 196 Symbolic names for object identifiers shall be defined as shown in Table 3-1. 197 198 199 200 201 202 205 204 205 206 207 208 209 210 211 212 213 21

41、4 215 3.2.9.3 Description OM-IMPORT(classpame) OMIMPORT(OIDname) This macro makes the class or other Object Identifier constants available within a compilation unit. Table 3-1 - Symbolic Names for Object Identifiers Object Identifier Name OM package OMP-O-OM-OM Encoding class OMPOOMCENCODING Externa

42、l class OMP-O-OM-C-EXTERNAL Object class OMP-O-OM-C-OBJECT BER OMP-O-OM-BER Canonical BER OMPOOMCANONICALBER The following macros shall be provided by the implementation to assist the appli- cation to handle object identifiers. OMP-LENGTH(oid-string) This macro calculates the length of an object ide

43、ntifier. OM-OID-DESC(type, OID-name) This macro initializes a descriptor for a value of syntax String(Object- Identifier). It sets the type component to that given, sets the syntax component to OMSOBJECTIDENTIFIERSTRING, and sets the value component to be the given Object Identifier. OM-OBJ-DESC(typ

44、e, value) 3.2 Datatypes 21 ISO/IEC 14364:1996(E) OISO/IEC 216 217 This macro initializes a descriptor for a value of syntax Object(*). It sets the type component to that given, sets the syntax component to OM-S-OBJECT), and sets the value component to that given. 218 OM-NULL-DESCRIPTOR 219 220 This

45、macro initializes a descriptor to mark the end of a client-allocated public object. 221 OM-C-class-name 222 For each class, and for other Object Identifiers, there is a global variable with the 223 same name (e.g., the External class has a variable called OM-C-EXTERNAL; the 224 Object Identifier for

46、 BER rules has a variable called OM_BER). This variable can 225 be supplied as an argument to functions when required. 226 Figure 3-l provides examples of the use of these macros. 227 3.2.10 Private Object 228 3.2.10.1 Name 229 Private Object-Type definition for a handle to an object in an implement

47、ation- 230 defined, or private, representation. 231 3.2.10.2 C Declaration 232 typedef OM-object OM_private-object; 233 3.2.10.3 Description 234 A data value of this datatype is the designator or handle for a private object. It 235 consists of a single descriptor whose Type component is OM-PRIVATE-O

48、BJECT) 236 and whose Representation, Syntax, and Value components are unspecified. 237 NOTE: The Representation, Syntax, and Value components of the descriptor are essential to the 238 proper operation of the service with respect to the private object. Of no concern to the client, their 239 nature i

49、s of concern to service implementors and is therefore further specified in Section 4. 240 3.2.11 Public Object 241 3.2.11.1 Name 242 Public Object-Type definition for a defined representation of an object that can be 243 directly interrogated by a programmer. 244 3.2.11.2 C Declaration 245 typedef OM-object OM_public-object; 22 3 Service Interface OISO/IEC ISO/IEC 14364:1996(E) 246 /* Examples of the use of the macros and constants. */ 247 #include 248 249 250 251 252 253 254 255 256 257 258 259 260 261

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1