forked from chen-Leo/bacnet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
errors.go
159 lines (155 loc) · 7.6 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
package bacnet
//ErrorClass is the type of error send by an object after a request
type ErrorClass uint16
//ErrorCode identifies precisely the error
type ErrorCode uint32
//go:generate stringer -type=ErrorClass
const (
DeviceError ErrorClass = 0x00
ObjectError ErrorClass = 0x01
PropertyError ErrorClass = 0x02
ResourcesError ErrorClass = 0x03
SecurityError ErrorClass = 0x04
ServicesError ErrorClass = 0x05
VTError ErrorClass = 0x06
CommunicationError ErrorClass = 0x07
)
//go:generate stringer -type=ErrorCode
const (
Other ErrorCode = 0x00
DeviceBusy ErrorCode = 0x03
ConfigurationInProgress ErrorCode = 0x02
OperationalProblem ErrorCode = 0x19
DynamicCreationNotSupported ErrorCode = 0x04
NoObjectsOfSpecifiedType ErrorCode = 0x11
ObjectDeletionNotPermitted ErrorCode = 0x17
ObjectIdentifierAlreadyExists ErrorCode = 0x18
ReadAccessDenied ErrorCode = 0x1B
UnknownObject ErrorCode = 0x1F
UnsupportedObjectType ErrorCode = 0x24
CharacterSetNotSupported ErrorCode = 0x29
DatatypeNotSupported ErrorCode = 0x2F
InconsistentSelectionCriterion ErrorCode = 0x08
InvalidArrayIndex ErrorCode = 0x2A
InvalidDataType ErrorCode = 0x09
NotCovProperty ErrorCode = 0x2C
OptionalFunctionalityNotSupported ErrorCode = 0x2D
PropertyIsNotAnArray ErrorCode = 0x32
UnknownProperty ErrorCode = 0x20
ValueOutOfRange ErrorCode = 0x25
WriteAccessDenied ErrorCode = 0x28
NoSpaceForObject ErrorCode = 0x12
NoSpaceToAddListElement ErrorCode = 0x13
NoSpaceToWriteProperty ErrorCode = 0x14
AuthenticationFailed ErrorCode = 0x01
IncompatibleSecurityLevels ErrorCode = 0x06
InvalidOperatorName ErrorCode = 0x0C
KeyGenerationError ErrorCode = 0x0F
PasswordFailure ErrorCode = 0x1A
SecurityNotSupported ErrorCode = 0x1C
Timeout ErrorCode = 0x1E
CovSubscriptionFailed ErrorCode = 0x2B
DuplicateName ErrorCode = 0x30
DuplicateObjectID ErrorCode = 0x31
FileAccessDenied ErrorCode = 0x05
InconsistentParameters ErrorCode = 0x07
InvalidConfigurationData ErrorCode = 0x2E
InvalidFileAccessMethod ErrorCode = 0x0A
InvalidFileStartPosition ErrorCode = 0x0B
InvalidParameterDataType ErrorCode = 0x0D
InvalidTimeStamp ErrorCode = 0x0E
MissingRequiredParameter ErrorCode = 0x10
PropertyIsNotAList ErrorCode = 0x16
ServiceRequestDenied ErrorCode = 0x1D
UnknownVtClass ErrorCode = 0x22
UnknownVtSession ErrorCode = 0x23
NoVtSessionsAvailable ErrorCode = 0x15
VtSessionAlreadyClosed ErrorCode = 0x26
VtSessionTerminationFailure ErrorCode = 0x27
AbortBufferOverflow ErrorCode = 0x33
AbortInvalidApduInThisState ErrorCode = 0x34
AbortPreemptedByHigherPriorityTask ErrorCode = 0x35
AbortSegmentationNotSupported ErrorCode = 0x36
AbortProprietary ErrorCode = 0x37
AbortOther ErrorCode = 0x38
InvalidTag ErrorCode = 0x39
NetworkDown ErrorCode = 0x3A
RejectBufferOverflow ErrorCode = 0x3B
RejectInconsistentParameters ErrorCode = 0x3C
RejectInvalidParameterDataType ErrorCode = 0x3D
RejectInvalidTag ErrorCode = 0x3E
RejectMissingRequiredParameter ErrorCode = 0x3F
RejectParameterOutOfRange ErrorCode = 0x40
RejectTooManyArguments ErrorCode = 0x41
RejectUndefinedEnumeration ErrorCode = 0x42
RejectUnrecognizedService ErrorCode = 0x43
RejectProprietary ErrorCode = 0x44
RejectOther ErrorCode = 0x45
UnknownDevice ErrorCode = 0x46
UnknownRoute ErrorCode = 0x47
ValueNotInitialized ErrorCode = 0x48
InvalidEventState ErrorCode = 0x49
NoAlarmConfigured ErrorCode = 0x4A
LogBufferFull ErrorCode = 0x4B
LoggedValuePurged ErrorCode = 0x4C
NoPropertySpecified ErrorCode = 0x4D
NotConfiguredForTriggeredLogging ErrorCode = 0x4E
UnknownSubscription ErrorCode = 0x4F
ParameterOutOfRange ErrorCode = 0x50
ListElementNotFound ErrorCode = 0x51
Busy ErrorCode = 0x52
CommunicationDisabled ErrorCode = 0x53
Success ErrorCode = 0x54
AccessDenied ErrorCode = 0x55
BadDestinationAddress ErrorCode = 0x56
BadDestinationDeviceID ErrorCode = 0x57
BadSignature ErrorCode = 0x58
BadSourceAddress ErrorCode = 0x59
BadTimestamp ErrorCode = 0x5A
CannotUseKey ErrorCode = 0x5B
CannotVerifyMessageID ErrorCode = 0x5C
CorrectKeyRevision ErrorCode = 0x5D
DestinationDeviceIDRequired ErrorCode = 0x5E
DuplicateMessage ErrorCode = 0x5F
EncryptionNotConfigured ErrorCode = 0x60
EncryptionRequired ErrorCode = 0x61
IncorrectKey ErrorCode = 0x62
InvalidKeyData ErrorCode = 0x63
KeyUpdateInProgress ErrorCode = 0x64
MalformedMessage ErrorCode = 0x65
NotKeyServer ErrorCode = 0x66
SecurityNotConfigured ErrorCode = 0x67
SourceSecurityRequired ErrorCode = 0x68
TooManyKeys ErrorCode = 0x69
UnknownAuthenticationType ErrorCode = 0x6A
UnknownKey ErrorCode = 0x6B
UnknownKeyRevision ErrorCode = 0x6C
UnknownSourceMessage ErrorCode = 0x6D
NotRouterToDnet ErrorCode = 0x6E
RouterBusy ErrorCode = 0x6F
UnknownNetworkMessage ErrorCode = 0x70
MessageTooLong ErrorCode = 0x71
SecurityErrorCode ErrorCode = 0x72
AddressingError ErrorCode = 0x73
WriteBdtFailed ErrorCode = 0x74
ReadBdtFailed ErrorCode = 0x75
RegisterForeignDeviceFailed ErrorCode = 0x76
ReadFdtFailed ErrorCode = 0x77
DeleteFdtEntryFailed ErrorCode = 0x78
DistributeBroadcastFailed ErrorCode = 0x79
UnknownFileSize ErrorCode = 0x7A
AbortApduTooLong ErrorCode = 0x7B
AbortApplicationExceededReplyTime ErrorCode = 0x7C
AbortOutOfResources ErrorCode = 0x7D
AbortTsmTimeout ErrorCode = 0x7E
AbortWindowSizeOutOfRange ErrorCode = 0x7F
FileFull ErrorCode = 0x80
InconsistentConfiguration ErrorCode = 0x81
InconsistentObjectType ErrorCode = 0x82
InternalError ErrorCode = 0x83
NotConfigured ErrorCode = 0x84
OutOfMemory ErrorCode = 0x85
ValueTooLong ErrorCode = 0x86
AbortInsufficientSecurity ErrorCode = 0x87
AbortSecurityError ErrorCode = 0x88
)