Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 | */ |
David K. Bainbridge | adf422d | 2021-04-09 16:06:41 +0000 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 | // VoipMediaProfileClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity VoIP media profile |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const VoipMediaProfileClassID = ClassID(142) // 0x008e |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var voipmediaprofileBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // VoipMediaProfile (Class ID: #142 / 0x008e) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // The VoIP media profile ME contains settings that apply to VoIP voice encoding. This entity is |
| 36 | // conditionally required for ONUs that offer VoIP services. If a non-OMCI interface is used to |
| 37 | // manage VoIP signalling, this ME is unnecessary. |
| 38 | // |
| 39 | // An instance of this ME is created and deleted by the OLT. A VoIP media profile is needed for |
| 40 | // each unique set of profile attributes. |
| 41 | // |
| 42 | // Relationships |
| 43 | // An instance of this ME may be associated with one or more VoIP voice CTP MEs. |
| 44 | // |
| 45 | // Attributes |
| 46 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 47 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 48 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 49 | // |
| 50 | // Fax Mode |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 51 | // Selects the fax mode; values are as follows. |
| 52 | // |
| 53 | // 0 Passthru |
| 54 | // |
| 55 | // 1 ITU-T T.38 |
| 56 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 57 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 58 | // |
| 59 | // Voice Service Profile Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 60 | // Pointer to a voice service profile, which defines parameters such as jitter buffering and echo |
| 61 | // cancellation. (R,-W, setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 62 | // |
| 63 | // Codec Selection 1st Order |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 64 | // Codec selection (1st order): This attribute specifies codec selection as defined by [IETF- |
| 65 | // RFC-3551]. |
| 66 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 67 | // (R,-W, set-by-create) (mandatory) (1-byte) |
| 68 | // |
| 69 | // Packet Period Selection 1st Order |
| 70 | // Packet period selection (1st order): This attribute specifies the packet period selection |
| 71 | // interval in milliseconds. The recommended default value is 10-ms. Valid values are 10..30-ms. |
| 72 | // (R,-W, set-by-create) (mandatory) (1-byte) |
| 73 | // |
| 74 | // Silence Suppression 1st Order |
| 75 | // Silence suppression (1st order): This attribute specifies whether silence suppression is on or |
| 76 | // off. Valid values are 0-= off and 1-= on. (R,-W, set-by-create) (mandatory) (1-byte) |
| 77 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 78 | // Three more groups of three attributes are defined, with definitions identical to the preceding |
| 79 | // three: |
| 80 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 81 | // Codec Selection 2nd Order |
| 82 | // Codec selection (2nd order): (R,-W, setbycreate) (mandatory) (1-byte) |
| 83 | // |
| 84 | // Packet Period Selection 2nd Order |
| 85 | // Packet period selection (2nd order): (R,-W, setbycreate) (mandatory) (1-byte) |
| 86 | // |
| 87 | // Silence Suppression 2nd Order |
| 88 | // Silence suppression (2nd order): (R,-W, setbycreate) (mandatory) (1-byte) |
| 89 | // |
| 90 | // Codec Selection 3rd Order |
| 91 | // Codec selection (3rd order): (R,-W, setbycreate) (mandatory) (1-byte) |
| 92 | // |
| 93 | // Packet Period Selection 3rd Order |
| 94 | // Packet period selection (3rd order): (R,-W, setbycreate) (mandatory) (1-byte) |
| 95 | // |
| 96 | // Silence Suppression 3rd Order |
| 97 | // Silence suppression (3rd order): (R,-W, setbycreate) (mandatory) (1-byte) |
| 98 | // |
| 99 | // Codec Selection 4th Order |
| 100 | // Codec selection (4th order): (R,-W, setbycreate) (mandatory) (1-byte) |
| 101 | // |
| 102 | // Packet Period Selection 4th Order |
| 103 | // Packet period selection (4th order): (R,-W, setbycreate) (mandatory) (1-byte) |
| 104 | // |
| 105 | // Silence Suppression 4th Order |
| 106 | // Silence suppression (4th order): (R,-W, setbycreate) (mandatory) (1-byte) |
| 107 | // |
| 108 | // Oob Dtmf |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 109 | // This attribute specifies out-of-band DMTF carriage. When enabled (1), DTMF signals are carried |
| 110 | // out of band via RTP or the associated signalling protocol. When disabled (0), DTMF tones are |
| 111 | // carried in the PCM stream. (R,-W, setbycreate) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 112 | // |
| 113 | // Rtp Profile Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 114 | // This attribute points to the associated RTP profile data ME. (R,-W, setbycreate) (mandatory) |
| 115 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 116 | // |
| 117 | type VoipMediaProfile struct { |
| 118 | ManagedEntityDefinition |
| 119 | Attributes AttributeValueMap |
| 120 | } |
| 121 | |
| 122 | func init() { |
| 123 | voipmediaprofileBME = &ManagedEntityDefinition{ |
| 124 | Name: "VoipMediaProfile", |
| 125 | ClassID: 142, |
| 126 | MessageTypes: mapset.NewSetWith( |
| 127 | Create, |
| 128 | Delete, |
| 129 | Get, |
| 130 | Set, |
| 131 | ), |
| 132 | AllowedAttributeMask: 0xffff, |
| 133 | AttributeDefinitions: AttributeDefinitionMap{ |
| 134 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 135 | 1: ByteField("FaxMode", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 136 | 2: Uint16Field("VoiceServiceProfilePointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 137 | 3: ByteField("CodecSelection1StOrder", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 138 | 4: ByteField("PacketPeriodSelection1StOrder", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 139 | 5: ByteField("SilenceSuppression1StOrder", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5), |
| 140 | 6: ByteField("CodecSelection2NdOrder", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6), |
| 141 | 7: ByteField("PacketPeriodSelection2NdOrder", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 142 | 8: ByteField("SilenceSuppression2NdOrder", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8), |
| 143 | 9: ByteField("CodecSelection3RdOrder", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9), |
| 144 | 10: ByteField("PacketPeriodSelection3RdOrder", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10), |
| 145 | 11: ByteField("SilenceSuppression3RdOrder", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11), |
| 146 | 12: ByteField("CodecSelection4ThOrder", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12), |
| 147 | 13: ByteField("PacketPeriodSelection4ThOrder", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 13), |
| 148 | 14: ByteField("SilenceSuppression4ThOrder", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 14), |
| 149 | 15: ByteField("OobDtmf", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 15), |
| 150 | 16: Uint16Field("RtpProfilePointer", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 16), |
| 151 | }, |
| 152 | Access: CreatedByOlt, |
| 153 | Support: UnknownSupport, |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | // NewVoipMediaProfile (class ID 142) creates the basic |
| 158 | // Managed Entity definition that is used to validate an ME of this type that |
| 159 | // is received from or transmitted to the OMCC. |
| 160 | func NewVoipMediaProfile(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 161 | return NewManagedEntity(*voipmediaprofileBME, params...) |
| 162 | } |