Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 4 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 5 | * 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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 8 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 10 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 11 | * 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 | */ |
David K. Bainbridge | adf422d | 2021-04-09 16:06:41 +0000 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 | */ |
| 23 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // MacBridgePortDesignationDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity MAC bridge port designation data |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const MacBridgePortDesignationDataClassID = ClassID(48) // 0x0030 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var macbridgeportdesignationdataBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // MacBridgePortDesignationData (Class ID: #48 / 0x0030) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 44 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 45 | // implicitly linked to an instance of the MAC bridge port configuration data. (R) (mandatory) |
| 46 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 47 | // |
| 48 | // Designated Bridge Root Cost Port |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 49 | // This attribute contains the designated root, designated cost, designated bridge and designated |
| 50 | // port, which are some of the outputs of the read port parameters operation defined in clause |
| 51 | // 14.8.2.1 of [IEEE-802.1D]: |
| 52 | // |
| 53 | // o identifier of the designated bridge for the port's segment (8-bytes); |
| 54 | // |
| 55 | // o bridge identifier of the root transmitted by the designated bridge for the segment (8-bytes); |
| 56 | // |
| 57 | // o port number of the designated port on the designated bridge considered to be part of this |
| 58 | // port's segment (4-bytes); |
| 59 | // |
| 60 | // o path cost contribution of the designated port to this port's segment (4-bytes). |
| 61 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 62 | // Upon ME instantiation, the ONU sets this attribute to 0. (R) (mandatory) (24-bytes) |
| 63 | // |
| 64 | // Port State |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 65 | // This attribute provides status information on the port. Valid values include the following. |
| 66 | // |
| 67 | // 0 Disabled |
| 68 | // |
| 69 | // 1 Listening |
| 70 | // |
| 71 | // 2 Learning |
| 72 | // |
| 73 | // 3 Forwarding |
| 74 | // |
| 75 | // 4 Blocking |
| 76 | // |
| 77 | // 5 Linkdown |
| 78 | // |
| 79 | // 6 (R)Stp_off |
| 80 | // |
| 81 | // in accordance with [IEEE 802.1D]. (R) (mandatory) (1-byte) |
| 82 | // |
| 83 | // NOTE - The value linkdown is introduced to denote the port status when the Ethernet link state |
| 84 | // is down. This value distinguishes the case where Ethernet is physically down from the case where |
| 85 | // Ethernet is administratively locked, the latter being denoted by disabled. Be aware that this |
| 86 | // terminology violates the ITUT convention that disabled is an operational state, not |
| 87 | // administrative. |
| 88 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 89 | // The value (R)stp_off is introduced to denote the port status where the (rapid) spanning tree |
| 90 | // protocol has been disabled by setting the port spanning tree ind attribute of the MAC bridge |
| 91 | // port configuration data to false, and the Ethernet link state is up. This value distinguishes |
| 92 | // whether frame forwarding is under the control of (R)STP. |
| 93 | // |
| 94 | type MacBridgePortDesignationData struct { |
| 95 | ManagedEntityDefinition |
| 96 | Attributes AttributeValueMap |
| 97 | } |
| 98 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 99 | // Attribute name constants |
| 100 | |
| 101 | const MacBridgePortDesignationData_DesignatedBridgeRootCostPort = "DesignatedBridgeRootCostPort" |
| 102 | const MacBridgePortDesignationData_PortState = "PortState" |
| 103 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 104 | func init() { |
| 105 | macbridgeportdesignationdataBME = &ManagedEntityDefinition{ |
| 106 | Name: "MacBridgePortDesignationData", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 107 | ClassID: MacBridgePortDesignationDataClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 108 | MessageTypes: mapset.NewSetWith( |
| 109 | Get, |
| 110 | ), |
| 111 | AllowedAttributeMask: 0xc000, |
| 112 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 113 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 114 | 1: MultiByteField(MacBridgePortDesignationData_DesignatedBridgeRootCostPort, OctetsAttributeType, 0x8000, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read), false, false, false, 1), |
| 115 | 2: ByteField(MacBridgePortDesignationData_PortState, EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 116 | }, |
| 117 | Access: CreatedByOnu, |
| 118 | Support: UnknownSupport, |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | // NewMacBridgePortDesignationData (class ID 48) creates the basic |
| 123 | // Managed Entity definition that is used to validate an ME of this type that |
| 124 | // is received from or transmitted to the OMCC. |
| 125 | func NewMacBridgePortDesignationData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 126 | return NewManagedEntity(*macbridgeportdesignationdataBME, params...) |
| 127 | } |