blob: b0cce3254ed916ee7c0d3a4789c86557a5518f5d [file] [log] [blame]
Matteo Scandolof9d43412021-01-12 11:11:34 -08001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Matteo Scandolof9d43412021-01-12 11:11:34 -08005 * 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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Matteo Scandolof9d43412021-01-12 11:11:34 -08009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Matteo Scandolof9d43412021-01-12 11:11:34 -080011 * 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 */
Girish Gowdra161d27a2021-05-05 12:01:44 -070017/*
Matteo Scandolof9d43412021-01-12 11:11:34 -080018 * 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// VoipFeatureAccessCodesClassID is the 16-bit ID for the OMCI
29// Managed entity VoIP feature access codes
Andrea Campanella10426e22021-10-15 17:58:04 +020030const VoipFeatureAccessCodesClassID = ClassID(147) // 0x0093
Matteo Scandolof9d43412021-01-12 11:11:34 -080031
32var voipfeatureaccesscodesBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// VoipFeatureAccessCodes (Class ID: #147 / 0x0093)
Matteo Scandolof9d43412021-01-12 11:11:34 -080035// The VoIP feature access codes ME defines administrable feature access codes for the VoIP
36// subscriber. It is optional for ONUs that support VoIP services. If a non-OMCI interface is used
37// to manage VoIP signalling, this ME is unnecessary.
38//
39// Instances of this ME are created and deleted by the OLT. A VoIP feature access codes instance is
40// needed for each unique set of feature access code attributes.
41//
42// Relationships
43// An instance of this ME may be associated with one or more SIP user data MEs.
44//
45// Attributes
46// Managed Entity Id
Andrea Campanella10426e22021-10-15 17:58:04 +020047// The remaining attributes are access codes for the features mentioned in their names. Each
48// attribute is a string of characters from the set {0..9, *, #}, with trailing nulls in any unused
49// bytes.
50//
51// This attribute uniquely identifies each instance of this ME. (R) (mandatory) (2-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080052//
53// Cancel Call Waiting
Andrea Campanella10426e22021-10-15 17:58:04 +020054// (R,-W) (optional) (5-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080055//
56// Call Hold
Andrea Campanella10426e22021-10-15 17:58:04 +020057// (R,-W) (optional) (5-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080058//
59// Call Park
Andrea Campanella10426e22021-10-15 17:58:04 +020060// (R,-W) (optional) (5-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080061//
62// Caller Id Activate
Andrea Campanella10426e22021-10-15 17:58:04 +020063// (R,-W) (optional) (5-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080064//
65// Caller Id Deactivate
Andrea Campanella10426e22021-10-15 17:58:04 +020066// (R,-W) (optional) (5-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080067//
68// Do Not Disturb Activation
Andrea Campanella10426e22021-10-15 17:58:04 +020069// (R,-W) (optional) (5-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080070//
71// Do Not Disturb Deactivation
Andrea Campanella10426e22021-10-15 17:58:04 +020072// (R,-W) (optional) (5-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080073//
74// Do Not Disturb Pin Change
Andrea Campanella10426e22021-10-15 17:58:04 +020075// (R,-W) (optional) (5-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080076//
77// Emergency Service Number
Andrea Campanella10426e22021-10-15 17:58:04 +020078// (R,-W) (optional) (5-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080079//
80// Intercom Service
Andrea Campanella10426e22021-10-15 17:58:04 +020081// (R,-W) (optional) (5-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080082//
83// Unattended_Blind Call Transfer
84// Unattended/blind call transfer: (R, W) (optional) (5 bytes)
85//
86// Attended Call Transfer
Andrea Campanella10426e22021-10-15 17:58:04 +020087// (R, W) (optional) (5 bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080088//
89type VoipFeatureAccessCodes struct {
90 ManagedEntityDefinition
91 Attributes AttributeValueMap
92}
93
Elia Battiston9bfe1102022-02-03 10:38:03 +010094// Attribute name constants
95
96const VoipFeatureAccessCodes_CancelCallWaiting = "CancelCallWaiting"
97const VoipFeatureAccessCodes_CallHold = "CallHold"
98const VoipFeatureAccessCodes_CallPark = "CallPark"
99const VoipFeatureAccessCodes_CallerIdActivate = "CallerIdActivate"
100const VoipFeatureAccessCodes_CallerIdDeactivate = "CallerIdDeactivate"
101const VoipFeatureAccessCodes_DoNotDisturbActivation = "DoNotDisturbActivation"
102const VoipFeatureAccessCodes_DoNotDisturbDeactivation = "DoNotDisturbDeactivation"
103const VoipFeatureAccessCodes_DoNotDisturbPinChange = "DoNotDisturbPinChange"
104const VoipFeatureAccessCodes_EmergencyServiceNumber = "EmergencyServiceNumber"
105const VoipFeatureAccessCodes_IntercomService = "IntercomService"
106const VoipFeatureAccessCodes_UnattendedBlindCallTransfer = "UnattendedBlindCallTransfer"
107const VoipFeatureAccessCodes_AttendedCallTransfer = "AttendedCallTransfer"
108
Matteo Scandolof9d43412021-01-12 11:11:34 -0800109func init() {
110 voipfeatureaccesscodesBME = &ManagedEntityDefinition{
111 Name: "VoipFeatureAccessCodes",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100112 ClassID: VoipFeatureAccessCodesClassID,
Matteo Scandolof9d43412021-01-12 11:11:34 -0800113 MessageTypes: mapset.NewSetWith(
114 Create,
115 Delete,
116 Get,
117 Set,
118 ),
119 AllowedAttributeMask: 0xfff0,
120 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100121 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
122 1: MultiByteField(VoipFeatureAccessCodes_CancelCallWaiting, OctetsAttributeType, 0x8000, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 1),
123 2: MultiByteField(VoipFeatureAccessCodes_CallHold, OctetsAttributeType, 0x4000, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 2),
124 3: MultiByteField(VoipFeatureAccessCodes_CallPark, OctetsAttributeType, 0x2000, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 3),
125 4: MultiByteField(VoipFeatureAccessCodes_CallerIdActivate, OctetsAttributeType, 0x1000, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 4),
126 5: MultiByteField(VoipFeatureAccessCodes_CallerIdDeactivate, OctetsAttributeType, 0x0800, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 5),
127 6: MultiByteField(VoipFeatureAccessCodes_DoNotDisturbActivation, OctetsAttributeType, 0x0400, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 6),
128 7: MultiByteField(VoipFeatureAccessCodes_DoNotDisturbDeactivation, OctetsAttributeType, 0x0200, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 7),
129 8: MultiByteField(VoipFeatureAccessCodes_DoNotDisturbPinChange, OctetsAttributeType, 0x0100, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 8),
130 9: MultiByteField(VoipFeatureAccessCodes_EmergencyServiceNumber, OctetsAttributeType, 0x0080, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 9),
131 10: MultiByteField(VoipFeatureAccessCodes_IntercomService, OctetsAttributeType, 0x0040, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 10),
132 11: MultiByteField(VoipFeatureAccessCodes_UnattendedBlindCallTransfer, OctetsAttributeType, 0x0020, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 11),
133 12: MultiByteField(VoipFeatureAccessCodes_AttendedCallTransfer, OctetsAttributeType, 0x0010, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 12),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800134 },
135 Access: CreatedByOlt,
136 Support: UnknownSupport,
137 }
138}
139
140// NewVoipFeatureAccessCodes (class ID 147) creates the basic
141// Managed Entity definition that is used to validate an ME of this type that
142// is received from or transmitted to the OMCC.
143func NewVoipFeatureAccessCodes(params ...ParamData) (*ManagedEntity, OmciErrors) {
144 return NewManagedEntity(*voipfeatureaccesscodesBME, params...)
145}