Tangence/Constants.pm

filter: Statementstmt 100% 214 / 214 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 71 / 71 Podpod n/a totaltotal 100% 285 / 285 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Tangence.pm ↑ Summary Tangence/Meta/Argument.pm »
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.33;
7  
8 15 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 15 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 15 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
12 15 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 ▶use constant MSG_CALL => 0x01;
Subroutine BEGIN: called CC=1 SCAR=0.0
97 15 ▶use constant MSG_SUBSCRIBE => 0x02;
Subroutine BEGIN: called CC=1 SCAR=0.0
98 15 ▶use constant MSG_UNSUBSCRIBE => 0x03;
Subroutine BEGIN: called CC=1 SCAR=0.0
99 15 ▶use constant MSG_EVENT => 0x04;
Subroutine BEGIN: called CC=1 SCAR=0.0
100 15 ▶use constant MSG_GETPROP => 0x05;
Subroutine BEGIN: called CC=1 SCAR=0.0
101 15 ▶use constant MSG_SETPROP => 0x06;
Subroutine BEGIN: called CC=1 SCAR=0.0
102 15 ▶use constant MSG_WATCH => 0x07;
Subroutine BEGIN: called CC=1 SCAR=0.0
103 15 ▶use constant MSG_UNWATCH => 0x08;
Subroutine BEGIN: called CC=1 SCAR=0.0
104 15 ▶use constant MSG_UPDATE => 0x09;
Subroutine BEGIN: called CC=1 SCAR=0.0
105 15 ▶use constant MSG_DESTROY => 0x0a;
Subroutine BEGIN: called CC=1 SCAR=0.0
106 15 ▶use constant MSG_GETPROPELEM => 0x0b;
Subroutine BEGIN: called CC=1 SCAR=0.0
107 15 ▶use constant MSG_WATCH_CUSR => 0x0c;
Subroutine BEGIN: called CC=1 SCAR=0.0
108 15 ▶use constant MSG_CUSR_NEXT => 0x0d;
Subroutine BEGIN: called CC=1 SCAR=0.0
109 15 ▶use constant MSG_CUSR_DESTROY => 0x0e;
Subroutine BEGIN: called CC=1 SCAR=0.0
110  
111 15 ▶use constant MSG_GETROOT => 0x40;
Subroutine BEGIN: called CC=1 SCAR=0.0
112 15 ▶use constant MSG_GETREGISTRY => 0x41;
Subroutine BEGIN: called CC=1 SCAR=0.0
113 15 ▶use constant MSG_INIT => 0x7f;
Subroutine BEGIN: called CC=1 SCAR=0.0
114  
115 # Responses
116 15 ▶use constant MSG_OK => 0x80;
Subroutine BEGIN: called CC=1 SCAR=0.0
117 15 ▶use constant MSG_ERROR => 0x81;
Subroutine BEGIN: called CC=1 SCAR=0.0
118 15 ▶use constant MSG_RESULT => 0x82;
Subroutine BEGIN: called CC=1 SCAR=0.0
119 15 ▶use constant MSG_SUBSCRIBED => 0x83;
Subroutine BEGIN: called CC=1 SCAR=0.0
120 15 ▶use constant MSG_WATCHING => 0x84;
Subroutine BEGIN: called CC=1 SCAR=0.0
121 15 ▶use constant MSG_WATCHING_CUSR => 0x85;
Subroutine BEGIN: called CC=1 SCAR=0.0
122 15 ▶use constant MSG_CUSR_RESULT => 0x86;
Subroutine BEGIN: called CC=1 SCAR=0.0
123  
124 15 ▶use constant MSG_INITED => 0xff;
Subroutine BEGIN: called CC=1 SCAR=0.0
125  
126  
127 # Property dimensions
128 15 ▶use constant DIM_SCALAR => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
129 15 ▶use constant DIM_HASH => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
130 15 ▶use constant DIM_QUEUE => 3;
Subroutine BEGIN: called CC=1 SCAR=0.0
131 15 ▶use constant DIM_ARRAY => 4;
Subroutine BEGIN: called CC=1 SCAR=0.0
132 15 ▶use constant DIM_OBJSET => 5;
Subroutine BEGIN: called CC=1 SCAR=0.0
133  
134 15 ▶use constant DIMNAMES => [
Subroutine BEGIN: called CC=1 SCAR=0.0
135 undef,
136 "scalar",
137 "hash",
138 "queue",
139 "array",
140 "objset",
141 15 ];
142  
143 # Property change types
144 15 ▶use constant CHANGE_SET => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
145 15 ▶use constant CHANGE_ADD => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
146 15 ▶use constant CHANGE_DEL => 3;
Subroutine BEGIN: called CC=1 SCAR=0.0
147 15 ▶use constant CHANGE_PUSH => 4;
Subroutine BEGIN: called CC=1 SCAR=0.0
148 15 ▶use constant CHANGE_SHIFT => 5;
Subroutine BEGIN: called CC=1 SCAR=0.0
149 15 ▶use constant CHANGE_SPLICE => 6;
Subroutine BEGIN: called CC=1 SCAR=0.0
150 15 ▶use constant CHANGE_MOVE => 7;
Subroutine BEGIN: called CC=1 SCAR=0.0
151  
152 15 ▶use constant CHANGETYPES => {
Subroutine BEGIN: called CC=1 SCAR=0.0
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 };
159  
160 # Cursor messages
161 15 ▶use constant CUSR_FIRST => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
162 15 ▶use constant CUSR_LAST => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
163 15 ▶use constant CUSR_FWD => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
164 15 ▶use constant CUSR_BACK => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
165  
166 # Stream data types
167 15 ▶use constant DATA_NUMBER => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
168 15 ▶use constant DATANUM_BOOLFALSE => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
169 15 ▶use constant DATANUM_BOOLTRUE => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
170 15 ▶use constant DATANUM_UINT8 => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
171 15 ▶use constant DATANUM_SINT8 => 3;
Subroutine BEGIN: called CC=1 SCAR=0.0
172 15 ▶use constant DATANUM_UINT16 => 4;
Subroutine BEGIN: called CC=1 SCAR=0.0
173 15 ▶use constant DATANUM_SINT16 => 5;
Subroutine BEGIN: called CC=1 SCAR=0.0
174 15 ▶use constant DATANUM_UINT32 => 6;
Subroutine BEGIN: called CC=1 SCAR=0.0
175 15 ▶use constant DATANUM_SINT32 => 7;
Subroutine BEGIN: called CC=1 SCAR=0.0
176 15 ▶use constant DATANUM_UINT64 => 8;
Subroutine BEGIN: called CC=1 SCAR=0.0
177 15 ▶use constant DATANUM_SINT64 => 9;
Subroutine BEGIN: called CC=1 SCAR=0.0
178 15 ▶use constant DATANUM_FLOAT16 => 16;
Subroutine BEGIN: called CC=1 SCAR=0.0
179 15 ▶use constant DATANUM_FLOAT32 => 17;
Subroutine BEGIN: called CC=1 SCAR=0.0
180 15 ▶use constant DATANUM_FLOAT64 => 18;
Subroutine BEGIN: called CC=1 SCAR=0.0
181 15 ▶use constant DATA_STRING => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
182 15 ▶use constant DATA_LIST => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
183 15 ▶use constant DATA_DICT => 3;
Subroutine BEGIN: called CC=1 SCAR=0.0
184 15 ▶use constant DATA_OBJECT => 4;
Subroutine BEGIN: called CC=1 SCAR=0.0
185 15 ▶use constant DATA_RECORD => 5;
Subroutine BEGIN: called CC=1 SCAR=0.0
186 15 ▶use constant DATA_META => 7;
Subroutine BEGIN: called CC=1 SCAR=0.0
187 15 ▶use constant DATAMETA_CONSTRUCT => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
188 15 ▶use constant DATAMETA_CLASS => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
189 15 ▶use constant DATAMETA_STRUCT => 3;
Subroutine BEGIN: called CC=1 SCAR=0.0
190  
191 15 ▶use constant VERSION_MAJOR => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
192 15 ▶use constant VERSION_MINOR => 4;
Subroutine BEGIN: called CC=1 SCAR=0.0
193  
194 =head1 NAME
195  
196 C<Tangence::Constants> - protocol constants for C<Tangence>
197  
198 =head1 DESCRIPTION
199  
200 This module is a component of L<Tangence::Client> or L<Tangence::Server>. It
201 is not intended for end-user use directly.
202  
203 =cut
204  
205 =head1 AUTHOR
206  
207 Paul Evans <leonerd@leonerd.org.uk>
208  
209 =cut
210  
211 15 0x55AA;
« Tangence.pm ↑ Summary Tangence/Meta/Argument.pm »