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 | */ |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [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 | // EfmBondingGroupClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity EFM bonding group |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const EfmBondingGroupClassID = ClassID(418) // 0x01a2 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var efmbondinggroupBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // EfmBondingGroup (Class ID: #418 / 0x01a2) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // The EFM bonding group represents a group of links that are bonded. In [IEEE 802.3], a bonding |
| 36 | // group is known as a PAF [physical medium entity (PME) aggregation function] and a link is known |
| 37 | // as a PME instance of this ME are created and deleted by the OLT. |
| 38 | // |
| 39 | // Relationships |
| 40 | // An instance of this ME may be associated with zero or more instances of an EFM bonding link. |
| 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. The value 0 is reserved. (R, |
| 45 | // setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 46 | // |
| 47 | // Group Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 48 | // This attribute is the unique number representing this bonding group. See clause C.3.1.1 of |
| 49 | // [ITU-T G.998.2]. (R,-W, setbycreate) (mandatory) (6-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 50 | // |
| 51 | // Minimum Upstream Group Rate |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 52 | // This attribute sets the minimum upstream group rate, in bits per second, for this EFM Group. |
| 53 | // This attribute is used to determine the group US rate low alarm status. The group US rate low |
| 54 | // alarm means that the aggregate upstream rate of all active links associated with this group is |
| 55 | // less than the minimum upstream group rate. The default value for this rate is zero. (R,-W) |
| 56 | // (mandatory, setbycreate) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 57 | // |
| 58 | // Minimum Downstream Group Rate |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 59 | // This attribute sets the minimum downstream group rate, in bits per second, for this EFM Group. |
| 60 | // This attribute is used to determine the group DS rate low alarm status. The group DS rate low |
| 61 | // alarm means that the aggregate downstream rate of all active links associated with this group is |
| 62 | // less than the minimum downstream group rate. The default value for this rate is zero. (R,-W) |
| 63 | // (mandatory) (4-bytes, setbycreate) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 64 | // |
| 65 | // Group Alarm Enable |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 66 | // This bit mapped attribute enables the various group alarms. A bit value of 1 means "enable". |
| 67 | // |
| 68 | // Bit Meaning |
| 69 | // |
| 70 | // 1 (LSB) Group down |
| 71 | // |
| 72 | // 2 Group partial |
| 73 | // |
| 74 | // 3 Group US rate low |
| 75 | // |
| 76 | // 4 Group DS rate low |
| 77 | // |
| 78 | // 5 4x rate ratio |
| 79 | // |
| 80 | // 6-8 Reserved |
| 81 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 82 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 83 | // |
| 84 | type EfmBondingGroup struct { |
| 85 | ManagedEntityDefinition |
| 86 | Attributes AttributeValueMap |
| 87 | } |
| 88 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 89 | // Attribute name constants |
| 90 | |
| 91 | const EfmBondingGroup_GroupId = "GroupId" |
| 92 | const EfmBondingGroup_MinimumUpstreamGroupRate = "MinimumUpstreamGroupRate" |
| 93 | const EfmBondingGroup_MinimumDownstreamGroupRate = "MinimumDownstreamGroupRate" |
| 94 | const EfmBondingGroup_GroupAlarmEnable = "GroupAlarmEnable" |
| 95 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 96 | func init() { |
| 97 | efmbondinggroupBME = &ManagedEntityDefinition{ |
| 98 | Name: "EfmBondingGroup", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 99 | ClassID: EfmBondingGroupClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 100 | MessageTypes: mapset.NewSetWith( |
| 101 | Create, |
| 102 | Delete, |
| 103 | Get, |
| 104 | Set, |
| 105 | ), |
| 106 | AllowedAttributeMask: 0xf000, |
| 107 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 108 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 109 | 1: MultiByteField(EfmBondingGroup_GroupId, OctetsAttributeType, 0x8000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 110 | 2: Uint32Field(EfmBondingGroup_MinimumUpstreamGroupRate, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 111 | 3: Uint32Field(EfmBondingGroup_MinimumDownstreamGroupRate, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 112 | 4: ByteField(EfmBondingGroup_GroupAlarmEnable, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 113 | }, |
| 114 | Access: CreatedByOlt, |
| 115 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 116 | Alarms: AlarmMap{ |
| 117 | 0: "Group down", |
| 118 | 1: "Group partial", |
| 119 | 2: "Group US rate low", |
| 120 | 3: "Group DS rate low", |
| 121 | 4: "4x rate ratio", |
| 122 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 123 | } |
| 124 | } |
| 125 | |
Chip Boling | 7a6e8d9 | 2021-07-14 15:42:21 -0500 | [diff] [blame] | 126 | // NewEfmBondingGroup (class ID 418) creates the basic |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 127 | // Managed Entity definition that is used to validate an ME of this type that |
| 128 | // is received from or transmitted to the OMCC. |
| 129 | func NewEfmBondingGroup(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 130 | return NewManagedEntity(*efmbondinggroupBME, params...) |
| 131 | } |