blob: e51eca00a9d1a588c48acfa52d35202792043139 [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// Dot1RateLimiterClassID is the 16-bit ID for the OMCI
26// Managed entity Dot1 rate limiter
27const Dot1RateLimiterClassID ClassID = ClassID(298)
28
29var dot1ratelimiterBME *ManagedEntityDefinition
30
31// Dot1RateLimiter (class ID #298)
32// This ME allows rate limits to be defined for various types of upstream traffic that are
33// processed by IEEE 802.1 bridges or related structures.
34//
35// Relationships
36// An instance of this ME may be linked to an instance of a MAC bridge service profile or an IEEE
37// 802.1p mapper.
38//
39// Attributes
40// Managed Entity Id
41// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
42// (mandatory) (2-bytes)
43//
44// Parent Me Pointer
45// Parent ME pointer: This attribute points to an instance of a ME. The type of ME is determined by
46// the TP type attribute. (R,-W, setbycreate) (mandatory) (2-bytes)
47//
48// Tp Type
49// (R,-W, setbycreate) (mandatory) (1-byte)
50//
51// Upstream Unicast Flood Rate Pointer
52// Upstream unicast flood rate pointer: This attribute points to an instance of the traffic
53// descriptor that governs the rate of upstream unicast packets whose DA is unknown to the bridge.
54// A null pointer specifies that no administrative limit is to be imposed. (R,-W, setbycreate)
55// (optional) (2-bytes)
56//
57// Upstream Broadcast Rate Pointer
58// Upstream broadcast rate pointer: This attribute points to an instance of the traffic descriptor
59// that governs the rate of upstream broadcast packets. A null pointer specifies that no
60// administrative limit is to be imposed. (R,-W, setbycreate) (optional) (2-bytes)
61//
62// Upstream Multicast Payload Rate Pointer
63// Upstream multicast payload rate pointer: This attribute points to an instance of the traffic
64// descriptor that governs the rate of upstream multicast payload packets. A null pointer specifies
65// that no administrative limit is to be imposed. (R,-W, setbycreate) (optional) (2-bytes)
66//
67type Dot1RateLimiter struct {
68 ManagedEntityDefinition
69 Attributes AttributeValueMap
70}
71
72func init() {
73 dot1ratelimiterBME = &ManagedEntityDefinition{
74 Name: "Dot1RateLimiter",
75 ClassID: 298,
76 MessageTypes: mapset.NewSetWith(
77 Create,
78 Delete,
79 Get,
80 Set,
81 ),
82 AllowedAttributeMask: 0xf800,
83 AttributeDefinitions: AttributeDefinitionMap{
84 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
85 1: Uint16Field("ParentMePointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
86 2: ByteField("TpType", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
87 3: Uint16Field("UpstreamUnicastFloodRatePointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
88 4: Uint16Field("UpstreamBroadcastRatePointer", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
89 5: Uint16Field("UpstreamMulticastPayloadRatePointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
90 },
91 Access: CreatedByOlt,
92 Support: UnknownSupport,
93 }
94}
95
96// NewDot1RateLimiter (class ID 298) creates the basic
97// Managed Entity definition that is used to validate an ME of this type that
98// is received from or transmitted to the OMCC.
99func NewDot1RateLimiter(params ...ParamData) (*ManagedEntity, OmciErrors) {
100 return NewManagedEntity(*dot1ratelimiterBME, params...)
101}