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