blob: 1573349bede68d756cfde6a07ead87869dc55b18 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// VoipConfigDataClassID is the 16-bit ID for the OMCI
26// Managed entity VoIP config data
27const VoipConfigDataClassID ClassID = ClassID(138)
28
29var voipconfigdataBME *ManagedEntityDefinition
30
31// VoipConfigData (class ID #138)
32// The VoIP configuration data ME defines the configuration for VoIP in the ONU. The OLT uses this
33// ME to discover the VoIP signalling protocols and configuration methods supported by this ONU.
34// The OLT then uses this ME to select the desired signalling protocol and configuration method.
35// The entity is conditionally required for ONUs that offer VoIP services.
36//
37// An ONU that supports VoIP services automatically creates an instance of this ME.
38//
39// Relationships
40// One instance of this ME is associated with the ONU.
41//
42// Attributes
43// Managed Entity Id
44// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
45// one instance, number 0. (R) (mandatory) (2-bytes)
46//
47// Available Signalling Protocols
48// (R) (mandatory) (1-byte)
49//
50// Signalling Protocol Used
51// (R,-W) (mandatory) (1-byte)
52//
53// Available Voip Configuration Methods
54// Bits 5..24 are reserved by ITU-T. Bits 25..32 are reserved for proprietary vendor configuration
55// capabilities. (R) (mandatory) (4-bytes)
56//
57// Voip Configuration Method Used
58// (R,-W) (mandatory) (1-byte)
59//
60// Voip Configuration Address Pointer
61// The default value is 0xFFFF (R,-W) (mandatory) (2-bytes)
62//
63// Voip Configuration State
64// Other values are reserved. At ME instantiation, the ONU sets this attribute to 0. (R)
65// (mandatory) (1-byte)
66//
67// Retrieve Profile
68// Retrieve profile: This attribute provides a means by which the ONU may be notified that a new
69// VoIP profile should be retrieved. By setting this attribute, the OLT triggers the ONU to
70// retrieve a new profile. The actual value in the set action is ignored because it is the action
71// of setting that is important. (W) (mandatory) (1-byte)
72//
73// Profile Version
74// Profile version: This attribute is a character string that identifies the version of the last
75// retrieved profile. (R) (mandatory) (25-bytes)
76//
77type VoipConfigData struct {
78 ManagedEntityDefinition
79 Attributes AttributeValueMap
80}
81
82func init() {
83 voipconfigdataBME = &ManagedEntityDefinition{
84 Name: "VoipConfigData",
85 ClassID: 138,
86 MessageTypes: mapset.NewSetWith(
87 Get,
88 Set,
89 ),
90 AllowedAttributeMask: 0xff00,
91 AttributeDefinitions: AttributeDefinitionMap{
92 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
93 1: ByteField("AvailableSignallingProtocols", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
94 2: ByteField("SignallingProtocolUsed", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
95 3: Uint32Field("AvailableVoipConfigurationMethods", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
96 4: ByteField("VoipConfigurationMethodUsed", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
97 5: Uint16Field("VoipConfigurationAddressPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
98 6: ByteField("VoipConfigurationState", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
99 7: ByteField("RetrieveProfile", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Write), false, false, false, 7),
100 8: MultiByteField("ProfileVersion", OctetsAttributeType, 0x0100, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 8),
101 },
102 Access: CreatedByOnu,
103 Support: UnknownSupport,
104 }
105}
106
107// NewVoipConfigData (class ID 138) creates the basic
108// Managed Entity definition that is used to validate an ME of this type that
109// is received from or transmitted to the OMCC.
110func NewVoipConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
111 return NewManagedEntity(*voipconfigdataBME, params...)
112}