Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
| 5 | * 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 |
| 8 | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | * 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 Gowdra | 161d27a | 2021-05-05 12:01:44 -0700 | [diff] [blame] | 17 | /* |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 18 | * 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // VoipFeatureAccessCodesClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity VoIP feature access codes |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 30 | const VoipFeatureAccessCodesClassID = ClassID(147) // 0x0093 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 31 | |
| 32 | var voipfeatureaccesscodesBME *ManagedEntityDefinition |
| 33 | |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 34 | // VoipFeatureAccessCodes (Class ID: #147 / 0x0093) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 35 | // 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 Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 47 | // 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 Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 52 | // |
| 53 | // Cancel Call Waiting |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 54 | // (R,-W) (optional) (5-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 55 | // |
| 56 | // Call Hold |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 57 | // (R,-W) (optional) (5-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 58 | // |
| 59 | // Call Park |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 60 | // (R,-W) (optional) (5-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 61 | // |
| 62 | // Caller Id Activate |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 63 | // (R,-W) (optional) (5-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 64 | // |
| 65 | // Caller Id Deactivate |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 66 | // (R,-W) (optional) (5-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 67 | // |
| 68 | // Do Not Disturb Activation |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 69 | // (R,-W) (optional) (5-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 70 | // |
| 71 | // Do Not Disturb Deactivation |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 72 | // (R,-W) (optional) (5-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 73 | // |
| 74 | // Do Not Disturb Pin Change |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 75 | // (R,-W) (optional) (5-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 76 | // |
| 77 | // Emergency Service Number |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 78 | // (R,-W) (optional) (5-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 79 | // |
| 80 | // Intercom Service |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 81 | // (R,-W) (optional) (5-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 82 | // |
| 83 | // Unattended_Blind Call Transfer |
| 84 | // Unattended/blind call transfer: (R, W) (optional) (5 bytes) |
| 85 | // |
| 86 | // Attended Call Transfer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 87 | // (R, W) (optional) (5 bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 88 | // |
| 89 | type VoipFeatureAccessCodes struct { |
| 90 | ManagedEntityDefinition |
| 91 | Attributes AttributeValueMap |
| 92 | } |
| 93 | |
| 94 | func init() { |
| 95 | voipfeatureaccesscodesBME = &ManagedEntityDefinition{ |
| 96 | Name: "VoipFeatureAccessCodes", |
| 97 | ClassID: 147, |
| 98 | MessageTypes: mapset.NewSetWith( |
| 99 | Create, |
| 100 | Delete, |
| 101 | Get, |
| 102 | Set, |
| 103 | ), |
| 104 | AllowedAttributeMask: 0xfff0, |
| 105 | AttributeDefinitions: AttributeDefinitionMap{ |
| 106 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 107 | 1: MultiByteField("CancelCallWaiting", OctetsAttributeType, 0x8000, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 1), |
| 108 | 2: MultiByteField("CallHold", OctetsAttributeType, 0x4000, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 2), |
| 109 | 3: MultiByteField("CallPark", OctetsAttributeType, 0x2000, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 3), |
| 110 | 4: MultiByteField("CallerIdActivate", OctetsAttributeType, 0x1000, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 4), |
| 111 | 5: MultiByteField("CallerIdDeactivate", OctetsAttributeType, 0x0800, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 5), |
| 112 | 6: MultiByteField("DoNotDisturbActivation", OctetsAttributeType, 0x0400, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 6), |
| 113 | 7: MultiByteField("DoNotDisturbDeactivation", OctetsAttributeType, 0x0200, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 7), |
| 114 | 8: MultiByteField("DoNotDisturbPinChange", OctetsAttributeType, 0x0100, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 8), |
| 115 | 9: MultiByteField("EmergencyServiceNumber", OctetsAttributeType, 0x0080, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 9), |
| 116 | 10: MultiByteField("IntercomService", OctetsAttributeType, 0x0040, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 10), |
| 117 | 11: MultiByteField("UnattendedBlindCallTransfer", OctetsAttributeType, 0x0020, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 11), |
| 118 | 12: MultiByteField("AttendedCallTransfer", OctetsAttributeType, 0x0010, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 12), |
| 119 | }, |
| 120 | Access: CreatedByOlt, |
| 121 | Support: UnknownSupport, |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | // NewVoipFeatureAccessCodes (class ID 147) creates the basic |
| 126 | // Managed Entity definition that is used to validate an ME of this type that |
| 127 | // is received from or transmitted to the OMCC. |
| 128 | func NewVoipFeatureAccessCodes(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 129 | return NewManagedEntity(*voipfeatureaccesscodesBME, params...) |
| 130 | } |