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 | // RtpProfileDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity RTP profile data |
| 30 | const RtpProfileDataClassID ClassID = ClassID(143) |
| 31 | |
| 32 | var rtpprofiledataBME *ManagedEntityDefinition |
| 33 | |
| 34 | // RtpProfileData (class ID #143) |
| 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 |
| 46 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate) |
| 47 | // (mandatory) (2-bytes) |
| 48 | // |
| 49 | // Local Port Min |
| 50 | // Local port min: This attribute defines the base UDP port that should be used by RTP for voice |
| 51 | // traffic. The recommended default is 50000 (R,-W, set-by-create) (mandatory) (2-bytes) |
| 52 | // |
| 53 | // Local Port Max |
| 54 | // Local port max: This attribute defines the highest UDP port used by RTP for voice traffic. The |
| 55 | // value must be greater than the local port minimum. The value 0 specifies that the local port |
| 56 | // maximum be equal to the local port minimum. (R,-W, set-by-create) (optional) (2-bytes) |
| 57 | // |
| 58 | // Dscp Mark |
| 59 | // DSCP mark: Diffserv code point to be used for outgoing RTP packets for this profile. The |
| 60 | // recommended default value is expedited forwarding (EF)-= 0x2E. (R,-W, setbycreate) (mandatory) |
| 61 | // (1-byte) |
| 62 | // |
| 63 | // Piggyback Events |
| 64 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 65 | // |
| 66 | // Tone Events |
| 67 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 68 | // |
| 69 | // Dtmf Events |
| 70 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 71 | // |
| 72 | // Cas Events |
| 73 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 74 | // |
| 75 | // Ip Host Config Pointer |
| 76 | // IP host config pointer: This optional pointer associates the bearer (voice) flow with an IP host |
| 77 | // config data or IPv6 host config data ME. If this attribute is not present or is not populated |
| 78 | // with a valid pointer value, the bearer flow uses the same IP stack that is used for signalling, |
| 79 | // indicated by the TCP/UDP pointer in the associated SIP agent or MGC config data. The default |
| 80 | // value is 0xFFFF, a null pointer. (R,-W) (optional) (2-bytes) |
| 81 | // |
| 82 | type RtpProfileData struct { |
| 83 | ManagedEntityDefinition |
| 84 | Attributes AttributeValueMap |
| 85 | } |
| 86 | |
| 87 | func init() { |
| 88 | rtpprofiledataBME = &ManagedEntityDefinition{ |
| 89 | Name: "RtpProfileData", |
| 90 | ClassID: 143, |
| 91 | MessageTypes: mapset.NewSetWith( |
| 92 | Create, |
| 93 | Delete, |
| 94 | Get, |
| 95 | Set, |
| 96 | ), |
| 97 | AllowedAttributeMask: 0xff00, |
| 98 | AttributeDefinitions: AttributeDefinitionMap{ |
| 99 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 100 | 1: Uint16Field("LocalPortMin", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 101 | 2: Uint16Field("LocalPortMax", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2), |
| 102 | 3: ByteField("DscpMark", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 103 | 4: ByteField("PiggybackEvents", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 104 | 5: ByteField("ToneEvents", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5), |
| 105 | 6: ByteField("DtmfEvents", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6), |
| 106 | 7: ByteField("CasEvents", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 107 | 8: Uint16Field("IpHostConfigPointer", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8), |
| 108 | }, |
| 109 | Access: CreatedByOlt, |
| 110 | Support: UnknownSupport, |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | // NewRtpProfileData (class ID 143) creates the basic |
| 115 | // Managed Entity definition that is used to validate an ME of this type that |
| 116 | // is received from or transmitted to the OMCC. |
| 117 | func NewRtpProfileData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 118 | return NewManagedEntity(*rtpprofiledataBME, params...) |
| 119 | } |