-
Notifications
You must be signed in to change notification settings - Fork 5
/
classidmap.go
233 lines (224 loc) · 12.8 KB
/
classidmap.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
/*
* Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* NOTE: This file was generated, manual edits will be overwritten!
*
* Generated by 'goCodeGenerator.py':
* https://github.com/cboling/OMCI-parser/README.md
*/
package generated
import "errors"
// ManagedEntityInfo provides ManagedEntity information
type ManagedEntityInfo struct {
//Interface IManagedEntity
New func(params ...ParamData) (IManagedEntityDefinition, error)
}
// ParamData can be passed to the 'New' function to dictate how the returned
// Managed Entity is created. You should supply either zero or one ParamData
// structure to 'New'.
//
// If No ParamData is passed, the returned Managed Entity can only be used for
// providing validation of other structures. This is commonly done in a packet
// encoder/decoder to assist in that process.
//
// If One ParamData is passed, the returned Managed Entity will be initialized
// with the given values/attributes and then validated. This is commonly done
// when you wish to create an ME for transmission, storage or removal from a
// persistent database, or some other similar purpose.
//
type ParamData struct {
EntityID uint16
Attributes AttributeValueMap
}
func decodeEntityID(params ...ParamData) uint16 {
if len(params) > 0 {
return params[0].EntityID
}
return 0
}
// CreateME wraps a function that makes it a creator of a Managed Entity
type CreateME func(params ...ParamData) (IManagedEntityDefinition, error)
var classToManagedEntityMap map[uint16]CreateME
func init() {
// Create mapping of 16-bit managed entity class IDs to ME-type
classToManagedEntityMap = make(map[uint16]CreateME, 161)
classToManagedEntityMap[2] = NewOnuData
classToManagedEntityMap[5] = NewCardholder
classToManagedEntityMap[6] = NewCircuitPack
classToManagedEntityMap[7] = NewSoftwareImage
classToManagedEntityMap[11] = NewPhysicalPathTerminationPointEthernetUni
classToManagedEntityMap[12] = NewPhysicalPathTerminationPointCesUni
classToManagedEntityMap[14] = NewInterworkingVccTerminationPoint
classToManagedEntityMap[16] = NewAal5Profile
classToManagedEntityMap[18] = NewAal5PerformanceMonitoringHistoryData
classToManagedEntityMap[21] = NewCesServiceProfile
classToManagedEntityMap[24] = NewEthernetPerformanceMonitoringHistoryData
classToManagedEntityMap[45] = NewMacBridgeServiceProfile
classToManagedEntityMap[46] = NewMacBridgeConfigurationData
classToManagedEntityMap[47] = NewMacBridgePortConfigurationData
classToManagedEntityMap[48] = NewMacBridgePortDesignationData
classToManagedEntityMap[51] = NewMacBridgePerformanceMonitoringHistoryData
classToManagedEntityMap[52] = NewMacBridgePortPerformanceMonitoringHistoryData
classToManagedEntityMap[53] = NewPhysicalPathTerminationPointPotsUni
classToManagedEntityMap[58] = NewVoiceServiceProfile
classToManagedEntityMap[62] = NewVpPerformanceMonitoringHistoryData
classToManagedEntityMap[78] = NewVlanTaggingOperationConfigurationData
classToManagedEntityMap[79] = NewMacBridgePortFilterPreAssignTable
classToManagedEntityMap[82] = NewPhysicalPathTerminationPointVideoUni
classToManagedEntityMap[83] = NewPhysicalPathTerminationPointLctUni
classToManagedEntityMap[84] = NewVlanTaggingFilterData
classToManagedEntityMap[89] = NewEthernetPerformanceMonitoringHistoryData2
classToManagedEntityMap[90] = NewPhysicalPathTerminationPointVideoAni
classToManagedEntityMap[98] = NewPhysicalPathTerminationPointXdslUniPart1
classToManagedEntityMap[99] = NewPhysicalPathTerminationPointXdslUniPart2
classToManagedEntityMap[100] = NewXdslLineInventoryAndStatusDataPart1
classToManagedEntityMap[101] = NewXdslLineInventoryAndStatusDataPart2
classToManagedEntityMap[102] = NewXdslChannelDownstreamStatusData
classToManagedEntityMap[103] = NewXdslChannelUpstreamStatusData
classToManagedEntityMap[105] = NewXdslLineConfigurationProfilePart2
classToManagedEntityMap[106] = NewXdslLineConfigurationProfilePart3
classToManagedEntityMap[107] = NewXdslChannelConfigurationProfile
classToManagedEntityMap[108] = NewXdslSubcarrierMaskingDownstreamProfile
classToManagedEntityMap[109] = NewXdslSubcarrierMaskingUpstreamProfile
classToManagedEntityMap[112] = NewXdslXtuCPerformanceMonitoringHistoryData
classToManagedEntityMap[113] = NewXdslXtuRPerformanceMonitoringHistoryData
classToManagedEntityMap[114] = NewXdslXtuCChannelPerformanceMonitoringHistoryData
classToManagedEntityMap[115] = NewXdslXtuRChannelPerformanceMonitoringHistoryData
classToManagedEntityMap[116] = NewTcAdaptorPerformanceMonitoringHistoryDataXdsl
classToManagedEntityMap[130] = NewIeee8021PMapperServiceProfile
classToManagedEntityMap[131] = NewOltG
classToManagedEntityMap[133] = NewOnuPowerShedding
classToManagedEntityMap[134] = NewIpHostConfigData
classToManagedEntityMap[135] = NewIpHostPerformanceMonitoringHistoryData
classToManagedEntityMap[136] = NewTcpUdpConfigData
classToManagedEntityMap[137] = NewNetworkAddress
classToManagedEntityMap[138] = NewVoipConfigData
classToManagedEntityMap[139] = NewVoipVoiceCtp
classToManagedEntityMap[140] = NewCallControlPerformanceMonitoringHistoryData
classToManagedEntityMap[141] = NewVoipLineStatus
classToManagedEntityMap[142] = NewVoipMediaProfile
classToManagedEntityMap[143] = NewRtpProfileData
classToManagedEntityMap[144] = NewRtpPerformanceMonitoringHistoryData
classToManagedEntityMap[145] = NewNetworkDialPlanTable
classToManagedEntityMap[146] = NewVoipApplicationServiceProfile
classToManagedEntityMap[147] = NewVoipFeatureAccessCodes
classToManagedEntityMap[148] = NewAuthenticationSecurityMethod
classToManagedEntityMap[150] = NewSipAgentConfigData
classToManagedEntityMap[151] = NewSipAgentPerformanceMonitoringHistoryData
classToManagedEntityMap[152] = NewSipCallInitiationPerformanceMonitoringHistoryData
classToManagedEntityMap[153] = NewSipUserData
classToManagedEntityMap[155] = NewMgcConfigData
classToManagedEntityMap[156] = NewMgcPerformanceMonitoringHistoryData
classToManagedEntityMap[158] = NewOnuRemoteDebug
classToManagedEntityMap[160] = NewEquipmentExtensionPackage
classToManagedEntityMap[162] = NewPhysicalPathTerminationPointMocaUni
classToManagedEntityMap[163] = NewMocaEthernetPerformanceMonitoringHistoryData
classToManagedEntityMap[171] = NewExtendedVlanTaggingOperationConfigurationData
classToManagedEntityMap[256] = NewOnuG
classToManagedEntityMap[257] = NewOnu2G
classToManagedEntityMap[262] = NewTCont
classToManagedEntityMap[263] = NewAniG
classToManagedEntityMap[264] = NewUniG
classToManagedEntityMap[266] = NewGemInterworkingTerminationPoint
classToManagedEntityMap[268] = NewGemPortNetworkCtp
classToManagedEntityMap[269] = NewVpNetworkCtp
classToManagedEntityMap[272] = NewGalEthernetProfile
classToManagedEntityMap[273] = NewThresholdData1
classToManagedEntityMap[274] = NewThresholdData2
classToManagedEntityMap[276] = NewGalEthernetPerformanceMonitoringHistoryData
classToManagedEntityMap[277] = NewPriorityQueue
classToManagedEntityMap[278] = NewTrafficScheduler
classToManagedEntityMap[280] = NewTrafficDescriptor
classToManagedEntityMap[281] = NewMulticastGemInterworkingTerminationPoint
classToManagedEntityMap[282] = NewPseudowireTerminationPoint
classToManagedEntityMap[283] = NewRtpPseudowireParameters
classToManagedEntityMap[284] = NewPseudowireMaintenanceProfile
classToManagedEntityMap[285] = NewPseudowirePerformanceMonitoringHistoryData
classToManagedEntityMap[286] = NewEthernetFlowTerminationPoint
classToManagedEntityMap[287] = NewOmci
classToManagedEntityMap[290] = NewDot1XPortExtensionPackage
classToManagedEntityMap[291] = NewDot1XConfigurationProfile
classToManagedEntityMap[292] = NewDot1XPerformanceMonitoringHistoryData
classToManagedEntityMap[293] = NewRadiusPerformanceMonitoringHistoryData
classToManagedEntityMap[296] = NewEthernetPerformanceMonitoringHistoryData3
classToManagedEntityMap[298] = NewDot1RateLimiter
classToManagedEntityMap[299] = NewDot1AgMaintenanceDomain
classToManagedEntityMap[300] = NewDot1AgMaintenanceAssociation
classToManagedEntityMap[301] = NewDot1AgDefaultMdLevel
classToManagedEntityMap[302] = NewDot1AgMep
classToManagedEntityMap[304] = NewDot1AgMepCcmDatabase
classToManagedEntityMap[305] = NewDot1AgCfmStack
classToManagedEntityMap[308] = NewGeneralPurposeBuffer
classToManagedEntityMap[310] = NewMulticastSubscriberConfigInfo
classToManagedEntityMap[311] = NewMulticastSubscriberMonitor
classToManagedEntityMap[313] = NewReAniG
classToManagedEntityMap[316] = NewReDownstreamAmplifier
classToManagedEntityMap[318] = NewFileTransferController
classToManagedEntityMap[321] = NewEthernetFramePerformanceMonitoringHistoryDataDownstream
classToManagedEntityMap[322] = NewEthernetFramePerformanceMonitoringHistoryDataUpstream
classToManagedEntityMap[325] = NewXdslLineInventoryAndStatusDataPart5
classToManagedEntityMap[328] = NewReCommonAmplifierParameters
classToManagedEntityMap[329] = NewVirtualEthernetInterfacePoint
classToManagedEntityMap[332] = NewEnhancedSecurityControl
classToManagedEntityMap[333] = NewMplsPseudowireTerminationPoint
classToManagedEntityMap[334] = NewEthernetFrameExtendedPm
classToManagedEntityMap[335] = NewSnmpConfigurationData
classToManagedEntityMap[336] = NewOnuDynamicPowerManagementControl
classToManagedEntityMap[338] = NewPwAtmPerformanceMonitoringHistoryData
classToManagedEntityMap[339] = NewPwEthernetConfigurationData
classToManagedEntityMap[340] = NewBbfTr069ManagementServer
classToManagedEntityMap[341] = NewGemPortNetworkCtpPerformanceMonitoringHistoryData
classToManagedEntityMap[342] = NewTcpUdpPerformanceMonitoringHistoryData
classToManagedEntityMap[343] = NewEnergyConsumptionPerformanceMonitoringHistoryData
classToManagedEntityMap[344] = NewXgPonTcPerformanceMonitoringHistoryData
classToManagedEntityMap[345] = NewXgPonDownstreamManagementPerformanceMonitoringHistoryData
classToManagedEntityMap[346] = NewXgPonUpstreamManagementPerformanceMonitoringHistoryData
classToManagedEntityMap[348] = NewMacBridgePortIcmpv6ProcessPreAssignTable
classToManagedEntityMap[400] = NewEthernetPseudowireParameters
classToManagedEntityMap[408] = NewXdslXtuCPerformanceMonitoringHistoryDataPart2
classToManagedEntityMap[410] = NewVdsl2LineConfigurationExtensions3
classToManagedEntityMap[412] = NewXdslChannelConfigurationProfilePart2
classToManagedEntityMap[414] = NewXdslLineInventoryAndStatusDataPart8
classToManagedEntityMap[415] = NewVdsl2LineInventoryAndStatusDataPart4
classToManagedEntityMap[420] = NewEfmBondingLink
classToManagedEntityMap[421] = NewEfmBondingGroupPerformanceMonitoringHistoryData
classToManagedEntityMap[422] = NewEfmBondingGroupPerformanceMonitoringHistoryDataPart2
classToManagedEntityMap[423] = NewEfmBondingLinkPerformanceMonitoringHistoryData
classToManagedEntityMap[424] = NewEfmBondingPortPerformanceMonitoringHistoryData
classToManagedEntityMap[425] = NewEfmBondingPortPerformanceMonitoringHistoryDataPart2
classToManagedEntityMap[432] = NewFastChannelConfigurationProfile
classToManagedEntityMap[433] = NewFastDataPathConfigurationProfile
classToManagedEntityMap[434] = NewFastVectoringLineConfigurationExtensions
classToManagedEntityMap[435] = NewFastLineInventoryAndStatusData
classToManagedEntityMap[436] = NewFastLineInventoryAndStatusDataPart2
classToManagedEntityMap[437] = NewFastXtuCPerformanceMonitoringHistoryData
classToManagedEntityMap[438] = NewFastXtuRPerformanceMonitoringHistoryData
classToManagedEntityMap[443] = NewTwdmChannelManagedEntity
classToManagedEntityMap[444] = NewTwdmChannelPhyLodsPerformanceMonitoringHistoryData
classToManagedEntityMap[445] = NewTwdmChannelXgemPerformanceMonitoringHistoryData
classToManagedEntityMap[446] = NewTwdmChannelPloamPerformanceMonitoringHistoryDataPart1
classToManagedEntityMap[447] = NewTwdmChannelPloamPerformanceMonitoringHistoryDataPart2
classToManagedEntityMap[448] = NewTwdmChannelPloamPerformanceMonitoringHistoryDataPart3
classToManagedEntityMap[449] = NewTwdmChannelTuningPerformanceMonitoringHistoryDataPart1
classToManagedEntityMap[450] = NewTwdmChannelTuningPerformanceMonitoringHistoryDataPart2
classToManagedEntityMap[451] = NewTwdmChannelTuningPerformanceMonitoringHistoryDataPart3
classToManagedEntityMap[452] = NewTwdmChannelOmciPerformanceMonitoringHistoryData
}
func LoadManagedEntityDefinition(classID uint16, params ...ParamData) (IManagedEntityDefinition, error) {
newFunc, ok := classToManagedEntityMap[classID]
if ok {
return newFunc(params...)
}
return nil, errors.New("managed entity definition not found")
}