blob: 7e39613a23457d10aedc5f984db4a1e9c1f569de [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 MacBridgeConfigurationDataClassId ClassID = ClassID(46)
25
26var macbridgeconfigurationdataBME *ManagedEntityDefinition
27
28// MacBridgeConfigurationData (class ID #46)
29// This ME organizes status data associated with a MAC bridge. The ONU automatically creates or
30// deletes an instance of this ME upon the creation or deletion of a MAC bridge service profile.
31//
32// Relationships
33// This ME is associated with one instance of a MAC bridge service profile.
34//
35// Attributes
36// Managed Entity Id
37// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
38// identical ID, this ME is implicitly linked to an instance of the MAC bridge service profile. (R)
39// (mandatory) (2 bytes)
40//
41// Bridge Mac Address
42// Bridge MAC address: This attribute indicates the MAC address used by the bridge. The ONU sets
43// this attribute to a value based on criteria beyond the scope of this Recommendation, e.g.,
44// factory settings. (R) (mandatory) (6 bytes)
45//
46// Bridge Priority
47// Bridge priority: This attribute reports the priority of the bridge. The ONU copies this
48// attribute from the priority attribute of the associated MAC bridge service profile. The value of
49// this attribute changes with updates to the MAC bridge service profile priority attribute. (R)
50// (mandatory) (2 bytes)
51//
52// Designated Root
53// Designated root: This attribute identifies the bridge at the root of the spanning tree. It
54// comprises bridge priority (2 bytes) and MAC address (6 bytes). (R) (mandatory) (8 bytes)
55//
56// Root Path Cost
57// Root path cost: This attribute reports the cost of the best path to the root as seen from this
58// bridge. Upon ME instantiation, the ONU sets this attribute to 0. (R) (mandatory) (4 bytes)
59//
60// Bridge Port Count
61// Bridge port count: This attribute records the number of ports linked to this bridge. (R)
62// (mandatory) (1 byte)
63//
64// Root Port Num
65// Root port num: This attribute contains the port number that has the lowest cost from the bridge
66// to the root bridge. The value 0 means that this bridge is itself the root. Upon ME
67// instantiation, the ONU sets this attribute to 0. (R) (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 is the forwarding delay time received from the designated root (in
74// 256ths of a second). Its range is 0x0400 to 0x1E00 (4..30 s) in accordance with [IEEE 802.1D].
75// (R) (optional) (2 bytes)
76//
77type MacBridgeConfigurationData struct {
78 ManagedEntityDefinition
79 Attributes AttributeValueMap
80}
81
82func init() {
83 macbridgeconfigurationdataBME = &ManagedEntityDefinition{
84 Name: "MacBridgeConfigurationData",
85 ClassID: 46,
86 MessageTypes: mapset.NewSetWith(
87 Get,
88 ),
89 AllowedAttributeMask: 0XFF00,
90 AttributeDefinitions: AttributeDefinitionMap{
91 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read), false, false, false, false, 0),
92 1: MultiByteField("BridgeMacAddress", 6, nil, mapset.NewSetWith(Read), false, false, false, false, 1),
93 2: Uint16Field("BridgePriority", 0, mapset.NewSetWith(Read), false, false, false, false, 2),
94 3: Uint64Field("DesignatedRoot", 0, mapset.NewSetWith(Read), false, false, false, false, 3),
95 4: Uint32Field("RootPathCost", 0, mapset.NewSetWith(Read), false, false, false, false, 4),
96 5: ByteField("BridgePortCount", 0, mapset.NewSetWith(Read), false, false, false, false, 5),
97 6: Uint16Field("RootPortNum", 0, mapset.NewSetWith(Read), false, false, false, false, 6),
98 7: Uint16Field("HelloTime", 0, mapset.NewSetWith(Read), false, false, true, false, 7),
99 8: Uint16Field("ForwardDelay", 0, mapset.NewSetWith(Read), false, false, true, false, 8),
100 },
101 }
102}
103
104// NewMacBridgeConfigurationData (class ID 46 creates the basic
105// Managed Entity definition that is used to validate an ME of this type that
106// is received from the wire, about to be sent on the wire.
107func NewMacBridgeConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
108 return NewManagedEntity(macbridgeconfigurationdataBME, params...)
109}