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 |
| 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 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [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 | */ |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [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 | // UniGClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity UNI-G |
| 30 | const UniGClassID ClassID = ClassID(264) |
| 31 | |
| 32 | var unigBME *ManagedEntityDefinition |
| 33 | |
| 34 | // UniG (class ID #264) |
| 35 | // This ME organizes data associated with UNIs supported by GEM. One instance of the UNI-G ME |
| 36 | // exists for each UNI supported by the ONU. |
| 37 | // |
| 38 | // The ONU automatically creates or deletes instances of this ME upon the creation or deletion of a |
| 39 | // real or virtual circuit pack ME, one per port. |
| 40 | // |
| 41 | // Relationships |
| 42 | // An instance of the UNI-G ME exists for each instance of a PPTP ME. |
| 43 | // |
| 44 | // Attributes |
| 45 | // Managed Entity Id |
| 46 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an |
| 47 | // identical ID, this ME is implicitly linked to an instance of a PPTP. (R) (mandatory) (2-bytes) |
| 48 | // |
| 49 | // Deprecated |
| 50 | // Deprecated: This attribute is not used. It should be set to 0 by the OLT and ignored by the ONU. |
| 51 | // (R,-W) (mandatory) (2-bytes) |
| 52 | // |
| 53 | // Administrative State |
| 54 | // NOTE - PPTP MEs also have an administrative state attribute. The user port is unlocked only if |
| 55 | // both administrative state attributes are set to unlocked. It is recommended that this attribute |
| 56 | // not be used: that the OLT set it to 0 and that the ONU ignore it. |
| 57 | // |
| 58 | // Management Capability |
| 59 | // (R) (optional) (1-byte) |
| 60 | // |
| 61 | // Non_Omci Management Identifier |
| 62 | // Non-OMCI management identifier: If a PPTP can be managed either directly by the OMCI or a non- |
| 63 | // OMCI management environment, this attribute specifies how it is in fact to be managed. This |
| 64 | // attribute is either 0 (default-=-OMCI management), or it is a pointer to a VEIP, which in turn |
| 65 | // links to a non-OMCI management environment. (R,-W) (optional) (2-bytes) |
| 66 | // |
| 67 | // Relay Agent Options |
| 68 | // 2/3/4:atm/123.4567 |
| 69 | // |
| 70 | type UniG struct { |
| 71 | ManagedEntityDefinition |
| 72 | Attributes AttributeValueMap |
| 73 | } |
| 74 | |
| 75 | func init() { |
| 76 | unigBME = &ManagedEntityDefinition{ |
| 77 | Name: "UniG", |
| 78 | ClassID: 264, |
| 79 | MessageTypes: mapset.NewSetWith( |
| 80 | Get, |
| 81 | Set, |
| 82 | ), |
| 83 | AllowedAttributeMask: 0xf800, |
| 84 | AttributeDefinitions: AttributeDefinitionMap{ |
| 85 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 86 | 1: Uint16Field("Deprecated", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, true, 1), |
| 87 | 2: ByteField("AdministrativeState", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 88 | 3: ByteField("ManagementCapability", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3), |
| 89 | 4: Uint16Field("NonOmciManagementIdentifier", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4), |
| 90 | 5: Uint16Field("RelayAgentOptions", PointerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5), |
| 91 | }, |
| 92 | Access: CreatedByOnu, |
| 93 | Support: UnknownSupport, |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | // NewUniG (class ID 264) creates the basic |
| 98 | // Managed Entity definition that is used to validate an ME of this type that |
| 99 | // is received from or transmitted to the OMCC. |
| 100 | func NewUniG(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 101 | return NewManagedEntity(*unigBME, params...) |
| 102 | } |