Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
| 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 |
| 8 | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 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 | */ |
Himani Chawla | ac1f5ad | 2021-02-04 21:21:54 +0530 | [diff] [blame] | 17 | /* |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [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 |
Girish Gowdra | 63c0c6d | 2021-07-19 15:32:10 -0700 | [diff] [blame^] | 30 | const EfmBondingGroupClassID ClassID = ClassID(418) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 31 | |
| 32 | var efmbondinggroupBME *ManagedEntityDefinition |
| 33 | |
Girish Gowdra | 63c0c6d | 2021-07-19 15:32:10 -0700 | [diff] [blame^] | 34 | // EfmBondingGroup (class ID #418) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [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 |
| 44 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is |
| 45 | // reserved. (R, setbycreate) (mandatory) (2-bytes) |
| 46 | // |
| 47 | // Group Id |
| 48 | // Group ID: This attribute is the unique number representing this bonding group. See clause |
| 49 | // C.3.1.1 of [ITU-T G.998.2]. (R,-W, setbycreate) (mandatory) (6-bytes) |
| 50 | // |
| 51 | // Minimum Upstream Group Rate |
| 52 | // Minimum upstream group rate: This attribute sets the minimum upstream group rate, in bits per |
| 53 | // second, for this EFM Group. This attribute is used to determine the group US rate low alarm |
| 54 | // status. The group US rate low alarm means that the aggregate upstream rate of all active links |
| 55 | // associated with this group is less than the minimum upstream group rate. The default value for |
| 56 | // this rate is zero. (R,-W) (mandatory, setbycreate) (4-bytes) |
| 57 | // |
| 58 | // Minimum Downstream Group Rate |
| 59 | // Minimum downstream group rate: This attribute sets the minimum downstream group rate, in bits |
| 60 | // per second, for this EFM Group. This attribute is used to determine the group DS rate low alarm |
| 61 | // status. The group DS rate low alarm means that the aggregate downstream rate of all active links |
| 62 | // associated with this group is less than the minimum downstream group rate. The default value for |
| 63 | // this rate is zero. (R,-W) (mandatory) (4-bytes, setbycreate) |
| 64 | // |
| 65 | // Group Alarm Enable |
| 66 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 67 | // |
| 68 | type EfmBondingGroup struct { |
| 69 | ManagedEntityDefinition |
| 70 | Attributes AttributeValueMap |
| 71 | } |
| 72 | |
| 73 | func init() { |
| 74 | efmbondinggroupBME = &ManagedEntityDefinition{ |
| 75 | Name: "EfmBondingGroup", |
Girish Gowdra | 63c0c6d | 2021-07-19 15:32:10 -0700 | [diff] [blame^] | 76 | ClassID: 418, |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 77 | MessageTypes: mapset.NewSetWith( |
| 78 | Create, |
| 79 | Delete, |
| 80 | Get, |
| 81 | Set, |
| 82 | ), |
| 83 | AllowedAttributeMask: 0xf000, |
| 84 | AttributeDefinitions: AttributeDefinitionMap{ |
| 85 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 86 | 1: MultiByteField("GroupId", OctetsAttributeType, 0x8000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 87 | 2: Uint32Field("MinimumUpstreamGroupRate", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 88 | 3: Uint32Field("MinimumDownstreamGroupRate", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 89 | 4: ByteField("GroupAlarmEnable", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 90 | }, |
| 91 | Access: CreatedByOlt, |
| 92 | Support: UnknownSupport, |
Himani Chawla | ac1f5ad | 2021-02-04 21:21:54 +0530 | [diff] [blame] | 93 | Alarms: AlarmMap{ |
| 94 | 0: "Group down", |
| 95 | 1: "Group partial", |
| 96 | 2: "Group US rate low", |
| 97 | 3: "Group DS rate low", |
| 98 | 4: "4x rate ratio", |
| 99 | }, |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 100 | } |
| 101 | } |
| 102 | |
Girish Gowdra | 63c0c6d | 2021-07-19 15:32:10 -0700 | [diff] [blame^] | 103 | // NewEfmBondingGroup (class ID 418) creates the basic |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 104 | // Managed Entity definition that is used to validate an ME of this type that |
| 105 | // is received from or transmitted to the OMCC. |
| 106 | func NewEfmBondingGroup(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 107 | return NewManagedEntity(*efmbondinggroupBME, params...) |
| 108 | } |