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 | */ |
David K. Bainbridge | adf422d | 2021-04-09 16:06:41 +0000 | [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 | // ThresholdData2ClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Threshold data 2 |
| 30 | const ThresholdData2ClassID ClassID = ClassID(274) |
| 31 | |
| 32 | var thresholddata2BME *ManagedEntityDefinition |
| 33 | |
| 34 | // ThresholdData2 (class ID #274) |
| 35 | // Together with an instance of the threshold data 1 ME, an instance of this ME contains threshold |
| 36 | // values for counters maintained in one or more instances of PM history data MEs. |
| 37 | // |
| 38 | // For a complete discussion of generic PM architecture, refer to clause-I.4. |
| 39 | // |
| 40 | // Instances of this ME are created and deleted by the OLT. |
| 41 | // |
| 42 | // Relationships |
| 43 | // Refer to the relationships of the threshold data 1 ME. |
| 44 | // |
| 45 | // Attributes |
| 46 | // Managed Entity Id |
| 47 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. Its value is the |
| 48 | // same as that of the paired threshold data-1-instance. (R, setbycreate) (mandatory) (2-bytes) |
| 49 | // |
| 50 | // Threshold Value_8 |
| 51 | // Threshold value-8: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 52 | // |
| 53 | // Threshold Value_9 |
| 54 | // Threshold value-9: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 55 | // |
| 56 | // Threshold Value_10 |
| 57 | // Threshold value-10: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 58 | // |
| 59 | // Threshold Value_11 |
| 60 | // Threshold value-11: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 61 | // |
| 62 | // Threshold Value_12 |
| 63 | // Threshold value-12: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 64 | // |
| 65 | // Threshold Value_13 |
| 66 | // Threshold value-13: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 67 | // |
| 68 | // Threshold Value_14 |
| 69 | // Threshold value-14: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 70 | // |
| 71 | type ThresholdData2 struct { |
| 72 | ManagedEntityDefinition |
| 73 | Attributes AttributeValueMap |
| 74 | } |
| 75 | |
| 76 | func init() { |
| 77 | thresholddata2BME = &ManagedEntityDefinition{ |
| 78 | Name: "ThresholdData2", |
| 79 | ClassID: 274, |
| 80 | MessageTypes: mapset.NewSetWith( |
| 81 | Create, |
| 82 | Delete, |
| 83 | Get, |
| 84 | Set, |
| 85 | ), |
| 86 | AllowedAttributeMask: 0xfe00, |
| 87 | AttributeDefinitions: AttributeDefinitionMap{ |
| 88 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 89 | 1: Uint32Field("ThresholdValue8", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 90 | 2: Uint32Field("ThresholdValue9", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 91 | 3: Uint32Field("ThresholdValue10", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 92 | 4: Uint32Field("ThresholdValue11", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 93 | 5: Uint32Field("ThresholdValue12", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5), |
| 94 | 6: Uint32Field("ThresholdValue13", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6), |
| 95 | 7: Uint32Field("ThresholdValue14", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 96 | }, |
| 97 | Access: CreatedByOlt, |
| 98 | Support: UnknownSupport, |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | // NewThresholdData2 (class ID 274) creates the basic |
| 103 | // Managed Entity definition that is used to validate an ME of this type that |
| 104 | // is received from or transmitted to the OMCC. |
| 105 | func NewThresholdData2(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 106 | return NewManagedEntity(*thresholddata2BME, params...) |
| 107 | } |