blob: e14230ed8c6f56984ca10dee797f66968a6dad5e [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 */
Girish Gowdra161d27a2021-05-05 12:01:44 -070017/*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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// MacBridgePortDesignationDataClassID is the 16-bit ID for the OMCI
29// Managed entity MAC bridge port designation data
30const MacBridgePortDesignationDataClassID ClassID = ClassID(48)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var macbridgeportdesignationdataBME *ManagedEntityDefinition
33
34// MacBridgePortDesignationData (class ID #48)
35// This ME records data associated with a bridge port. The ONU automatically creates or deletes an
36// instance of this managed entity upon the creation or deletion of a MAC bridge port configuration
37// data ME.
38//
39// Relationships
40// An instance of this managed entity is associated with one MAC bridge port configuration data ME.
41//
42// Attributes
43// Managed Entity Id
44// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
45// identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
Matteo Scandolof9d43412021-01-12 11:11:34 -080046// data. (R) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070047//
48// Designated Bridge Root Cost Port
Matteo Scandolof9d43412021-01-12 11:11:34 -080049// Upon ME instantiation, the ONU sets this attribute to 0. (R) (mandatory) (24-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070050//
51// Port State
52// The value (R)stp_off is introduced to denote the port status where the (rapid) spanning tree
53// protocol has been disabled by setting the port spanning tree ind attribute of the MAC bridge
54// port configuration data to false, and the Ethernet link state is up. This value distinguishes
55// whether frame forwarding is under the control of (R)STP.
56//
57type MacBridgePortDesignationData struct {
58 ManagedEntityDefinition
59 Attributes AttributeValueMap
60}
61
62func init() {
63 macbridgeportdesignationdataBME = &ManagedEntityDefinition{
64 Name: "MacBridgePortDesignationData",
65 ClassID: 48,
66 MessageTypes: mapset.NewSetWith(
67 Get,
68 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080069 AllowedAttributeMask: 0xc000,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070070 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080071 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
72 1: MultiByteField("DesignatedBridgeRootCostPort", OctetsAttributeType, 0x8000, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read), false, false, false, 1),
73 2: ByteField("PortState", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070074 },
Matteo Scandolof9d43412021-01-12 11:11:34 -080075 Access: CreatedByOnu,
76 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070077 }
78}
79
Matteo Scandolof9d43412021-01-12 11:11:34 -080080// NewMacBridgePortDesignationData (class ID 48) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070081// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -080082// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070083func NewMacBridgePortDesignationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -080084 return NewManagedEntity(*macbridgeportdesignationdataBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070085}