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