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 | */ |
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 | // EquipmentExtensionPackageClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Equipment extension package |
| 30 | const EquipmentExtensionPackageClassID ClassID = ClassID(160) |
| 31 | |
| 32 | var equipmentextensionpackageBME *ManagedEntityDefinition |
| 33 | |
| 34 | // EquipmentExtensionPackage (class ID #160) |
| 35 | // This ME supports optional extensions to circuit pack MEs. If the circuit pack supports these |
| 36 | // features, the ONU creates and deletes this ME along with its associated real or virtual circuit |
| 37 | // pack. |
| 38 | // |
| 39 | // Relationships |
| 40 | // An equipment extension package may be contained by an ONU-G or cardholder. |
| 41 | // |
| 42 | // Attributes |
| 43 | // Managed Entity Id |
| 44 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an |
| 45 | // identical ID, this ME is implicitly linked to an instance of the ONU-G or cardholder. (R) |
| 46 | // (mandatory) (2-bytes) |
| 47 | // |
| 48 | // Environmental Sense |
| 49 | // NOTE - Some specific sense point applications are already defined on the ONU-G ME. It is the |
| 50 | // vendor's choice how to configure and report sense points that appear both generically and |
| 51 | // specifically. |
| 52 | // |
| 53 | // Contact Closure Output |
| 54 | // On read, the left bit in each pair should be set to 0 at the ONU and ignored at the OLT. The |
| 55 | // right bit indicates a released output point with 0 and an operated contact point with 1. (R,-W) |
| 56 | // (optional) (2-bytes) |
| 57 | // |
| 58 | type EquipmentExtensionPackage struct { |
| 59 | ManagedEntityDefinition |
| 60 | Attributes AttributeValueMap |
| 61 | } |
| 62 | |
| 63 | func init() { |
| 64 | equipmentextensionpackageBME = &ManagedEntityDefinition{ |
| 65 | Name: "EquipmentExtensionPackage", |
| 66 | ClassID: 160, |
| 67 | MessageTypes: mapset.NewSetWith( |
| 68 | Get, |
| 69 | Set, |
| 70 | ), |
| 71 | AllowedAttributeMask: 0xc000, |
| 72 | AttributeDefinitions: AttributeDefinitionMap{ |
| 73 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 74 | 1: Uint16Field("EnvironmentalSense", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, true, false, 1), |
| 75 | 2: Uint16Field("ContactClosureOutput", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, true, false, 2), |
| 76 | }, |
| 77 | Access: CreatedByOnu, |
| 78 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 79 | Alarms: AlarmMap{ |
| 80 | 0: "Reserved", |
| 81 | 1: "Sense point 1", |
| 82 | 2: "Sense point 2", |
| 83 | 3: "Sense point 3", |
| 84 | 4: "Sense point 4", |
| 85 | 5: "Sense point 5", |
| 86 | 6: "Sense point 6", |
| 87 | 7: "Sense point 7", |
| 88 | 8: "Sense point 8", |
| 89 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 90 | } |
| 91 | } |
| 92 | |
| 93 | // NewEquipmentExtensionPackage (class ID 160) creates the basic |
| 94 | // Managed Entity definition that is used to validate an ME of this type that |
| 95 | // is received from or transmitted to the OMCC. |
| 96 | func NewEquipmentExtensionPackage(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 97 | return NewManagedEntity(*equipmentextensionpackageBME, params...) |
| 98 | } |