blob: 8718214433f6299a3454c8665a53ef98da16d6a7 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
17/*
18 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// MacBridgeConfigurationDataClassID is the 16-bit ID for the OMCI
29// Managed entity MAC bridge configuration data
30const MacBridgeConfigurationDataClassID ClassID = ClassID(46)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var macbridgeconfigurationdataBME *ManagedEntityDefinition
33
34// MacBridgeConfigurationData (class ID #46)
35// This ME organizes status data associated with a MAC bridge. The ONU automatically creates or
36// deletes an instance of this ME upon the creation or deletion of a MAC bridge service profile.
37//
38// Relationships
39// This ME is associated with one instance of a MAC bridge service profile.
40//
41// Attributes
42// Managed Entity Id
43// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
44// identical ID, this ME is implicitly linked to an instance of the MAC bridge service profile. (R)
Matteo Scandolof9d43412021-01-12 11:11:34 -080045// (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070046//
47// Bridge Mac Address
48// Bridge MAC address: This attribute indicates the MAC address used by the bridge. The ONU sets
49// this attribute to a value based on criteria beyond the scope of this Recommendation, e.g.,
Matteo Scandolof9d43412021-01-12 11:11:34 -080050// factory settings. (R) (mandatory) (6-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070051//
52// Bridge Priority
53// Bridge priority: This attribute reports the priority of the bridge. The ONU copies this
54// attribute from the priority attribute of the associated MAC bridge service profile. The value of
55// this attribute changes with updates to the MAC bridge service profile priority attribute. (R)
Matteo Scandolof9d43412021-01-12 11:11:34 -080056// (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070057//
58// Designated Root
59// Designated root: This attribute identifies the bridge at the root of the spanning tree. It
Matteo Scandolof9d43412021-01-12 11:11:34 -080060// comprises bridge priority (2-bytes) and MAC address (6-bytes). (R) (mandatory) (8-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070061//
62// Root Path Cost
63// Root path cost: This attribute reports the cost of the best path to the root as seen from this
Matteo Scandolof9d43412021-01-12 11:11:34 -080064// bridge. Upon ME instantiation, the ONU sets this attribute to 0. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070065//
66// Bridge Port Count
67// Bridge port count: This attribute records the number of ports linked to this bridge. (R)
Matteo Scandolof9d43412021-01-12 11:11:34 -080068// (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070069//
70// Root Port Num
71// Root port num: This attribute contains the port number that has the lowest cost from the bridge
72// to the root bridge. The value 0 means that this bridge is itself the root. Upon ME
Matteo Scandolof9d43412021-01-12 11:11:34 -080073// instantiation, the ONU sets this attribute to 0. (R) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070074//
75// Hello Time
Matteo Scandolof9d43412021-01-12 11:11:34 -080076// NOTE - [IEEE 802.1D] specifies the compatibility range for hello time to be 1..2-s.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070077//
78// Forward Delay
79// Forward delay: This attribute is the forwarding delay time received from the designated root (in
Matteo Scandolof9d43412021-01-12 11:11:34 -080080// 256ths of a second). Its range is 0x0400 to 0x1E00 (4..30-s) in accordance with [IEEE 802.1D].
81// (R) (optional) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070082//
83type MacBridgeConfigurationData struct {
84 ManagedEntityDefinition
85 Attributes AttributeValueMap
86}
87
88func init() {
89 macbridgeconfigurationdataBME = &ManagedEntityDefinition{
90 Name: "MacBridgeConfigurationData",
91 ClassID: 46,
92 MessageTypes: mapset.NewSetWith(
93 Get,
94 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080095 AllowedAttributeMask: 0xff00,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070096 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080097 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
98 1: MultiByteField("BridgeMacAddress", OctetsAttributeType, 0x8000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, false, false, 1),
99 2: Uint16Field("BridgePriority", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
100 3: MultiByteField("DesignatedRoot", OctetsAttributeType, 0x2000, 8, toOctets("AAAAAAAAAAA="), mapset.NewSetWith(Read), false, false, false, 3),
101 4: Uint32Field("RootPathCost", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
102 5: ByteField("BridgePortCount", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
103 6: Uint16Field("RootPortNum", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
104 7: Uint16Field("HelloTime", UnsignedIntegerAttributeType, 0x0200, 256, mapset.NewSetWith(Read), false, true, false, 7),
105 8: Uint16Field("ForwardDelay", UnsignedIntegerAttributeType, 0x0100, 1024, mapset.NewSetWith(Read), false, true, false, 8),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700106 },
Matteo Scandolof9d43412021-01-12 11:11:34 -0800107 Access: CreatedByOnu,
108 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700109 }
110}
111
Matteo Scandolof9d43412021-01-12 11:11:34 -0800112// NewMacBridgeConfigurationData (class ID 46) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700113// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800114// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700115func NewMacBridgeConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800116 return NewManagedEntity(*macbridgeconfigurationdataBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700117}