line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# You may distribute under the terms of either the GNU General Public License |
2
|
|
|
|
|
|
|
# or the Artistic License (the same terms as Perl itself) |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# (C) Paul Evans, 2010-2016 -- leonerd@leonerd.org.uk |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Tangence::Constants 0.28; |
7
|
|
|
|
|
|
|
|
8
|
15
|
|
|
15
|
|
794245
|
use v5.26; |
|
15
|
|
|
|
|
155
|
|
9
|
15
|
|
|
15
|
|
65
|
use warnings; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
410
|
|
10
|
|
|
|
|
|
|
|
11
|
15
|
|
|
15
|
|
64
|
use Exporter 'import'; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
1507
|
|
12
|
|
|
|
|
|
|
our @EXPORT = qw( |
13
|
|
|
|
|
|
|
MSG_CALL |
14
|
|
|
|
|
|
|
MSG_SUBSCRIBE |
15
|
|
|
|
|
|
|
MSG_UNSUBSCRIBE |
16
|
|
|
|
|
|
|
MSG_EVENT |
17
|
|
|
|
|
|
|
MSG_GETPROP |
18
|
|
|
|
|
|
|
MSG_SETPROP |
19
|
|
|
|
|
|
|
MSG_WATCH |
20
|
|
|
|
|
|
|
MSG_UNWATCH |
21
|
|
|
|
|
|
|
MSG_UPDATE |
22
|
|
|
|
|
|
|
MSG_DESTROY |
23
|
|
|
|
|
|
|
MSG_GETPROPELEM |
24
|
|
|
|
|
|
|
MSG_WATCH_CUSR |
25
|
|
|
|
|
|
|
MSG_CUSR_NEXT |
26
|
|
|
|
|
|
|
MSG_CUSR_DESTROY |
27
|
|
|
|
|
|
|
MSG_GETROOT |
28
|
|
|
|
|
|
|
MSG_GETREGISTRY |
29
|
|
|
|
|
|
|
MSG_INIT |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
MSG_OK |
32
|
|
|
|
|
|
|
MSG_ERROR |
33
|
|
|
|
|
|
|
MSG_RESULT |
34
|
|
|
|
|
|
|
MSG_SUBSCRIBED |
35
|
|
|
|
|
|
|
MSG_WATCHING |
36
|
|
|
|
|
|
|
MSG_WATCHING_CUSR |
37
|
|
|
|
|
|
|
MSG_CUSR_RESULT |
38
|
|
|
|
|
|
|
MSG_INITED |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
DIM_SCALAR |
41
|
|
|
|
|
|
|
DIM_HASH |
42
|
|
|
|
|
|
|
DIM_QUEUE |
43
|
|
|
|
|
|
|
DIM_ARRAY |
44
|
|
|
|
|
|
|
DIM_OBJSET |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
DIMNAMES |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
CHANGE_SET |
49
|
|
|
|
|
|
|
CHANGE_ADD |
50
|
|
|
|
|
|
|
CHANGE_DEL |
51
|
|
|
|
|
|
|
CHANGE_PUSH |
52
|
|
|
|
|
|
|
CHANGE_SHIFT |
53
|
|
|
|
|
|
|
CHANGE_SPLICE |
54
|
|
|
|
|
|
|
CHANGE_MOVE |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
CHANGETYPES |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
CUSR_FIRST |
59
|
|
|
|
|
|
|
CUSR_LAST |
60
|
|
|
|
|
|
|
CUSR_FWD |
61
|
|
|
|
|
|
|
CUSR_BACK |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
DATA_NUMBER |
64
|
|
|
|
|
|
|
DATA_STRING |
65
|
|
|
|
|
|
|
DATA_LIST |
66
|
|
|
|
|
|
|
DATA_DICT |
67
|
|
|
|
|
|
|
DATA_OBJECT |
68
|
|
|
|
|
|
|
DATA_RECORD |
69
|
|
|
|
|
|
|
DATA_META |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
DATANUM_BOOLFALSE |
72
|
|
|
|
|
|
|
DATANUM_BOOLTRUE |
73
|
|
|
|
|
|
|
DATANUM_UINT8 |
74
|
|
|
|
|
|
|
DATANUM_SINT8 |
75
|
|
|
|
|
|
|
DATANUM_UINT16 |
76
|
|
|
|
|
|
|
DATANUM_SINT16 |
77
|
|
|
|
|
|
|
DATANUM_UINT32 |
78
|
|
|
|
|
|
|
DATANUM_SINT32 |
79
|
|
|
|
|
|
|
DATANUM_UINT64 |
80
|
|
|
|
|
|
|
DATANUM_SINT64 |
81
|
|
|
|
|
|
|
DATANUM_FLOAT16 |
82
|
|
|
|
|
|
|
DATANUM_FLOAT32 |
83
|
|
|
|
|
|
|
DATANUM_FLOAT64 |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
DATAMETA_CONSTRUCT |
86
|
|
|
|
|
|
|
DATAMETA_CLASS |
87
|
|
|
|
|
|
|
DATAMETA_STRUCT |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
VERSION_MAJOR |
90
|
|
|
|
|
|
|
VERSION_MINOR |
91
|
|
|
|
|
|
|
); |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
# Message types |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
# Requests |
96
|
15
|
|
|
15
|
|
118
|
use constant MSG_CALL => 0x01; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
1045
|
|
97
|
15
|
|
|
15
|
|
99
|
use constant MSG_SUBSCRIBE => 0x02; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
706
|
|
98
|
15
|
|
|
15
|
|
82
|
use constant MSG_UNSUBSCRIBE => 0x03; |
|
15
|
|
|
|
|
38
|
|
|
15
|
|
|
|
|
673
|
|
99
|
15
|
|
|
15
|
|
93
|
use constant MSG_EVENT => 0x04; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
663
|
|
100
|
15
|
|
|
15
|
|
84
|
use constant MSG_GETPROP => 0x05; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
699
|
|
101
|
15
|
|
|
15
|
|
83
|
use constant MSG_SETPROP => 0x06; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
629
|
|
102
|
15
|
|
|
15
|
|
85
|
use constant MSG_WATCH => 0x07; |
|
15
|
|
|
|
|
39
|
|
|
15
|
|
|
|
|
652
|
|
103
|
15
|
|
|
15
|
|
80
|
use constant MSG_UNWATCH => 0x08; |
|
15
|
|
|
|
|
18
|
|
|
15
|
|
|
|
|
667
|
|
104
|
15
|
|
|
15
|
|
106
|
use constant MSG_UPDATE => 0x09; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
775
|
|
105
|
15
|
|
|
15
|
|
88
|
use constant MSG_DESTROY => 0x0a; |
|
15
|
|
|
|
|
22
|
|
|
15
|
|
|
|
|
670
|
|
106
|
15
|
|
|
15
|
|
79
|
use constant MSG_GETPROPELEM => 0x0b; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
673
|
|
107
|
15
|
|
|
15
|
|
109
|
use constant MSG_WATCH_CUSR => 0x0c; |
|
15
|
|
|
|
|
34
|
|
|
15
|
|
|
|
|
648
|
|
108
|
15
|
|
|
15
|
|
76
|
use constant MSG_CUSR_NEXT => 0x0d; |
|
15
|
|
|
|
|
43
|
|
|
15
|
|
|
|
|
782
|
|
109
|
15
|
|
|
15
|
|
85
|
use constant MSG_CUSR_DESTROY => 0x0e; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
647
|
|
110
|
|
|
|
|
|
|
|
111
|
15
|
|
|
15
|
|
77
|
use constant MSG_GETROOT => 0x40; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
666
|
|
112
|
15
|
|
|
15
|
|
80
|
use constant MSG_GETREGISTRY => 0x41; |
|
15
|
|
|
|
|
39
|
|
|
15
|
|
|
|
|
708
|
|
113
|
15
|
|
|
15
|
|
114
|
use constant MSG_INIT => 0x7f; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
691
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
# Responses |
116
|
15
|
|
|
15
|
|
81
|
use constant MSG_OK => 0x80; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
635
|
|
117
|
15
|
|
|
15
|
|
90
|
use constant MSG_ERROR => 0x81; |
|
15
|
|
|
|
|
21
|
|
|
15
|
|
|
|
|
821
|
|
118
|
15
|
|
|
15
|
|
99
|
use constant MSG_RESULT => 0x82; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
628
|
|
119
|
15
|
|
|
15
|
|
79
|
use constant MSG_SUBSCRIBED => 0x83; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
613
|
|
120
|
15
|
|
|
15
|
|
72
|
use constant MSG_WATCHING => 0x84; |
|
15
|
|
|
|
|
37
|
|
|
15
|
|
|
|
|
648
|
|
121
|
15
|
|
|
15
|
|
80
|
use constant MSG_WATCHING_CUSR => 0x85; |
|
15
|
|
|
|
|
21
|
|
|
15
|
|
|
|
|
589
|
|
122
|
15
|
|
|
15
|
|
72
|
use constant MSG_CUSR_RESULT => 0x86; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
673
|
|
123
|
|
|
|
|
|
|
|
124
|
15
|
|
|
15
|
|
92
|
use constant MSG_INITED => 0xff; |
|
15
|
|
|
|
|
39
|
|
|
15
|
|
|
|
|
643
|
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
# Property dimensions |
128
|
15
|
|
|
15
|
|
75
|
use constant DIM_SCALAR => 1; |
|
15
|
|
|
|
|
35
|
|
|
15
|
|
|
|
|
708
|
|
129
|
15
|
|
|
15
|
|
83
|
use constant DIM_HASH => 2; |
|
15
|
|
|
|
|
22
|
|
|
15
|
|
|
|
|
616
|
|
130
|
15
|
|
|
15
|
|
97
|
use constant DIM_QUEUE => 3; |
|
15
|
|
|
|
|
32
|
|
|
15
|
|
|
|
|
668
|
|
131
|
15
|
|
|
15
|
|
76
|
use constant DIM_ARRAY => 4; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
662
|
|
132
|
15
|
|
|
15
|
|
76
|
use constant DIM_OBJSET => 5; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
853
|
|
133
|
|
|
|
|
|
|
|
134
|
15
|
|
|
|
|
714
|
use constant DIMNAMES => [ |
135
|
|
|
|
|
|
|
undef, |
136
|
|
|
|
|
|
|
"scalar", |
137
|
|
|
|
|
|
|
"hash", |
138
|
|
|
|
|
|
|
"queue", |
139
|
|
|
|
|
|
|
"array", |
140
|
|
|
|
|
|
|
"objset", |
141
|
15
|
|
|
15
|
|
95
|
]; |
|
15
|
|
|
|
|
24
|
|
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
# Property change types |
144
|
15
|
|
|
15
|
|
80
|
use constant CHANGE_SET => 1; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
644
|
|
145
|
15
|
|
|
15
|
|
80
|
use constant CHANGE_ADD => 2; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
651
|
|
146
|
15
|
|
|
15
|
|
83
|
use constant CHANGE_DEL => 3; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
663
|
|
147
|
15
|
|
|
15
|
|
80
|
use constant CHANGE_PUSH => 4; |
|
15
|
|
|
|
|
18
|
|
|
15
|
|
|
|
|
853
|
|
148
|
15
|
|
|
15
|
|
90
|
use constant CHANGE_SHIFT => 5; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
688
|
|
149
|
15
|
|
|
15
|
|
120
|
use constant CHANGE_SPLICE => 6; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
602
|
|
150
|
15
|
|
|
15
|
|
72
|
use constant CHANGE_MOVE => 7; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
1178
|
|
151
|
|
|
|
|
|
|
|
152
|
15
|
|
|
|
|
832
|
use constant CHANGETYPES => { |
153
|
|
|
|
|
|
|
DIM_SCALAR() => [qw( on_set )], |
154
|
|
|
|
|
|
|
DIM_HASH() => [qw( on_set on_add on_del )], |
155
|
|
|
|
|
|
|
DIM_QUEUE() => [qw( on_set on_push on_shift )], |
156
|
|
|
|
|
|
|
DIM_ARRAY() => [qw( on_set on_push on_shift on_splice on_move )], |
157
|
|
|
|
|
|
|
DIM_OBJSET() => [qw( on_set on_add on_del )], |
158
|
15
|
|
|
15
|
|
87
|
}; |
|
15
|
|
|
|
|
25
|
|
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
# Cursor messages |
161
|
15
|
|
|
15
|
|
80
|
use constant CUSR_FIRST => 1; |
|
15
|
|
|
|
|
66
|
|
|
15
|
|
|
|
|
628
|
|
162
|
15
|
|
|
15
|
|
76
|
use constant CUSR_LAST => 2; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
657
|
|
163
|
15
|
|
|
15
|
|
90
|
use constant CUSR_FWD => 1; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
597
|
|
164
|
15
|
|
|
15
|
|
73
|
use constant CUSR_BACK => 2; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
672
|
|
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
# Stream data types |
167
|
15
|
|
|
15
|
|
80
|
use constant DATA_NUMBER => 0; |
|
15
|
|
|
|
|
32
|
|
|
15
|
|
|
|
|
674
|
|
168
|
15
|
|
|
15
|
|
79
|
use constant DATANUM_BOOLFALSE => 0; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
807
|
|
169
|
15
|
|
|
15
|
|
81
|
use constant DATANUM_BOOLTRUE => 1; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
674
|
|
170
|
15
|
|
|
15
|
|
85
|
use constant DATANUM_UINT8 => 2; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
599
|
|
171
|
15
|
|
|
15
|
|
79
|
use constant DATANUM_SINT8 => 3; |
|
15
|
|
|
|
|
36
|
|
|
15
|
|
|
|
|
625
|
|
172
|
15
|
|
|
15
|
|
84
|
use constant DATANUM_UINT16 => 4; |
|
15
|
|
|
|
|
22
|
|
|
15
|
|
|
|
|
689
|
|
173
|
15
|
|
|
15
|
|
87
|
use constant DATANUM_SINT16 => 5; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
615
|
|
174
|
15
|
|
|
15
|
|
76
|
use constant DATANUM_UINT32 => 6; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
722
|
|
175
|
15
|
|
|
15
|
|
82
|
use constant DATANUM_SINT32 => 7; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
589
|
|
176
|
15
|
|
|
15
|
|
76
|
use constant DATANUM_UINT64 => 8; |
|
15
|
|
|
|
|
41
|
|
|
15
|
|
|
|
|
647
|
|
177
|
15
|
|
|
15
|
|
85
|
use constant DATANUM_SINT64 => 9; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
737
|
|
178
|
15
|
|
|
15
|
|
82
|
use constant DATANUM_FLOAT16 => 16; |
|
15
|
|
|
|
|
20
|
|
|
15
|
|
|
|
|
645
|
|
179
|
15
|
|
|
15
|
|
112
|
use constant DATANUM_FLOAT32 => 17; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
685
|
|
180
|
15
|
|
|
15
|
|
84
|
use constant DATANUM_FLOAT64 => 18; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
603
|
|
181
|
15
|
|
|
15
|
|
82
|
use constant DATA_STRING => 1; |
|
15
|
|
|
|
|
34
|
|
|
15
|
|
|
|
|
613
|
|
182
|
15
|
|
|
15
|
|
117
|
use constant DATA_LIST => 2; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
658
|
|
183
|
15
|
|
|
15
|
|
86
|
use constant DATA_DICT => 3; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
764
|
|
184
|
15
|
|
|
15
|
|
83
|
use constant DATA_OBJECT => 4; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
651
|
|
185
|
15
|
|
|
15
|
|
71
|
use constant DATA_RECORD => 5; |
|
15
|
|
|
|
|
302
|
|
|
15
|
|
|
|
|
692
|
|
186
|
15
|
|
|
15
|
|
84
|
use constant DATA_META => 7; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
677
|
|
187
|
15
|
|
|
15
|
|
88
|
use constant DATAMETA_CONSTRUCT => 1; |
|
15
|
|
|
|
|
20
|
|
|
15
|
|
|
|
|
588
|
|
188
|
15
|
|
|
15
|
|
78
|
use constant DATAMETA_CLASS => 2; |
|
15
|
|
|
|
|
36
|
|
|
15
|
|
|
|
|
679
|
|
189
|
15
|
|
|
15
|
|
84
|
use constant DATAMETA_STRUCT => 3; |
|
15
|
|
|
|
|
33
|
|
|
15
|
|
|
|
|
592
|
|
190
|
|
|
|
|
|
|
|
191
|
15
|
|
|
15
|
|
72
|
use constant VERSION_MAJOR => 0; |
|
15
|
|
|
|
|
21
|
|
|
15
|
|
|
|
|
682
|
|
192
|
15
|
|
|
15
|
|
91
|
use constant VERSION_MINOR => 4; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
850
|
|
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=head1 AUTHOR |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
Paul Evans |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
=cut |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
0x55AA; |