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 |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame^] | 4 | * |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [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 |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame^] | 8 | * |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame^] | 10 | * |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [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 | */ |
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 | // RtpProfileDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity RTP profile data |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 30 | const RtpProfileDataClassID = ClassID(143) // 0x008f |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 31 | |
| 32 | var rtpprofiledataBME *ManagedEntityDefinition |
| 33 | |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 34 | // RtpProfileData (Class ID: #143 / 0x008f) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 35 | // This ME configures RTP. It is conditionally required for ONUs that offer VoIP service. If a non- |
| 36 | // OMCI interface is used to manage VoIP, this ME is unnecessary. |
| 37 | // |
| 38 | // An instance of this ME is created and deleted by the OLT. An RTP profile is needed for each |
| 39 | // unique set of attributes. |
| 40 | // |
| 41 | // Relationships |
| 42 | // An instance of this ME may be associated with one or more VoIP media profile MEs. |
| 43 | // |
| 44 | // Attributes |
| 45 | // Managed Entity Id |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 46 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 47 | // (2-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 48 | // |
| 49 | // Local Port Min |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 50 | // This attribute defines the base UDP port that should be used by RTP for voice traffic. The |
| 51 | // recommended default is 50000 (R,-W, set-by-create) (mandatory) (2-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 52 | // |
| 53 | // Local Port Max |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 54 | // This attribute defines the highest UDP port used by RTP for voice traffic. The value must be |
| 55 | // greater than the local port minimum. The value 0 specifies that the local port maximum be equal |
| 56 | // to the local port minimum. (R,-W, set-by-create) (optional) (2-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 57 | // |
| 58 | // Dscp Mark |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 59 | // Diffserv code point to be used for outgoing RTP packets for this profile. The recommended |
| 60 | // default value is expedited forwarding (EF)-= 0x2E. (R,-W, setbycreate) (mandatory) (1-byte) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 61 | // |
| 62 | // Piggyback Events |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 63 | // 0 Disabled (recommended default) |
| 64 | // |
| 65 | // 1 Enabled |
| 66 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 67 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 68 | // |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 69 | // Enables or disables RTP piggyback events. |
| 70 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 71 | // Tone Events |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 72 | // Enables or disables the handling of tones via RTP tone events per [IETF RFC 4733], (see also |
| 73 | // [IETF RFC 4734]). |
| 74 | // |
| 75 | // 0 Disabled (recommended default) |
| 76 | // |
| 77 | // 1 Enabled |
| 78 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 79 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 80 | // |
| 81 | // Dtmf Events |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 82 | // 0 Disabled |
| 83 | // |
| 84 | // 1 Enabled |
| 85 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 86 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 87 | // |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 88 | // Enables or disables the handling of DTMF via RTP DTMF events per [IETF-RFC 4733], (see also |
| 89 | // [IETF RFC 4734]). This attribute is ignored unless the OOB DTMF attribute in the VoIP media |
| 90 | // profile is enabled. |
| 91 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 92 | // Cas Events |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 93 | // Enables or disables the handling of CAS via RTP CAS events per [IETF-RFC-4733], (see also [IETF |
| 94 | // RFC 4734]). |
| 95 | // |
| 96 | // 0 Disabled |
| 97 | // |
| 98 | // 1 Enabled |
| 99 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 100 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 101 | // |
| 102 | // Ip Host Config Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 103 | // This optional pointer associates the bearer (voice) flow with an IP host config data or IPv6 |
| 104 | // host config data ME. If this attribute is not present or is not populated with a valid pointer |
| 105 | // value, the bearer flow uses the same IP stack that is used for signalling, indicated by the |
| 106 | // TCP/UDP pointer in the associated SIP agent or MGC config data. The default value is 0xFFFF, a |
| 107 | // null pointer. (R,-W) (optional) (2-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 108 | // |
| 109 | type RtpProfileData struct { |
| 110 | ManagedEntityDefinition |
| 111 | Attributes AttributeValueMap |
| 112 | } |
| 113 | |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame^] | 114 | // Attribute name constants |
| 115 | |
| 116 | const RtpProfileData_LocalPortMin = "LocalPortMin" |
| 117 | const RtpProfileData_LocalPortMax = "LocalPortMax" |
| 118 | const RtpProfileData_DscpMark = "DscpMark" |
| 119 | const RtpProfileData_PiggybackEvents = "PiggybackEvents" |
| 120 | const RtpProfileData_ToneEvents = "ToneEvents" |
| 121 | const RtpProfileData_DtmfEvents = "DtmfEvents" |
| 122 | const RtpProfileData_CasEvents = "CasEvents" |
| 123 | const RtpProfileData_IpHostConfigPointer = "IpHostConfigPointer" |
| 124 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 125 | func init() { |
| 126 | rtpprofiledataBME = &ManagedEntityDefinition{ |
| 127 | Name: "RtpProfileData", |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame^] | 128 | ClassID: RtpProfileDataClassID, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 129 | MessageTypes: mapset.NewSetWith( |
| 130 | Create, |
| 131 | Delete, |
| 132 | Get, |
| 133 | Set, |
| 134 | ), |
| 135 | AllowedAttributeMask: 0xff00, |
| 136 | AttributeDefinitions: AttributeDefinitionMap{ |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame^] | 137 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 138 | 1: Uint16Field(RtpProfileData_LocalPortMin, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 139 | 2: Uint16Field(RtpProfileData_LocalPortMax, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2), |
| 140 | 3: ByteField(RtpProfileData_DscpMark, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 141 | 4: ByteField(RtpProfileData_PiggybackEvents, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 142 | 5: ByteField(RtpProfileData_ToneEvents, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5), |
| 143 | 6: ByteField(RtpProfileData_DtmfEvents, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6), |
| 144 | 7: ByteField(RtpProfileData_CasEvents, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 145 | 8: Uint16Field(RtpProfileData_IpHostConfigPointer, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8), |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 146 | }, |
| 147 | Access: CreatedByOlt, |
| 148 | Support: UnknownSupport, |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | // NewRtpProfileData (class ID 143) creates the basic |
| 153 | // Managed Entity definition that is used to validate an ME of this type that |
| 154 | // is received from or transmitted to the OMCC. |
| 155 | func NewRtpProfileData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 156 | return NewManagedEntity(*rtpprofiledataBME, params...) |
| 157 | } |