blob: 0e8f60ef600fedd634ee15aa82b21803a7d1c8bc [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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
Andrea Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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 */
Chip Boling34ebcb62021-02-02 12:13:58 -060017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
Chip Boling610117d2021-09-09 11:24:34 -050030const VoipConfigDataClassID = ClassID(138) // 0x008a
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var voipconfigdataBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// VoipConfigData (Class ID: #138 / 0x008a)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050047// This attribute uniquely identifies each instance of this ME. There is only one instance, number
48// 0. (R) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060049//
50// Available Signalling Protocols
Chip Boling610117d2021-09-09 11:24:34 -050051// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060060// (R) (mandatory) (1-byte)
61//
62// Signalling Protocol Used
Chip Boling610117d2021-09-09 11:24:34 -050063// 0xFF Selected by non-OMCI management interface
64//
Chip Boling6e27b352020-02-14 09:10:01 -060065// (R,-W) (mandatory) (1-byte)
66//
Chip Boling610117d2021-09-09 11:24:34 -050067// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060078// Available Voip Configuration Methods
Chip Boling610117d2021-09-09 11:24:34 -050079// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060091// 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
Chip Boling610117d2021-09-09 11:24:34 -050095// 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//
Chip Boling6e27b352020-02-14 09:10:01 -0600111// (R,-W) (mandatory) (1-byte)
112//
113// Voip Configuration Address Pointer
Chip Boling610117d2021-09-09 11:24:34 -0500114// 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//
Chip Boling6e27b352020-02-14 09:10:01 -0600123// The default value is 0xFFFF (R,-W) (mandatory) (2-bytes)
124//
125// Voip Configuration State
Chip Boling610117d2021-09-09 11:24:34 -0500126// 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//
Chip Boling6e27b352020-02-14 09:10:01 -0600136// Other values are reserved. At ME instantiation, the ONU sets this attribute to 0. (R)
137// (mandatory) (1-byte)
138//
139// Retrieve Profile
Chip Boling610117d2021-09-09 11:24:34 -0500140// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600144//
145// Profile Version
Chip Boling610117d2021-09-09 11:24:34 -0500146// This attribute is a character string that identifies the version of the last retrieved profile.
147// (R) (mandatory) (25-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600148//
149type VoipConfigData struct {
150 ManagedEntityDefinition
151 Attributes AttributeValueMap
152}
153
154func init() {
155 voipconfigdataBME = &ManagedEntityDefinition{
156 Name: "VoipConfigData",
157 ClassID: 138,
158 MessageTypes: mapset.NewSetWith(
159 Get,
160 Set,
161 ),
162 AllowedAttributeMask: 0xff00,
163 AttributeDefinitions: AttributeDefinitionMap{
164 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
165 1: ByteField("AvailableSignallingProtocols", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
166 2: ByteField("SignallingProtocolUsed", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
167 3: Uint32Field("AvailableVoipConfigurationMethods", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
168 4: ByteField("VoipConfigurationMethodUsed", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
169 5: Uint16Field("VoipConfigurationAddressPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
170 6: ByteField("VoipConfigurationState", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
171 7: ByteField("RetrieveProfile", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Write), false, false, false, 7),
172 8: MultiByteField("ProfileVersion", OctetsAttributeType, 0x0100, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 8),
173 },
174 Access: CreatedByOnu,
175 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600176 Alarms: AlarmMap{
177 0: "VCD config server name",
178 1: "VCD config server reach",
179 2: "VCD config server connect",
180 3: "VCD config server validate",
181 4: "VCD config server auth",
182 5: "VCD config server timeout",
183 6: "VCD config server fail",
184 7: "VCD config file error",
185 8: "VCD subscription name",
186 9: "VCD subscription reach",
187 10: "VCD subscription connect",
188 11: "VCD subscription validate",
189 12: "VCD subscription auth",
190 13: "VCD subscription timeout",
191 14: "VCD subscription fail",
192 15: "VCD reboot request",
193 },
Chip Boling6e27b352020-02-14 09:10:01 -0600194 }
195}
196
197// NewVoipConfigData (class ID 138) creates the basic
198// Managed Entity definition that is used to validate an ME of this type that
199// is received from or transmitted to the OMCC.
200func NewVoipConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
201 return NewManagedEntity(*voipconfigdataBME, params...)
202}