blob: d64c0fb73fc58c3243214c4780d9c823f8d6c8d5 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// RtpProfileDataClassID is the 16-bit ID for the OMCI
26// Managed entity RTP profile data
27const RtpProfileDataClassID ClassID = ClassID(143)
28
29var rtpprofiledataBME *ManagedEntityDefinition
30
31// RtpProfileData (class ID #143)
32// This ME configures RTP. It is conditionally required for ONUs that offer VoIP service. If a non-
33// OMCI interface is used to manage VoIP, this ME is unnecessary.
34//
35// An instance of this ME is created and deleted by the OLT. An RTP profile is needed for each
36// unique set of attributes.
37//
38// Relationships
39// An instance of this ME may be associated with one or more VoIP media profile MEs.
40//
41// Attributes
42// Managed Entity Id
43// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
44// (mandatory) (2-bytes)
45//
46// Local Port Min
47// Local port min: This attribute defines the base UDP port that should be used by RTP for voice
48// traffic. The recommended default is 50000 (R,-W, set-by-create) (mandatory) (2-bytes)
49//
50// Local Port Max
51// Local port max: This attribute defines the highest UDP port used by RTP for voice traffic. The
52// value must be greater than the local port minimum. The value 0 specifies that the local port
53// maximum be equal to the local port minimum. (R,-W, set-by-create) (optional) (2-bytes)
54//
55// Dscp Mark
56// DSCP mark: Diffserv code point to be used for outgoing RTP packets for this profile. The
57// recommended default value is expedited forwarding (EF)-= 0x2E. (R,-W, setbycreate) (mandatory)
58// (1-byte)
59//
60// Piggyback Events
61// (R,-W, setbycreate) (mandatory) (1-byte)
62//
63// Tone Events
64// (R,-W, setbycreate) (mandatory) (1-byte)
65//
66// Dtmf Events
67// (R,-W, setbycreate) (mandatory) (1-byte)
68//
69// Cas Events
70// (R,-W, setbycreate) (mandatory) (1-byte)
71//
72// Ip Host Config Pointer
73// IP host config pointer: This optional pointer associates the bearer (voice) flow with an IP host
74// config data or IPv6 host config data ME. If this attribute is not present or is not populated
75// with a valid pointer value, the bearer flow uses the same IP stack that is used for signalling,
76// indicated by the TCP/UDP pointer in the associated SIP agent or MGC config data. The default
77// value is 0xFFFF, a null pointer. (R,-W) (optional) (2-bytes)
78//
79type RtpProfileData struct {
80 ManagedEntityDefinition
81 Attributes AttributeValueMap
82}
83
84func init() {
85 rtpprofiledataBME = &ManagedEntityDefinition{
86 Name: "RtpProfileData",
87 ClassID: 143,
88 MessageTypes: mapset.NewSetWith(
89 Create,
90 Delete,
91 Get,
92 Set,
93 ),
94 AllowedAttributeMask: 0xff00,
95 AttributeDefinitions: AttributeDefinitionMap{
96 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
97 1: Uint16Field("LocalPortMin", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
98 2: Uint16Field("LocalPortMax", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
99 3: ByteField("DscpMark", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
100 4: ByteField("PiggybackEvents", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
101 5: ByteField("ToneEvents", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
102 6: ByteField("DtmfEvents", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
103 7: ByteField("CasEvents", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
104 8: Uint16Field("IpHostConfigPointer", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
105 },
106 Access: CreatedByOlt,
107 Support: UnknownSupport,
108 }
109}
110
111// NewRtpProfileData (class ID 143) creates the basic
112// Managed Entity definition that is used to validate an ME of this type that
113// is received from or transmitted to the OMCC.
114func NewRtpProfileData(params ...ParamData) (*ManagedEntity, OmciErrors) {
115 return NewManagedEntity(*rtpprofiledataBME, params...)
116}