blob: f48f8f3c8ff6f6543b235e2fde87353d99be2498 [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// PseudowireMaintenanceProfileClassID is the 16-bit ID for the OMCI
26// Managed entity Pseudowire maintenance profile
27const PseudowireMaintenanceProfileClassID ClassID = ClassID(284)
28
29var pseudowiremaintenanceprofileBME *ManagedEntityDefinition
30
31// PseudowireMaintenanceProfile (class ID #284)
32// The pseudowire maintenance profile permits the configuration of pseudowire service exception
33// handling. It is created and deleted by the OLT.
34//
35// The settings, and indeed existence, of a pseudowire maintenance profile affect the behaviour of
36// the pseudowire PM history data ME only in establishing criteria for counting SESs, but in no
37// other way. The pseudowire maintenance profile primarily affects the alarms declared by the
38// subscribing pseudowire TP.
39//
40// Relationships
41// One or more instances of the pseudowire TP may point to an instance of the pseudowire
42// maintenance profile. If the pseudowire TP does not refer to a pseudowire maintenance profile,
43// the ONU's default exception handling is implied.
44//
45// Attributes
46// Managed Entity Id
47// Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
48// reserved. (R, setbycreate) (mandatory) (2-bytes)
49//
50// Jitter Buffer Maximum Depth
51// Jitter buffer maximum depth: This attribute specifies the desired maximum depth of the playout
52// buffer in the PSN to the TDM direction. The value is expressed as a multiple of the 125-vs frame
53// rate. The default value 0 selects the ONU's internal policy. (R,-W, setbycreate) (optional)
54// (2-bytes)
55//
56// Jitter Buffer Desired Depth
57// Jitter buffer desired depth: This attribute specifies the desired nominal fill depth of the
58// playout buffer in the PSN to the TDM direction. The value is expressed as a multiple of the
59// 125-vs frame rate. The default value 0 selects the ONU's internal policy. (R,-W, setbycreate)
60// (optional) (2-bytes)
61//
62// Fill Policy
63// (R,-W, setbycreate) (optional) (1-byte)
64//
65// Misconnected Packets Declaration Policy
66// Misconnected packets declaration policy: (R,-W, setbycreate) (optional) (1-byte)
67//
68// Misconnected Packets Clear Policy
69// Misconnected packets clear policy: (R,-W, setbycreate) (optional) (1-byte)
70//
71// Loss Of Packets Declaration Policy
72// Loss of packets declaration policy: (R,-W, setbycreate) (optional) (1-byte)
73//
74// Loss Of Packets Clear Policy
75// Loss of packets clear policy: (R,-W, setbycreate) (optional) (1-byte)
76//
77// Buffer Overrun_Underrun Declaration Policy
78// Buffer overrun/underrun declaration policy: (R,-W, setbycreate) (optional) (1-byte)
79//
80// Buffer Overrun_Underrun Clear Policy
81// Buffer overrun/underrun clear policy: (R,-W, setbycreate) (optional) (1-byte)
82//
83// Malformed Packets Declaration Policy
84// Malformed packets declaration policy: (R,-W, setbycreate) (optional) (1-byte)
85//
86// Malformed Packets Clear Policy
87// Malformed packets clear policy: (R,-W, setbycreate) (optional) (1-byte)
88//
89// R_Bit Transmit Set Policy
90// R-bit transmit set policy: This attribute defines the number of consecutive lost packets that
91// causes the transmitted R bit to be set in the TDM to the PSN direction, indicating lost packets
92// to the far end. The default value 0 selects the ONU's internal policy. (R,-W, setbycreate)
93// (optional) (1-byte)
94//
95// R_Bit Transmit Clear Policy
96// R-bit transmit clear policy: This attribute defines the number of consecutive valid packets that
97// causes the transmitted R bit to be cleared in the TDM to the PSN direction, removing the remote
98// failure indication to the far end. The default value 0 selects the ONU's internal policy. (R,-W,
99// setbycreate) (optional) (1-byte)
100//
101// R_Bit Receive Policy
102// (R,-W, setbycreate) (optional) (1-byte)
103//
104// L Bit Receive Policy
105// (R,-W, setbycreate) (optional) (1-byte)
106//
107// Ses Threshold
108// SES threshold: Number of lost, malformed or otherwise unusable packets expected in the PSN to
109// the TDM direction within a 1-s interval that causes an SES to be counted. Stray packets do not
110// count towards an SES, nor do packets whose L bit is set at the far end. The value 0 specifies
111// that the ONU uses its internal default, which is not necessarily the same as the recommended
112// default value 3. (R, W, set-by-create) (optional) (2 bytes)
113//
114type PseudowireMaintenanceProfile struct {
115 ManagedEntityDefinition
116 Attributes AttributeValueMap
117}
118
119func init() {
120 pseudowiremaintenanceprofileBME = &ManagedEntityDefinition{
121 Name: "PseudowireMaintenanceProfile",
122 ClassID: 284,
123 MessageTypes: mapset.NewSetWith(
124 Create,
125 Delete,
126 Get,
127 Set,
128 ),
129 AllowedAttributeMask: 0xffff,
130 AttributeDefinitions: AttributeDefinitionMap{
131 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
132 1: Uint16Field("JitterBufferMaximumDepth", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 1),
133 2: Uint16Field("JitterBufferDesiredDepth", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
134 3: ByteField("FillPolicy", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
135 4: ByteField("MisconnectedPacketsDeclarationPolicy", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
136 5: ByteField("MisconnectedPacketsClearPolicy", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
137 6: ByteField("LossOfPacketsDeclarationPolicy", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
138 7: ByteField("LossOfPacketsClearPolicy", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
139 8: ByteField("BufferOverrunUnderrunDeclarationPolicy", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 8),
140 9: ByteField("BufferOverrunUnderrunClearPolicy", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
141 10: ByteField("MalformedPacketsDeclarationPolicy", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10),
142 11: ByteField("MalformedPacketsClearPolicy", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 11),
143 12: ByteField("RBitTransmitSetPolicy", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 12),
144 13: ByteField("RBitTransmitClearPolicy", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
145 14: ByteField("RBitReceivePolicy", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
146 15: ByteField("LBitReceivePolicy", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 15),
147 16: Uint16Field("SesThreshold", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 16),
148 },
149 Access: CreatedByOlt,
150 Support: UnknownSupport,
151 }
152}
153
154// NewPseudowireMaintenanceProfile (class ID 284) creates the basic
155// Managed Entity definition that is used to validate an ME of this type that
156// is received from or transmitted to the OMCC.
157func NewPseudowireMaintenanceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
158 return NewManagedEntity(*pseudowiremaintenanceprofileBME, params...)
159}