Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 8 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 10 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 | */ |
| 17 | /* |
| 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 | */ |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 23 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 28 | // EfmBondingLinkClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity EFM bonding link |
| 30 | const EfmBondingLinkClassID ClassID = ClassID(420) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 31 | |
| 32 | var efmbondinglinkBME *ManagedEntityDefinition |
| 33 | |
| 34 | // EfmBondingLink (class ID #420) |
| 35 | // The EFM bonding link represents a link that can be bonded with other links to form a group. In |
| 36 | // [IEEE 802.3], a bonding group is known as a PAF and a link is known as a PME. Instances of this |
| 37 | // ME are created and deleted by the OLT. |
| 38 | // |
| 39 | // Relationships |
| 40 | // An instance of this ME may be associated with zero or one instance of an EFM bonding group. |
| 41 | // |
| 42 | // Attributes |
| 43 | // Managed Entity Id |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 44 | // NOTE - This attribute has the same meaning as the Stream ID in clause C.3.1.2 of [ITU-T |
| 45 | // G.998.2], except that it cannot be changed. (R, setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 46 | // |
| 47 | // Associated Group Me Id |
| 48 | // Associated group ME ID: This attribute is the ME ID of the bonding group to which this link is |
| 49 | // associated. Changing this attribute moves the link from one group to another. Setting this |
| 50 | // attribute to an ME ID that has not yet been provisioned will result in this link being placed in |
| 51 | // a single-link group that contains only this link. The default value for this attribute is the |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 52 | // null pointer, 0xFFFF. (R,-W, setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 53 | // |
| 54 | // Link Alarm Enable |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 55 | // (R,-W, setbycreate) (mandatory) (1-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 56 | // |
| 57 | type EfmBondingLink struct { |
| 58 | ManagedEntityDefinition |
| 59 | Attributes AttributeValueMap |
| 60 | } |
| 61 | |
| 62 | func init() { |
| 63 | efmbondinglinkBME = &ManagedEntityDefinition{ |
| 64 | Name: "EfmBondingLink", |
| 65 | ClassID: 420, |
| 66 | MessageTypes: mapset.NewSetWith( |
| 67 | Create, |
| 68 | Delete, |
| 69 | Get, |
| 70 | Set, |
| 71 | ), |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 72 | AllowedAttributeMask: 0xc000, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 73 | AttributeDefinitions: AttributeDefinitionMap{ |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 74 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 75 | 1: Uint16Field("AssociatedGroupMeId", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 76 | 2: ByteField("LinkAlarmEnable", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 77 | }, |
| 78 | Access: CreatedByOlt, |
| 79 | Support: UnknownSupport, |
| 80 | Alarms: AlarmMap{ |
| 81 | 0: "Link down", |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 82 | }, |
| 83 | } |
| 84 | } |
| 85 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 86 | // NewEfmBondingLink (class ID 420) creates the basic |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 87 | // Managed Entity definition that is used to validate an ME of this type that |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 88 | // is received from or transmitted to the OMCC. |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 89 | func NewEfmBondingLink(params ...ParamData) (*ManagedEntity, OmciErrors) { |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 90 | return NewManagedEntity(*efmbondinglinkBME, params...) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 91 | } |