| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package BACnet::PDUTypes::Utils; |
|
4
|
|
|
|
|
|
|
|
|
5
|
27
|
|
|
27
|
|
174
|
use warnings; |
|
|
27
|
|
|
|
|
67
|
|
|
|
27
|
|
|
|
|
1542
|
|
|
6
|
27
|
|
|
27
|
|
213
|
use strict; |
|
|
27
|
|
|
|
|
49
|
|
|
|
27
|
|
|
|
|
750
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
27
|
|
|
27
|
|
128
|
use bytes; |
|
|
27
|
|
|
|
|
75
|
|
|
|
27
|
|
|
|
|
183
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
27
|
|
|
27
|
|
1289
|
use BACnet::APDU; |
|
|
27
|
|
|
|
|
64
|
|
|
|
27
|
|
|
|
|
9538
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $confirmed_service = { |
|
13
|
|
|
|
|
|
|
'AcknowledgeAlarm' => 0, |
|
14
|
|
|
|
|
|
|
'ConfirmedCOVNotification' => 1, # Implemented |
|
15
|
|
|
|
|
|
|
'ConfirmedEventNotification' => 2, |
|
16
|
|
|
|
|
|
|
'GetAlarmSummary' => 3, |
|
17
|
|
|
|
|
|
|
'GetEnrollmentSummary' => 4, |
|
18
|
|
|
|
|
|
|
'SubscribeCOV' => 5, # Implemented |
|
19
|
|
|
|
|
|
|
'AtomicReadFile' => 6, |
|
20
|
|
|
|
|
|
|
'AtomicWriteFile' => 7, |
|
21
|
|
|
|
|
|
|
'AddListElement' => 8, |
|
22
|
|
|
|
|
|
|
'RemoveListElement' => 9, |
|
23
|
|
|
|
|
|
|
'CreateObject' => 10, |
|
24
|
|
|
|
|
|
|
'DeleteObject' => 11, |
|
25
|
|
|
|
|
|
|
'ReadProperty' => 12, # Implemented |
|
26
|
|
|
|
|
|
|
'ReadPropertyConditional' => 13, |
|
27
|
|
|
|
|
|
|
'ReadPropertyMultiple' => 14, |
|
28
|
|
|
|
|
|
|
'WriteProperty' => 15, |
|
29
|
|
|
|
|
|
|
'WritePropertyMultiple' => 16, |
|
30
|
|
|
|
|
|
|
'DeviceCommunicationControl' => 17, |
|
31
|
|
|
|
|
|
|
'ConfirmedPrivateTransfer' => 18, |
|
32
|
|
|
|
|
|
|
'ConfirmedTextMessage' => 19, |
|
33
|
|
|
|
|
|
|
'ReinitializeDevice' => 20, |
|
34
|
|
|
|
|
|
|
'VT-Open' => 21, |
|
35
|
|
|
|
|
|
|
'VT-Close' => 22, |
|
36
|
|
|
|
|
|
|
'VT-Data' => 23, |
|
37
|
|
|
|
|
|
|
'Authenticate' => 24, |
|
38
|
|
|
|
|
|
|
'RequestKey' => 25, |
|
39
|
|
|
|
|
|
|
'ReadRange' => 26, |
|
40
|
|
|
|
|
|
|
'LifeSafetyOperation' => 27, |
|
41
|
|
|
|
|
|
|
'SubscribeCOVProperty' => 28, |
|
42
|
|
|
|
|
|
|
'GetEventInformation' => 29, |
|
43
|
|
|
|
|
|
|
}; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
our $confirmed_service_rev = { reverse %$confirmed_service }; |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
our $unconfirmed_service = { |
|
48
|
|
|
|
|
|
|
'I-Am' => 0, |
|
49
|
|
|
|
|
|
|
'I-Have' => 1, |
|
50
|
|
|
|
|
|
|
'UnconfirmedCOVNotification' => 2, # Implemented |
|
51
|
|
|
|
|
|
|
'UnconfirmedEventNotification' => 3, |
|
52
|
|
|
|
|
|
|
'UnconfirmedPrivateTransfer' => 4, |
|
53
|
|
|
|
|
|
|
'UnconfirmedTextMessage' => 5, |
|
54
|
|
|
|
|
|
|
'TimeSynchronization' => 6, |
|
55
|
|
|
|
|
|
|
'Who-Has' => 7, |
|
56
|
|
|
|
|
|
|
'Who-Is' => 8, |
|
57
|
|
|
|
|
|
|
'UTC-TimeSynchronization' => 9, |
|
58
|
|
|
|
|
|
|
'WriteGroup' => 10, |
|
59
|
|
|
|
|
|
|
}; |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
our $unconfirmed_service_rev = { reverse %$unconfirmed_service }; |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
our $reject_reason = { |
|
64
|
|
|
|
|
|
|
'Other' => 0, |
|
65
|
|
|
|
|
|
|
'BufferOverflow' => 1, |
|
66
|
|
|
|
|
|
|
'InconsistentParameters' => 2, |
|
67
|
|
|
|
|
|
|
'InvalidParameterDataType' => 3, |
|
68
|
|
|
|
|
|
|
'InvalidTag' => 4, |
|
69
|
|
|
|
|
|
|
'MissingRequiredParameter' => 5, |
|
70
|
|
|
|
|
|
|
'ParameterOutOfRange' => 6, |
|
71
|
|
|
|
|
|
|
'TooManyArguments' => 7, |
|
72
|
|
|
|
|
|
|
'UndefinedEnumeration' => 8, |
|
73
|
|
|
|
|
|
|
'UnrecognizedService' => 9, |
|
74
|
|
|
|
|
|
|
}; |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
our $reject_reason_rev = { reverse %$reject_reason }; |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
our $abort_reason = { |
|
79
|
|
|
|
|
|
|
'Other' => 0, |
|
80
|
|
|
|
|
|
|
'BufferOverflow' => 1, |
|
81
|
|
|
|
|
|
|
'InvalidAPDUInThisState' => 2, |
|
82
|
|
|
|
|
|
|
'PreemptedByHigherPriorityTask' => 3, |
|
83
|
|
|
|
|
|
|
'SegmentationNotSupported' => 4, |
|
84
|
|
|
|
|
|
|
'SecurityError' => 5, |
|
85
|
|
|
|
|
|
|
'InsufficientSecurity' => 6, |
|
86
|
|
|
|
|
|
|
'WindowSizeOutOfRange' => 7, |
|
87
|
|
|
|
|
|
|
'ApplicationExceededReplyTime' => 8, |
|
88
|
|
|
|
|
|
|
'OutOfResources' => 9, |
|
89
|
|
|
|
|
|
|
'TSMTimeout' => 10, |
|
90
|
|
|
|
|
|
|
'APDUTooLong' => 11, |
|
91
|
|
|
|
|
|
|
}; |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
our $abort_reason_rev = { reverse %$abort_reason }; |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub _holder { |
|
96
|
0
|
|
|
0
|
|
|
return undef; |
|
97
|
|
|
|
|
|
|
} |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
1; |