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