1、STD-DIN DIN ETS 3007L5-GERM 1978 I279Li44b c171OUAL 276 II DEUTSCHE NORM Juni 1998 DIN Darstellung der MHEG-Makrosprache (MHEG-SIR) - Endgerte (TE) Englische Fassung ETS 300715 : 1997 ETS 300715 ICs 33.160.60 Deskriptoren: Telekommunikation, Endgert, Makrosprache, Darstellung Terminal Equipment (TE)
2、 - MHEG script interchange representation (MHEG-SIR); English version ETS 300715 : 1997 Die Europische Telekommunikationsnorm ETS 300715 : 1997 hat den Status einer Deutschen Norm. Nationales Vorwort Die vorliegende Norm ist auf der Grundlage der vom Europischen Institut fr Telekommunikationsnormen
3、(ETSI) herausgegebenen Europischen Telekommunikationsnorm ETS 300715, Ausgabe Juni 1997, ,Terminal Equipment (TE) - MHEG script interchange representation (MHEG-SIR)“, verffentlicht worden. Diese Norm enthlt unter Bercksichtigung des DIN-Prsidialbeschlusses13/1983 den englischen Originaltext der vom
4、 Technischen Gremium MTA des ETSI erarbeiteten ETS 300715. Fachlich zustndig in Deutschland ist das Unterkomitee 723.5 ,Nichtsprach-Telekommunikationsendeinrichtungen“ der Deutschen Elektrotechnischen Kommission im DIN und VDE (DKE). Fortsetzung 137 Seiten ETS-Original Deutsche Elektrotechnische Kom
5、mission im DIN und VDE (DKE) I DIN Deutsches Institut fr Normung e.V. . Jede Art der Vervielfltigung, auch auszugsweise, Alleinverkauf der Normen durch Beuth Verlag GmbH, 10772 Berlin nur mit Genehmigung des DIN Deutsches Institut fr Normung e.V., Berlin, gestattet. Ref. Nr. DIN ETS 300715 : 1998-06
6、 Preisgr. 29 Vertr-Nr. 1729 STD=DIN DIN ETS 3007LS-GERPl 1998 D 279444b U710082 I22 D - Leerseite - STD.DIN DIN ETS 300725-GERM 1998 I279Li44b 0730083 Ob9 II ETS 300 715 June 1997 Source: ETSI TC-TE Reference: DE/MTA-O01047 (formerly DETTE-O1 047) ICs: 33.020 Key words: AVI, MHEG, MHI, multimedia Te
7、rminal Equipment (TE); MHEG script interchange representation (MHEG-SIR) ETSI European Telecommunications Standards Institute ETSI Secretariat Postal address: F-O6921 Sophia Antipolis CEDEX - FRANCE Office address: 650 Route des Lucioles - Sophia Antipolis - Valbonne - FRANCE X.400: c=fr, a=atlas, p
8、=etsi, s=secretarat - Internet: secretariat etsi.fr Tel.: +33 4 92 94 42 O0 - Fax: +33 4 93 65 47 16 Copyright Notification: No part inay be reproduced except IS authorized by written permission The copyright and the foregoing restriction extend to reprodiiction iii all media 0 European Telecoinmuni
9、cations Standards Institute 1997 All rights reserved Whilst every care has been taken in the preparation and publication of this document, errors in content, typographical or otherwise, may occur. If you have comments concerning its accuracy, please write to “ETSI Editing and Committee Support Dept.
10、“ at the address shown on the title page. Page 3 ETS 300 71 5: June 1997 Contents Foreword 11 Introduction . 11 1 2 3 4 5 6 7 8 Scope . 13 Normative references . 13 Definitions . 14 3.1 Definitions . 14 3.2 Abbreviations 17 General . 18 Conformance 18 5.1 Information object conformance 18 5.1.1 Prof
11、iles 18 5.1.2 Encoding . 19 5.1.3 Syntax 19 5.2 Implementation conformance 19 5.1.4 Semantics 19 5.2.1 Conformance requirements . 19 5.2.2 Conformance documentation 20 5.3 Application conformance . 2 5.4 Test Methods 20 Overview 20 6.2 6.3 6.1 Description methodology . 2 Data processing operations .
12、 21 Access to external data and functions . 21 MHEG/MHEG-3 relationship 22 7.1 MHEG entities . 22 7.2 Functional entities . 22 7.3 MHEG-SIR script interpreter 23 Elements of MHEG-SIR . 23 8.1 Data types . 23 8.1.1 Predefined types 24 8.1.1.1 Primitive types . 25 8.1.1.1.1 void type 25 8.1.1.1.2 octe
13、t type 25 8.1.1.1.3 short type 25 8.1.1.1.4 long type . 25 8.1.1.1.5 unsigned short type . 25 8.1.1.1.6 unsigned long type 25 8.1.1.1.7 float type . 26 8.1.1.1.8 double type . 26 8.1.1.1.9 boolean type . 26 8.1.1.1.1 O character type . 26 8.1.1.1.1 1 data identifier type . 26 8.1.1.1.12 object refer
14、ence type 26 Predefined constructed types 26 Declared constructed types . 26 8.1.2.1 sequence types 27 8.1.1.2 8.1.2 8.1.2.2 string types 27 rlib 07LOOBb 8-78 STD4IN DIN ETS 300715-GERH by78 . . . ._ -. . . _._ Page 4 ETS 300 71 5: June 1997 8.1.2.3 array types . 28 8.1.2.4 structure types . 28 8.1.
15、2.5 union types 28 Data 29 8.2.1 Immediate values 29 8.2.2 Constants 29 8.2.3 Variables . 30 8.2.3.1 Global variables 30 8.2 8.2.3.2 Local variables 30 8.2.3.2 Dynamic variables . 30 Functions 8.3 31 8.3.1 Routines 31 8.3.2 Services 32 8.3.3 Predefined functions . 32 8.4 Messages . 32 8.4.1 Package
16、exceptions 32 8.4.2 Predefined messages . 33 8.5 Instructions . 33 8.6 Identifiers 33 8.6.1 Type identifiers . 33 8.6.2 Data identifiers 34 8.6.3 Function identifiers 34 8.6.4 Message identifiers . 34 9.1 Structure of the MHEG-SIR virtual machine . 34 9.2 Structures and notations . 5 9.2.1 Table . 3
17、5 9.2.2 Stack . 35 9.2.3 Parameter stack . 35 9.2.4 Queue . 36 9 The MHEG-SIR virtual machine 34 9.2.5 Data representation 36 9.3 Memory areas 37 9.3.1 Mh-script memory areas . 37 9.3.1.1 Data areas . 37 9.3.1.1.1 Type definition table . 37 9.3.1.1.2 Constant table . 37 9.3.1.1.3 Global variable def
18、inition table . 37 9.3.1.2 Code areas 37 9.3.1.2.1 Routine definition table . 38 9.3.1.2.2 Package definition table . 38 9.3.1.2.3 Service definition table . 38 9.3.1.2.4 Exception definition table . 39 9.3.1.2.5 Handler definition table . 39 9.3.1.2.6 Program code area 39 Rt-script memory areas 39
19、9.3.2.1 Dynamic memory areas 39 9.3.2.1.1 Variable table . 40 9.3.2.1.2 Call stack 40 9.3.2.1.3 Parameter stack . 40 9.3.2.1.4 Message queue 41 9.3.2.1.5 Heap . 41 9.3.2.2 Registers . 41 9.3.2.2.1 instruction pointer register 42 9.3.2.2.2 Instruction register 42 9.3.2.2.3 Error register 42 9.3.2.2.4
20、 Stack pointer register . 42 9.3.2.2.5 Frame pointer register 42 9.3.2.2.6 Queue pointer register . 42 9.3.2.2.7 Function register 42 9.4.1 Mh-script statuses . 42 9.4.1.1 Not available . 42 9.3.2 9.4 Script statuses 42 STD-BIN DIN ETS 3UD715-GERfl 3778 271l4lL 0730087 704 10 11 12 Page 5 ETS 300 71
21、 5: June 1997 9.4.1.2 Available 43 9.4.2 Rt-script statuses . 43 9.4.2.1 Not ready . 43 9.4.2.2 Ready 43 9.4.2.3 Running . 43 9.4.2.4 Erroneous 44 9.5 Processing units 44 9.5.1 Message reception 44 9.5.1.2 External exception . 44 MHEG-3 API exception 45 9.5.2 Mh-script initialization 45 9.5.3 Rt-scr
22、ipt initialization 45 Rt-script execution unit . 45 9.5.1.1 MHEG-3 API operations 44 9.5.1.3 InstructionExecutionError exception 45 9.5.1.4 9.5.4 9.5.5 MHEG-SIR instruction execution unit 46 Provisions for run-time environment access 46 10.1 General model 46 10.2 Declaration of IDL interfaces . 6 10
23、.3 Invocation of external operations in an MHEG-SIR program . 47 10.4 Handling of external exceptions in an MHEG-SIR program 47 10.5 10.6 10.7 Invocation of external operations by an MHEG-3 engine 48 Handling of external exceptions by an MHEG-3 engine 48 Platform mapping specifications 48 Provisions
24、 for MHEG object manipulation 48 ? 1.1 Invoking MHEG actions . 8 11.1.1 Sending messages to other scripts . 49 11.1.2 Exchange of information with MHEG objects 49 Receiving MHEG messages 49 11.2.1 11.2.2 MHEG API exceptions . 49 11.2 MHEG-3 API run operations 49 MHEG-SIR declarations . : . 50 12.1.1
25、 Type identifier 50 12.1 Type declaration . 50 12.1.2 Type description 51 12.1.2.1 String description . 51 12.1.2.2 Sequence description 51 12.1.2.3 Array description 51 12.1.2.5 Union description . 51 12.2 Constant declaration . 52 12.2.1 Data identifier 52 12.2.2 Type identifier 52 12.2.3 Constant
26、 value 52 Global variable declaration . 53 12.3.1 Data identifier 53 12.3.2 Type identifier 53 12.3.3 Constant reference 53 12.4 Package declaration . 53 12.4.1 Package identifier 54 12.4.2 Name . 54 12.4.3 Service description 54 12.4.3.1 Function identifier 54 12.4.3.2 Name . 54 12.4.3.3 Calling mo
27、de 54 12.4.3.4 Type identifier 55 12.4.3.5 Parameter description . 55 12.4.3.5.1 Passing mode . 55 12.4.3.5.2 Type identifier . 55 12.4.4 Exception description 55 12.1.2,.4 Structure description 51 12.3 . Page 6 ETS 300 71 5: June 1997 Message identifier . 55 12.4.4.1 12.4.4.2 Name 56 12.4.4.3 Param
28、eter description . 56 12.5 Handler declaration 56 12.5.2 Function identifier . 56 12.6 Routine declaration 56 12.5.1 Message identifier . 56 12.6.1 Function identifier . 57 12.6.2 Type identifier . 57 12.6.3 Parameter description . 57 12.6.3.1 Passing mode . 57 12.6.3.2 Type identifier 57 Local vari
29、able declaration . 57 Data identifier 57 12.6.4.1 12.6.4.2 Type identifier 58 12.6.4.3 Constant reference . 58 12.6.5 Program code . 58 12.6.4 13 MHEG-SIR instructions 58 13.1.1 13.1.2 Formal specification 59 13.1.3 13.1.4 13.1.5 Primitives 60 Classification of MHEG-SIR instructions . 60 Description
30、 of instructions 61 13.3.1 No operation . 61 13.3.2 Yield 62 13.3.3 Return . 62 13.3.4 Free 63 13.3.5 Not 63 13.3.6 Or 63 13.3.7 Exclusive or 64 13.3.8 And . 64 13.3.9 Equal reference 65 13.3.10 Equal . 65 13.3.11 Less than 66 13.3.12 Greater than 66 13.3.13 Add . 66 13.3.14 Subtract 67 13.3.15 Mult
31、iply 67 13.3.1 6 Divide 67 13.3.17 Negate 68 13.3.1 8 Remainder 68 13.3.19 Duplicate . 69 13.3.20 Convert . 69 13.3.21 Jump on true . 69 13.3.22 Jump on false . 70 13.3.23 Jump . 70 13.3.24 Shift . 70 13.3.25 Get object reference . 71 13.3.26 Long jump on true . 71 13.3.27 Long jump on false . 72 13
32、.3.28 Long jump . 72 13.3.29 Call 72 13.3.30 External call 73 13.3.31 Push 74 13.3.32 Push reference . 75 13.3.34 Pop . 76 13.3.35 Pop reference . 76 13.3.36 Pop contents . 76 13.1 Presentation methodology . 5 Error conditions 1 59 Data table notation 59 Template instruction notation 60 13.2 13.3 13
33、.3.33 Push immediate 75 STD-DIN DIN ETS 30D7L5-GERM 17798 277Lii.lLib 07LOD89 587 M Page 7 ETC 300 71 5: June 1997 13.3.37 Allocate 77 13.3.38 Increment 77 13.3.39 Decrement . : . 78 13.3.40 Get . 78 Get contents . : 79 13.3.41 13.3.42 Set . 79 13.3.43 Set contents 80 13.4.1 Reversible conversions .
34、 81 13.4.2 Lossless extensions 81 Conversions from boolean . 81 Conversions from octet to a numeric type . 82 Lossless conversions from a numeric to a larger numeric type 82 13.4.3 Lossy extensions . 82 13.4.4 Truncations to boolean 82 13.4.5 Truncations between integer or between floating-point typ
35、es . 82 13.4.6 13.4 Type conversion rules . 81 13.4.2.1 13.4.2.2 13.4.2.3 Truncations from floating-point to integer 82 14 IDL mapping to MHEG-SIR 82 14.1 IDL specifications 82 14.3 IDL operations . 83 14.3.1 Operation name . 83 14.3.2 Operation parameters . 83 14.3.3 implicit parameter 83 14.3.4 Re
36、turn value 83 14.4 IDL attributes . 83 14.4.1 Accessor 84 14.4.2 Modifier 84 14.4.3 Readoniy attribute . 84 IDL inherited operations 84 14.6 IDL exceptions 84 14.6.1 Exception name . 84 14.6.2 Exception members 84 14.6.3 Implicit member . 84 14.7 IDL types . 84 14.7.1 char type 85 14.7.2 enum type 8
37、5 14.7.3 Constructed types . 85 14.7.4 any type . 85 Restrictions on types . 86 14.8 IDL constants 86 14.2 IDL interfaces and modules . 8 14.5 14.7.5 15 The MHEG-3 API . 86 15.1 Scriptlnterpreter object . 86 15.1.1 kill operation 86 15.1.2 prepare operation 87 15.2 MhScript object . 87 15.2.1 destro
38、y operation . 87 15.3 RtScript object . 88 15.2.2 new operation 88 15.3.1 delete operation . 88 15.3.2 setPriority operation . 88 15.3.3 getpriority operation 89 15.3.4 setData operation 89 15.3.5 getData operation 90 15.3.6 allocate operation 90 15.3.7 free operation 91 15.3.8 stop operation 91 15.
39、3.9 relnit operation 91 15.3.1 O getRtScriptStatus operation 92 15.3.1 1 open operation 92 - STDIDIN DIN ETS 3007LS-GfRfl 1998 M 279999b 0710090 2T9.m - . - _- - Page 8 ETS 300 71 5: June 1997 15.4 Routinelnvocation object 92 15.4.1 close operation . 93 15.4.2 routine-id readonly attribute . 93 15.4
40、.3 setparameter operation 93 15.4.4 getprototype operation 94 15.4.5 run operation . 94 15.4.6 reset operation 95 15.4.7 getlnvocationStatus operation 95 Annex A (normative): ASN.l specification of interchanged scripts . 96 Annex B (normative): Coded representation of interchanged scripts 99 B.l Cod
41、ing for interchanged scripts . 99 8.2 Coding for the program code . 99 8.2.1 Instruction op-codes . 99 8.2.2 Instruction operands . 99 Data identifier operands 99 Function identifier operands . 99 Miscellaneous numeric operands . 99 B.2.2.1 B.2.2.2 B.2.2.3 Annex C (normative): MHEG-SIR predefined el
42、ements . 104 c.1 c.2 c.3 Predefined types 104 C.l.l Primitive types 104 C.1.2 MHEG API types 104 Predefined functions 105 C.2.1 MHEG API operations . 15 C.2.2 MHEGB API operations 10 Predefined messages 105 (2.3.1 MHEG-3 API operations 10 C.3.2 The InstructionExecutionError exception 106 C.3.3 MHEG-
43、3 API exceptions . 106 C.3.4 MHEG API exceptions . 16 Annex D (normative): IDL Platform mapping specification form . 108 Annex E (normative): MHEG API definition process 110 E.l Generic API definition framework 110 E.l.l MHEG elements input to MHEG API definition process . 110 E.1.2 IDL elements out
44、put by MHEG API definition process 110 E.1.3 Requirements on the MHEG API definition process . 110 E.1.3.1 Portability 110 E.1.3.2 Genericity 111 E.1.3.3 Conformance testability 111 E.1.3.4 Implementability 111 E.1.3.5 Fulfilment of technical requirements . 111 General structure of the MHEG API 111
45、IDL non-object datatype definition . 112 E.1.5.1 Name mapping . 112 E.1.5.1.1 Data types . 112 E.1.5.1.2 Components 112 E.l 51.3 Values . 112 Type mapping . 113 E.1.5.2.1 INTEGER 113 E.l S.2.2 BOOLEAN . 113 E.1.5.2.3 OCTET STRING . 113 E.1.5.2.4 ENUMERATED . 113 E.1.5.2.5 SEQUENCE OF 113 E.1.4 E.1.5
46、 E.l S.2 Page 9 ETS 300 715: June 1997 E.1.5.2.6 CHOICE . 114 E.1.5.2.7 SEQUENCE . 114 E.1.5.3 Order of declarations . 114 IDL interface definition 116 IDL attribute definition . 116 E.1.7.1 MHEG interchanged attributes 116 E.1.7.2 MHEG internal attributes . 117 IDL operation definition . 117 E.1.8.
47、1 Operations mapping MHEG elementary actions . 117 E.1.8.2 Operations enabling the deletion of an interface instance 119 E.1.8.3 Operations to attach and detach an interface instance to a MHEG entity . 119 IDL exception definition . 119 E.1.6 E.1.7 E.1.8 E.1.9 E.2 MHEG API mapping to MHEG-SIR 120 An
48、nex F (normative): IDL specification of the MHEG-3 API . 121 Annex G (normative): Relationships with other parts of ISOAEC 13522 . 123 G.1 Relationships with ISOAEC 13522-1 123 G.2 Relationships with ISO/IEC 13522-5 123 Annex H (informative): MHEG-SIR syntax (EBNF notation) . 125 Annex J (informativ
49、e): Textual notation for MHEG-SIR scripts 127 Annex K (informative): MHEG entities . 130 K.l MHEG objects 130 K.2 Mh-objects 130 K.3 Rt-objects . 130 K.4 Interchanged MHEG objects 131 Annex L (informative): Main features of MHEG-SIR . 13 L.l Features of using applications 132 L.l.l Manipulation of MHEG entities 132 L.1.2 Computations. variable handling and control structures 132 L.1.3 External device control 132 L.1.4 Data acquisition 132 L.1.5 Access to external data 132 L.1.6 Access to arbitrary external run-time services