Home

User Control Language (UCL) Reference Manual

image

Contents

1. Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 11 von of 471 4 3 4 Lifetime of Objects Apart from the static scope hierarchy described above objects in UCL have a dynamic behaviour An object is created when the block whose scope it is declared in is activated it is deleted when the block terminates Objects declared in an AP are created when the AP is started and deleted when the AP terminates Objects declared in a subprogram procedure or function are created when the subprogram is called and deleted when the subprogram ends So in each call of the subprogram its locally de clared identifiers will denote different objects When a subprogram is called recursively each incarnation of the subprogram will have its own set of local objects These sets of objects form a stack according to the subprogram call hierarchy The identifiers denote the objects in the up permost incarnation of the subprogram i e the currently active incarnation All objects declared in the specification or body of any modules linked to an AP by direct or in direct import are created when the AP is started and deleted when it terminates The predefined objects are created when the AP is started and deleted when it terminates A for loop variable is created when the loop is entered and deleted when the loop ends 4
2. Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 10 von of 4 71 AP with 2 local procedures Procl and Proc2 procedure Close_Valve import APM Sys_Lib variable A INTEGER outer A procedure Procl visible variable A INT variable B INT begin scope of scope of B inner A end Procl scope of imported outer A objects variable C REAL visible procedure Proc2 begin scope of 0 outer A visible end Proc2 begin Close_Valve end Close_Valve Figure 4 Scope and Visibility of Identifiers 4 3 3 Qualified Identifiers A qualified identifier is an identifier prefixed with a pathname designating the library or other import able module in which the qualified identifier is defined The prefix and the identifier are separated by a period dot The qualified form can be used to access imported objects It is the only way to access imported objects whose identifier is hidden Formal syntax Qualified_Identifier Name Identifier Name Identifier 1 Path_Identifier Pathname Pathname see 4 3 5 Identifier see 4 1 2 2 Examples APM SYS_LIBS GROUND_LIBRARY Issue APM EGSE USER_LIBS MATH_LIB Matrix Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34
3. unit in 0 0254 m inch unit ft 12 in foot unit yd 0 yard unit mi 1760 yd mile unit oz 0 282495 ounce unit 1b 16 oz pound unit gr 1b 7000 grain unit cwt 112 1b hundredweight unit ton 20 cwt ton unit degC 273 15 Kabs degree Celsius unit degF 10 degC 18 320 18 degr Fahrenheit end Non_SI_Units Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 71 von of 471 4 13 3 Formal Parameter List Definitions Items in the database may have formal parameter lists When such an item is used in a context that re quires parameters the item name must be given together with actual parameters conforming to the for mal parameter list The formal parameter list can be defined in UCL syntax and compiled with the UCL compiler The parameter list definition is given in the same form as for an AP or a subprogram identifier formal_parameter formal_parameter The identifier is optional If present it will be implicitly declared as an alias for the item s path name For specific item types there may be restrictions on the allowed number and types of parameters Such restrictions will be stored in the database and observed by
4. OR rn 4 10 5 Loop Statements 141 544 Seed aw RACK ACERO 4 10 5 1 Simple loop Statement 4 10 5 2 while Statement bee Rem ee 4 10 5 3 repeat Statement 6 4 10 5 4 for Statement 3 9 er re RE GS a 4 10 6 return Statement ass 4 10 7 halt Statement roa ERA EAR ee ees 4 10 8 exit Statement x EERE Ee REO ACORN 4 11 Subprogram Declarations 464446 5946949669496946469 6966 5 55 4 11 1 Procedure Declaration nn cede es 4 11 2 Function Declaration eso noh harry Rn 4 12 Standard Functions and Procedures eeeeee 413 Compilation Units rn e hp 9 992 x y RV ER ER PERS 4 13 1 Automated Procedures ss a 4 13 2 Libraries asus naar 4 13 3 Formal Parameter List Definitions eee eee Appendix A Acronyms Appendix B Definitions 52 9 5555 899858 998898 9899985298 RU eS wees 8 1 Appendix C deleted acc a C 1 Appendix D UCL SyntaX 4s RR 3 D 1 Appendix E ASCH Character Set eeeeeeeeeeeee hn E 1 Appendix F UCL MDB Type Correspondence Table
5. Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 21 0 4 71 It is possible to define a subrange type of another subrange type Then both subrange types have the same base type and the bounds of the new type must not lie outside the bounds of the old type A subrange type declaration is given by the name of the base type followed by the range enclosed in parentheses as in INTEGER 10 100 The two dots are part of the syntax Formal Syntax Subrange Qualified Identifier Constant Expression Constant Expression Qualified Identifier see 4 3 3 Constant Expression see 4 9 Examples type Index INTEGER 0 25 type Light Colors Colors Red Blue type Digit CHARACTER 0 9 Representation in memory Subrange values are represented like values of their base type 4 5 2 Structured Types 4 5 2 1 Array Types An array is a structure consisting of a fixed number of components which are all of the same type Each component can be denoted and directly accessed by the name of the array variable followed by the array index in parentheses e g A i indicates the i th element of the array A For matrices A i or A i j are both valid ways to access an element where i is the row and the column of the matrix The number of dimensions of an array i
6. 100 0 K 10 0 K 110 0 K In multiplications or divisions the operands can be of different units The result is another unit or a unitless value Examples a force length work or in units Newton Meter m kg s Joule b duration frequency unitless value Also note that any unitized value can be multiplied with or divided by a unitless value n exponentiations the unitized values can be raised to constant integer powers only This opera tion is equivalent to a multiplication or division of values with the same unit It results in a new unit Examples unit degC Kabs 273 15 unit km 1000 m unit h 3600 s type Temperatur REAL degC type Voltage REAL V type Speed REAL m s type Acceleration REAL m s2 constant Max_Voltage Voltage 100 0 V variable T Temperature variable V Voltage variable 5 Speed variable A Acceleration variable M REAL m T 37 5 degC TS 1035 V invalid because tl is of type TEMPERATURE V A B C valid only if A B C refers to an MDB item of the appropriate type voltage measurement M 50 0 km h commensurable units are converted by the compiler 5 0 5 h m lt m s Ay 77250 19 17 5 lt 52 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD
7. Enumeration Type Subrange Type see 4 3 3 see 4 5 1 11 see 4 5 1 12 see 4 5 2 5 see 4 5 1 8 see 4 5 3 see 4 5 4 see 4 5 2 1 see 4 5 2 3 see 4 5 2 2 see array Lo Hi of REAL array type White Red Green Blue Black enumeration type Color Red Blue subrange type REAL DegC unitized type string 20 string type UNSIGNED INTEGER renaming Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Formal Syntax Type Declaration Type Simple Type Qualified Identifier Enumeration Type Subrange Type String Type Statecode Type Pathname Type Subitem Pathname Type Array Type Set Type Record Type Unit Examples type Vector type Color type Primary_Color type Temperatur type Name type Number Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 16 von of 471 4 5 1 Elementary Types 4 5 1 1 Type INTEGER Values of type INTEGER are whole numbers which may be positive or negative Its range is given by the predefined constants MIN INTEGER and MAX INTEGER corresponding to 2 and 231 1 respectively Integer literals are defined in 4 1 2 4 1 The operators and 5 may be applied to values of this type and represent add
8. F 1 Appendix G Engineering Units ccc cc ccc cece cece nenne G 6 1 Be Units ns si ea u RETE RS hess 5 2 51 Units 4 000 ee ee G 1 G 3 Non SI Units 2 ccc ccc ccc ccc ccc ccc ccc nn G 6 G 4 Prefix names and 1165 nn G 6 Appendix H Implementation Constraints eee eees Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 1 1 von of 1 1 1 Introduction 1 1 Identification This is the Language Reference Manual for the Columbus User Control Language UCL Document COL RIBRE STD 0010 1 2 Purpose This document provides the language definition for UCL Its primary goal is to establish formal re quirements on syntax and semantics of UCL for the development of language processing tools such as compiler and interpreter It may also be used as a language reference manual libraries for specific target systems The definition of UCL system libraries is part of the interface docu Please note that this reference manual covers only the UCL language itself it does not define system mentation of the respective target systems e g the CGS ICD DMS ICD etc 1 3 Document Outline This reference manual is divided into main chapters 3 and 4 and several appendices whi
9. is invalid In a procedure call the types of the actual parameters must be compatible with those of the formal para meters Subprogram parameters belong to one of three classes in parameters allow to pass values into a subprogram Within the subprogram only read access is allowed The actual parameter for a formal IN parameter may be an expression The keyword in may be omitted in the parameter declaration out parameters allow to pass values out of a subprogram Within the subprogram read access is allowed but only to obtain a value that was previously assigned within the same subprogram call The actual parameter for a formal out parameter must be a variable or an MDB item or subitem with READ WRITE access Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 48 von of 471 in out parameters allow to pass values into and out of a subprogram Both read and write access are allowed within the subprogram The actual parameter for a formal in out parameter must be a variable or an MDB item or subitem with READ WRITE access Scalar in parameter are passed by copying the value into the subprogram structured in parameters are passed by reference out and in out parameters are always passed by reference MDB ite
10. 33 units of measure 4 33 UNSIGNED INTEGER type 4 16 V variable declaration 4 31 variant 4 23 vocabulary 4 1 W while statement 4 51 WORD type 4 17 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Daimler Benz Aerospace Raumfahrt Infrastruktur repeat statement 4 52 reserved words 4 3 return statement 4 55 root pathname 4 3 S scope 4 9 of loop index 4 53 separator 4 1 set comparison 4 24 set difference 4 24 set inclusion 4 24 set intersection 4 24 set membership test 4 24 set operator 4 40 set type 4 24 set union 4 24 SI system 4 33 software type 4 12 source code 4 1 standard function 4 61 standard procedure 4 61 statecode literal 4 6 statecode type 4 18 statement 4 46 statement sequence 4 46 string literal 4 5 string type 4 26 structural compatibility 4 0 structured type 4 15 4 21 subitem 4 11 subitem pathname 4 11 subitem pathname type 4 15 4 28 subprogram declaration 4 57 subrange type 4 20 symmetric set difference 4 24
11. 8 4 64 in out parameter 4 48 4 57 4 59 in parameter 4 47 4 57 INC procedure 4 16 4 20 4 61 INCL procedure 4 25 4 62 index 4 21 index type 4 21 integer number 4 4 INTEGER type 4 16 interactive commands 3 1 L LENGTH function 4 26 4 61 lexical element 4 1 4 2 library 4 66 library body 4 66 library implementation 4 66 library specification 4 66 lifetime of objects 4 11 line length 4 1 logical operator 4 40 LONG REAL type 4 17 loop index 4 53 implicitly declared 4 53 loop statement 4 51 low level programming 4 23 M MAX function 4 16 4 17 4 19 4 61 MDB 3 1 4 11 MDB item 4 11 MDB object 4 11 MIN function 4 16 4 17 4 19 4 20 4 61 Mission Database 3 1 4 11 multidimensional array 4 21 Dok Nr Doc No COL RIBRE Datum Date 13 03 1998 4 Uberarbtg Rev Datum Date Seite Page 3 von of 3 syntax notation 5 tag field 4 23 temperatures special treatment for 4 36 time literal 6 TIME type 4 19 type 5 type conversion 4 42 type declaration 4 15 U unbound array 4 57 See also procedure declaration unbound string 4 48 4 57 unit declaration 4 34 unit expression 4 34 unit identifier 4 9 unit literal 4 7 unitized constants 4 35 unitized type 4 15 4 33 unitized value 4
12. Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 67 von of 471 the respective implementations for all functions and procedures defined in the corresponding library specification Note that identifiers declared in the specification part of a library are visible in the corre sponding body 1 6 may be used in the body without declarations However identifiers which are im ported into a library specification are not automatically available to the library body These identifiers must be explicily imported into the body before they can be used A library body may optionally contain an initialization section consisting of a statement sequence de limited by begin and end which is used to initialize its local objects This initialization section will be automatically executed before the client AP or library is executed A library is initialized only once even if it is imported many times by different imported units If multiple libraries are imported they are initialized in the order in which they textually appear Circular references for example A im ports B which imports C which imports A are not allowed and result in error messages At runtime all APs share the same system libraries but user libraries are not shared between APs each AP has its own copy of user libraries Formal Syntax Library_Specification
13. Letter Digit Letter Digit Examples of path identifiers N root pathname no pathname AP EQUIPMENT_Y Pathnames are formed by a sequence of path identifiers with no spaces between them The pathname NAPMNDMSNASSEMBLY XNUNIT Y consists of 4 consecutive path identifiers Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 4 von of 471 4 1 2 4 Numeric Literals In the UCL source code numeric literals constants may take three possible forms integer simple integer based integer or real numbers 4 1 2 4 1 Integers An integer is simply a sequence of digits 0 9 The underscore character may be used to logically group digits it has no effect on the numeric value of the literal The value of an integer must be in the range 0 MAX UNSIGNED INTEGER The compiler issues an error message if this range constraint is violated Formal syntax Simple_Integer Digits Digits Digit Digit Digit 0 1 2 3 4 6 7 8g 9 Examples 5 123 027 10 000 4 1 2 4 2 Based Integers A based integer has the form Base Value where Base is a decimal number indicating
14. s name poss ibly followed by one or more parameters in parentheses These parameters the actual parameters are substituted for the formal parameters specified in the corresponding procedure declaration The association between actual and formal parameter may be specified either in positional or in named notation In the positional form the correspondence between actual and formal parameters is estab lished by the positions of the respective parameters in the list In anamed parameter association the parameter must be named explicitly Named parameters may be given in any order If both positional and named associations are used in one procedure call the positional associations must occur first For each formal parameter there must be exactly one actual parameter either explicitly specified or by default If a default value exists the actual parameter may be omitted In this case all remaining actual parameters must be denoted by name For example if the procedure R is defined as procedure P X INTEGER 0 Y REAL 0 0 2 BOOLEAN FALSE then the following procedure calls are all valid P 5 3 14 TRUE all parameters positional P 1 Z TRUE X positional Y omitted Z named 2 RE 1 7 X and Y positional Z omitted P all parameters omitted D 0 same as P Note that the use of commas to indicate omitted default parameters is not allowed Thus P 5 TRUE
15. All Rights reserved Copyright per DIN 34 AP APM ASCII BNF CSS DB DMS EBNF EGSE FLAP GMT HCI HLCL HW ICD IEEE ISO MDB N A NASA ODB OS SI SID SW TBC TBD UCL UIL VICOS Dok Nr Doc No COL RIBRE Datum Date 13 03 1998 4 berarbtg Rev Datum Date Seite Page B 1 von of B 2 Daimler Benz Aerospace Raumfahrt Infrastruktur Appendix B Definitions permission users or applications have to access objects or entities program or set of programs performing some specialized user oriented function as opposed to general purpose programs like an operating system program main procedure written in User Control Language UCL in a hierarchical structure denotes an immediate descendant of a network or tree component A child is thus located one hierarchical level below its parent smallest unit of code that is accepted by the compiler In UCL there are 4 types of Compilation Units Automated Procedure AP Library Specification Library Body and Formal Parameter List Definition common or integrated collection of interrelated data whose purpose is to serve one or more applications a value supplied by the system when a user does not specify a required parameter qualifier or attribute MDB item located at the lowest hierarchical level leaf or terminal node and hence cannot be further decomposed binary code generated by the UCL compiler interpreted at
16. All Rights reserved Copyright per DIN 34 Access rights Application Automated Procedure Child Compilation unit Database Default End item Intermediate code I code Item type MDB item MDB object Mission Database MDB Name tree Network Node Operating system OS Parent Pathname Dok Nr Doc No COL RIBRE Datum Date 13 03 1998 4 berarbtg Rev Datum Date Seite Page B 2 von of B 2 rules dealing with the meaning of the language elements symbols constants variables statements etc software generated unique number assigned to each MDB item allows faster retrieval identifier character string denoting one of many possible states of a discrete end item e g OPEN CLOSED HIGH SMEDIUM SLOW any lower level item in the SW architecture e g module object Columbus test and operations language used for real time control amp monitoring purposes in both the onboard and ground environment Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Daimler Benz Aerospace Raumfahrt Infrastruktur Semantics Short identifier SID Statecode Unit User Control Language Dok Nr Doc No COL RIBRE Daimler Benz Aerospace 509900409 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page C 1 von of C 1 Appendix C DELETED Daimler Benz Aerospace AG D 28199 Bremen All Ri
17. LONG_REAL real_value These conversions are implicitly carried out whenever necessary They may however also be done ex plicitly Examples Long_Real_Value LONG_REAL Real_Value 1 0E50 Type to Subtype Conversion subtype value The base type of value must be the same as the base type of subt ype The effect of this conversion is to interpret the value as belonging to the subtype A check will be done to insure that the value does not violate possible constraints of the subtype If the value is constant and thus known to the compiler the compiler will do the check otherwise it will be carried out at runtime For pathname and subitem pathname types the check will always be done at compile time it makes sure that the target subt ype is not more constrained than the type of value Note A special case is the conversion of a type to itself which is allowed but has no effect Example type Short INTEGER 0 2 16 1 type Switch statecode SLOW MEDIUM SHIGH type Label string 10 variable I INTEGER variable C statecode variable 5 string 80 I Short I make sure I is a short integer C Switch C make sure C is a Switch value Send Message Label S make sure 5 is not longer than a Label Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz
18. Statement Sequence else Statement Sequence end if case Expression Case Case else Statement Sequence end case when Case Label List Statement Sequence while Expression do Statement Sequence end while repeat Statement Sequence until Expression loop Statement Sequence end loop d Iterative For Statement Collective For Statement for Identifier Expression to Expression by Constant Expression do Statement Sequence end for dd Daimler Benz Aerospace Raumfahrt Infrastruktur Statement Assignment Procedure Call Actual Parameters Parameter If Statement Case Statement Case While Statement Repeat Statement Loop Statement For Statement Iterative For Statement Collective For Statement for Identifier in Qualified Identifier by Constant Expression do Statement Sequence end for T halt Expression exit si return Expression Statement Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Halt Statement Exit Statement Return Statement Statement Sequence Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page D 5 von of D 7 Expressions Constant Expression Express
19. duration duration duration duration duration duration duration Furthermore all comparison operations are provided for both types e g time lt time boolean duration lt duration boolean Time values may be with or without a date In the second case the date is ignored in any operations If in an operation one operand is with a date and the other is without a date it is assumed to refer to the same date as the other operand e g 01 09 1997 13 00 12 00 3600 0 s The special time literal denotes no time This may be used e g as a default value for TIME para meters or variables It can only be compared on equality lt gt and must not be used in other oper ations Representation in memory A TIME value is internally represented using two 32 bit words The first word stores the date the second word stores the seconds since midnight in DURATION format The date is stored in packed format the first byte is the day in the range 1 31 the second byte is the month in the range 1 12 the remaining two bytes hold the year in the range 1901 2099 Times without a date are represented with the complete date word 0 The constant no time is represented with a date word of the form day 0 month 0 year 1 and the second word 0 0 DURATION values are represented like REAL values see 4 5 1 3 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyrig
20. library Identifier Import Definition end Identifier Library Body library body Identifier Import Declaration begin Statement Sequence end Identifier Definition Unit Declaration Constant Declaration Type Declaration Variable Declaration Alias Declaration Procedure Heading Function Heading Import see42 Declaration see 4 3 Statement Sequence see 4 10 Unit_Declaration see Constant_Declaration see 4 4 Type_Declaration see 4 5 Variable Declaration see Alias Declaration see 4 7 Procedure Heading see 4 11 1 Function Heading see4 11 2 Identifier see 4 1 2 2 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Seite Page 4 68 0 4 71 Daimler Benz Aerospace Raumfahrt Infrastruktur Example 1 This library keeps a buffer of pathnames The buffer implementation 18 invisible to the user the library provides operations to put get items in from the buffer and to inquire the number of items in the buffer Library specification library Pathname Buffer constant Buffer Size INTEGER 100 type Buffer Error No Error Buffer Full Buffer Empty procedure Put Buffer in Item pathname out Error Buffer Error procedure Ge
21. plane 1 value value value value value value value value value plane n value value value value value value An empty aggregate for an array with no element is written as an empty pair of parentheses Aggregates are expressions see 4 9 Representation in memory An array is represented as a sequence of its elements in their respective representation Arrays with more than one dimension are stored column wise i e such than for all index positions i and i 1 indices on position 1 1 vary faster than on position i Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 23 von of 471 4 5 2 2 Record Types Like an array a record is a structured type In a record however the components are not constrained to be of identical type In the record declaration each component or field must be specified by a name field identifier and a type To reference a field the name of the record is followed by a period dot and the respective field identifier e g BIRTHDAY MONTH Records may be nested The scope of a field identifier is the innermost record in which it is defined Hence field identifiers i e the names of record components may be reuse
22. where pathname denotes an importable item e g a library from which objects are imported The import clause makes all objects declared in the imported module s specification directly visible See section 4 2 for details The optional declaration part of an AP may declare constants types variables aliases and units as well as procedures and functions See sections 4 3 and 4 11 for details The AP s name may be repeated at the end after the end keyword in this case it obviously must match the name following the procedure keyword in the header Formal Syntax Main Procedure procedure Identifier Formal Parameters Import Declaration begin Statement Sequence end Identifier Formal Parameters see 4 11 1 Import see 4 2 Declaration see 4 3 Statement Sequence see 4 10 Identifier see 4 1 2 2 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 65 von of 4 71 Example This is the definition of an Automated Procedure named PM PAYLOAD EQUIPMENT_UNIT_A COMMAND MODE_OFF Procedures like Issue Execute_AP Enable_EVL etc are imported from a system library named APM UCL GROUND_LIBRARY procedure Mode_Off import APM UCL GROUND_LIBRARY const
23. 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 37 von of 471 4 9 Expressions Expressions are syntactical constructs used to calculate values of variables or generate new values They represent combinations of operands and operators whereby an operand may itself contain an ex pression 1 6 expressions can be constructed recursively At runtime when the expression is evaluated the respective current values denoted by the operands are combined using the specified operators to yield a new value An error will occur if the computed value cannot be represented on the current target machine e g division by zero The arithmetical operators e g applied to INTEGER REAL or LONG_REAL operands form arithmeti cal expressions whereas the logical relational and some set operators together with their respective operands yield Boolean expressions If an MDB object is used in an expression through a pathname designator its meaning depends on the expected target type If the target type is a pathname type the pathname stands for itself as a reference to the item Otherwise the pathname denotes the runtime value of the item The item must then be accessible in READ or READ WRITE mode see section 4 2 The same holds analogously for subitem pathnames Formal Syntax Expression Relation 1 8 Relation Relation 1 Relation
24. 3 5 MDB Objects Pathnames Mission Database MDB objects are by default visible to the UCL program i e they need not be explicitly declared Their definitions are inherited from the MDB An MDB object or MDB item is identified by a pathname reflecting its respective position in the hier archical name tree Some MDB items may have subitems These are denoted by a subitem pathname 1 6 an identifier prefixed with the pathname of the MDB item separated with a dot Note that the sub item identifier may be identical to a reserved word Formal syntax Pathname Identifier Path Identifier Subitem Pathname Path Identifier Path Identifier Identifier Identifier see 4 1 2 2 Path_Identifier see 4 1 2 3 Examples APM PAYLOAD EQUIPMENT_UNIT_A a pathname APM PAYLOAD EQUIPMENT_UNIT_A INPUT_1 a subitem pathname MDB objects may have parameters e g APs messages stimuli It depends on the program context whether or not an actual parameter list must be supplied with the pathname of such items see 4 5 3 for details The parameter list is then given together with the pathname e g EGSE TES01 AP_1 3 14 MDB objects fall into several classes or types The item type of an MDB object not to be confused with the corresponding UCL type defines the object s characteristics or properties and by implication the semantic rules governing its usage In the UCL environment se
25. 60 8 hour h 1h 60 min day d 1dz24h electric current ampere A kA mA uA nA pA base unit temperature kelvin Kabs base unit degree Celsius degC 1 C 1K 273 15 temp difference kelvin K base unit amount of substance mole mol kmol mmol umol base unit luminosity candela cd base unit plane angle radian rad mrad urad supplementary unit m m solid angle steradian sr supplementary unit m m frequency hertz Hz THz GHz MHz kHz 1Hz 1s 1 rotational freq 8 1 8 l min force newton N mN 1 N 1 kg m s pressure pascal Pa GPa MPa kPa mPa uPa 1 Pa 1 N m bar bar mbar ubar 1 bar 10 Pa Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace 509900409 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page G 3 von of G 6 Quantity SI unit Sym Supported multiples of this unit Definition energy work heat joule J TJ GJ MJ kJ mJ 1J 1Nm electronvolt eV GeV MeV keV 1 eV 1 60219 S 10 19 J torque Nm Nm MNm kNm mNm uNm 1Nm 1Nm 1J power watt GW MW kW mW uW 1 17 5 electric charge coulomb C MC kC mC nC pC 18 Ah mAh uAh 1 Ah 3 6 kC electric potential volt V MV kV mV uV 1V 1JC electric capacitance farad F mF uF nF pF 1F 1C V electric resistance ohm Q Ohm GOhm MOhm kOhm mOhm 1W 1 V A electric conductance siemens 5 kS mS uS 1S 1W magnetic flux weber Wb mWb 1Wb 1Vs magnetic i
26. Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 6 von of 4 71 4 1 2 7 Statecode Literals In the MDB a statecode is a literal constant identifying one specific state e g Open Closed of a dis crete type MDB object When such an object is created like a switch or a valve its allowable states are also defined and appropriate symbolic names or statecodes assigned to them In UCL each statecode identifier must be prefixed by a dollar sign The following identifier may be up to 8 characters long not including the sign Formal syntax Identifier see 4 1 2 2 Statecode Identifier Examples of statecode literals EN E SACTIVE SOP SOFF 4 1 2 8 Time Literals A time literal consists of two separate lexical elements date and hour specification If the date is omitted UCL ignores it in any related time operation Other omitted parts are assumed as zero A special time literal is the constant which stands for an undefined time value It can only be used in assignments and as parameters and tested for equality no further operations are defined on it The date is restricted to the range from year 1901 to year 2099 Formal syntax Time_Literal Date Time Time Dat
27. Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 46 0 471 4 10 Statements The following kinds of statements are supported in UCL Assignments Procedure calls Conditional statements if case teration statements while repeat loop for Others exit return halt UCL requires each statement to be terminated by a semicolon In many places a possibly empty se quence of statements is allowed Individual statement descriptions follow Formal syntax Statement Assignment Procedure Call Statement Case Statement While Statement Repeat Statement Loop Statement For Statement Halt Statement Exit Statement Return Statement Statement Sequence Statement 4 10 1 Assignment An assignment serves to replace the current value of a variable or an array or record element by a new value indicated by an expression The assignment operator is Variable and expression must be compatible see Section 4 5 5 The designator to the left of the assignment operator must be a variable or an MDB item or subitem given by its pathname in the latter case the assignment changes the runtime value of the item or subitem the corresponding MDB object must therefore be accessible in the READ WRITE mode After an assignment is executed the variable has the value obtained by evaluating the expression the old value is lost i e
28. Aggregate Aggregate Expression List Relation Simple_Expression Simple Expression Simple Expression Simple Expression Simple Expression gt Simple_Expression gt Simple_Expression in Simple_Expression Simple Expression Term Term Term Term Factor Factor Factor Factor Factor Primary Factor Primary Number Unit String Character Set_Constant Date Time Time Statecode Designator Function_Call Type_Conversion Expression Primary Designator Name Identifier Expression List Name see 4 3 5 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 COL RIBRE STD 0010 4 Datum Date 13 03 1998 Datum Date 4 38 von of 4 71 Dok Nr Doc No 598 6 55 6 Uberarbtg Rev Seite Page Expression Expression Simple_Integer Based_Integer Real see 4 1 2 2 see 4 1 2 4 1 see 4 1 2 4 1 see 4 1 2 4 3 see 4 1 2 6 see 4 1 2 5 see 4 5 2 3 see 4 1 2 8 see 4 1 2 8 see 4 1 2 7 see 4 9 3 see 4 9 4 see 4 8 Daimler Benz Aerospace Raumfahrt Infrastruktur Expression List Number Identifier Simple_Integer Based_Integer Real String Character lt Set_Constant Date Time Statecode Function_Call Type_Conversio
29. COL RIBRE Datum Date 13 03 1998 4 berarbtg Rev Datum Date Seite Page G 6 von of G 6 Daimler Benz Aerospace Raumfahrt Infrastruktur G 3 Non SI Units For convenience the following non SI units are also supported Quantity Unit Sym Supported multiples of this unit Definition lin 25 4 mm length inch in An inch is defined to be exactly 25 4 mm It is used as the base unit for imperial lengths 1 ft 12in 1 yd 23 ft 1 mi 60 yd 1 Ib 453 592 g foot ft yard yd mile mi mass pound Ib A pound is defined to be exactly 453 592 It is used as the base unit for imperial masses 1 oz 1 16 Ib 1 gr 1 437 2 oz 1 cwt Ib 1 ton 20 cwt 1 degF 10 18 degC 8 ounce OZ grain gr hundredweightcwt ton ton temperature degree Fahrenheit degF 6 4 Prefix names and values The SI prefixes also in the ISO 1000 standard are used with the unit symbols defined above should be U mu but this is not in the ASCII character set Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 E exa 1018 P peta 1015 T tera 1012 G giga 10 M mega 106 k kilo 103 h hecto 102 da deca 10 d deci 10 1 0 centi 10 2 m milli 10 3 u micro 10 6 n nano 10 9 p pico 10 12 f femto 10 15 a atto 10 18 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date R
30. Command Language HLCL command as e g in an EGSE environment on request Note that unlike a return statement the halt statement causes termination of the AP i e of the main program A call to the halt statement itself is optional an AP may terminate without such a statement in which case halt SUCCESS is assumed by default Formal Syntax Halt Statement halt Expression Expression 4066 9 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Seite Page 4 56 0 4 71 Daimler Benz Aerospace Raumfahrt Infrastruktur 4 10 8 exit Statement The exit statement consists of the keyword exit It causes termination of the innermost enclosing loop execution is resumed with the statement following the loop Any iterative statement i e 1oop while repeat or for may be left via an exit statement A gt 10 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 execution continues here when Formal Syntax Exit Statement exit Examples loop 2 1 if A gt 10 then exit end if B Bot A end loop Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 57 von
31. DIN 34 Dok Nr Doc No COL RIBRE Datum Date 13 03 1998 4 berarbtg Rev Datum Date Seite Page I 1 von of I 3 INDEX constant 4 14 constant declaration 4 14 constant expression 4 38 conversion 4 42 D DEC procedure 4 16 4 20 4 62 declaration 4 9 default value 4 57 delimiter 4 2 dimension 4 21 dollar sign for state code identifiers 4 6 duration literal 7 DURATION type 4 19 E element type 4 21 elementary type 4 15 4 16 end of line 4 3 enumeration type 4 17 4 20 EXCL procedure 4 25 4 62 exit statement 4 56 expression 4 37 F floating point 4 5 for statement 4 53 formal parameter 4 57 formal parameter list definition 4 71 function call 4 41 function declaration 4 59 H halt statement 4 55 HIGH function 4 61 HLCL 3 1 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Daimler Benz Aerospace Raumfahrt Infrastruktur A ABS function 4 16 4 61 access class 4 12 actual parameter 4 41 aggregate 4 22 alias declaration 4 32 analog measumement 4 12 1 arithmetical operator 4 39 array index 4 21 array type 4 21 ASCII 4 5 assignment 4 46 automated procedure 3 1 4 64 B base unit 4 33 based integer number 4 4 BITSET type 4 25 Boolean operator 4 40 BOOLEAN
32. Expression do Statement Sequence end while 7 Expression see 4 9 Statement Sequence see 4 10 Examples while PM TTC MODE 0 do Wait 1 0 s end while 4 10 5 3 repeat Statement A repeat statement specifies the repeated execution of a statement sequence depending on the value of a Boolean expression In contrast to the while loop the expression is evaluated after each subse quent execution of the statement sequence hence the statement sequence is executed at least once The repetition stops as soon as the evaluation of the expression yields the value TRUE A repeat statement has the following form and is equivalent to the shown Loop statement repeat loop statement_sequenc statement_sequenc until expression if expression then exit end if end loop Formal Syntax Repeat Statement repeat Statement Sequence until Expression Statement Sequende see 4 10 Expression see 4 9 Examples repeat INC Index if Table Index Used then exit end if until Index Max_Index Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 53 von of 471 4 10 5 4 for Statement The for statement is used when a statement sequence is to be executed a known number of times w
33. Lower Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace 99040 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page von of APPENDICES Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 COL RIBRE Dok Nr Doc No Daimler Benz Aerospace B sp be i berarbtg Rev Raumfahrt Infrastruktur Seite Page Appendix A Acronyms Automated Procedure Attached Pressurized Module Laboratory American Standard Code for Information Interchange Backus Naur Form syntax Core Simulation Software DataBase Data Management Subsystem Extended Backus Naur Form Electrical Ground Support Equipment FLight Automated Procedure onboard Greenwich Mean Time Human Computer Interface High Level Command Language HardWare Interface Control Document Institute of Electrical and Electronics Engineers International Organisation for Standardization Input Output Mission DataBase Not Applicable National Aeronautics and Space Administration USA Onboard DataBase Operating System Syst me Internationale metric unit standards Short IDentifier SoftWare To Be Confirmed To Be Defined User Control Language User Interface Language Verification Integration and Check Out Software Daimler Benz Aerospace AG D 28199 Bremen
34. Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 42 von of 471 4 9 4 Type Conversions Whenever required type conversions must be stated explicitly UCL supports type conversion between the following types INTEGER and REAL LONG REAL INTEGER and CHARACTER INTEGER and enumeration types INTEGER and BITSET REAL LONG REAL and unitized types e unitized types and commensurable unitized types REAL and LONG REAL e any type and its subtypes any subtype and subtypes of the same base type Note that type conversions between REAL and LONG REAL are performed automatically by the com piler These conversions may however been written explicitly as well A conversion to a subtype implies a constraint or range check at runtime to ensure the converted value fits the constraints of the subtype A type conversion 18 specified by prefixing the expression to be converted in parentheses with the name of the target type one of the above The result takes the type of the target type A type conversion is an expression Syntactically it corresponds to a function call Formal Syntax Type Conversion Qualified Identifier Expression Qualified Identifier 2 see 4 3 3 Expression see 4 9 Note that wherever in the following examples REAL is
35. SARR Types TIME and DURATION Inherited types Units of Measure SARR RIDs incorporated Editorial updates made SRR RIDs incorporated Types revised Status parameter amp constants defined Names of procedures functions types har monised BNF Syntax revised Syslibs re placed with new System Libraries On board and Ground DDR ECOL 0034 Issue 1 Revision B incorporated Onboard System Library revised in light of Eureca experience Replace all references to SWRU with SWOP in line with CSRD 2 A 2 Replace all references to AP with FLAP to avoid confusion with NASA Automatic Procedures 3 Create new types and constants needed for revised procedures 4 Delete old monitor limit procedures SET xxxx LIMIT and replace with 5 1 1 3 SET MONITOR LIMIT 5 Update description of procedure ABORT_FLAP 6 Create proc GET_FLAP_EXEC_STATE 7 Delete procedure REPLACE_SWRU because revised baseline abolishes SWRU online replacement 8 Create procedure GET_SWOP_STATUS 9 Delete procedure RECEIVE_MESSAGE 10 Delete procedures LOAD_ UN LOAD_ACQUISITION_TABLE 11 Create procedure GET RAW DATA Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 all all all all all 5 only change pages 5 1 5 1 5 1 5 1 1 3 4 5 6 and 7 5 1 3 7 5 1 3 8 5 1 4 7 5 1 4 8 5 1 4 10 5 1 6 1 5 1 6 2 5 1 6 3 Daimler Benz Aerospace Raumfahrt Infrast
36. accepted by Execute Execute A Error A is not parameterized even if Z was assigned end P Representation in memory Non parameterized pathname values are represented as one 32 bit word containing the short ident ifier SID of the item as an unsigned integer Parameterized pathname values can only occur as parameters to a subprogram When the subpro gram is called a parameter block is constructed in memory that describes the item together with its actual parameter list and the address of the parameter block is passed to the subprogram The para meter block conforms to the internal parameter encoding scheme as described in reference docu ment 2 2 4 4 5 4 Subitem Pathname Types The values comprised by subitem pathname types are references to subitems of database objects them selves not to their value Subitem pathnames are regarded as literals that denote the values of these types Subitem pathname values can be assigned and compared on equality lt gt Subitem pathname types can be unconstrained or constrained An unconstrained subitem pathname type is denoted by the pattern pathname it comprises all valid subitem pathnames A constrained subitem pathname type is restricted to a specific set of MDB item types This is denoted by the pattern pathname followed by the list of allowed subitem types in parenth eses The subitem types are represented by a special set of identifiers defined in the database the
37. be used for string operands and except lt and gt for set operands The equality operands and lt gt can also be applied to statecode pathname and subitem path name operands 4 9 2 5 Set Operators Symbol Operation in contained in set union set difference set intersection symmetric set difference Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 41 0 471 4 9 3 Function Calls Like a procedure a function is invoked by its name followed by the appropriate actual parameters In contrast to a procedure call which denotes an action a function call returns a value and corresponds therefore to an expression The specification of actual parameters in function calls follow the same syn tax rules as in procedure calls see 4 10 2 Formal Syntax Function_ Call Qualified Identifier Actual Parameters Actual Parameters Parameter Parameter Parameter Identifier Expression Qualified Identifier 2 see 4 3 3 Identifier see 4 1 2 2 Expression see 4 9 Examples X Average First_Val Last_Val function Average if Is_Empty Buffer then Boolean function Is Empty Daimler Benz Aerospace AG D 28199 Bremen All
38. moved one level up It was formerly a subsection of Subprogram Declarations Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 VW Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp be i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page von of XI IX Table of Contents 1 INTRODUCTION 554539 kes xi ue kh 40 60d eGo kes X RR ER RE Ge Y des 1 1 LI Identiheation ass sen ann REY ERR EE 1 1 L2 PROSE a ae 1 1 1 3 Document Outline as aka 1 1 2 APPLICABLE AND REFERENCE 0 2 1 2 1 Applicable 13005 ERR se ee eee pace SA 2 1 2 2 Reference Documents gt 2 1 ELAD VIEW E PE IA N E 3 1 Conceptual Overview eisen en en sn 32 Language Summary nn 986 995898 9802 8989 989898 686 3 3 Syntax Notation 4445452 9 4550 654 A ecese oreren tienes 3 5 3 4 Conventions Used in Examples 2 8 3 5 4 LANGUAGE DEFINITION eese ee een 4 1 Vocabulary amp Lexical Elements eere 41 Character Set 2 coda ska e ERR Vr REFERRI FARE RA d 4 1 2 Lexical Elements se CIERRE REOR CER CEN TERRE 4 1 2 1 Delimiters PG heen VE TCI RESP 4 1 2 2 Identifiers eines 4 1 2 3 Path Identifiers and Pathnames 4 4 1 2 4 Numene Literals u a nee ba I a k
39. necessary to allow conversions between e g C and K in particular the relationship 0 C 273 15 Kabs does not hold for temperature differences G 2 SI Units In the table of SI units given below the column SI unit refers to the name of the unit as defined by ISO 1000 and the international system of units Syst me International d Unit s SI or to unit names composed by SI unit names e g m s The column Sym symbol shows the recommended string to be used in UCL to denote such a unit the same is true for the supported multiples of this unit in the next columns The Definition column exactly defines the unit Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace 80000340 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page G 2 von of G 6 Quantity SI unit Sym Supported multiples of this unit Definition length meter m kn cm mm um nm pm base unit astronomic unit AU 1 AU 149597 870 10 m parsec 1 pe 206265 AU area m m2 km2 dm2 cm2 mm2 1m 1me m volume m m3 dm3 cm3 mm3 Im Imemem liter LL c ml 11 1 dm Note that both the upper case letter L and the lower case letter 1 denote the unit liter mass kilogram kg g mg ug base unit atomic mass unit u 1 u 1 66053 S 10 27 kg tonne t 11 10 kg time second S ms us ns base unit minute min 1 min
40. of hierarchical tree structures For better manageability and adaptability to specific target environments the monitoring and control features of UCL have been removed from the actual language definition and encapsulated in system libraries These libraries are specific for the respective target systems they are defined in the interface documentation for these systems e g the DMS ICD the CGS ICD etc The library construct of UCL corresponds to the Ada package or the module in Modula 2 It supports the information hiding concept which allows the separation of a module s specification from its imple mentation The library concept is not restricted to system libraries but a user may implement his own user libraries in UCL UCL programs Automated Procedures or APs automatically inherit the definitions of objects con tained in the MDB These objects are thus directly visible and may be referenced by their Database path names see Fig 1 UCL also supports on line interactive commands These facilities are provided by the High Level Com mand Language HLCL in the ground SW environment HLCL is somewhat a modification of UCL i e it extends UCL with respect to interactive commanding e g HLCL allows abbreviations and shares the same system libraries In this manner UCL s monitoring and control facilities also become available on line as HLCL keyboard commands HLCL is described in reference document 2 2 1 UCL programs are ed
41. predefined libraries with a UCL specification but no corre sponding UCL implementation Such libraries will be provided by the target specific runtime environment presumably as part of the interpreter From the user point of view the library type is transparent Both types of libraries are imported and used in exactly the same way A library consists of two parts belonging to two separate compilation units library specification library body missing for system libraries The library specification is the list of all entities which are visible to APs or other libraries 1 6 they may be imported The ibrary body on the other hand contains the actual implementations of these entities as well as other entities that are invisible from the outside For system libraries the body is mis sing since their implementation is part of the runtime system This partitioning of libraries into specification and implementation part allows torestrict the number of entities visible to users and to hide implementation details information hiding principle It also improves maintainability by allowing changes to be made to a library implementation without affecting its clients UCL allows a library to be composed of a specification part only i e without a corresponding body For example a library could contain constant and type declarations only Note that the specification and body parts logically belong to the same library and must sh
42. run time type of an MDB item defines the properties attributes and the set operations that may be performed on that item used interchangeably uniquely identifiable entity defined in the Mission Database and corresponds to a real world HW or SW entity An MDB Object or Item may be decomposed into lower level items according to the hierarchical name tree conventions see Name tree the central repository for all HW SW configuration information about Columbus Flight Elements Payloads and associated Ground Support Equipment hierarchical tree structure within the MDB which decomposes the system into subsystems equipment etc The topmost node of the name tree is called the root node whereas terminal nodes leaf nodes represent the items that cannot or need not be further decomposed the end items Each MDB object is identifiable by a pathname indicating the succession of nodes to be traversed to reach that particular object in the name tree group of computers workstations and or terminals that are linked together to allow the sharing of resources data and peripherals component of a network or tree structure system software that controls the computer and its parts performing the basic tasks such as allocating memory and allowing computer components to communicate in a hierarchical structure denotes an immediate ancestor of a network or tree component see Name tree Daimler Benz Aerospace AG D 28199 Bremen
43. subitem type names These identifiers may appear only in this specific context they do not in terfer with normal UCL identifiers The compiler will check that subitem pathnames assigned to a variable associated with a constant or passed as a parameter are of one of the subitem types allowed for the target object All declared subitem pathname types are subtypes of the general predefined type pathname Formal Syntax Pathname Type pathname Identifier_List Identifier_List Identifier Identifier Identifier see 4 1 2 2 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 29 von of 471 Examples type Subitem pathname gt unconstrained type Input pathname FB_IO_INPUT constrained to FB_IO_INPUT procedure P X pathname begin end P unconstrained parameter procedure 0 X Input begin end 0 constrained parameter Note that all checks concerning constraints of subitem pathname types are performed at compilation time not at runtime Whenever a subitem pathname value is assigned to a variable or passed as a para meter it is checked that the type of the source value has at least the constraints of the target object Example procedur
44. the UCL compiler The parameter list definition may be preceded by unit constant type and alias declarations This allows to have parameter types other than the predefined types and named default values Units constants types and aliases may also be obtained by importing them from libraries or other parameterized items Database items with formal parameter lists may be imported like libraries in any compilation unit An import makes all objects declared in the formal parameter list definition visible in the importing com pilation unit This comprises explicitly declared units constants types and aliases as well as the impli citly declared alias for the item s path name Without an import a parameterized item can be used with out any restrictions but any additional identifiers declared together with the formal parameter list will not be visible Formal Syntax Formal_Parameter_List_Definition Import Unit_Declaration Constant_Declaration Type_Declaration Alias_Declaration Identifier Formal_Parameters Import see 4 2 Unit_Declaration see 8 Constant_Declaration see 4 4 Type_Declaration see 4 5 Formal Parameters see 4 11 1 Example import MAPMNGLOBALNCOMMON TYPES import common type declarations constant Lower INTEGER 0 constant Upper INTEGER 255 type Range INTEGER Lower Upper Message Name string the parameter list definition Value Range
45. the function name an optional list of formal parameters and the function result type Formal parameters and body of functions are specified in the same way as procedures see 4 11 1 The type of the function return value is restricted to scalar types and pathname types The statements of the function body must include one or more return statements see 4 10 6 specify ing the returned value but only one return statement is executed A runtime error occurs if a func tion is left otherwise than by a return statement Note that the expression following the return keyword must yield a value of the function result type stated in the function header Neither out nor in out parameters are allowed for functions Formal Syntax Function Declaration Function Heading Block Function Heading function Identifier Formal Parameters Qualified Identifier Block Declaration begin Statement Sequence end Identifier Formal Parameters see 4 11 1 Declaration see 4 3 Statement Sequence see 4 10 Identifier see 4 1 2 2 Examples function Square N INTEGER INTEGER begin return N N end Square function Is Printable C CHARACTER BOOLEAN begin return C gt CHARACTER 31 amp C gt CHARACTER 127 end Is Printable Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc
46. were all referring to unitless values UCL also provides the facility for defining and operating on unitized values i e real values associated with a unit of measure This facility improves the readability of the source code and at the same time enables addi tional semantic checking at compilation time 4 8 1 Units of Measure Every measurement system defines a number of base units each describing a physical quantity The currently world wide used unit system is the SI system which defines 7 base units meter to measure the length second to measure the time kilogram to measure the mass etc It is standardized under ISO 1000 The units of measure in UCL are based on this International Standard All other units can be derived from the base units by multiplication or division of two or more base units or by multiplication and or addition with constants Such units are called derived units For example the unit volt is defined as m2 kg s3 A or m kg 73 1 The second expression shows that derived units are products of base units raised to positive or negative integer power The same physical quantity can be described by more than one unit For example the length can be measured in meters or in inches Such units are called commensurable units They are assignment com patible The UCL compiler automatically converts between commensurable units This is explained later in more detail UCL can handle all units derived f
47. 0 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 1 von of 4 71 4 Language Definition 4 1 Vocabulary amp Lexical Elements 4 1 1 Character Set The text of a UCL program also called the source code is a sequence of lexical elements or tokens each consisting of one or more characters These characters may be any ofthe ASCH graphic symbols defined in the ISO standard 646 The UCL source code can be freely broken into lines whereby the length of the line is restricted to 256 characters This is a restriction imposed by the particular Columbus implementation of the UCL com piler see Appendix H Adjacent lexical elements may be separated by one or more special characters e g blank space called separators Separators are allowed between any two tokens and also before the first and after the last token in particular the end of a line is a separator Within lexical elements separators are not allowed except if a separator is part of the element character and string literals A separator is mandatory whenever its absence would result in an ambiguous token sequence For example it is not required between identifiers and non alphanumeric symbols e g the arithmetical operators but it is required between identifiers and keywords or numeric constants Thus A B C is equivalent to A B C However IFA B THEN is invalid because of the mis
48. 009 2 2 2 Columbus Ground System CGS User Manual COL RIBRE MA 0028 2 2 3 Mission Database MDB User Manual There are specific MDB user manuals for different target systems 2 2 4 System to CLS Interface Control Document COL RIBRE ICD 0058 00 2 2 5 ISO 1000 SI units and recommendations for the use of their multiples and of certain other units International Standards Organisation Geneva Switzerland 2 2 6 ISO 646 Information Processing ISO 7 Bit Coded Character Set for Information Interchange International Standards Organisation Geneva Switzerland Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 3 1 von of 3 5 3 Overview 3 1 Conceptual Overview Although its basic syntax is that of a general purpose programming language UCL is a dedicated test and operations language for monitoring and control of COLUMBUS subsystems It is intended for use in both the on board operational and the ground checkout environment UCL is a procedural language representing the set of all commands or instructions that can be prede fined and stored as so called Automated Procedures APs and User Libraries in the Columbus Mission Database MDB Automated procedures are typically parts of some higher level actions which are stored in the form
49. 308 to 1 7969E 308 The syntax of LONG_REAL literals is the same as for REAL values and the same operators may be applied Note that values of type REAL are compatible with those of type LONG_REAL and vice versa Thus mixed expressions consisting of both REAL and LONG_REAL values are allowed Representation in memory A LONG REAL value is internally represented as two 32 bit words in IEEE standard double float ing point format 4 5 1 5 Type BOOLEAN The standard type BOOLEAN is an enumeration type defined as follows type BOOLEAN FALSE TRUE All properties and operations defined for enumeration types apply to BOOLEAN as well For a definition of enumeration types see 4 5 1 11 In addition there are three special BOOLEAN operators amp corresponding to and or and not respectively Representation in memory A BOOLEAN value is internally represented like enumeration types FALSE 0 TRUE 1 4 5 1 6 Type CHARACTER The value of a variable of type CHARACTER is a character i e one element of the ASCII character set A character literal is written between single quotes or apostrophes see 4 1 2 5 Values of type CHARACTER are ordered according to the collating sequence of characters in the ASCII character set see Appendix E The relational operators may therefore be applied CHARACTER values may also be used in string operations see 4 5 2 5 Type conversions to and from INTEGER can be used
50. AL 50 05 How many INTEGER 50 out Total REAL procedure Finish Up then these are valid procedure calls Calculate New Limit Rvall Rval2 Rlim Calculate New Limit 100 0 2 5 Rlim Get Total 5 5 Total T Get Total First 5 5 How Many 100 Total T Get Total Total T Finish Up Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 49 von of 471 4 10 3 if Statement The if statement denotes conditional execution of one or more statements It takes the form if condition_1 then statement_sequence_l elsif condition_2 then statement_sequence_2 elsif else statement_sequence_ntl end if where condition_1 and condition_2 are Boolean expressions These expressions are evaluated one after the other and as soon as one yields the value TRUE the corre sponding statement sequence is executed and no further conditions are tested The else part if pres ent is executed if none of the conditions was true The elsif and else parts are optional Formal Syntax If Statement if Expression then Statement Sequence elsi Expression then Statement Sequence else Statement Sequence end i P Statement Sequence see 4 10 Expression 4066 9 Example
51. BRE STD 0010 Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Seite Page 4 58 0 4 71 Daimler Benz Aerospace Raumfahrt Infrastruktur The parameter type may be one of the open forms any pathname types any subitem pathname types any statecode types pathname pathname statecode If the parameter is of a pathname type it may require actual parameters to be given together with their actual parameter list For parameterized MDB items see 4 3 5 The pathname type specification 15 then suffixed with an empty pair of parentheses pathname typename Subitem pathnames cannot be parameterized Procedure body The procedure body contains a statement sequence bracketed by the reserved words begin and end possibly preceded by local constant type variable or alias declarations These local declarations effec tively hide any identically named objects in the enclosing main program AP as well as imported and predefined identifiers A procedure or function declaration may appear within an AP or a library but not within another procedure or function After the end keyword the name of the procedure may be repeated Also note that parameters of mode in may not be modified within a procedure body 1 6 they are not allowed as targets in an assignment statement and must not be passed as an out or in out parameter to another subprogram Formal Syntax Procedure_Declaration Procedu
52. Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Dokument Typ Standard Document Type Titel User Control Language UCL Reference Manual Title Lieferbedingungs Nr Klassifikations Nr DRL DRD No Classification No Produktgruppe Konfigurationsteil Nr Product Group Configuration Item No 1 21 1 382 Schlagw rter UCL Porduktklassifizierungs Nr Headings User Control Language Classifying Product Code AP Automated Procedure Freigabe Ordnungs Nr Release Orde No Bisherige Dok Nr previous doc no STD 1 21 6404 Bearbeitet F Kruse Org Einh RIO 64 Unternehmen Dasa RI Prepared by Orgin Unit Company Gepr ft W B lke Org Einh RIO 22 Unternehmen Dasa RI Agreed by Orgin Unit Company Genehmigt P Davies Org Einh RIO 22 Unternehmen Dasa RI Approved by Orgin Unit Company Genehmigt H J Pospieszczyk Org Einh RIO 21 Unternehmen Dasa RI Approved by Orgin Unit Company Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Datum Date 13 03 1998 4 berarbtg Rev Datum Date Seite Page von of xl Data Document Change Record E Affected Section Paragraph Page Reason for Change Brief Description of Change first issue internal review data incorporated new issue for MPS
53. ER REAL BOOLEAN etc belong to a global scope outside the compilation unit Like any other identifiers they may be redeclared within inner scopes main program or subprogram This will hide the predefined identifier for the rest of the block Rede clarations of predefined identifiers are legal but usually they obscure the program and should be avoided The scope of record field names is the record Since record field names are always written in dot notation prefixed with the name of the record variable there is never a name conflict The scope of a for loop variable is the body of the for loop see 4 10 5 4 Since for loops may be nested the loop variable of an inner loop may hide a loop variable of an outer loop and loop variables may hide identifiers declared outside the loop Libraries and other importable modules have their own scope The scope of an identifier declared in a library specification comprises both the specification up from its declaration and the body of the library Identifiers declared in a library body are visible in the body only When imported all identifiers declared in the specification of the imported module become visible throughout the compilation unit see 4 2 Note that unit identifiers such as kg A MeV etc are not ordinary identifiers They are not bound to scopes but are always global see 4 8 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34
54. F Representation in memory Internally a statecode variable is represented by two 32 bit words containing the corresponding statecode literal as an ASCII character sequence up to 8 characters in all upper case left justified and padded with blanks Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 19 von of 471 4 5 1 9 Types TIME and DURATION UCL distinguishes between absolute and relative time references Two predefined data types are pro vided TIME whose values are absolute points in time and DURATION whose values are time dis tances TIME values range from 1901 to 2099 the lowest and highest allowed values can be obtained with the standard functions MIN TIME and MAX TIME The type DURATION comprises REAL values expressed in seconds they must lie between one day indicated by the predefined constants MIN DURATION and MAX DURATION The predefined type DURATION is declared as type DURATION REAL 86400 86400 0 s The following operations may be performed on TIME DURATION objects time duration time duration time time time duration time time time duration duration real duration duration real
55. IN REAL and MAX REAL corresponding approximately to the range 3 4028 E 38 to 3 4028 E 38 Real values may be written either in decimal notation with in teger part and fractional part separated by a decimal point or in the scientific or exponential notation as defined in 4 1 2 4 3 The operators that may be used with REAL operands are and which represent addition subtrac tion multiplication and division respectively The relational operators lt gt lt gt gt are also applicable to this type they yield BOOLEAN values The predefined procedures functions MIN MAX and ABS may be used for REAL see 4 12 Representation in memory A REAL value is internally represented using one 32 bit word in IEEE standard single floating point format Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 17 von of 471 4 5 1 4 Type LONG_REAL Values of the type LONG_REAL represent approximations of the mathematical real numbers like the REAL type but with a better precision and a larger exponent range Their range is given by the prede fined constants MIN LONG_REAL and MAX LONG_REAL corresponding approximately to the range 1 7969E
56. No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 60 von of 471 function Sum_Of A array of INTEGER INTEGER variable Sum INTEGER 0 begin for I 0 to HIGH A do Sum Sum 2 1 end for return Sum end Sum_Of Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 61 0 4 71 4 12 Standard Functions and Procedures The following functions and procedures are predefined Some of them are generic in the sense that they may have several possible parameter list forms For example the procedures INC DEC may have one or two actual parameters and the first parameter may be an INTEGER or an enumerated type value ABS Function ABS x returns the absolute value of the expression or variable x x must be of type INTEGER REAL or LONG REAL The result has the type of x MAX Function MAX t denotes a constant equal to the maximum highest value of the type t where t may be one of the basic types or subtypes thereof NTEGER REAL LONG REAL TIME DURATION enumeration types MIN Function MIN t denotes a constant equal to the mini
57. ON ISSUE 5 2 5 4 5 2 7 2 5 2 12 1 4 Add procedures DOWNLOAD USER_EVENT LOAD_UCL 5 2 13 1 5 2 13 2 5 2 13 3 EXECUTE_FLAP EXECWAIT_FLAP ISSUE_SW_COMMAND Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 VW Dok Nr Doc No COL RIBRE Daimler Benz Aerospace 80000340 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page II von of Xl Data Document Change Record Revision Affected Section Paragraph Page Reason for Change Brief Description of Change 3 A 04 04 95 COL RIBRE DDR 0481 Issue 1 incorporated 5 2 1 Add following procedures to Ground System Library to reflect adequate onboard commanding capability 5 2 13 1 5 2 13 2 5 2 13 3 EXECUTE FLAP EXECWAIT_FLAP ISSUE SW COMMAND 3 A 04 04 95 5 1 COL RIBRE DDR 0482 Issue 1 incorporated 4 1 2 2 1 Underscores in Identifiers re arrange list of reserved words T1222 2 Correct examples for Path Identifier 4 1 2 7 3 Correct examples for Duration Literals 4 1 2 8 4 Restrict Time Literals add example 4 2 5 Declaration and Scope of Identifiers Remove WITH statement 4 4 6 correct examples for Types 4 4 1 8 7 Modify description of Type Statecode 4 4 1 9 8 Modify list of operations on Time Dur ation objects 4 4 1 10 9 Modify description of Type Pathname 4 4 2 1 10 Modify description of Arrays add example 4 8 2 1 11 Modify description of Arithmetical Op e
58. P_STATUS ABORT_FLAP GET_FLAP_EXEC_STATE accordingly 2 3 Ground System Library re work types 3 A 04 04 95 COL RIBRE DDR 0494 Issue 1 Revision A incorporated 4 11 1 4 11 2 D 7 1 Revise syntax of Path_Identifier and up date paragraph Automated Procedure Declaration accordingly Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 VW Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page V von of XI Data Document Change Record Revision E Affected Section Paragraph Page Reason for Change Brief Description of Change 3 B 11 04 97 COL RIBRE DDR 0606 Issue 1 4 4 1 2 Correct range of UNSIGNED INTEGER 4 10 4 Add type conversions INTEGER UNSIGNED INTEGER REAL LONG REAL COL RIBRE DDR 0668 Issue 1 Appendix G G 2 Delete G 2 Statecodes COL RIBRE DDR 0768 Issue 1 Chapter 5 Delete chapter 5 System Libraries COL RIBRE DDR 0785 Issue 1 4 4 3 4 9 3 4 10 2 Remove restrictions on type pathname COL RIBRE DDR 0786 Issue 1 A 4 4 4 4 1 2 Redefine UNSIGNED INTEGER to be a subtype of INTEGER COL RIBRE DDR 0787 Issue 1 4 9 13 Allow import of parameterized items 4 11 4 11 3 New compilation unit Formal Parameter List Definition Appendix D Extend UCL syntax accordingly COL RIBRE DDR 0788 Issue 1 A Editorial changes 4 2 Clarify the concept of paramet
59. R ee en ee 4 5 1 8 Statecode Types v eR nr an RE be REG 4 5 1 9 Types TIME and DURATION 1225 a a er aa 4 19 153 10 Type COMPLETION CODE ebene thai 4 5 1 11 Enumeration Types sese ege gant hare 655959 4 20 4 5 1 12 SUbtan ge 19868 obe ee ee gee iege mox i N 4 3 2 Structured Types bape ecko ERR 4 5 2 Array Types o eet tial ee pee ah eae ee 421 4 5 2 2 Record TYPOS use ne eie ai E ee in MT MPH v 2520 Type BITSET euere ee een 185 2 T N 4 5 3 Patbname Types 4 5 4 Subitem Pathname 19965 4 444 4464469469 64684 6 55 45 5 Compatibility of 1065 ccc 8 492 1 General Rules reticere renee ee ene ne ERG nae 4 5 5 2 Structural Compatibility 4 6 Variable Declarations cc 5 5 5 5 5 9 4 0 6 6 6546545465 5 5966646565 6 5 5969965555 4 7 Alas Declarations ce ERRARE AREA 4 8 Unitized Values and Types 5 5 5 5 5 5 5 433 4 5 1 Units of Measure cs cdnen bas ceased ak Rowe 4 8 2 UNIT declaration a Y ES 4 8 3 Unit Syntax ur sehen er rien ee Free Ww a U 4 8 4 Unit
60. a value The associated value must be a constant or a constant expression The latter is an expression consisting of literal constants and already defined constant identifiers it can thus be computed at compile time A constant declaration is introduced with the reserved word constant followed by the name of the constant A colon associates the constant with a type the becomes symbol associates it with a value For string constants the type may be given as just string the maximum length need not be specified it is then assumed from the assigned string value 2 0 25 36 Two Lower Limit Value exceeds upper limit SON 100 0 V see unitized values MAX INTEGER 0j 3 43 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 constant Identifier Constant Type Constant Expression Qualified Identifier Formal Syntax string statecode pathname 4 see 4 1 2 2 Expression see 4 9 Two REAL Lower_Limit REAL Upper_Limit REAL Warning string On 8686060006 Max Voltage Voltage High_Value INTEGER Set_Value BITSET Constant_Declaration Constant_Type Qualified Identifier Constant Expression Expression Examples constant constant constant constant constant constant constant constant Dok Nr Doc No COL RIBRE STD 0010 Ausgabe l
61. ant Limit REAL 15 0 variable AP Id AP Identifier variable AP Code INTEGER variable Status INTEGER alias Unit APM PAYLOAD EQUIPMENT_UNIT_A begin if Unit NOSHARE FLAG SON then Write_Message_To_User Unit error Status halt FAILURE elsif Unit MODE SOff then if Unit SENSOR_1 gt Limit then check sensor output Write_Message_To_User Limit exceeded Status halt FAILURE else Issue Unit POWER_OFF Status Status end if end if Delay 10 0 s if Unit SENSOR_1 lt Limit then Execute_AP Unit COMMAND MODE_ON AP_Id Status Synchronize_With_AP AP_Id AP_Code Status end if Unit Mode SOFF update the status flag Enable EVL Unit MODE Status write flag to memory end Mode Off Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 66 0 471 4 13 2 Libraries In UCL a library is an encapsulation mechanism or envelope for data structures and operations similar to a package in Ada or a module in Modula 2 There are two types of UCL libraries user libraries which have both their specification and implementation body written in UCL e system libraries which are special
62. are enumeration types Whenever an enumeration type may be used it includes these two types Formal Syntax Enumeration Identifier List Identifier List Identifier Identifier Identifier see 4 1 2 2 Examples type Color White Red Green Blue Black type State Ready Active Suspended Representation in memory Enumeration values are represented like INTEGER the 32 bit word stores the ordinal value 4 5 1 12 Subrange Types A subrange type denotes a restricted range of consecutive values from some other type called the base type The latter must be one of the following types INTEGER REAL LONG_REAL CHARACTER or enumeration type They are not separate types but subtypes of other types All characteristics and operations defined for the base type apply to the subtype as well However a value to be assigned to a variable of a subrange type must lie within the specified interval otherwise a runtime error occurs A subrange type is specified by its bounds i e the lowest and highest allowable values The lower bound must not be greater than the upper bound further they must be both specified as constants or constant expressions Both bounds must be compatible with the given base type The predefined con stant functions MIN and MAX may be used to obtain the upper and lower bound resp Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34
63. are listed below left parenthesis right parenthesis asterisk multiplication operator exponentiation operator plus addition operator comma minus subtraction operator dot double dot range symbol slash division operator percent modulus operator logical AND logical OR logical NOT colon assignment operator semicolon also used as statement terminator gt 1655 than lt less than or equal lt gt not equal 1 gt greater than or equal left bracket right bracket left brace might brace oe ot m Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 3 von of 4 71 4 1 2 2 Identifiers Identifiers are the names used in a UCL program to designate various UCL entities such as constants variables types etc An identifier begins with a letter which may be followed by any combination of letters digits and underscore characters _ Not allowed are consecutive underscore characters a b and underscore character at the end of a name abc_ UCL is not case sensitive i e does not distinguish between upper and lower case letters Thus the three identifiers SENsor_A SENSOR_A and sensor_a are equivalent Since end of line is a separator a
64. are the same name The specification part of a library represents the interface between the library on one side and the library s clients on the other side Any change to the specification will require changes to the body On the other hand the body may change without affecting the definition part and hence its clients Library specification A library specification starts with the keyword library followed by the library s name an optional import list see 4 2 and an optional declaration part see 4 3 It is terminated by the keyword end The library s name may be repeated at the end after the end keyword in which case it obviously must match the name specified in the header Only the entities declared in a library specification can be imported by other APs or libraries The decla ration part may contain any kind of declarations but system libraries cannot declare variables For pro cedures and functions only the subprogram header is given the subprogram body must be given in the library body The library name is implicitly declared as an alias for the library s pathname in the data base This alias is visible to client units Library body A library body starts with the keywords library body followed by the library s name an optional import list see 4 2 an optional declaration part see 4 3 and finally by the actual body containing Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34
65. ariable M Matrix M APM EGSE DATA MI The assignment is legal if M and the database item are structurally compatible i e if the type of the database item is structurally identical to the type Matrix Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 31 0 471 4 6 Variable Declarations A variable declaration associates a variable with a unique identifier and a data type The type determines the set of values that the variable may assume and the operators that are applicable it also defines the structure of the variable see 4 5 Type Declaration In a variable declaration either a predefined type as in example a or a named user defined type may be specified as in example b String variables may be declared directly where the maximum length is specified within the variable declaration see example c A variable declaration is introduced by the reserved word variable followed by the name of the variable an identifier A colon introduces the type Optionally the variable may be given a con stant initial value indicated with the assignment symbol If no initial value is given the value of the variable is undefined Using an uninitialized variable
66. aumfahrt Infrastruktur Seite Page H 1 von of H 1 Appendix H Implementation Constraints The following restrictions are not inherent to the language rather they are due to the Columbus specific implementation of the UCL compiler and its runtime environment Restrictions on UCL procedures also apply to UCL functions Maximum length of a line of text and hence of an identifier is 256 characters e Maximum number of local variables parameters in one procedure is restricted to 256 e Maximum number of global variables parameters in one compilation unit is 256 Maximum number of procedures in one compilation unit is 255 e Maximum size of a record variable is 65536 words or 219 e Maximum number of elements in a set is 65536 or 216 Maximum number of components in an array is 231 1 e Maximum number of characters in a string is 231 1 e Maximum number of imported user libraries in one AP is 255 Maximum number of imported system libraries in one AP is 255 e Maximum size of code in one procedure or library body initialization part is 32767 bytes Maximum size of a boolean expression containing amp or operators is 256 bytes e Maximum storage for all structured constants i e strings state codes large sets in one compila tion unit is restricted to 65536 words The Columbus UCL Compiler is part of the Columbus Ground System CGS Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per
67. ch for the most part summarise information provided elsewhere in the document Chapter 3 gives a general overview it briefly explains the underlying concept and puts UCL in per spective showing how it fits into the Columbus language scenario UIL HLCL UCL Chapter 4 deals with the basic language definition It is organised into sections each covering a specific language element This is first explained in narrative form followed by the formal syntax using a vari ant of the Backus Naur Form and finally illustrated by one or more examples The appendices A through H have the following contents Appendix A and B explain the acronyms and terms used Appendix C is empty Appendix D summarizes the syntax of UCL e Appendix E shows the ASCH character set Appendix F shows correspondences between MDB item types and UCL types Appendix G shows the ISO 1000 engineering units e Appendix H summarizes issues of implementation At the end of the document there is an alphabetical index Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 2 1 von of 2 1 2 Applicable and Reference Documents 2 1 Applicable Documents none 2 2 Reference Documents 2 2 1 High Level Command Language HLCL Reference Manual COL RIBRE STD 0
68. claration Constant Declaration Type Declaration Alias Declaration Identifier Formal Parameters Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page D 2 von of D 7 Declarations Import import Name Definition Unit Declaration Constant Declaration Type Declaration Variable Declaration Alias Declaration Procedure Heading Function Heading Declaration Unit Declaration Constant Declaration Type Declaration Variable Declaration Alias Declaration Procedure Declaration Function Declaration Unit Declaration unit Unit Identifier Unit Constant Declaration constant Identifier Constant Type Constant Expression Constant Type Qualified Identifier string statecode pathname Type Declaration type Identifier Type Unit Variable Declaration variable Identifier Variable Type Constant Expression Variable Type Qualified Identifier Unit String Type statecode pathname n DI Alias Declaration alias Identifier Name Identifier Procedure Heading procedure Identifier Formal Parameters Procedure Declaration Proced
69. d outside the scope of that record definition A record type may have several variants based on the values of a specific field the tag field These variants may differ in the number and type of components and thus allow for alternate forms of the same record They are enclosed by the keywords case and end case Each keyword when introduces a variant that is to be part of the record for the list of tag field values given after the keyword Note that changing the value of the tag field e g by an assignment may select a different variant and thus change the structure of the record variable Access to fields outside the currently selected variant 1 6 to undefined components may have unpredictable effects This is not checked and may be used for low level programming purposes to circumvent UCL s type checking mechanisms exploiting the fact that all variants occupy the same location in memory and thus overlay each other This is not normal programming practise and should be avoided If necessary for special and exceptional cases great care must be taken For an example see chapter Libraries 4 13 2 example 2 No operations are defined on record objects They can only be assigned and passed as parameters to subprograms Formal Syntax Record_Type record Fields end record Fields dentifier List Qualified Identifier case Identifier Qualified Identifier Variant Part end case when Case Label Li
70. e 41 2 5 Character Literals 4c tere ee a er eR 4 1 26 String literals srei ELE ERREEPRCHKRLE MEER EE a a MEE 4 1 2 7 Statecod Literals u DER de Leake baked e S 4 1 2 8 Time Literals 4 1 2 9 Duration Literals i kat eie ras y hus 4 1210 Unit Literals IHE apte Leen KREE E Rt 42 199011 4 cece 4 4 4 56 6 4 66 66 9 66 66 6 6 8 nennen une 4 3 Declarations Names and Scopes 55 0 0 93 9999996 55 59 CENE E ETE TETTE CE CE CE CE OO 4 3 2 Scope of Identifiers ee en ese hr rh raa 4 3 3 Qualified Identifiers 0 4 10 4 3 4 Lifetime of Objects ccc cece cece 555 595 545965 en nennen nenn 4 11 4 3 5 MDB Objects Pathnames 8 4 11 2 3 0 Node Names ana ee 4 13 44 Constant Declarations 0 En a 4 14 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp be i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page von of XI x 4 5 Type DeelaraGons u nr aa 4 5 1 Elementary Types u u a a a a 2531 Type INTEGER se ii aasang aaa 4 5 1 2 Type UNSIGNED INTEGER u au ea ar 2513 Type BEA ne Ku POETE patti ee ASIA Type LONG REAL 4 4 17 49 13 Type BOOLEAN wi anne asien 4 5 1 6 Type CHARACTER Li ash cake nner rnrn rrer An nee 451 7 T1908 VO
71. e Day Month Year Day Digit Digit Month Digit Digit Year Digit Digit Digit Digit Time Hours Minutes Seconds Fraction Hours Digit Digit Minutes Digit Digit Seconds Digit Digit Fraction Digits Digits 66 1 Digit see 4 1 2 4 1 Examples 30 05 1992 12 34 17 48 date and time 13 30 time only date is ignored 24 12 1991 date only at 00 00 h undefined time Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 7 von of 4 71 4 1 2 9 Duration Literals A duration literal is written as a real number with a time unit e g seconds minutes or hours Unit lit erals are described in 4 1 2 10 the unit concept is described in 4 8 Examples each representing a duration of one hour 3600 0 s in seconds 60 0 min in minutes Teo PI in hours 4 1 2 10 Unit Literals A unit literal denotes a physical measurement unit It is enclosed in square brackets The unit expression follows the ISO 1000 conventions see section 4 8 and reference document 2 2 5 Exponentiation is denoted by placing the exponent directly behind a unit identifier with no blanks between them 6 m2 stands for m Note that in contrast to ordinary identifiers unit identifiers used in unit
72. e P X pathname Y Input variable P pathname variable I Input begin P X OK P may be assigned any type of subitem pathnames Y I X Error X is not constrained at all but I is I Y OK Same constraints on both sides Q X Error Formal parameter is constrained but X is not Q Y OK Formal and actual parameter have same constraints end P Representation in memory Subitem pathname values are represented as two 32 bit words the first contains the short identifier SID of the database item the second the subitem identifier both as unsigned integers 4 5 5 Compatibility of Types 4 5 5 1 General Rules Whenever a value is assigned to a variable passed as a parameter to a subprogram or used as an operand in an operation it is required that it be compatible to the target object or to other operands in the oper ation Usually two objects are compatible if they are of the same type they are incompatible if they are of different types Two types declared in different type declarations are considered different and incompatible types even if the declarations are identical except in the following cases The type is declared to be identical to another type In this case both type identifiers denote the same type The type is declared to constrain some other type In this case the type is a subtype of the other type All subtypes of the same base type are compatible to the base typ
73. e and to each other For some closely related types a value of one type is implicitly converted to the other type if needed REAL and LONG REAL types are always compatible CHARACTER values are compatible to string values in certain contexts see 4 5 2 5 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 30 von of 471 Values of certain types may be explicitly converted to certain other types without violating the strict UCL typing rules see 4 9 4 For formal array and string parameters of subprograms there are open forms that allow for less re strictive compatibility rules see 4 10 2 and 4 9 3 For unitized types in addition to type compatibility compatibility and commensurability of the in volved measurement units must be observed see 4 8 Examples type Arr 1 array 1 10 of Real different types type Arr_2 array 1 10 of Real although textually identical type Number INTEGER identical types type Arr_3 Arr_l type Short INTEGER 0 2 16 1 subtypes type Switch statecode SOFF ON type Node pathname EGSE_NODE type Input pathname FB IO x variable A1 Arr 1 Al and A2 are incompatible variab
74. e or passed to a subprogram that requires a non parameterized item as parameter Examples procedure Acquire Item Measurement non parameterized item procedure Execute AP AP_Item parameterized item Note that all checks concerning constraints and parameterisation of pathname types are performed at compilation time not at runtime Whenever a pathname value is assigned to a variable or passed as a parameter it is checked that the type of the source value has at least the constraints of the target object Example type Measurement pathname EGSE_INTEGER_MEASUREMENT EGSE FLOAT MEASUREMENT procedure P X pathname Y Monitor Item Z AP Item variable P pathname variable M Measurement variable A AP Item Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 28 von of 4 71 begin P X OK P may be assigned any type of pathnames Yo P 2 even parameterized pathnames Y Error M is more constrained than Y X Error X is not constrained at all but M is Z OK Non parameterized access to parameterized item Execute Z OK Z is parameterized and thus
75. e unit Kabs 273 15 it defines the offset of the two zero points Parentheses may be used to clarify the order of evaluation but no nested parentheses are supported to keep a unit expression as clear as possible Also only one division both for the unit and the offset is allowed in a unit expression thus avoiding ambiguous expressions Examples unit N kg m s2 Newton unit Pa N m2 Pascal unit km 1000 m kilometer unit degC Kabs 273 15 degrees Celsius unit degF 10 degC 18 320 18 degrees Fahrenheit Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 35 von of 471 4 8 4 Unitized Value Types Variables and Constants In type variable and constant declarations a unit clause is used to indicate a unitized value type or unitized type for short The associated type is given first then a unit expression Examples type Furnace_Temperature REAL Kabs type Coolant_Temperature REAL degC type Power REAL m2 kg s3 variable Temperature Furnace_Temperature 0 0 K variable Velocity REAL m s Only REAL and LONG REAL types may be unitized i e associated with a unit of measure via a unit expression A unitized type may be part of a st
76. eft to right except for sequences of exponentiation operators which are evaluated from right to left The order of evaluation may be altered by using parentheses The precedence of operators is highest 1 Boolean negation unary exponentiation 2 he gf multiplying operators 3 adding operators 4 lt gt lt lt gt gt in relational operators lowes 5 amp Boolean operators Examples I J K INTEGER expression A B same as A b 1 1 1 same as I 1 J 1 5 same as A N 5 A N M same as A N M associates right to left A N M same as A N M associates left to right 4 9 2 1 Arithmetical Operators Symbol Operation addition subtraction multiplication division exponentiation modulus oe All operators apply to variables of the type INTEGER and its subranges The operators and apply to REAL and LONG REAL variables The operators and apply to TIME and DURATION variables as well For exponentiation however the right operand called the exponent must be of the type INTEGER and the result type is the type of the left operand Further the operators and may be used as unary operators to denote the sign of a number Integer division and modulus are defined by the relation A A B B A B where A 96 B has the sign of A and an absolute value less
77. ence of bits The i th bit of a bitset B for example is 1 if i is 8 member of B 0 otherwise Any one word object may be converted to BITSET see 4 9 4 Bitset literals are written in braces like set literals see 4 5 2 3 but the preceding type name may be omitted Examples variable Flags BITSET variable I INTEGER Flags 3 5 12 I INTEGER Flags Representation in memory A bitset is represented like a set see 4 5 2 3 in one 32 bit word Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 26 von of 471 4 5 2 5 String Types String types are used to store character sequences of variable lengths A string type is declared with the keyword string followed by the maximum length of the string in parentheses The actual length of a variable of a string type may vary between 0 and the declared maximum length The actual length may be obtained with the predefined function LENGTH In a string each 32 bit word stores four con secutive characters One may access individual string elements i e characters like in array indexing if S is a string variable S i denotes the i th character in the string The first character has index 1 etc Strings of different l
78. engths may be assigned and compared If a string with an actual length longer than the maximum length of the target string is to be assigned a run time error occurs i e there is no impli cit truncation A run time error also occurs if one tries to assign or retrieve a character outside the actual length of the string Supported operations on string variables are comparison and the concatenation of two strings with the operator The comparison operators lt lt gt gt compare strings in lexicographic order based on the ASCII values of the characters e g aux gt attention A character is treated as a string of length 1 if it is concatenated with a string or another character as signed to a string variable or constant or passed as a string parameter e g xyz a xyza b map Formal syntax string Constant Expression String Type Constant Expression see 4 9 Examples variable 5 string 255 String with max of 255 characters variable 580 string 80 String with max of 80 characters S Hello world S80 5 7 5 1 X replace first character in 5 580 Hello 7 S string concatenation Representation in memory A string is represented as one 32 bit word holding the actual length of the string as an unsigned in teger followed by zero or more words holding a byte array with 4 bytes characters each packed in one word The number of byte
79. erized items 4 9 0 Example syntactically corrected Appendix D Different syntax corrections COL RIBRE DDR 0843 Issue 1 4 7 Allow target system to predefine additional engineering units COL RIBRE DDR 0877 Issue 1 A Appendix C Delete appendix C Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 VW Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page VI von of XI Data Document Change Record Revision E Affected Section Paragraph Page Reason for Change Brief Description of Change 4 13 03 98 1 253 COL RIBRE CCN 1031 1 DR C 261 Reference to system library definitions 13 03 98 4 5 4 New section on subitem pathname types 13 03 98 Editorial revision of document whole document Layout of the different text patterns made uniform paragraphs headers syntax de scriptions examples etc whole document Formal syntax descriptions in the various chapters revised Errors corrected irrel evant syntax productions deleted missing productions added whole document Examples revised corrected if necessary more or better examples given where ap propriate whole document Wording polished where appropriate whole document UCL code in examples adapted to a unified coding scheme and oriented towards the Columbus coding standards for UCL whole document Corrected and ins
80. erted many cross refer ences between sections and single language features 1 2 Stated that the UCL RM may also be used as a reference manual not just as to estab lish formal requirements on the syntax and semantics of UCL 1 3 List of appendices corrected 2 2 List of reference documents updated ob solete references deleted useful references added 3 1 References to obsolete documents deleted References to obsolete Columbus software components deleted 3 2 List of language features corrected and en hanced 3 4 This section was added 4 1 2 10 This section was added Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 VW Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page VII von of XI Data Document Change Record Revision Ea Affected Section Paragraph Page Reason for Change Brief Description of Change 4 2 This section was inserted to replace the former section 4 9 13 Import Statement This was done because import is not a state ment but a special language construct like e g declarations 4 3 Section completely rewritten and enhanced to make the UCL name and scoping concept more explicit 4 5 Type category subitem pathname type added Incomplete definition of type compatibility deleted detailed definition 18 section 4 5 5 In all subsec
81. esult of this type conversion is the BITSET variable whose internal representation corresponds to the 32 integer value integer value Examples BITSET 7 returns the BITSET constant 0 1 2 Unitized Type to REAL Conversion REAL unitized value The result of type conversion is the raw unitless real value of unitized value Examples REAL 3 6 km h returns 3 6 REAL to Unitized Type Conversion unitized type real value The result of type conversion is the unitless 2681 value expressed in units of unitized type Examples type Velocity REAL m s variable V Velocity V Velocity 3 6 returns 3 6 m s Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 45 von of 471 Unitized Type to Unitized Type Conversion unitized_type unitized_value The type of unitized value must be commensurable with unitized_type The result of this type conversion is the value of unitized value expressed in units of unitized_type Example unit mph 1609 m h miles per hour type Mph REAL mph variable Speed REAL m s variable X REAL X REAL Mph Speed Speed is converted to Mph then to REAL REAL LONG REAL Conversion REAL long_real_value
82. express ions kg m A MeV etc are case sensitive Formal syntax Unit l Unit Expression Unit Expression Numerator Denominator Offset Offset Offset Number Number Numerator Unit_Term C Unit Term Denominator Number Unit_Factor Unit Term Unit_Term Number Unit_Factor Unit_Factor Number Unit_Factor Unit Identifier Digit Unit Identifier Letter Letter Number Simple Integer Based Integer Real Simple Integer see 4 1 2 4 1 Based Integer see 4 1 2 4 2 Real see 4 1 2 4 3 Examples kg kg m s A s N m s2 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 8 von of 4 71 4 2 Import Import is used to make objects declared in other compilation units e g libraries available to the current compilation unit Importable modules are libraries and parameterized MDB items The module is given by its pathname see section 4 3 5 When imported all identifiers declared in the specification of the imported module units constants types variables aliases procedures and functions become visible throughout the compilation unit An imported identifier will be hidden if the same identifier is impor
83. f the MDB item is used READ WRITE vct HLcL indicates that the item has a runtime value that may be read and altered by a UCL program Items of this class may be regarded as global software variables The corresponding pathnames may be used in expressions assignments on either side of the assignment symbol or in parameter lists as in in out or out parameters IMPORT 846 applies to UCL libraries that may be imported by other compilation units EXECUTE 864 applies to MDB items of type automated procedure which may be invoked by other APs PATH SELECT applies to parent virtual MDB items i e those at non terminal nodes of the MDB name tree Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 13 von of 471 NODE SELECT tcr applies to MDB items of type network node The corresponding pathnames designate a specific computer in the network SEND applies to items that represent commands stimuli telecommands that may be sent to specific target systems none applies to all other MDB items Examples APM DMS ITEM_A 3 5 set current runtime value of the global software variable named APM DMS ITEM_A to 3 5 valid only if the MDB item s access class is READ WRITE and its soft
84. ghts reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page D 1 von of D 7 Appendix D UCL Syntax The following syntax definition uses the variant of BNF described in section 3 3 Within the syntax productions between any terminal symbols blanks tabs or line and page breaks may be arbitrarily inserted Within terminal symbols no blanks tabs line or page breaks are allowed A comment starts with two hyphens and extends to the end of a line In identifiers and reserved words as well as for the letter e E in real literals lower and upper case letters are not distinghuished These letters are shown here in lower case only they are to be undestood as representing both the lower case and upper case variant Compilation Units Compilation Unit Main Procedure Library Specification Library Body Formal Parameter List Definition Main Procedure procedure Identifier Formal Parameters Import Declaration begin Statement Sequence end Identifier Library Specification 2 library Identifier Import Definition end Identifier Library Body library body Identifier Import Declaration begin Statement Sequence end Identifier Formal Parameter List Definition Import Unit De
85. gth V m V m MV mkV m mV m uV m permittivity F m F m uF m nF m pF m electric polarization C m C m2 kC m2 mC m2 uC m2 electric dipole moment Cm Cm Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page G 5 von of G 6 Quantity SI unit Sym Supported multiples of this unit Definition current density A m Alm2 A mm2 linear current density A m A m A mm magnetic vector potential Wb m Wb m permeability H m H m uH m nH m electromagnetic moment A m2 A m2 magnetization A m A m A mm magnetic dipole moment Wb m Wb m resistivity Qm Ohm m GOhm m MOhmm KOhmm mOhm m conductivity S m S m MS m kS m reluctance 1 H radiant intensity W sr Wisr radiance W sr m2 W sr m2 irradiance W m W m2 quantity of light lm s Im s luminance cd m cd m2 luminous exitance Im m Im m2 light exposure Ix s Ix s luminous efficacy Im W Im W mechanical impedance N s m N s m molar mass kg mol kg mol g mol molar volume m mol m3 mol l mol molar internal energy J mol KJ mol molar heat capacity J mol K J mol K concentration of substance B mol m mol m3 molality of solute substance B mol kg mol kg Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No
86. he database name tree In this case the alias may be used as a prefix in other pathnames alias System EGSE VICOS SYSTEM alias Lib System GROUND_LIBRARY asubitem pathname alias Input 1 APM SIMULATION PAYLOAD EQUIPMENT_UNIT_A INPUT_1 aqualified name an identifier prefixed with the pathname of an imported module e g a library import EGSE VICOS SYSTEM GROUND_LIBRARY alias Issue EGSE VICOS SYSTEM GROUND_LIBRARY Issue Note that for any compilation unit the name identifier of the unit is implicitly declared as an alias for the pathname of the unit see 4 13 1 4 13 2 and 4 13 3 When importing a library or some other mod ule the name alias of the module is imported together with the other identifiers from the module and may then be used instead of the long pathname import EGSE VICOS SYSTEM GROUND_LIBRARY alias Issue Ground Library Issue Formal Syntax Alias Declaration alias Identifier Name Identifier Name see 4 3 3 Identifier see 4 1 2 2 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 4 Datum Date 13 03 1998 Datum Date 4 33 von of 4 71 Ausgabe lssue berarbtg Rev Seite Page Daimler Benz Aerospace Raumfahrt Infrastruktur 4 8 Unitized Values and Types The types and values introduced in the previous sections
87. high etc Statecodes are defined in the Mission Database as attributes of the respective discrete items In UCL statecode constants are denoted by identifiers prefixed with a dollar sign such as SACTIVE SOFF see 4 1 2 7 Statecode types represent unordered sets of values 1 6 there is no defined less greater relationship be tween the statecode literals and the relational operators cannot be used The only allowed operation on statecode values is comparison on equality and inequality lt gt Statecode types may be unconstrained or constrained An unconstrained statecode type is denoted by the keyword statecode it comprises all poss ible statecode literals A constrained statecode type is restricted to a specific set of statecode literals This is denoted by the keyword 858660066 followed by the list of allowed literals in parentheses All declared statecode types are subtypes of the general predefined type statecode Formal Syntax statecode Statecode List Statecode Statecode Statecode Type Statecode List Statecode Identifier Identifier see 4 1 2 2 Examples type Code statecode unconstrained type type Switch statecode SON SOFF constrained type variable 51 statecode unconstrained variable variable S2 Code unconstrained variable variable S3 Switch constrained 51 52 53 2 not allowed constraint violation 52 SON S3 SOF
88. hile a progression of values is assigned to a control variable the loop index It takes two alternative forms 1 Iterative for statement for loop_index start_value to limit by increment do statement sequenc end for The iterative for statement is used to loop over a range of values whose start_value and limit are explicitly specified The iterative for statement cannot be used for statecode types since statecode types are not ordered The type of limit must be compatible with the type of start_value and the increment must be an INTEGER constant or constant expression 2 Collective for statement for loop_index in type_name by increment do statement_sequenc end for The collective for statement is used to loop over all values of a discrete type including constrained statecode types For non statecode types the start value and limit are implicitly determined by the min and max value of the type Since statecode types are unordered the order in which the values are processed is undefined and the by clause cannot be used The increment must be an INTEGER constant or constant expression Note that start_value limit and increment are evaluated only once and in that order before the loop body Further the value of the loop index cannot be altered by the statements inside the for loop The for statement causes the statement sequence enclosed in the for end for bracket to be repeatedly executed until the val
89. hile and for loops ransfer of Controls halt return exit Declarations constant variable type unit and alias declarations Declaration of variables is mandatory Objects must be declared before they are referenced Certain keywords are reserved and cannot be used as identifiers The semicolon is a statement terminator not a separator Datatypes Predefined Integers real numbers with single and double precision Booleans enumerated types state codes times durations sets strings arrays records and pathnames user defined Arrays and strings may be of arbitrary dimension with arbitrary bounds array bounds are con stants i e no dynamic arrays except in parameter list of procedures and functions Strings may vary in length up to a fixed user declared upper limit Implementation restrictions Several restrictions are indirectly imposed on the language through the I code and symbol table definition These restrictions are summarized in Appendix H Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 3 5 von of 3 5 3 3 Syntax Notation Throughout this manual the syntax of UCL is described in an Extended Backus Naur Form The s
90. hname Type Subitem Pathname Type pathname Identifier List array Index Range Index Range of Qualified Identifier Constant Expression Constant Expression Qualified Identifier set of Simple Type record Fields end record Identifier List Qualified Identifier case Identifier Qualified Identifier Variant Part end case when Case Label List 1 Fields else Fields Case_Labels Case_Labels Statecode_List Constant_Expression Constant_Expression Identifier 1 Identifier Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Array_Type Index_Range Set_Type Record_Type Fields Variant_Part Case Label List Case Labels Identifier List Dok Nr Doc No COL RIBRE 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Seite Page 4 von of D 7 Statements Assignment While_Statement Halt_Statement Procedure Call Repeat Statement Exit Statement If Statement Case Statement Loop Statement For Statement Return Statement Designator Expression Qualified Identifier Actual Parameters C Parameter 1 Parameter Identifier Expression i Expression then Statement Sequence elsif Expression then
91. ht per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 20 von of 4 71 4 5 1 10 Type COMPLETION_CODE The predefined type COMPLETION_CODE is an enumeration type defined as type COMPLETION CODE SUCCESS FAILURE All characteristics and operations defined for enumeration types see 4 5 1 11 apply to COMPLE TION CODE as well Representation in memory COMPLETION CODE values are represented like other enumeration types with SUCCESS 0 and FAILURE 1 4 5 1 11 Enumeration Types An enumeration consists of an ordered sequence of identifiers These identifiers are constants defining the list of values that may be assumed by a variable of that type Enumerated types are ordered by the sequence of values in the enumeration in the example below Red is smaller or less than Green In an enumeration with n elements the first element has the ordinal number 0 and the last element the ordinal number n 1 All comparison operators can therefore be used on enumeration values according to this ordering Type conversions see 4 9 4 can be used to convert between an enumeration value and its ordinal number The predefined procedures functions MIN MAX INC and DEC may be used for enumeration types see 4 12 Note that BOOLEAN and COMPLETION CODE
92. in order to specify a parameter mode If no mode is specified then in is implicitly assumed Formal parameters are local to the procedure i e their scope is the program text which constitutes the procedure declaration They can also be used within the actual parameter list to associate a value with a specific parameter see 4 10 2 In this context they do not conflict with identifiers declared outside the subprogram The type of a formal parameter may be an open type Ifthe parameter is a string the type may be specified as just string where the specification of the maximum length is omitted The parameter is then said to be an open or unbound string parameter and actual parameters of any string types are accepted Their maximum length can be obtained through the standard function HIGH Ifthe parameter is an array the type may be specified as just array of type identifier where the specification of the actual index bounds is omitted e g array 05 INTEGER The parameter is then said to be an open or unbound array parameter and array parameters of any size but with the given element type are accepted Within the subprogram the actual index range and its type is always mapped to a corresponding INTEGER range with a lower bound of 0 its upper bound can be obtained through the standard function HIGH Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RI
93. ing access classes and software types are defined in the database documentation for the respective target system MDB object type UCL object type SW variable READ WRITE INTEGER REAL BOOLEAN Due lt emm D eem mme De none means MDB objects of this type can be accessed only via System Library procedures functions Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page G 1 von of G 6 Appendix G Engineering Units This section is based on the International Standard ISO 1000 SI units and recommendations for the use of their multiples and of certain other units G 1 Base Units The international system of units Systeme International d Unit s SI defines seven base units For a definition of the SI base units see the ISO 1000 standard annex B Quantity Unit SI symbol UCL symbol 1 length meter m m 2 mass kilogram kg kg 3 time second S S 4 electric current ampere A 5 temperature kelvin K Kabs temperature difference kelvin K K 6 amount of substance mole mol mol 7 luminosity candela cd cd Note that UCL makes the distinction between absolute temperature Kabs and temperature difference K The distinc tion is
94. ion Expression Relation amp Relation Relation 1 Relation Aggregate Aggregate Expression List Relation Simple Expression Simple Expression Simple Expression Simple Expression lt Simple Expression gt Simple_Expression gt Simple Expression in Simple_Expression Simple_Expression 4 Term Term Term Term Factor 1 Factor 7 Factor 96 Factor Factor Primary Factor Primary Number Unit String Character Set Constant Date Time Time Statecode Designator Function Call Type Conversion Expression Primary Set Constant Qualified Identifier Element Element Element Constant Expression Constant Expression Function Call Qualified Identifier Actual Parameters Type Conversion Qualified Identifier Expression Qualified Identifier Name Identifier Designator Name 1 Identifier Expression List Expression List Expression Expression Name Identifier Path Identifier Pathname Pathname Path Identifier Path Identifier Subitem Pathname Name Identifier Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE 990641 4 Datum Da
95. is an error that is not automatically detected Formal Syntax Variable Declaration variable Identifier Variable Type Constant Expression Variable_Type Qualified_Identifier Unit String_Type statecode pathname Identifier see 4 1 2 2 Constant_Expression see 4 9 Qualified Identifier see 4 3 3 Unit see 4 8 and 4 1 2 10 String_Type see 4 5 2 5 Examples a variable declaration with predefined types variable Index INTEGER variable State statecode variable declaration with user defined types type Primary_Color Red Green Blue variable Color Primary_Color c string variable declaration variable s string 80 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 32 von of 471 4 7 Alias Declarations An alias declaration associates a simple name an identifier with a complex name that includes a path name and thus provides a shorthand for the long name The alias name may then be used instead of the corresponding long name The long name may be one of the following apathname alias Lib EGSE VICOS SYSTEM GROUND_LIBRARY The pathname may be incomplete i e denote a virtual node in t
96. it the fact that objects of type pathname are repre sented in memory as their SID see 4 5 3 Library specification library Pathname_Conversion function To_SID Path pathname UNSIGNED_INTEGER function To Pathname SID UNSIGNED INTEGER pathname end Pathname Conversion Library body library body Pathname Conversion type Overlay record case B BOOLEAN when FALSE Path pathname when True SoSID UNSIGNED INTEGER end case end record function To SID Path pathname UNSIGNED INTEGER variable Union Overlay begin Union Path Path return Union SID end To SID function To Pathname SID UNSIGNED INTEGER pathname variable Union Overlay begin Union SID SID return Union Path end To_Pathname end Pathname_Conversion Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 70 0 471 Example 3 The following library does not need a body It contains no executable parts but only passive declar ations It might be implemented both as a user library or as a system library Library specification This library defines a set of useful non SI engineering units library Non_SI_Units
97. ited and compiled off line This process is depicted in Figure 3 During the com pilation process the UCL code is transformed into a binary intermediate code which is later executed interpreted in the target environment e g DMS EGSE by a dedicated program interpreter Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 3 2 von of 5 5 switch_positiop x output voltage Example of end item name APM SubSystems TCS Equip_Alswitch_posi tion for illustration purposes onl Figure 1 Hierarchical Name Tree example Subsystems Equipment Acquisition Monitoring amp runtime data Control SW tables SIDs Attributes Runtime UCL I code Interpreter predefined Configuration data Figure 2 UCL runtime environment Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 3 3 von of 3 5 to 008 data extraction services to EGSE source Configuration DB UCL source I code code Figure 3 Off line preparation of an AP 3 2 Language Summary Compilation Units Aut
98. ith at most 216 values i e a set may contain as many elements as can be expressed using an unsigned 16 bit integer A set type declaration is denoted by the keywords set of followed by the appropriate type identifier A set constant is represented by a list of its members enclosed in braces curly brackets and preceded by the respective type identifier base type e g CharSet a b c j Ifthetype identifier is omitted the predefined type BITSET is assumed e g 3 5 15 isa literal of type BITSET If the members of a set are consecutive values they may be expressed as a range e g 5 6 7 8 9 may be written 5 9 A set may have no members at all in which case it is called the empty set and is written The operations applicable to set variables are Operation Operator set union set difference set intersection symmetric set difference set inclusion lt set comparison lt gt membership tests in The union of two sets is a set containing the members of both sets The difference of two sets is a set containing all the members of the first set that are not members of the second set Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 25 von of 4 71 The inte
99. ition subtrac tion multiplication division exponentiation and modulus respectively These operators are infix op erators which means that they are written between their operands The and operators may also be used as unary operators to denote the sign of a value The relational operators lt lt gt lt gt gt are also applicable to this type and yield BOOLEAN values The predefined procedures functions MIN MAX ABS ODD INC and DEC may be used for INTEGER see 4 12 The operator denotes integer division which always yields an integer result possibly leaving a re mainder No rounding is performed e g 9 4 2 9 5 1 The result of an integer division is zero whenever the divisor is greater than the dividend Representation in memory An Integer value is internally represented as one 32 bit word in 2 s complement representation 4 5 1 2 Type UNSIGNED_INTEGER For convenience a type UNSIGNED_INTEGER is predefined as a subrange type of type INTEGER It is constrained to non negative integers type UNSIGNED INTEGER INTEGER 0 MAX INTEGER For a definition of subrange types see 4 5 1 12 Representation in memory UNSIGNED_INTEGER values are represented like INTEGER values 4 5 1 3 Type REAL Values of the type REAL represent approximations of the mathematical real numbers Their range is given by the predefined constants M
100. ized Value Types Variables and Constants 4 8 5 Unitized Literals amp 025 16 5 ccc cease ann 4 8 6 Expressions with unitized values gt 8 4 9 Expressions 41 2342 x be 49 1 Operands end 4 9 2 OBGFOUDES EAE ra a 4 9 2 1 Arithmetical Operators 4 9 2 2 Concatenation Operator 2 2 4 9 2 3 Logical or Boolean Operators 4 9 2 4 Relational or Comparison Operators 4 9 2 5 S t Operators cos ede nenn 4 9 3 Function Calls 0 000 000 8 rrr nire en 494 Type Conversions ise xk e ERU HER ERA Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp be i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page von of XI XI 4 10 Statement ss reger 4 10 1 Assignment ss een A102 Procedure Call siqua au 4 10 3 if Statement GU ehren 4 10 4 case Statement
101. le A2 Arr 2 variable A3 Arr 1 A3 and 24 are compatible variable A4 Arr 3 Expressions are always evaluated in terms of the base type of the operands see 4 9 constraints are therefore not relevant But when a value is assigned to a variable or passed as a parameter to a subpro gram it is checked that the value does not violate the constraints of the target variable see 4 10 1 or formal parameter see 4 10 2 and 4 9 3 The check whether a value violates a constraint is normally performed at runtime If the value is a con stant und hence known at compile time the check will be done by the compiler Pathname and subitem pathname constraints are always checked at compile time see 4 5 3 and 4 5 4 in order to avoid data base queries at runtime which would otherwise be necessary to complete the check 4 5 5 2 Structural Compatibility When accessing structured runtime values of database items the strict compatibility rules described above cannot be applied e g a local array value would always be incompatible to the array value of a database item since their types can never stem from the same type declaration For this case a less restrictive compatibility concept called structural compatibility is applied Two types are structurally compatible if they have identical structure e g for array types the index types index range and element types must be identical Example type Matrix array 1 3 1 3 of REAL v
102. lse branch that collects all label values not explicitly specified in previous branches If there is an else branch it must be the last branch in the case statement The case labels must be constants or constant expressions and they must be unique within a particular case statement i e no label may occur more than once When the same action is required for several different values of the case selector these values may be written in a list separated by commas Ranges of contiguous values may be written in range notation lower upper Statecode labels cannot form ranges because statecode types are unordered The type of all case labels must be compatible with the type of the case selector When the case statement is executed the selector is first evaluated If there is a case label with the same value as the case selector the corresponding statement sequence is executed Otherwise the state ment sequence specified in the else clause if present is executed The else clause is optional if omitted however the specified case labels must cover the entire value range of the case selector type Formal Syntax Case_Statement case Expression Case Case else Statement Sequence end case Men Case when Case Label List Statement Sequence Case Label List Case Labels Case Labels Statecode List Case Labels Constant Expression Constant Expression Statecode List Statecode 1 Statecode Sta
103. ms and subitems are passed by copy the input value in in out is copied into the procedure the output value in out out is copied back to the location of the runtime value of the item If a formal parameter type denotes an array structure its corresponding actual parameter must be an array of identical type i e same bounds same component types unless the array is defined as an un bound array or unbound string in which case only the component types must match also see unbound array and unbound string in subprogram declarations 4 11 A procedure call is inherently synchronous 1 6 control is returned to the caller only after execution of the called procedure is completed Note A procedure or function may invoke itself recursive call Indirect recursion which occurs for example when a procedure A calls a procedure B which in turn calls A is also allowed The order of evaluation of actual parameters is not defined and a program must not depend on the evaluation order Formal Syntax Procedure Call Qualified Identifier Actual Parameters Actual Parameters Parameter Parameter Parameter Identifier Expression Qualified Identifier see 4 3 3 Identifier see 4 1 2 2 Expression see 4 9 Examples Assuming the following procedure declarations procedure Calculate_New_Limit Threshold REAL Ref_Factor REAL out New_Limit REAL procedure Get_Total First RE
104. mum lowest value of the type t where t may be one of the basic types NTEGER REAL LONG REAL TIME DURATION enumeration types HIGH Function HIGH 3 returns the uppermost index of the unbound array or unbound string a The return value is of type INTEGER LENGTH Function LENGTH a returns the current actual length of string a For an empty string LENGTH returns 0 The return value is of type INTEGER ODD Function ODD x returns the Boolean value TRUE if xis odd i e x 2 lt gt 0 6156 FALSE x must be of type INTEGER INC Procedure This procedure increments a variable The parameter can be of any discrete type except statecode types INC x This procedure increments the variable x by 1 If x is an enumeration type or CHARACTER value it is replaced by its successor INC x n This procedure increments the variable x by n Regardless of the type of x n must be an expression of type INTEGER If x is an enumeration type or CHARACTER value it is replaced by its n th successor Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 62 0 4 71 DEC Procedure This procedure decrements a variable The parameter can be of any discre
105. n Unit Constant expressions An expression may be required to be constant Constant expressions are expressions whose operands are all constants or constant expressions such that its value can be determined at compilation time Expression Constant_Expression 4 9 1 Operands The various components of an expression are called operands Valid operands are literal constants see 4 1 declared or imported constants see 4 4 and 4 2 declared or imported variables see 4 6 and 4 2 array components see 4 5 2 1 array aggregates see 4 5 2 1 record components see 4 5 2 2 MDB items and subitems see 4 3 5 function calls see 4 9 3 type conversions see 4 9 4 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 expressions Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 39 von of 471 4 9 2 Operators There exists a precedence hierarchy among operators It determines the order of evaluation of operands in an expression The not operator and the exponentiation operator have the highest precedence fol lowed by the so called multiplying operators the so called adding operators and the relational oper ators Boolean operators have the lowest precedence Sequences of operators of the same precedence are evaluated from l
106. n identifier must fit on one line The maximum length of an identifier is thus restricted to 256 characters All characters in an identifier are significant Formal syntax Identifier Letter _ Letter_Or_Digit Letter_Or_Digit Letter Digit Examples Valve_nr_5 Sensor_12 An_example_of_a_very_long_identifier Reserved words Some identifiers are reserved words having a special meaning in the language They cannot be used to denote user defined entities e g variables constants The following identifiers are reserved words in UCL alias array begin body by case constant do else elsif end exit for function halt if import in library loop of out pathname procedure record repeat return set statecode string then to type until variable when while 4 1 2 3 Path Identifiers and Pathnames A Database object is denoted in UCL by its pathname see also 4 5 3 Pathname Types Syntactically a pathname consists of a sequence of path identifiers corresponding each to a level or node in the hier archical nametree A path identifier consists of either one backslash the root pathname or two con secutive backslash characters no pathname or an identifier prefixed by a backslash character The syntax of a path identifier is less strict than the normal identifier syntax The nametree design re stricts the length of a path identifier to 16 characters not including the backslash Formal syntax Path Identifier
107. nduction tesla T mT uT 1 T 1 Wb m inductance henry H mH uH nH pH 1 2 1 Wb A luminous flux lumen Im Ilm 1cdsr illuminance lux Ix 11x 1 Im m activity of a radionuclide becquerel Bq 1 Bq 1 s7 absorbed dose gray Gy 1 Gy 1 J kg dose equivalent sievert Sv 1 Sv 1 J kg velocity m s m s km h km h 1 km h 1 3 6 m s knot knot 1 knot 0 514 m s angular velocity rad s rad s acceleration m s2 m s2 density kg m kg m3 kg g l linear mass density kg m kg m mg m Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page G 4 von of G 6 Quantity SI unit Sym Supported multiples of this unit Definition momentum kg m s kg m s angular momentum kg m s kg m2 s moment of inertia kg m kg m2 viscosity Pas Pas mPa s specific acoustic impedance Pa s m Pa s m acoustic impedance Pa s m Pa s m3 kinematic viscosity m2 s m2 s mm2 s volume flow rate m3 s m3 s Vs surface tension N m N m mN m linear expansion coefficient UK thermal conductivity W m K W m K coefficient of heat transfer W m K W m2 K heat capacity J K J K KJ K specific heat capacity J kg K J kg K specific internal energy J kg MJ kg kJ kg charge density C m C m3 surface density of charge C m C m2 electric field stren
108. normally used scien tific syntax as defined in ISO 1000 Examples 10 0 degC 1 3E 3 K 35 5 m s 100 0 m2 kg s2 4 8 6 Expressions with unitized values Unitized values can be used in arithmetical expressions according to the following rules nassignments both operands must have commensurable units The UCL compiler converts units as necessary Example Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 36 0 471 variable X REAL Kabs X 25 0 degC automatic conversion from Celsius to Kelvin In additions or subtractions both operands must have commensurable units The UCL compiler converts units as necessary Note that unitless values cannot be added or subtracted from unitized values Special treatment is needed to handle conversion between temperatures correctly as there are temperatures and temperature differences Also special conversion rules apply to measurements of temperatures because the subtraction of two temperatures yields a temperature difference for any other unit it results in the unit itself Examples 100 0 Kabs 90 0 Kabs 10 0 K 100 0 Kabs 10 0 K 90 0 Kabs 100 0 Kabs 10 0 Kabs is invalid 100 0 K 10 0 K 90 0 K
109. o INTEGER Conversion INTEGER enumeration_value The result of this type conversion is the integer corresponding to the position of enumera tion_value in the enumeration list The first element in the list has the position 0 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Examples type Color Red Green Blue INTEGER Green returns 1 INTEGER Red returns 0 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 44 0 471 INTEGER to Enumeration Conversion enumeration_type integer_value The result of this type conversion is the enumerated value literal whose position in the enumeration list is equal to integer_value The first element in a list has the position 0 A runtime error occurs if integer_value lt Oor integer_value gt INTEGER MAX enumeration_type Examples type Color Red Green Blue Color 1 returns Green Color 0 returns Red BITSET to INTEGER Conversion INTEGER bitset value The result of this type conversion is the 32 bit integer whose internal representation corresponds to the 32 member bitset value Examples INTEGER 0 1 2 returns 7 or 20 21 22 INTEGER to BITSET Conversion BITSET integer value The r
110. of 471 4 11 Subprogram Declarations A subprogram or subroutine is a code segment or sequence of statements which can be invoked by name UCL supports two kinds of subprograms procedures and functions 4 11 1 Procedure Declaration A procedure declaration comprises 8 procedure header consisting of the reserved word procedure followed by the procedure name and an optional parameter list in which the procedure s formal parameters are defined e aprocedure body which may contain declarations and statements It must not however contain procedure or function declarations In other words procedures and functions cannot be nested inside other procedures and functions Formal Parameters Formal parameters are identifiers which denote values or objects to be passed with the call There are three modes of formal parameters in parameters are treated as place holders to which the result of the evaluation of the correspon ding actual parameter is assigned as an initial value They may be assigned default values via the assignment operator These default values are used as actual parameters if the corre sponding parameters are omitted from the procedure call e in out and out parameters correspond to actual parameters that are variables and they stand for these variables Each formal parameter must be specified by its name and its type In the parameter list the reserved words in and out are used to preceed the parameter
111. omated Procedures main program Libraries Formal parameter list definitions A Library consists of Library specification Library body implementation part Automated Procedures Library specifications and Library bodies are compiled separately Two kinds of subprograms Procedures Functions e Subprograms must be defined within main programs APs or Libraries they may not be nested inside other subprograms Their parameters may have default values and may be unbound ar rays or strings Parameter associations are either named or positional Subprograms may be called recursively e Predefined Subprograms ABS MAX MIN HIGH LENGTH ODD INC DEC INCL EXCL All VO Monitoring amp Control operations via target specific system library routines Access to database items as global objects via their path name Support for physical measurement units 9 Statements Assignments Procedure calls Function calls Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 3 4 von of 3 5 Conditional statements if statement with elsif and else clauses case statement with when and else clauses Iteration general loop statement with exit repeat w
112. ompiled before its services can actually be used executed by a client Formal Parameter List Definitions Database items may have formal parameter lists When using such an item in a context that requires a parameterized item see 4 11 1 the item name must be given together with its actual parameter list The UCL Compiler can be used to create the formal parameter lists of such database items Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 64 0 4 71 4 13 1 Automated Procedures An Automated Procedure AP corresponds to a UCL main program An AP declaration consists of the following an AP header e an optional list of imported libraries or other modules e an optional declarations section a statement sequence bracketed by begin and end The AP header comprises the keyword procedure followed by the AP s name and an optional para meter list The AP name is implicitly declared as an alias for the AP s pathname in the database The parameter list is similar to the formal parameter list of a procedure or function see 4 11 1 except that no in out or out parameters and no parameterized pathname parameters are allowed The optional import list contains import directives of the form import pathname
113. overwritten The value to be assigned must not violate any constraints imposed on the target variable e g if the vari able is of a subrange type the value must be within the bounds of the subrange Constraints are usually performed at runtime and constraint violations yield a runtime error If the value is constant und thus known to the compiler the check is performed at compilation time Checks on pathname constraints are always performed at compilation time since a runtime check would require a database access Note In string assignments left and right side may be of different lengths If the length of the right side exceeds the maximum length on the left a runtime error occurs Formal Syntax Assignment Designator Expression Designator see 4 9 Expression see 4 9 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 47 von of 471 Examples variable I INTEGER variable S string 8 variable C CHARACTER variable A array 1 10 1 20 of Real variable B Real I 5 5 hello 0 X A I 1 I 1 B Rec_X Comp_A 100 PM TTC STAT SNOGO 4 10 2 Procedure Call A procedure call activates the specified procedure It is denoted by stating the procedure
114. p Statement The basic form of iteration is the Loop statement It specifies that a statement sequence is to be repeat edly executed until an exit statement is executed A typical Loop statement with an exit statement is shown below loop statement_sequence_l if condition then exit end if statement_sequence_l end loop u Formal Syntax Loop Statement loop Statement Sequence end loop XE Statement Sequence 366 0 Example loop 2 2 if gt 10 then exit end if end loop 4 10 5 2 while Statement The while statement specifies the repeated execution of a statement sequence depending on the value of a Boolean expression The expression is evaluated before each subsequent execution of the statement sequence hence the statement sequence may not be executed at all The repetition stops as soon as the evaluation of the expression yields the value FALSE A while statement has the following form and is equivalent to the shown loop statement while expression do loop statement_sequenc if expression then exit end if end while statement_sequenc end loop Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 52 0 471 Formal Syntax While_Statement while
115. possible to declare units locally to a procedure or func tion Unit names are always global For convenience it is however possible to redeclare an existing unit name but only identical to the existing unit Formal syntax Unit_Declaration unit Unit Identifier Unit Unit lUnit Expression Unit Expression Numerator Denominator Offset Offset Offset Number Number Numerator Unit_Term Unit Term Denominator Number Unit Factor C Unit Term Unit Term Number Unit Factor Unit Factor Number Unit Factor Unit Identifier Digit Unit Identifier Letter Letter 4 8 3 Unit Syntax A unit is expressed with a syntax production defined somehow like a string with an imposed syntax enclosed in brackets and A unit clause is valid only for entities of type REAL and LONG REAL Note that no space may be used between the Unit Identifier and the following Digit in the syntax produc tion Unit Factor A Unit Identifier is composed of letters only The following conventions are used for unit expressions Identifiers are case sensitive mA MeV Multiplication is denoted by a space kg m Nm 1000 m Division is denoted by a slash 7 7 m s 1 s Exponentiation is denoted by an attached digit m3 s2 For numbers reals or integers may be used 0 0254 m LO degC 18 320 18 An expression with or creates an absolut
116. raries but cannot be imported by other objects Libraries A UCL library like a package in Ada or a module in Modula 2 is a collection of computational re sources procedures functions data types variables etc that may be used by the library s clients by importing the provided objects or services In the UCL context these clients may be any kind of com pilation unit A UCL library consists of two parts a library specification and a library body implementation part Each part is compiled separately The library specification identifies the resources that are visible to its clients whereas the body contains the corresponding implementation details and is hidden from the clients All objects declared in a library specification are available in the corresponding body without explicit import Also note that all libraries including system libraries must be explicitly imported by their cli ents A library specification and its corresponding body form two separate compilation units The library body may be modified without affecting the library s clients whereas a modification of the library spec ification implies recompilation of the corresponding body and of all clients UCL requires compilation units to be compiled in the following order 1 Alibrary specification must be compiled before its clients 2 Alibrary specification must be compiled before its body if one exists Note that the body of a user library must have been c
117. rators 4 9 12 Statements Remove WITH statement 4 9 2 13 Procedure Call Update parameter description 4 9 5 14 Statecodes in CASE Statement 4 9 9 15 Enhancement of the FOR Statement 4 9 10 16 Delete WITH Statement 4 10 1 17 Typo correct example 4 10 3 18 Update description of Functions ABS MAX MIN Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 VW Dok Nr Doc No COL RIBRE Daimler Benz Aerospace 80000340 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page IV von of Xl Data Document Change Record Revision E Affected Section Paragraph Page Reason for Change Brief Description of Change 4 11 1 19 Revise example of an Automated Pro cedure 4 11 2 20 Typo 5 2 Add description for Input Output para meter Appendix D 22 Update UCL Syntax for Case Label List Statement For State ment Primary delete WITH Statement 23 Re arrange para 4 4 Type Declarations as follows change Elementary Types to Scalar Types move Sets Bitset and String to Structured Types make Type Pathname a separate para graph 4 4 2 6 4 4 2 6 1 24 Add paragraphs for Compatibility of Types in Arrays and Records 3 A 04 04 95 COL RIBRE DDR 0493 Issue 1 incor porated 4 4 1 10 1 Add paragraph Type COMPLE TION_CODE 5 1 2 Onboard System Library re work types and update procedures 5 1 3 6 5 1 3 7 5 1 3 8 GET_FLA
118. re_Heading Block PROCEDURE Identifier Formal Parameters Declaration begin Statement Sequence end Identifier C Parameter List Parameter List in out Identifier List Formal Type Constant Expression Identifier Identifier Formal Simple Type array of Formal Simple Type string Qualified Identifier statecode pathname C pathname X see 3 see 4 10 see 4 1 2 2 see 4 3 3 see 4 9 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Procedure_Heading Block Formal_Parameters Parameter_List Identifier_List Formal_Type Formal_Simple_Type Declaration Statement_Sequence Identifier Qualified_Identifier Constant_Expression Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 59 von of 4 71 Example procedure Accumulate First INTEGER Last INTEGER out Result INTEGER variable Sum INTEGER begin Sum First for I First 1 to Last do Sum Sum I end for Result Sum end Accumulate 4 11 2 Function Declaration A function is a subprogram that returns a value A function declaration starts with the reserved word function followed by
119. rom the seven base units defined by the international system of units Systeme Internationale d Unites SI UCL itself predefines only the names of the seven base units the target system may predefine further unit names All other unit names can then be derived from these predefined units by means of UCL unit declarations For a definition of the SI base units see the ISO 1000 standard annex 8 Quantity Unit SI symbol UCL symbol length meter m m mass kilogram kg kg time second 5 5 electric current ampere A A temperature kelvin K Kabs temperature difference kelvin K K amount of substance mole mol mol luminosity candela cd cd Note the distinction made between temperature and temperature difference expressed with different UCL unit symbols Kabs K absolute and K This is necessary to allow conversions between e g C and K The temperature relationship 0 C 273 15 K is not reflected for temperature differences where 1 C 1K Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 34 0 471 4 8 2 Unit Declaration New identifiers for derived units can be declared in a unit declaration which takes the form unit unit identifier unit expression and must precede all other declarations It is not
120. rsection of two sets is the set of objects that are members of both sets The symmetric set difference of two sets is a set containing those elements that are members of exactly one of the two sets not of both The membership operator in is used to test for set membership in is treated as a relational operator The expression I in 5 is of type BOOLEAN returning TRUE if I is a member of the set S The predefined procedures INCL and EXCL see 4 12 may be used to include a member in or exclude a member from resp a set variable Formal Syntax Set_Type get of Simple Type Simple Type see 4 5 Examples type Id INTEGER 0 100 type Id_Set set of Id type Traffic_Light set of Red Green Blue type Spectrum set of Color Representation in memory A set is represented by a number of bits packed in one or more 32 bit words one bit for each possible member of the set A member is present in the set if its bit is set it is absent otherwise The first member is expressed by bit 0 the last member by bit n 1 4 5 2 4 Type BITSET The predefined type BITSET is defined as type BITSET set of INTEGER 0 31 It thus represents a set of 32 elements corresponding to the width of a storage unit All operations appli cable to the set types equally apply to BITSET see 4 5 2 3 but BITSET has additional special char acteristics It may be used to access a 32 bit storage word as a sequ
121. rties Declaration of all UCL objects is described in the following sections Once an object has been declared it may be refer enced by its name or identifier An identifier used in a declaration must have been declared in a previous declaration i e an identifier must not be used in its own declaration Within the same scope all identifiers must be unique 4 3 2 Scope of Identifiers A UCL program AP may be structured it may contain subprograms procedures and functions which are nested within the main program The main program as well as each subprogram form a scope which may contain its own set of locally declared objects Parameters belong to the local scope of the AP or subprogram The scope of an identifier is the section of a program or subprogram in which the object denoted by the identifier exists In general the scope of an object extends from its declaration to the end of the block in which it is declared see figure 4 below Whithin its scope an identifier is visible and can be used e An identifier declared in an outer scope e g an AP may be redeclared in an inner scope a sub program In this case two different objects are denoted by the same identifier and the identifier declared in the inner scope hides the same identifier declared in the outer scope Within the inner scope the hidden variable from the outer scope still exists but is not visible and cannot be ac cessed The predefined identifiers INTEG
122. ructured type e g array record however the structured type itself must not be unitized Thus in the following example type Rval_Array array Lo Hi of REAL TYPE Temperature_Array Rval_Array degC not allowed TYPE Voltage_Array array lo hi of REAL V the type declaration for Temperature Array is invalid the type Voltage Array on the other hand is a valid UCL construct UCL also allows a variable to be associated directly with a unit of measure This is syntactically analo gous to declaring an unnamed structured type For example variable A REAL kg associates the variable A with the mass unit kilogram This variable is compatible with other variables of type REAL which are associated with a unit commensurable to kilogram Unitized types are forbid den in such declarations For example variable T Furnace Temperature degC is not allowed because Furnace Temperature is already a unitized type 4 8 5 Unitized Literals amp Constants In the UCL source code unitized values may be formed by suffixing a real value with their appropriate unit which is written in brackets in the syntax described below As stated above it is possible to derive other units using the and operators offsets and exponenti ations with integer numbers Such unit expressions described below must be enclosed in square brack ets They follow a syntax which allows unit expressions as close as possible to the
123. ruktur 09 06 89 08 01 90 12 11 90 15 02 91 23 04 93 5 Revision 1 2 2 A 3 3 VW Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page von of Xl Data Document Change Record Revision E Affected Section Paragraph Page Reason for Change Brief Description of Change 5 1 6 4 12 Create procedure GET ENG DATA 5 1 7 13 Delete Event Handling 5 1 8 3 14 Create SEND_PDU procedure for special packets 15 Modify parameter list of following pro cedures 5 1 3 1 5 1 3 2 EXECUTE_FLAP EXECWAIT_FLAP 5 1 8 x CCSDS packet control 5 1 9 1 SEND_MESSAGE 5 1 3 3 5 1 3 4 5 1 3 8 SUSPEND_ RESUME_ ABORT_FLAP 5 1 5 1 5 1 5 2 ISSUE_DISCRETE SEND_SERIAL 3 A 04 04 95 DDR ECOL 0044 Issue 1 incorporated 5 1 remove V3 notes from Type Definitions 3 A 04 04 95 COL RIBRE DDR 0472 Issue 1 Revision incorporated 5 2 1 Create new types and constants needed for revised procedures 2 Delete procedures CLOSE_URT OPEN_URT READ RAW DATA READ RESULT FROM URT RESUME SMT SET OFFLINE SET ONLINE WRITE RESULT TO URT 3 Update description of procedures 5 2 1 3 5 2 1 4 5 2 1 5 SET_XXXX_LIMIT 5 2 1 3 5 2 1 4 5 2 1 5 SET_EXCEPTION_COUNT SET_EXPECTED_STATE SET_EXPECTED_VALUE 5 2 1 9 5 2 2 4 SET_LIMIT_SET START_SMT 5 2 3 1 5 2 4 5 2 5 EXECUTE_FLAP LOAD_APPLICATI
124. s The compiler will check that pathnames assigned to a variable associated with a con stant or passed as a parameter are of one of the item types allowed for the target object All declared pathname types are subtypes of the general predefined type pathname Formal Syntax Pathname Type pathname Identifier List Identifier_List Identifier Identifier Identifier see 4 1 2 2 Examples procedure P X pathname begin end P unconstrained type Monitor_Item pathname EGSE_INTEGER_MEASUREMENT constrained EGSE_FLOAT_MEASUREMENT EGSE_INTEGER_SW_VARIABLE EGSE_FLOAT_SW_VARIABLE type AP_Item pathname UCL_AUTOMATED_PROCEDURE constrained If a formal parameter is of a possibly constrained pathname type and followed by the syntax the actual parameter must be followed by its own actual parameter list if one is declared within the database Such a formal parameter is then known to be of a parameterized pathname type For such a parameter only pathnames of items that may have parameters can be passed The property whether or not an item can have parameters is an attribute stored together with the item in the database Para meters of a parameterized pathname type can only be of mode in see 4 11 1 Whithin the subprogram they may be accessed as parameterized items passed to other subprograms or non parameterized items e g assigned to a variabl
125. s if PM TTC TRANSMITTER STATUS 1 then end if if X lt Y then statements elsif X gt Y then statements else end if 4 10 4 case Statement The case statement is used when a choice from among several mutually exclusive alternatives must be made on the basis of the value of an expression It thus represents a generalization of the if state ment It has the form case expression when labels 1 statement sequence 1 when labels 2 statement sequence 2 else statement sequence n end if The case statement causes one of its statement sequences to be selected according to the value of an expression the case selector which must be of a discrete type INTEGER CHARACTER enumer Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 50 von of 471 ation type or constrained statecode type The different values that may be taken by this selector appear in the case statement as case labels or case label ranges The branches in a case statement must be uniquely identified by its labels 1 6 a label may appear only once in a case statement The union of labels and label ranges in a case statements must cover all possible values of the selector type either explicitly or implicitly by an e
126. s determined by the number of indices it is not restricted by the language A runtime error occurs if the array index is outside the defined ranges Each index belongs to a specific index type This must be a discrete type INTEGER CHARACTER enumeration type or constrained statecode type If a constrained statecode type is used as the index type of an array the order in which the array components are arranged is not defined since statecode types are unordered A program must not rely on a specific order An array type is specified in the form array index range of element type The index range may either be given as an explicit range in the form min max or as the name of a discrete type In the latter case the index range comprises all values of the type 1l array min max of element type 2 array type name of element type For statecode types 2 is the only allowed form The type of an array element may itself be an array this leads to multidimensional arrays In that case the following two notations are identical 1 array 0 10 of array 0 20 of INTEGER 2 array 0 10 0 20 of INTEGER No operations are defined on array objects They can only be assigned and passed as parameters to sub programs Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Iss
127. s is the maximum length of the string filled up to a multiple of 4 4 5 3 Pathname Types The values comprised by pathname types are references to database objects themselves not to their runtime value Pathnames are regarded as literals that denote the values of these types The special lit eral NN means no pathname It may be used e g as a default value for pathname parameters or as an initial or dummy value for pathname variables NN is compatible to all pathname types regardsless of constraints or parameterisation see below Pathname values can be assigned and compared on equal ity lt gt Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 27 von of 471 Pathname types can be unconstrained or constrained An unconstrained pathname type is denoted by the keyword pathname it comprises all valid pathnames constrained pathname type is restricted to a specific set of MDB item types This is denoted by the keyword pathname followed by the list of allowed item types in parentheses The item types are represented by a special set of identifiers defined in the database the item type names These identifiers may appear only in this specific context they do not interfer with normal UCL identifier
128. sing separator between the keyword if and the identifier A The UCL separators are Blank space Horizontal tabulator e Vertical tabulation characters LF line feed and VT vertical tabulator Endofline Page separators ASCII form feed FF character Comment These ASCII graphic symbols printable characters and the separator symbols are the only characters allowed in UCL source code The other non graphic symbols so called control characters e g back space or escape are not allowed except in comments see below and are rejected by the UCL compiler A comment begins with two consecutive hyphens and terminates with the end of the line Note the contents of a comment are not interpreted Hence a comment may contain any characters even those prohibited outside a comment Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 2 von of 4 71 4 1 2 Lexical Elements The text of a UCL program may consist of the following lexical elements delimiters identifiers prede fined and user defined and literals numeric character string state code time and unit literals 4 1 2 1 Delimiters Delimiters are either one character or two consecutive characters used as punctuation symbols or as operators They
129. ssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Seite Page 4 15 0 4 71 Daimler Benz Aerospace Raumfahrt Infrastruktur 4 5 Type Declarations Every UCL object has a type defining the set of valid values that it may take and the set of operations that may be performed on it UCL types fall into the following broad categories Elementary types comprise all predefined types INTEGER REAL etc as well as the enumer ation types section 4 5 1 11 and subrange types section 4 5 1 12 which enable users to create new data types Such user defined types make code more readable and let the user exclude illegal values from storage in variables e Structured types allow the definition of data structures arrays records sets strings Unitized types are for dimensioned quantities i e associated with a unit of measure e Pathname types and subitem pathname types represent references to MDB items or their sub 5555 items resp A type declaration is introduced with the reserved word type followed by the type identifier The symbol associates the identfier with the type definition Note that a type declaration need not introduce a new type it may define a synonym to an existing type type Identifier Type Unit Simple_Type String_Type Statecode_Type Pathname_Type Array_Type Set_Type Record_Type Pathname Type Subitem Pathname Type Qualified Identifier
130. st 1 Fields else Fields Case Labels 1 Case Labels Variant Part Case Label List Case Labels QConstant Expression Constant Expression Identifier List Identifier 1 Identifier Qualified Identifier see 4 3 3 Identifier see 4 1 2 2 Constant_Expression see 4 9 Examples a Simple record record Day INTEGER Month INTEGER Year INTEGER end record Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 24 0 471 b Record with variant parts type Measurement_Type Analog Discrete type Eng_Unit_Type array 1 4 of CHARACTER type Measurement record Channel_No INTEGER case Measure Measurement_Type when Analog Eng Value REAL Eng Unit Eng Unit Type when Discrete State statecode end case end record Representation in memory A record is represented as the sequence of its fields in their respective representation All variants of the same variant part are mapped to the same location in memory The size of a variant part is determined by its longest variant 4 5 2 3 Set Types A set is a collection of objects of the same type the base type The latter must be a discrete type w
131. t Buffer out Item pathname out Error Buffer Error function Buffer Level UNSIGNED INTEGER of pathname pathname Buffer Error pathname Buffer Error I 1G Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Buffer_Size INT end Pathname_Buffer Library body library body Pathname_Buffer 1 array type Buffer_Type variable Buffer Buffer_Type variable Index UNSIGNED_INTEG procedure Put_Buffer in Item out Error begin if Index lt Buffer_Size then INC Index Buffer Index Item Error No_Error else Error Buffer_Full end if end Put_Buffer procedure Get_Buffer out Item out Error begin if Index gt 0 then Item Buffer Index DEC Index Error No_Error else Error Buffer_Empty end if end Get_Buffer function Buffer_Level UNSIGNED begin return Index end Buffer_Level end Pathname_Buffer Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 69 von of 471 Example 2 This user library performs conversions between a pathname and its SID short identifier as an integer This is an example of how to use low level conversions with record variants in a safe and controlled way see 4 5 2 2 The conversion operations explo
132. te 13 03 1998 berarbtg Rev Datum Date Seite Page D 6 von of D 7 Unit Expressions Daimler Benz Aerospace Raumfahrt Infrastruktur Unit Unit Expression Unit Expression Numerator Denominator Offset Offset Offset Number Number Numerator Unit Term C Unit Term Denominator Number Unit Factor Unit Term Unit Term Number Unit Factor Unit Factor Number Unit Factor Unit Identifier Digit Unit Identifier Letter Letter Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace 80000340 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page D 7 von of D 7 Terminal Symbols Unit_Factor Unit_Identifier Digit Path Identifier Letter Digit Letter Digit Statecode Identifier Identifier Letter Letter Or Digit Unit Identifier Letter Letter Number Simple Integer Based Integer Real Simple Integer Digits Based Integer Digits Hex Digit Hex Digit Real Digits Digits e Digits Date Day Month Year Day Digit Digit Month Digit Digit Year Digit Digit Digit Digit Time Hours Minutes Seconds Fraction Hours Digit Digit Min
133. te type except statecode types DEC x This procedure decrements the variable x by 1 If x is an enumeration type or CHARACTER value it is replaced by its predecessor DEC x n This procedure decrements the variable x by n Regardless of the type of x n must be an expression of type INTEGER If x is an enumeration type or CHARACTER value it is replaced by its n th predecessor INCL Procedure INCL s x This procedure includes the element x into the set variable s x must be an expression of the element type of s EXCL Procedure EXCL s x This procedure excludes the element x from the set variable s x must be an expression of the element type of s Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 63 0 4 71 4 13 Compilation Units A text which is accepted by the compiler as a unit is called a compilation unit There are four kinds of compilation units in UCL Main program called Automated Procedure in the COLUMBUS UCL environment Library specification Library body Formal parameter list definition Automated Procedures An Automated Procedure AP constitutes a parameterized UCL program or main procedure It may import objects defined in separately compiled units called lib
134. tecode see 4 5 1 8 Constant_Expression see 4 9 Expression see 4 9 Statement Sequence see 4 10 Examples case Traffic Light when Red t Stop Car when Green Go Ahead Turn Right else Traffic Light end case case Code when SLOW when SMEDIUM when end case Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 51 0 471 4 10 5 Loop Statements A loop statement specifies that a sequence of statements is to be repeatedly executed until a termination condition if any becomes true or until an exit statement is executed UCL has four different forms of loop statements The sequence of statements within a loop statement may itself contain loop statements that is loops may be nested When a termination condition has become true or when a loop is left via an exit state ment control is passed to the first statement following the innermost enclosing loop after the end loop keywords and the loop statement is considered to have finished its execution Note that loops need not necessarily terminate endless loops are valid constructs A loop is of course implicitly terminated when a return or halt statement is executed see 4 10 6 and 4 10 7 4 10 5 1 Simple Loo
135. ted from more than one module The conflicting imported identifiers are then hidden throughout the compilation unit the same identifier is declared within the importing compilation unit The imported identifier is then hidden throughout the scope of the local identifier there is an identical predefined identifier The imported identifier is then hidden throughout the compilation unit An imported identifier can thus never hide a predefined identifier or an identifier declared in the com pilation unit Imported identifiers even if hidden can always be accessed with a qualified identifier see section 4 3 3 Formal Syntax Import import Name Name see 4 3 5 Example import APM ONBOARD DMS SYSLIB Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 9 von of 4 71 4 3 Declarations Names and Scopes 4 3 1 Identifiers All UCL objects i e constant variable type procedure etc with the exception of the predefined stan dard identifiers Mission Database objects and imported objects must be explicitly introduced via an object declaration before they can be used in the program The object declaration associates the object with a name and at the same time establishes the object s attributes or prope
136. tes an error if the value of the specified number is not a valid floating point number see predefined type LONG_REAL 4 5 1 4 Examples of real numbers 2 975 5 8e3 5 0 3 1 2e 3 0 000 000 1 4 1 2 5 Character Literals A character literal consists of any one of the 95 graphic ASCII characters including the space char acter enclosed between single quotes apostrophe The single quote character itself is represented in a similar manner i e also enclosed between single quotes Examples of character literals 8 1 t 4 1 2 6 String Literals A string is a sequence of zero or more characters from the 95 graphic ASCII characters including the space enclosed between quotation marks double quote characters The quotation mark itself has to be doubled if it appears within the string The empty string is denoted by two adjacent quotation marks Since end of line is a separator a string must not extend over the end of a line The maximum length of a string literal including the quotes is thus 256 characters String literals are mapped to the predefined st ring type 4 5 2 5 Characters in a string are packed with one character per byte Formal syntax String 333393 ASCII 399999 399999 399999 Character ASCII ASCII any of the ASCII Characters in range 32 126 Examples of string literals String i String with quoted word oie empty string Daimler Benz
137. than the absolute value of B During divisions and modulus operations a runtime error occurs if the right operand is zero Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 40 0 471 4 9 2 2 Concatenation Operator Symbol Operation string concatenation This operator joins two strings i e string literals string constants or string variables or characters The result is a string containing the left operand concatenated with the right operand 4 9 2 3 Logical or Boolean Operators Symbol Operation logical or logical and logical negation unary operator Their operands must have the type BOOLEAN The definition of the Boolean operators amp and is as follows p amp q if p then q else FALSE p q if p then TRUE else q This definition implies that the second operand will not be evaluated if the result is already known from the evaluation of the first operand short circuit evaluation 4 9 2 4 Relational or Comparison Operators Symbol Operation 1 lt gt unequal lt less gt less or equal lt greater or equal gt greater These operators are applicable to all ordered types 1 6 INTEGER REAL LONG_REAL CHARACTER TIME and enumeration types They may also
138. the base of the numbering system it must be in the range 2 16 Some bases are particularly useful 2 for binary 8 for octal 10 for decimal the default or 16 for hexadecimal Value must be a sequence of extended digits i e 0 9 or the letters A F which in hexadecimal notation correspond to the decimal values 10 15 respectively Further for a given base B each extended digit must be in the range 0 to B 1 The compiler generates an error if the value of the specified number is not in the range MAX INTEGER Formal syntax Based Integer Digits Hex Digit Hex Digit see 4 1 2 4 1 Digit A B C D E F Digits Hex Digit Examples of based integers all having the value 255 241111 1111 843774 16 FF 10 255 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 5 von of 4 71 4 1 2 4 3 Real Numbers A real number may be built as Formal syntax Real Digits Digits E Digits Digits see 4 1 2 4 1 The exponent indicates the power of ten by which the value of the decimal literal is to be multiplied Thus the value of a real number can be obtained as Decimal_Literal 10 Exponent The compiler genera
139. tions Memory representation completed or corrected resp For all types Reference to description of literals 4 1 2 added 4 5 9 Added explanation of time values with and without date Added explanation of no time 4 5 2 1 Description of array aggregates added 4 5 2 2 Low level programming by exploiting overlay of variants clarified 4 5 3 Concept of constraints and parameterisa tion as well as handling of constrained un constrained and parameterised pathname objects made much more explicit 4 5 4 Concept of constraints as well as handling of constrained and unconstrained subitem pathname objects made much more ex plicit 4 5 5 Compatibility rules made much more ex plicit 4 9 3 This sections was moved from Statements to Expressions Function calls are not state ments but expressions 4 9 4 This sections was moved from Subprogram Declarations to Expressions was totally misplaced Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 VW Dok Nr Doc No COL RIBRE Daimler Benz Aerospace 0990040 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page VIII von of XI Data Document Change Record Revision Ea Affected Section Paragraph Page Reason for Change Brief Description of Change 4 10 6 Different loop statements grouped in one section Common loop properties described globally 4 12 This section was
140. to convert between a character value and its ordinal number its ASCII code see 4 9 4 The predefined procedures functions MIN and MAX may be used for CHARACTER see 4 12 Representation in memory A CHARACTER value is internally represented as one 32 bit word containing its ASCII code 4 5 1 7 Type WORD The type WORD represents an individually accessible storage unit 32 bits No operation is defined on this type word values can only be assigned and passed as parameters If a formal parameter of a pro cedure is of type WORD the corresponding actual parameter may be of any type that uses one storage word If the formal parameter is array of WORD the corresponding actual parameter may be of any type A variable of type WORD may be assigned a value of any type that can be represented by one word Representation in memory A WORD value is internally represented as one 32 bit word without any interpretation of the bits contained in it Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 18 von of 471 4 5 1 8 Statecode Types The set of legal values for a statecode type comprises the literals indicating the predefined states of dis crete items e g on off open closed low medium
141. tur Seite Page 4 55 von of 471 4 10 6 return Statement A return statement consists of the keyword return possibly followed by an expression It indi cates the end of a procedure or function execution There may be several return statements in one procedure or function although only one will be executed In afunction the return statement is mandatory and it must be followed by an expression which spec ifies the value returned by the function In a procedure the return statement is optional It is implied by the end of the procedure body When a return statement is executed control returns to the caller of the procedure or function Formal Syntax Return statement return Expression Expression see 4 9 Examples return I J in a function return in a procedure 4 10 7 halt Statement The halt statement is used within an AP to terminate the AP itself It further provides an optional facility for reporting the AP completion status successful non successful to the runtime system A halt statement takes the form halt completion_status The expression is optional It is of the type COMPLETION_CODE By default SUCCESS is assumed At runtime depending on the AP activation method the completion code may be sent either tothe calling AP on request tothe supervisory higher level software responsible for AP activation toan interactive user who started the AP via an interactive High Level
142. type 4 17 C case sensitive 4 3 case statement 4 49 character literal 5 character set 4 1 CHARACTER type 4 17 commensurable unit 4 33 comment 4 1 comparison operator 4 40 compatibility 4 29 compilation unit 4 63 COMPLETION CODE type 4 20 concatenation 4 26 concatenation operator 4 40 Dok Nr Doc No COL RIBRE Datum Date 13 03 1998 4 berarbtg Rev Datum Date Seite Page I 2 von of I 3 N name 4 9 name tree 3 2 3 no pathname 4 3 node name 4 13 numeric literal 4 4 0 ODD function 4 16 1 open array 4 48 4 57 open string 4 48 4 57 operand 4 38 operator 4 39 out parameter 4 47 4 57 4 59 overlay 4 3 P path identifier 4 3 pathname 4 3 1 pathname type 4 15 4 26 precedence of operators 4 39 predefined type 4 15 procedure body 4 57 4 58 procedure call 4 47 procedure declaration 4 57 procedure header 4 57 Q qualified identifier 4 10 R range constraint 4 4 4 21 real number 4 5 REAL type 4 16 record field 4 23 record type 4 23 recursive call 4 11 4 48 relational operator 4 40 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Daimler Benz Aerospace Raumfahrt Infrastruktur identifier 4 3 4 9 if statement 4 49 implementation constraints 1 import 4
143. uch information must be provided to the compiler by the user Notes The definition of analog measurement objects in the MDB includes the physical quantity voltage temperature etc and the respective engineering units associated with the particular measurement Similarly discrete measurement objects are associated with statecodes names identifying the states the object may be in such as SON SOFF SOPEN SCLOSED SLOW S MEDIUM SHIGH The runtime values of analog measurement objects are expressed in engineering values i e the acquired raw values are converted to the predefined engineering units using the appropriate calibration curves For discrete objects the runtime values correspond to the predefined state codes The runtime values of MDB items have a software type according to the UCL type system See Type Correspondence Table between MDB and UCL objects in Appendix F MDB items are further classified by an access class Some of these access classes define the allowed usage of an item in UCL and HLCL these are marked with UC and or 7 97 superscripts READ UCL HLCL indicates that the item has a runtime value that is read only 1 6 it may be read but cannot be altered by a UCL program The corresponding pathnames may be used in an expression may appear on the right hand side in an assignment statement or as an in parameter In expression evaluation the current i e most recent runtime value o
144. ue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 22 0 471 Formal Syntax Array_Type array Index Range Index Range of Qualified Identifier Constant Expression Constant Expression Qualified Identifier Index Range Constant Expression see 4 9 Qualified Identifier see 4 3 3 Examples type Row Index INTEGER 0 10 type Col Index INTEGER 0 20 type Vector array 1 3 of REAL type Matrix array Row Index Col Index of REAL type Color White Red Green Blue Yellow Cyan Magenta Black type RGB Color Red Blue type Bool Array array Red Magenta BOOLEAN array Color RGB of REAL statecode SLOW SMEDIUM SHIGH array Level of REAL type Color_Table type Level type Level Array Aggregates An array value may be written in form of an aggregate with the array elements enumerated in parenth eses value value value Aggregates of multidimensional arrays are expressed in nested form A matrix is written as a vector of line vectors value value value ine value value value line 2 value value value line n A three dimensional array as a vector of two dimensinal planes which are written as vectors of line vectors This concept is recursively applied to any dimensionality value value value
145. ue of the loop index has covered all values of the range start value to limit or type After each iteration the oop index is incremented by the specified increment value which may be negative If no increment is specified 1 is assumed For a negative increment the values are processed in descending order In contrast to other forms of loop for loops always terminate A for statement with a positive increment is equivalent to the following loop Loop Index start value Saved Limit limit Saved Increment increment 1 by default while Loop Index Saved Limit do statement sequenc Loop Index Loop Index Saved Increment end while With a negative increment the relational operator in the while statement would be The oop index need not be declared in the UCL program it is implicitly that is automatically created its type is derived from the type of start value and limit or from the specified type resp and its scope is limited to the body of the loop only Should an object of the same name exist it is hidden inside the for loop by the loop index and thus become inaccessible as shown in the following example For a discussion of scoping rules see 4 3 2 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Ra
146. umfahrt Infrastruktur Seite Page 4 54 0 471 variable Index INTEGER declaration of a variable named Index begin The variable Index is accessible here for Index 1 to 100 do loop index also called Index only the loop index is visible here the variable Index is hidden by the loop index end for variable Index is now accessible again x and it still has its original value end Formal Syntax For_Statement Ilterative_For Statement Collective For Statement Iterative For Statement for Identifier Expression to Expression by Const Expression do Statement Sequence end for X Collective For Statement for Identifier in Qualified Identifier by Constant Expression do Statement Sequence end for m Identifier see 4 1 2 2 Qualified Identifier see 4 3 3 Expression see 4 9 Constant_Expression see 9 Statement_Sequence see 4 10 Examples for I 1 to 1000 do Sum Sum 1 end for for i 10 to 10 by 2 do statement sequenc end for for C Red to Blue do statement sequenc end for type Level statecode LOW SMEDIUM SHIGH for L in Level do Process L end for Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruk
147. ure Heading Block Function Heading function Identifier Formal Parameters Qualified Identifier Function Declaration Function Heading Block Block Declaration begin Statement Sequence end Identifier Formal Parameters Parameter List Parameter List Parameter List in out Identifier List Formal Type Constant Expression Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Seite Page D 3 von of D 7 Daimler Benz Aerospace Raumfahrt Infrastruktur Types Formal Simple Type array of Formal Simple Type string Qualified Identifier statecode pathname C pathname iod 9 Simple_Type String_Type Statecode_Type Pathname_Type Subitem_Pathname_Type Array_Type Set_Type Record_Type Qualified Identifier Enumeration Subrange C Identifier List Qualified Identifier Constant Expression Constant Expression string Constant Expression statecode Statecode List Statecode Statecode pathname Identifier List Formal Type Formal Simple Type Type Simple Type Enumeration Subrange String Type Statecode Type Statecode List Pat
148. utes Digit Digit Seconds Digit Digit Fraction Digits Digits Digit Digit Hex Digit Digit a b c d e P Letter Or Digit Letter Digit Letter a b c 6 6 P g i P P m o C u v we x Py Digit 0 1 2 8 4 5 6 7 8 9 String LASCII mm mm p Character ASCII ASCII any of the ASCII Characters in range 32 126 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace 50990040 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page E 1 von of E 1 Appendix E ASCII Character Set see ISO standard 646 Ref doc 2 2 6 for details 104 112 120 Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE Daimler Benz Aerospace B sp beQ i0 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page F 1 von of F 1 Appendix F UCL MDB Type Correspondence Table The following table shows for a few examples the principle how MDB item types map on UCL access classes and software types This is to be understood as an example only the actual MDB item types the correspond
149. veral kinds of operations or user interactions may be performed on MDB objects In particular all monitoring and control operations measurement acquisition stimuli com Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe Issue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 12 0 471 mands etc are performed via dedicated system library procedures functions Also other kinds of in teractions are available via a system library e g a procedure that causes a specific MDB object of type automated procedure to be executed A pathname designator tells the UCL compiler to retrieve an object s definition classification type etc from the Mission Database to check its semantics Depending on the context a pathname designa tor represents either a value or a reference to an MDB item In assignments expressions conditions or when used as parameters of a type other than pathname pathname designators refer to objects whose runtime values may change independently of the execut ing UCL program e g value of sensor data periodically updated by data acquisition software In all other cases they are references to specific object definitions in the MDB A pathname designator by itself does not refer to any particular occurrence or version of the object S
150. ware type is REAL SOPEN check whether current runtime value of MDB item named APM XYZ SWITCH is OPEN valid only if the MDB item s access class is READ or READ WRITE and its software type is statecode if APM XYZ SWITCH APM DMS ITEM_X assign current runtime value of MDB item APM DMS ITEM_X to the local variable X valid only if the MDB object s access class is READ or READ WRITE and its software type is compatible with the type of X Issue APM xyz POWER_ON pass an MDB item named APM xyz POWER_ON as a parameter to a system library procedure Here a reference to the item is passed not its runtime value The procedure may retrieve its definition from the MDB including stimulus characteristics target equipment authorization etc 4 3 6 Node Names UCL is designed for use in a networked environment consisting of several network nodes processors These nodes are referenced by node names which correspond to their MDB pathnames Node names and pathnames are thus syntactically equivalent Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Ausgabe lssue 4 Datum Date 13 03 1998 Uberarbtg Rev Datum Date Seite Page 4 14 0 4 71 Daimler Benz Aerospace Raumfahrt Infrastruktur 4 4 Constant Declarations A constant declaration associates an identifier a name with
151. written it can be replaced by LONG_REAL Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 0010 Daimler Benz Aerospace Ausgabe lssue 4 Datum Date 13 03 1998 berarbtg Rev Datum Date Raumfahrt Infrastruktur Seite Page 4 43 von of 471 REAL to INTEGER Conversion INTEGER real_value The result of this type conversion is the integer value obtained by truncating the value expressed by real value toward zero Examples INTEGER 3 6 value is 3 INTEGER 1 5 value is 1 INTEGER 1 3 value is 1 INTEGER to REAL Conversion REAL integer_value The result of this type conversion is the floating point value corresponding to the value of inte ger_value Examples REAL I 5 value converted to floating point CHARACTER to INTEGER Conversion INTEGER character_value The result of this type conversion is the integer corresponding to the ordinal value of charac ter value i e its sequence number in the ASCII character set Examples INTEGER A yields 65 INTEGER E yields 69 INTEGER to CHARACTER Conversion CHARACTER integer_value The result of this type conversion is the character whose ordinal number in the ASCII character set is integer_value Examples CHARACTER 65 returns character A CHARACTER 69 returns character E Enumeration t
152. ymbol equal sign separates a syntactic class from its definition Terminal symbols i e literals are enclosed in double quotes If the quote character appears as a literal itself it is written twice Braces curly brackets denote repetition i e the enclosed item may appear zero or more times e g A means 0 or more occurrences of A Square brackets enclose optional items i e the enclosed item may appear once or be omitted e g A means 0 or 1 occurrence of A A vertical bar separates alternative items e g A B means either A or B but not both Parentheses are used for grouping e g a b C stands for ac bc Each production rule is terminated by a period A complete syntax summary is given in appendix D 3 4 Conventions Used in Examples UCL source text in examples is written in a mono spaced font Courier Strict conventions are fol lowed for the representation of word classes UCL reserved words are written in bold and all lower case begin if case etc e Predefined identifiers are written in all upper case INTEGER REAL INCL DECL etc Other identifiers are written with upper case initial letters for each word part e g File Name Min Value Control structures are uniformly indented according to the logical program structure Daimler Benz Aerospace AG D 28199 Bremen All Rights reserved Copyright per DIN 34 Dok Nr Doc No COL RIBRE STD 001

Download Pdf Manuals

image

Related Search

Related Contents

SPEEDLINK SL-6830 webcam  TFA_No. 60.2507 Anleitung  GOURMET GRILLS  GPT-9000 Series  取扱説明書  LISTE LIVRES - Lecture Pour Tous    取扱説明書を必ずご参照下さい  Liebe Leserin, lieber Leser! - VHS  Woodford THERM-3 Installation Guide  

Copyright © All rights reserved.
Failed to retrieve file