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