blob: 1bc4f00181a9b5991110ae6b6db6cb2c269f90e2 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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 Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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// RtpProfileDataClassID is the 16-bit ID for the OMCI
29// Managed entity RTP profile data
Chip Boling610117d2021-09-09 11:24:34 -050030const RtpProfileDataClassID = ClassID(143) // 0x008f
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var rtpprofiledataBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// RtpProfileData (Class ID: #143 / 0x008f)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050046// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
47// (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060048//
49// Local Port Min
Chip Boling610117d2021-09-09 11:24:34 -050050// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060052//
53// Local Port Max
Chip Boling610117d2021-09-09 11:24:34 -050054// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060057//
58// Dscp Mark
Chip Boling610117d2021-09-09 11:24:34 -050059// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060061//
62// Piggyback Events
Chip Boling610117d2021-09-09 11:24:34 -050063// 0 Disabled (recommended default)
64//
65// 1 Enabled
66//
Chip Boling6e27b352020-02-14 09:10:01 -060067// (R,-W, setbycreate) (mandatory) (1-byte)
68//
Chip Boling610117d2021-09-09 11:24:34 -050069// Enables or disables RTP piggyback events.
70//
Chip Boling6e27b352020-02-14 09:10:01 -060071// Tone Events
Chip Boling610117d2021-09-09 11:24:34 -050072// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060079// (R,-W, setbycreate) (mandatory) (1-byte)
80//
81// Dtmf Events
Chip Boling610117d2021-09-09 11:24:34 -050082// 0 Disabled
83//
84// 1 Enabled
85//
Chip Boling6e27b352020-02-14 09:10:01 -060086// (R,-W, setbycreate) (mandatory) (1-byte)
87//
Chip Boling610117d2021-09-09 11:24:34 -050088// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060092// Cas Events
Chip Boling610117d2021-09-09 11:24:34 -050093// 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//
Chip Boling6e27b352020-02-14 09:10:01 -0600100// (R,-W, setbycreate) (mandatory) (1-byte)
101//
102// Ip Host Config Pointer
Chip Boling610117d2021-09-09 11:24:34 -0500103// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600108//
109type RtpProfileData struct {
110 ManagedEntityDefinition
111 Attributes AttributeValueMap
112}
113
114func init() {
115 rtpprofiledataBME = &ManagedEntityDefinition{
116 Name: "RtpProfileData",
117 ClassID: 143,
118 MessageTypes: mapset.NewSetWith(
119 Create,
120 Delete,
121 Get,
122 Set,
123 ),
124 AllowedAttributeMask: 0xff00,
125 AttributeDefinitions: AttributeDefinitionMap{
126 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
127 1: Uint16Field("LocalPortMin", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
128 2: Uint16Field("LocalPortMax", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
129 3: ByteField("DscpMark", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
130 4: ByteField("PiggybackEvents", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
131 5: ByteField("ToneEvents", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
132 6: ByteField("DtmfEvents", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
133 7: ByteField("CasEvents", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
134 8: Uint16Field("IpHostConfigPointer", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
135 },
136 Access: CreatedByOlt,
137 Support: UnknownSupport,
138 }
139}
140
141// NewRtpProfileData (class ID 143) creates the basic
142// Managed Entity definition that is used to validate an ME of this type that
143// is received from or transmitted to the OMCC.
144func NewRtpProfileData(params ...ParamData) (*ManagedEntity, OmciErrors) {
145 return NewManagedEntity(*rtpprofiledataBME, params...)
146}