1--
2-- GlowDtd.asn1
3-- Lawo GmbH
4--
5-- This file defines the Glow DTD used with the Ember+ protocol.
6--
7-- Change Log:
8--
9-- 2.50:
10--   - Added nullable parameter values.
11-- 2.40:
12--   - NOTE: This version describes the data schema of Ember+ 1.4.
13--   - Added Template Extensions
14-- 2.30:
15--   - NOTE: This version describes the data schema of Ember+ 1.3.
16--   - Added Schema Extensions
17-- 2.20:
18--   - NOTE: This version describes the data schema of Ember+ 1.2.
19--   - Added Function Extensions (see type Function)
20-- 2.10:
21--   - NOTE: This version describes the data schema of Ember+ 1.1.
22--   - Added Matrix Extensions (see type Matrix)
23--   - Added "isOnline" field to NodeContents
24-- 2.5:
25--   - NOTE: This version describes the data schema of Ember+ 1.0.
26--   - NOTE: This version introduces breaking changes!
27--   - Changed Parameter.isCommand (BOOLEAN) to an enumeration named "type".
28--     To determine the effective type of a parameter, follow this rule:
29--     - If the parameter has the "type" field that equals "trigger", its
30--       type is "trigger".
31--     - If the parameter has either the "enumeration" or the "enumMap" field,
32--       its type is "enum".
33--     - If the parameter has the "value" field, its type corresponds to the
34--       BER type of the value.
35--     - If the parameter has the "type" field, its type is the value of this
36--       field.
37--     This is useful for parameters that do not specify a current value -
38--     e.g. "trigger" parameters or parameters that have write-only access.
39--   - Changed Parameter.isWriteable (BOOLEAN) to an enumeration named
40--     "access".
41--   - More options for Value - now also supports OCTET STRING and BOOLEAN
42--   - Introduces QualifiedParameter and QualifiedNode types
43--   - Introduces RootElement and RootElementCollection types:
44--     At the root level, a different set of supported types is available.
45--   - StreamCollection can also be used as root container.
46--   - Introduces the StreamDescription type and the field "streamDescriptor"
47--     in type ParameterContents.
48-- 2.4:
49--   - NOTE: This version introduces breaking changes!
50--   - moved "children" in Parameter and Node out of
51--     "contents" SET.
52-- 2.3:
53--   - Added size constraints for INTEGER values.
54--   - Renamed EnumEntry to StringIntegerPair
55--   - Renamed EnumCollection to StringIntegerCollection
56-- 2.2:
57--   - Added new field "enumMap" to Parameter and types to describe
58--     enum entries: EnumEntry and EnumCollection
59-- 2.1:
60--   - NOTE: This version introduces breaking changes!
61--   - Replaced all APPLICATION tags for fields with CONTEXT-SPECIFIC tags
62--     APPLICATION tags are only used for custom types now.
63-- 2.0:
64--   Initial Release
65--
66
67
68EmberPlus-Glow DEFINITIONS EXPLICIT TAGS ::= BEGIN
69
70
71-- ======================================================
72--
73-- Primitive Types
74--
75-- ======================================================
76
77EmberString ::= UTF8String
78Integer32 ::= INTEGER (-2147483648 .. 2147483647)
79Integer64 ::= INTEGER (-9223372036854775808 .. 9223372036854775807)
80
81
82-- this is the base oid for all RELATIVE-OID values defined in this document.
83-- when using the RELATIVE-OID type, defining a base oid is required by ASN.1.
84-- does not have any impact upon the DTD.
85baseOid OBJECT IDENTIFIER ::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) lsb(37411) lsb-mgmt(2) emberPlus(1) glow(1) glowVolatile(100) }
86
87-- ======================================================
88--
89-- Template
90--
91-- ======================================================
92
93Template ::=
94	[APPLICATION 24] IMPLICIT SET {
95			number		[0]	Integer32,
96			element	 	[1]	TemplateElement     OPTIONAL,
97			description	[2]	EmberString         OPTIONAL
98	}
99
100QualifiedTemplate ::=
101	[APPLICATION 25] IMPLICIT SET {
102		path  		[0] RELATIVE-OID,
103		element 	[1] TemplateElement               OPTIONAL,
104		description	[2] EmberString                   OPTIONAL
105	}
106
107TemplateElement ::=
108	CHOICE {
109		parameter		Parameter,
110		node			Node,
111		matrix			Matrix,
112		function		Function
113	}
114
115-- ======================================================
116--
117-- Parameter
118--
119-- ======================================================
120
121Parameter ::=
122    [APPLICATION 1] IMPLICIT
123        SEQUENCE {
124            number   [0] Integer32,
125            contents [1] ParameterContents OPTIONAL,
126            children [2] ElementCollection OPTIONAL
127        }
128
129
130QualifiedParameter ::=
131    [APPLICATION 9] IMPLICIT
132        SEQUENCE {
133            path     [0] RELATIVE-OID,
134            contents [1] ParameterContents OPTIONAL,
135            children [2] ElementCollection OPTIONAL
136        }
137
138
139ParameterContents ::=
140    SET {
141        identifier       [ 0] EmberString             OPTIONAL,
142        description      [ 1] EmberString             OPTIONAL,
143        value            [ 2] Value                   OPTIONAL,
144        minimum          [ 3] MinMax                  OPTIONAL,
145        maximum          [ 4] MinMax                  OPTIONAL,
146        access           [ 5] ParameterAccess         OPTIONAL,
147        format           [ 6] EmberString             OPTIONAL,
148        enumeration      [ 7] EmberString             OPTIONAL,
149        factor           [ 8] Integer32               OPTIONAL,
150        isOnline         [ 9] BOOLEAN                 OPTIONAL,
151        formula          [10] EmberString             OPTIONAL,
152        step             [11] Integer32               OPTIONAL,
153        default          [12] Value                   OPTIONAL,
154        type             [13] ParameterType           OPTIONAL,
155        streamIdentifier [14] Integer32               OPTIONAL,
156        enumMap          [15] StringIntegerCollection OPTIONAL,
157        streamDescriptor [16] StreamDescription       OPTIONAL,
158        schemaIdentifiers[17] EmberString             OPTIONAL,
159        templateReference[18] RELATIVE-OID            OPTIONAL
160    }
161
162
163Value ::=
164    CHOICE {
165        integer Integer64,
166        real    REAL,
167        string  EmberString,
168        boolean BOOLEAN,
169        octets  OCTET STRING,
170        null    NULL
171    }
172
173
174MinMax ::=
175    CHOICE {
176        integer Integer64,
177        real    REAL,
178        null    NULL
179    }
180
181
182ParameterType ::=
183    INTEGER {
184        null    (0),
185        integer (1),
186        real    (2),
187        string  (3),
188        boolean (4),
189        trigger (5),
190        enum    (6),
191        octets  (7)
192    }
193
194
195ParameterAccess ::=
196    INTEGER {
197        none      (0),
198        read      (1), -- default
199        write     (2),
200        readWrite (3)
201    }
202
203
204StringIntegerPair ::=
205    [APPLICATION 7] IMPLICIT
206        SEQUENCE {
207            entryString  [0] EmberString,
208            entryInteger [1] Integer32
209        }
210
211
212StringIntegerCollection ::=
213    [APPLICATION 8] IMPLICIT
214        SEQUENCE OF [0] StringIntegerPair
215
216
217StreamDescription ::=
218    [APPLICATION 12] IMPLICIT
219        SEQUENCE {
220            streamFormat [0] StreamFormat,
221            offset [1] Integer32  -- byte offset of the value in the streamed blob.
222        }
223
224
225-- type:       0=uint,  1=int,   2=float
226-- size:       0=1byte, 1=2byte, 2=4byte, 3=8byte
227-- endianness: 0=big,   1=little
228StreamFormat ::=
229    INTEGER {
230        unsignedInt8                  ( 0), -- 00000 00 0
231        unsignedInt16BigEndian        ( 2), -- 00000 01 0
232        unsignedInt16LittleEndian     ( 3), -- 00000 01 1
233        unsignedInt32BigEndian        ( 4), -- 00000 10 0
234        unsignedInt32LittleEndian     ( 5), -- 00000 10 1
235        unsignedInt64BigEndian        ( 6), -- 00000 11 0
236        unsignedInt64LittleEndian     ( 7), -- 00000 11 1
237        signedInt8                    ( 8), -- 00001 00 0
238        signedInt16BigEndian          (10), -- 00001 01 0
239        signedInt16LittleEndian       (11), -- 00001 01 1
240        signedInt32BigEndian          (12), -- 00001 10 0
241        signedInt32LittleEndian       (13), -- 00001 10 1
242        signedInt64BigEndian          (14), -- 00001 11 0
243        signedInt64LittleEndian       (15), -- 00001 11 1
244        ieeeFloat32BigEndian          (20), -- 00010 10 0
245        ieeeFloat32LittleEndian       (21), -- 00010 10 1
246        ieeeFloat64BigEndian          (22), -- 00010 11 0
247        ieeeFloat64LittleEndian       (23)  -- 00010 11 1
248    }
249
250
251-- ======================================================
252--
253-- Command
254--
255-- ======================================================
256
257Command ::=
258    [APPLICATION 2] IMPLICIT
259        SEQUENCE {
260            number    [0] CommandType,
261            options       CHOICE {
262                dirFieldMask [1] FieldFlags, -- only valid if number is getDirectory(32)
263                invocation   [2] Invocation -- only valid if number is invoke(33)
264            } OPTIONAL
265        }
266
267
268CommandType ::=
269    INTEGER {
270        subscribe    (30),
271        unsubscribe  (31),
272        getDirectory (32),
273        invoke       (33)
274    }
275
276
277FieldFlags ::=
278    INTEGER {
279        sparse            (-2),
280        all               (-1),
281        default           ( 0), -- same as "all"
282        identifier        ( 1),
283        description       ( 2),
284        tree              ( 3),
285        value             ( 4),
286        connections       ( 5)
287    }
288
289
290-- ======================================================
291--
292-- Node
293--
294-- ======================================================
295
296Node ::=
297    [APPLICATION 3] IMPLICIT
298        SEQUENCE {
299            number   [0] Integer32,
300            contents [1] NodeContents      OPTIONAL,
301            children [2] ElementCollection OPTIONAL
302        }
303
304
305QualifiedNode ::=
306    [APPLICATION 10] IMPLICIT
307        SEQUENCE {
308            path     [0] RELATIVE-OID,
309            contents [1] NodeContents      OPTIONAL,
310            children [2] ElementCollection OPTIONAL
311        }
312
313
314NodeContents ::=
315    SET {
316        identifier       [0] EmberString  OPTIONAL,
317        description      [1] EmberString  OPTIONAL,
318        isRoot           [2] BOOLEAN      OPTIONAL,
319        isOnline         [3] BOOLEAN      OPTIONAL,   -- default is true
320        schemaIdentifiers[4] EmberString  OPTIONAL,
321        templateReference[5] RELATIVE-OID OPTIONAL
322    }
323
324
325-- ======================================================
326--
327-- Matrix
328--
329-- ======================================================
330
331Matrix ::=
332    [APPLICATION 13] IMPLICIT
333        SEQUENCE {
334            number         [0] Integer32,
335            contents       [1] MatrixContents       OPTIONAL,
336            children       [2] ElementCollection    OPTIONAL,
337            targetList     [3] TargetCollection     OPTIONAL,
338            sourceList     [4] SourceCollection     OPTIONAL,
339            connections    [5] ConnectionCollection OPTIONAL
340        }
341
342
343MatrixContents ::=
344    SET {
345        identifier               [ 0] EmberString,
346        description              [ 1] EmberString          OPTIONAL,
347        type                     [ 2] MatrixType           OPTIONAL,
348        addressingMode           [ 3] MatrixAddressingMode OPTIONAL,
349        targetCount              [ 4] Integer32,                     -- linear: matrix X size; nonLinear: number of targets
350        sourceCount              [ 5] Integer32,                     -- linear: matrix Y size; nonLinear: number of sources
351        maximumTotalConnects     [ 6] Integer32            OPTIONAL, -- nToN: max number of set connections
352        maximumConnectsPerTarget [ 7] Integer32            OPTIONAL, -- nToN: max number of sources connected to one target
353        parametersLocation       [ 8] ParametersLocation   OPTIONAL,
354        gainParameterNumber      [ 9] Integer32            OPTIONAL, -- nToN: number of connection gain parameter
355        labels                   [10] LabelCollection      OPTIONAL,
356        schemaIdentifiers        [11] EmberString          OPTIONAL,
357        templateReference        [12] RELATIVE-OID OPTIONAL
358    }
359
360-- Addressing scheme for node at MatrixContents.parametersLocation:
361-- N 0001 targets.<targetNumber>: subtree containing parameters attached to target with <targetNumber>
362-- N 0002 sources.<sourceNumber>: subtree containing parameters attached to source with <targetNumber>
363-- N 0003 connections.<targetNumber>.<sourceNumber>: : subtree containing parameters attached to connection <targetNumber>/<sourceNumber>
364
365
366MatrixType ::=
367    INTEGER {
368        oneToN   (0),  -- default
369        oneToOne (1),
370        nToN     (2)
371    }
372
373
374MatrixAddressingMode ::=
375    INTEGER {
376        linear    (0),  -- default
377        nonLinear (1)
378    }
379
380
381ParametersLocation ::=
382    CHOICE {
383        basePath RELATIVE-OID, -- absolute path to node containing parameters for targets, sources and connections
384        inline   Integer32     -- subidentifier to node containing parameters for targets, sources and connections
385    }
386
387
388LabelCollection ::=
389    SEQUENCE OF [0] Label
390
391
392Label ::=
393    [APPLICATION 18] IMPLICIT
394        SEQUENCE {
395            basePath    [0] RELATIVE-OID,
396            description [1] EmberString
397        }
398
399
400TargetCollection ::=
401    SEQUENCE OF [0] Target
402
403
404Target ::=
405    [APPLICATION 14] IMPLICIT
406        Signal
407
408
409Signal ::=
410    SEQUENCE {
411        number  [0] Integer32
412    }
413
414
415SourceCollection ::=
416    SEQUENCE OF [0] Source
417
418
419Source ::=
420    [APPLICATION 15] IMPLICIT
421        Signal
422
423
424ConnectionCollection ::=
425    SEQUENCE OF [0] Connection
426
427
428Connection ::=
429    [APPLICATION 16] IMPLICIT
430        SEQUENCE {
431            target         [0] Integer32,
432            sources        [1] PackedNumbers         OPTIONAL, -- not present or empty array means "none"
433            operation      [2] ConnectionOperation   OPTIONAL,
434            disposition    [3] ConnectionDisposition OPTIONAL
435        }
436
437-- Use case 1: Tally (Provider to consumer)
438-- Connection: { target:1, sources:[5,2], operation:absolute, disposition:tally }
439
440-- Use case 2: Take (Consumer to provider)
441-- Connection: { target:1, sources:[4], operation:absolute|connect|disconnect }
442
443-- Use case 3: TakeResponse (Provider to consumer)
444-- Connection: { target:1, sources:[4], operation:absolute, disposition:modified|pending|locked|... }
445
446
447PackedNumbers ::=
448    RELATIVE-OID
449
450
451ConnectionOperation ::=
452    INTEGER {
453        absolute   (0),  -- default. sources contains absolute information
454        connect    (1),  -- nToN only. sources contains sources to add to connection
455        disconnect (2)   -- nToN only. sources contains sources to remove from connection
456    }
457
458
459ConnectionDisposition ::=
460    INTEGER {
461        tally    (0),  -- default
462        modified (1),  -- sources contains new current state
463        pending  (2),  -- sources contains future state
464        locked   (3)   -- error: target locked. sources contains current state
465        -- more tbd.
466    }
467
468
469QualifiedMatrix ::=
470    [APPLICATION 17] IMPLICIT
471        SEQUENCE {
472            path           [0] RELATIVE-OID,
473            contents       [1] MatrixContents       OPTIONAL,
474            children       [2] ElementCollection    OPTIONAL,
475            targetList     [3] TargetCollection     OPTIONAL,
476            sourceList     [4] SourceCollection     OPTIONAL,
477            connections    [5] ConnectionCollection OPTIONAL
478        }
479
480
481-- ======================================================
482--
483-- Function
484--
485-- ======================================================
486
487Function ::=
488    [APPLICATION 19] IMPLICIT
489        SEQUENCE {
490            number      [0] Integer32,
491            contents    [1] FunctionContents    OPTIONAL,
492            children    [2] ElementCollection   OPTIONAL
493        }
494
495
496QualifiedFunction ::=
497    [APPLICATION 20] IMPLICIT
498        SEQUENCE {
499            path        [0] RELATIVE-OID,
500            contents    [1] FunctionContents    OPTIONAL,
501            children    [2] ElementCollection   OPTIONAL
502        }
503
504
505FunctionContents ::=
506    SET {
507        identifier       [0] EmberString         OPTIONAL,
508        description      [1] EmberString         OPTIONAL,
509        arguments        [2] TupleDescription    OPTIONAL,
510        result           [3] TupleDescription    OPTIONAL,
511        templateReference[4] RELATIVE-OID        OPTIONAL
512    }
513
514
515TupleDescription ::=
516    SEQUENCE OF [0] TupleItemDescription
517
518
519TupleItemDescription ::=
520    [APPLICATION 21] IMPLICIT
521        SEQUENCE {
522            type     [0] ParameterType,
523            name     [1] EmberString            OPTIONAL
524        }
525
526
527Invocation ::=
528    [APPLICATION 22] IMPLICIT
529        SEQUENCE {
530            invocationId    [0] Integer32       OPTIONAL,
531            arguments       [1] Tuple           OPTIONAL
532        }
533
534
535Tuple ::=
536    SEQUENCE OF [0] Value
537
538
539InvocationResult ::=
540    [APPLICATION 23] IMPLICIT
541        SEQUENCE {
542            invocationId    [0] Integer32,
543            success         [1] BOOLEAN         OPTIONAL,
544            result          [2] Tuple           OPTIONAL
545        }
546
547
548-- ======================================================
549--
550-- ElementCollection
551--
552-- ======================================================
553
554ElementCollection ::=
555    [APPLICATION 4] IMPLICIT
556        SEQUENCE OF [0] Element
557
558
559Element ::=
560    CHOICE {
561        parameter          Parameter,
562        node               Node,
563        command            Command,
564        matrix             Matrix,
565        function           Function,
566        template           Template
567    }
568
569
570-- ======================================================
571--
572-- Streams
573--
574-- ======================================================
575
576StreamEntry ::=
577    [APPLICATION 5] IMPLICIT
578        SEQUENCE {
579            streamIdentifier [0] Integer32,
580            streamValue      [1] Value
581        }
582
583
584StreamCollection ::=
585    [APPLICATION 6] IMPLICIT
586        SEQUENCE OF [0] StreamEntry
587
588
589-- ======================================================
590--
591-- Root
592--
593-- ======================================================
594
595Root ::=
596   [APPLICATION 0]
597       CHOICE {
598           elements         RootElementCollection,
599           streams          StreamCollection,
600           invocationResult InvocationResult
601       }
602
603
604RootElementCollection ::=
605    [APPLICATION 11] IMPLICIT
606        SEQUENCE OF [0] RootElement
607
608
609RootElement ::=
610    CHOICE {
611        element            Element,
612        qualifiedParameter QualifiedParameter,
613        qualifiedNode      QualifiedNode,
614        qualifiedMatrix    QualifiedMatrix,
615        qualifiedFunction  QualifiedFunction,
616        qualifiedTemplate  QualifiedTemplate
617    }
618
619
620END
621
622