blob: 9da4493aa978c8859b8c37ae1b2a1a7a75aa8b79 [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
30const VoipConfigDataClassID ClassID = ClassID(138)
31
32var voipconfigdataBME *ManagedEntityDefinition
33
34// VoipConfigData (class ID #138)
35// 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
47// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
48// one instance, number 0. (R) (mandatory) (2-bytes)
49//
50// Available Signalling Protocols
51// (R) (mandatory) (1-byte)
52//
53// Signalling Protocol Used
54// (R,-W) (mandatory) (1-byte)
55//
56// Available Voip Configuration Methods
57// Bits 5..24 are reserved by ITU-T. Bits 25..32 are reserved for proprietary vendor configuration
58// capabilities. (R) (mandatory) (4-bytes)
59//
60// Voip Configuration Method Used
61// (R,-W) (mandatory) (1-byte)
62//
63// Voip Configuration Address Pointer
64// The default value is 0xFFFF (R,-W) (mandatory) (2-bytes)
65//
66// Voip Configuration State
67// Other values are reserved. At ME instantiation, the ONU sets this attribute to 0. (R)
68// (mandatory) (1-byte)
69//
70// Retrieve Profile
71// Retrieve profile: This attribute provides a means by which the ONU may be notified that a new
72// VoIP profile should be retrieved. By setting this attribute, the OLT triggers the ONU to
73// retrieve a new profile. The actual value in the set action is ignored because it is the action
74// of setting that is important. (W) (mandatory) (1-byte)
75//
76// Profile Version
77// Profile version: This attribute is a character string that identifies the version of the last
78// retrieved profile. (R) (mandatory) (25-bytes)
79//
80type VoipConfigData struct {
81 ManagedEntityDefinition
82 Attributes AttributeValueMap
83}
84
85func init() {
86 voipconfigdataBME = &ManagedEntityDefinition{
87 Name: "VoipConfigData",
88 ClassID: 138,
89 MessageTypes: mapset.NewSetWith(
90 Get,
91 Set,
92 ),
93 AllowedAttributeMask: 0xff00,
94 AttributeDefinitions: AttributeDefinitionMap{
95 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
96 1: ByteField("AvailableSignallingProtocols", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
97 2: ByteField("SignallingProtocolUsed", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
98 3: Uint32Field("AvailableVoipConfigurationMethods", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
99 4: ByteField("VoipConfigurationMethodUsed", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
100 5: Uint16Field("VoipConfigurationAddressPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
101 6: ByteField("VoipConfigurationState", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
102 7: ByteField("RetrieveProfile", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Write), false, false, false, 7),
103 8: MultiByteField("ProfileVersion", OctetsAttributeType, 0x0100, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 8),
104 },
105 Access: CreatedByOnu,
106 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600107 Alarms: AlarmMap{
108 0: "VCD config server name",
109 1: "VCD config server reach",
110 2: "VCD config server connect",
111 3: "VCD config server validate",
112 4: "VCD config server auth",
113 5: "VCD config server timeout",
114 6: "VCD config server fail",
115 7: "VCD config file error",
116 8: "VCD subscription name",
117 9: "VCD subscription reach",
118 10: "VCD subscription connect",
119 11: "VCD subscription validate",
120 12: "VCD subscription auth",
121 13: "VCD subscription timeout",
122 14: "VCD subscription fail",
123 15: "VCD reboot request",
124 },
Chip Boling6e27b352020-02-14 09:10:01 -0600125 }
126}
127
128// NewVoipConfigData (class ID 138) creates the basic
129// Managed Entity definition that is used to validate an ME of this type that
130// is received from or transmitted to the OMCC.
131func NewVoipConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
132 return NewManagedEntity(*voipconfigdataBME, params...)
133}