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