2 Value Reference is a URI compatible string that represents a in-value path from a structure to a sub-structure.
3 For example, to an element of an array (index) or map (key), or record field (field-name).
5 There are explicit references and label references. Explicit references are typed, they specify the datatype where the reference is applicable. for example "i-5" is read "Array index 5", or "n-name" is "Record field name".
7 Label references are more human readable, but must be used in correct context to be usable. For example reference "5" is ambiguous, it can mean array index 5, or map element by key 5:integer, or record field by name "5" - the reference depends on the data where it is applied.
9 {| border="1" cellpadding="3" cellspacing="0" align="center"
10 |- style="background-color: #f9f9f9;"
11 |'''Node Type''' || '''Child Reference String Notation'''
13 |Index Reference (Array, Union, Record) ||''i-<index>''
15 |Key Reference (Map) ||''k-<key>''*
16 |- style="background-color: #f9f9f9;"
17 |Name Reference (Record, Union) ||''n-<field name>''**
18 |- style="background-color: #f9f9f9;"
19 |Component Reference (Optional, Union, Variant) ||v
21 |Label Reference (Array, Union, Record, Optional, Variant) ||<string>**
23 *) Key is ascii serialized with Variant String encoding
24 **) Names are escaped using URI escape rules [http://www.ietf.org/rfc/rfc2396.txt]
26 Path separator is '''/''', for example: ''nodes/SSINE/value/o/v''
31 ==Reference definitons==
32 The datatype definition for ChildReference is an union.
34 type ChildReference = | IndexReference { childReference : Optional(ChildReference), index : Integer }
35 | KeyReference { childReference : Optional(ChildReference), key : Variant }
36 | NameReference { childReference : Optional(ChildReference), name : String }
37 | ComponentReference { childReference : Optional(ChildReference) }
38 | LabelReference { childReference : Optional(ChildReference), label : String }
40 An event contains a modification to the data model.
41 type Event = | ArrayElementAdded { reference : Optional( ChildReference ), index : Integer, value : Optional( Variant ) }
42 | ArrayElementRemoved { reference : Optional( ChildReference ), index : Integer }
43 | MapEntryAdded { reference : Optional( ChildReference ), key : Variant, value : Optional( Variant ) }
44 | MapEntryRemoved { reference : Optional( ChildReference ), key : Variant }
45 | UnionValueAssigned { reference : Optional( ChildReference ), tag : Integer, newValue : Optional( Variant ) }
46 | OptionalValueAssigned { reference : Optional( ChildReference ), newValue : Optional( Variant ) }
47 | OptionalValueRemoved { reference : Optional( ChildReference ) }
48 | ValueAssigned { reference : Optional( ChildReference ), newValue : Optional( Variant ) }
49 | InvalidatedEvent { reference : Optional( ChildReference ) }
51 type ChangeSet = { events : Event[] }
53 InterestSet describes how and what of a sub-tree is to be monitored.
54 type InterestSet = | BooleanInterestSet { notification : Boolean, value : Boolean }
55 | ByteInterestSet { notification : Boolean, value : Boolean }
56 | IntegerInterestSet { notification : Boolean, value : Boolean }
57 | LongInterestSet { notification : Boolean, value : Boolean }
58 | FloatInterestSet { notification : Boolean, value : Boolean }
59 | DoubleInterestSet { notification : Boolean, value : Boolean }
60 | StringInterestSet { notification : Boolean, value : Boolean }
61 | RecordInterestSet { notification : Boolean, notifications : Boolean[], value : Boolean, values : Boolean[] }
62 | ArrayInterestSet { notification : Boolean, notifications : Integer[], value : Boolean, values : Integer[] }
63 | MapInterestSet { notification : Boolean, notifications : Variant[], value : Boolean, values : Variant[], componentInterest : InterestSet, componentInterests : Map( Variant, InterestSet ) }
64 | OptionalInterestSet { notification : Boolean, value : Boolean, componentInterest : InterestSet }
65 | UnionInterestSet { notification : Boolean, value : Boolean, componentInterests : InterestSet[] }
66 | VariantInterestSet { notification : Boolean, value : Boolean, componentInterest : InterestSet, completeComponent : Boolean }