blob: c0cc23c1454ff067daad99529bf8f61ddc785592 [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 */
Andrea Campanella7167ebb2020-02-24 09:56:38 +010017 /*
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// MacBridgeServiceProfileClassID is the 16-bit ID for the OMCI
29// Managed entity MAC bridge service profile
30const MacBridgeServiceProfileClassID ClassID = ClassID(45)
31
32var macbridgeserviceprofileBME *ManagedEntityDefinition
33
34// MacBridgeServiceProfile (class ID #45)
35// This ME models a MAC bridge in its entirety; any number of ports may be associated with the
36// bridge through pointers to the MAC bridge service profile ME. Instances of this ME are created
37// and deleted by the OLT.
38//
39// Relationships
40// Bridge ports are modelled by MAC bridge port configuration data MEs, any number of which can
41// point to a MAC bridge service profile. The real-time status of the bridge is available from an
42// implicitly linked MAC bridge configuration data ME.
43//
44// Attributes
45// Managed Entity Id
46// Managed entity ID: This attribute uniquely identifies each instance of this ME. The first byte
47// is the slot ID. In an integrated ONU, this value is 0. The second byte is the bridge group ID.
48// (R, setbycreate) (mandatory) (2-bytes)
49//
50// Spanning Tree Ind
51// Spanning tree ind: The Boolean value true specifies that a spanning tree algorithm is enabled.
52// The value false disables (rapid) spanning tree. (R,-W, setbycreate) (mandatory) (1-byte)
53//
54// Learning Ind
55// Learning ind: The Boolean value true specifies that bridge learning functions are enabled. The
56// value false disables bridge learning. (R,-W, setbycreate) (mandatory) (1-byte)
57//
58// Port Bridging Ind
59// Port bridging ind: The Boolean value true specifies that bridging between UNI ports is enabled.
60// The value false disables local bridging. (R,-W, setbycreate) (mandatory) (1-byte)
61//
62// Priority
63// Priority: This attribute specifies the bridge priority in the range 0..65535. The value of this
64// attribute is copied to the bridge priority attribute of the associated MAC bridge configuration
65// data ME. (R,-W, setbycreate) (mandatory) (2-bytes)
66//
67// Max Age
68// Max age: This attribute specifies the maximum age (in 256ths of a second) of received protocol
69// information before its entry in the spanning tree listing is discarded. The range is 0x0600 to
70// 0x2800 (6..40-s) in accordance with [IEEE-802.1D]. (R,-W, setbycreate) (mandatory) (2-bytes)
71//
72// Hello Time
73// NOTE - [IEEE 802.1D] specifies the compatibility range for hello time to be 1..2-s.
74//
75// Forward Delay
76// Forward delay: This attribute specifies the forwarding delay (in 256ths of a second) when the
77// bridge acts as the root. The range is 0x0400 to 0x1E00 (4..30-s) in accordance with [IEEE
78// 802.1D]. (R,-W, set-by-create) (mandatory) (2-bytes)
79//
80// Unknown Mac Address Discard
81// Unknown MAC address discard: The Boolean value true specifies that MAC frames with unknown DAs
82// be discarded. The value false specifies that such frames be forwarded to all allowed ports.
83// (R,-W, setbycreate) (mandatory) (1-byte)
84//
85// Mac Learning Depth
86// MAC learning depth: This attribute specifies the maximum number of UNI MAC addresses to be
87// learned by the bridge. The default value 0 specifies that there is no administratively imposed
88// limit. (R,-W, setbycreate) (optional) (1-byte)
89//
90// Dynamic Filtering Ageing Time
91// Dynamic filtering ageing time: This attribute specifies the age of dynamic filtering entries in
92// the bridge database, after which unrefreshed entries are discarded. In accordance with clause
93// 7.9.2 of [IEEE 802.1D] and clause 8.8.3 of [IEEE 802.1Q], the range is 10..1 000 000-s, with a
94// resolution of 1-s and a default of 300-s. The value 0 specifies that the ONU uses its internal
95// default. (R, W, set-by-create) (optional) (4 bytes)
96//
97type MacBridgeServiceProfile struct {
98 ManagedEntityDefinition
99 Attributes AttributeValueMap
100}
101
102func init() {
103 macbridgeserviceprofileBME = &ManagedEntityDefinition{
104 Name: "MacBridgeServiceProfile",
105 ClassID: 45,
106 MessageTypes: mapset.NewSetWith(
107 Create,
108 Delete,
109 Get,
110 Set,
111 ),
112 AllowedAttributeMask: 0xffc0,
113 AttributeDefinitions: AttributeDefinitionMap{
114 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
115 1: ByteField("SpanningTreeInd", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
116 2: ByteField("LearningInd", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
117 3: ByteField("PortBridgingInd", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
118 4: Uint16Field("Priority", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
119 5: Uint16Field("MaxAge", UnsignedIntegerAttributeType, 0x0800, 1536, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
120 6: Uint16Field("HelloTime", UnsignedIntegerAttributeType, 0x0400, 256, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
121 7: Uint16Field("ForwardDelay", UnsignedIntegerAttributeType, 0x0200, 1024, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
122 8: ByteField("UnknownMacAddressDiscard", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
123 9: ByteField("MacLearningDepth", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
124 10: Uint32Field("DynamicFilteringAgeingTime", UnsignedIntegerAttributeType, 0x0040, 300, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10),
125 },
126 Access: CreatedByOlt,
127 Support: UnknownSupport,
128 }
129}
130
131// NewMacBridgeServiceProfile (class ID 45) creates the basic
132// Managed Entity definition that is used to validate an ME of this type that
133// is received from or transmitted to the OMCC.
134func NewMacBridgeServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
135 return NewManagedEntity(*macbridgeserviceprofileBME, params...)
136}