blob: c65416eac3c2e1c2bec3863d435815a44e210a05 [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
Himani Chawlaac1f5ad2021-02-04 21:21:54 +053017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * NOTE: This file was generated, manual edits will be overwritten!
19 *
20 * Generated by 'goCodeGenerator.py':
21 * https://github.com/cboling/OMCI-parser/README.md
22 */
23
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// VoipConfigDataClassID is the 16-bit ID for the OMCI
29// Managed entity VoIP config data
mpagenko836a1fd2021-11-01 16:12:42 +000030const VoipConfigDataClassID = ClassID(138) // 0x008a
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var voipconfigdataBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// VoipConfigData (Class ID: #138 / 0x008a)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// The VoIP configuration data ME defines the configuration for VoIP in the ONU. The OLT uses this
36// ME to discover the VoIP signalling protocols and configuration methods supported by this ONU.
37// The OLT then uses this ME to select the desired signalling protocol and configuration method.
38// The entity is conditionally required for ONUs that offer VoIP services.
39//
40// An ONU that supports VoIP services automatically creates an instance of this ME.
41//
42// Relationships
43// One instance of this ME is associated with the ONU.
44//
45// Attributes
46// Managed Entity Id
mpagenko836a1fd2021-11-01 16:12:42 +000047// This attribute uniquely identifies each instance of this ME. There is only one instance, number
48// 0. (R) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000049//
50// Available Signalling Protocols
mpagenko836a1fd2021-11-01 16:12:42 +000051// This attribute is a bit map that defines the VoIP signalling protocols supported in the ONU. The
52// bit value 1 specifies that the ONU supports the associated protocol.
53//
54// 1 (LSB) SIP
55//
56// 2 ITU-T H.248
57//
58// 3 MGCP
59//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000060// (R) (mandatory) (1-byte)
61//
62// Signalling Protocol Used
mpagenko836a1fd2021-11-01 16:12:42 +000063// 0xFF Selected by non-OMCI management interface
64//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000065// (R,-W) (mandatory) (1-byte)
66//
mpagenko836a1fd2021-11-01 16:12:42 +000067// This attribute specifies the VoIP signalling protocol to use. Only one type of protocol is
68// allowed at a time. Valid values are:
69//
70// 0 None
71//
72// 1 SIP
73//
74// 2 ITU-T H.248
75//
76// 3 MGCP
77//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000078// Available Voip Configuration Methods
mpagenko836a1fd2021-11-01 16:12:42 +000079// This attribute is a bit map that indicates the capabilities of the ONU with regard to VoIP
80// service configuration. The bit value 1 specifies that the ONU supports the associated
81// capability.
82//
83// 1 (LSB) ONU capable of using the OMCI to configure its VoIP services.
84//
85// 2 ONU capable of working with configuration file retrieval to configure its VoIP services.
86//
87// 3 ONU capable of working with [BBF TR-069] to configure its VoIP services.
88//
89// 4 ONU capable of working with IETF sipping config framework to configure its VoIP services.
90//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000091// Bits 5..24 are reserved by ITU-T. Bits 25..32 are reserved for proprietary vendor configuration
92// capabilities. (R) (mandatory) (4-bytes)
93//
94// Voip Configuration Method Used
mpagenko836a1fd2021-11-01 16:12:42 +000095// Specifies which method is used to configure the ONU's VoIP service.
96//
97// 0 Do not configure - ONU default
98//
99// 1 OMCI
100//
101// 2 Configuration file retrieval
102//
103// 3 BBF TR-069
104//
105// 4 IETF sipping config framework
106//
107// 5..240 Reserved by ITU-T
108//
109// 241..255 Reserved for proprietary vendor configuration methods
110//
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000111// (R,-W) (mandatory) (1-byte)
112//
113// Voip Configuration Address Pointer
mpagenko836a1fd2021-11-01 16:12:42 +0000114// If this attribute is set to any value other than a null pointer, it points to a network address
115// ME, which indicates the address of the server to contact using the method indicated in the VoIP
116// configuration method used attribute. This attribute is only relevant for non-OMCI configuration
117// methods.
118//
119// If this attribute is set to a null pointer, no address is defined by this attribute. However,
120// the address may be defined by other methods, such as deriving it from the ONU identifier
121// attribute of the IP host config data ME and using a well-known URI schema.
122//
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000123// The default value is 0xFFFF (R,-W) (mandatory) (2-bytes)
124//
125// Voip Configuration State
mpagenko836a1fd2021-11-01 16:12:42 +0000126// Indicates the status of the ONU VoIP service.
127//
128// 0 Inactive: configuration retrieval has not been attempted
129//
130// 1 Active: configuration was retrieved
131//
132// 2 Initializing: configuration is now being retrieved
133//
134// 3 Fault: configuration retrieval process failed
135//
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000136// Other values are reserved. At ME instantiation, the ONU sets this attribute to 0. (R)
137// (mandatory) (1-byte)
138//
139// Retrieve Profile
mpagenko836a1fd2021-11-01 16:12:42 +0000140// This attribute provides a means by which the ONU may be notified that a new VoIP profile should
141// be retrieved. By setting this attribute, the OLT triggers the ONU to retrieve a new profile. The
142// actual value in the set action is ignored because it is the action of setting that is important.
143// (W) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000144//
145// Profile Version
mpagenko836a1fd2021-11-01 16:12:42 +0000146// This attribute is a character string that identifies the version of the last retrieved profile.
147// (R) (mandatory) (25-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000148//
149type VoipConfigData struct {
150 ManagedEntityDefinition
151 Attributes AttributeValueMap
152}
153
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000154// Attribute name constants
155
156const VoipConfigData_AvailableSignallingProtocols = "AvailableSignallingProtocols"
157const VoipConfigData_SignallingProtocolUsed = "SignallingProtocolUsed"
158const VoipConfigData_AvailableVoipConfigurationMethods = "AvailableVoipConfigurationMethods"
159const VoipConfigData_VoipConfigurationMethodUsed = "VoipConfigurationMethodUsed"
160const VoipConfigData_VoipConfigurationAddressPointer = "VoipConfigurationAddressPointer"
161const VoipConfigData_VoipConfigurationState = "VoipConfigurationState"
162const VoipConfigData_RetrieveProfile = "RetrieveProfile"
163const VoipConfigData_ProfileVersion = "ProfileVersion"
164
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000165func init() {
166 voipconfigdataBME = &ManagedEntityDefinition{
167 Name: "VoipConfigData",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000168 ClassID: VoipConfigDataClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000169 MessageTypes: mapset.NewSetWith(
170 Get,
171 Set,
172 ),
173 AllowedAttributeMask: 0xff00,
174 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000175 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
176 1: ByteField(VoipConfigData_AvailableSignallingProtocols, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
177 2: ByteField(VoipConfigData_SignallingProtocolUsed, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
178 3: Uint32Field(VoipConfigData_AvailableVoipConfigurationMethods, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
179 4: ByteField(VoipConfigData_VoipConfigurationMethodUsed, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
180 5: Uint16Field(VoipConfigData_VoipConfigurationAddressPointer, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
181 6: ByteField(VoipConfigData_VoipConfigurationState, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
182 7: ByteField(VoipConfigData_RetrieveProfile, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Write), false, false, false, 7),
183 8: MultiByteField(VoipConfigData_ProfileVersion, OctetsAttributeType, 0x0100, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 8),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000184 },
185 Access: CreatedByOnu,
186 Support: UnknownSupport,
Himani Chawlaac1f5ad2021-02-04 21:21:54 +0530187 Alarms: AlarmMap{
188 0: "VCD config server name",
189 1: "VCD config server reach",
190 2: "VCD config server connect",
191 3: "VCD config server validate",
192 4: "VCD config server auth",
193 5: "VCD config server timeout",
194 6: "VCD config server fail",
195 7: "VCD config file error",
196 8: "VCD subscription name",
197 9: "VCD subscription reach",
198 10: "VCD subscription connect",
199 11: "VCD subscription validate",
200 12: "VCD subscription auth",
201 13: "VCD subscription timeout",
202 14: "VCD subscription fail",
203 15: "VCD reboot request",
204 },
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000205 }
206}
207
208// NewVoipConfigData (class ID 138) creates the basic
209// Managed Entity definition that is used to validate an ME of this type that
210// is received from or transmitted to the OMCC.
211func NewVoipConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
212 return NewManagedEntity(*voipconfigdataBME, params...)
213}