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 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 4 | * |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [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 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 8 | * |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 10 | * |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [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 | d80007b | 2021-04-12 12:22:29 +0000 | [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 | // ThresholdData2ClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Threshold data 2 |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 30 | const ThresholdData2ClassID = ClassID(274) // 0x0112 |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 31 | |
| 32 | var thresholddata2BME *ManagedEntityDefinition |
| 33 | |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 34 | // ThresholdData2 (Class ID: #274 / 0x0112) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 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 |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 47 | // This attribute uniquely identifies each instance of this ME. Its value is the same as that of |
| 48 | // the paired threshold data-1-instance. (R, setbycreate) (mandatory) (2-bytes) |
| 49 | // |
| 50 | // The following seven attributes specify threshold values for seven thresholded counters in |
| 51 | // associated PM history data MEs. The definition of each PM history ME includes a table that links |
| 52 | // each thresholded counter to one of these threshold value attributes. |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 53 | // |
| 54 | // Threshold Value_8 |
| 55 | // Threshold value-8: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 56 | // |
| 57 | // Threshold Value_9 |
| 58 | // Threshold value-9: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 59 | // |
| 60 | // Threshold Value_10 |
| 61 | // Threshold value-10: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 62 | // |
| 63 | // Threshold Value_11 |
| 64 | // Threshold value-11: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 65 | // |
| 66 | // Threshold Value_12 |
| 67 | // Threshold value-12: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 68 | // |
| 69 | // Threshold Value_13 |
| 70 | // Threshold value-13: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 71 | // |
| 72 | // Threshold Value_14 |
| 73 | // Threshold value-14: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 74 | // |
| 75 | type ThresholdData2 struct { |
| 76 | ManagedEntityDefinition |
| 77 | Attributes AttributeValueMap |
| 78 | } |
| 79 | |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 80 | // Attribute name constants |
| 81 | |
| 82 | const ThresholdData2_ThresholdValue8 = "ThresholdValue8" |
| 83 | const ThresholdData2_ThresholdValue9 = "ThresholdValue9" |
| 84 | const ThresholdData2_ThresholdValue10 = "ThresholdValue10" |
| 85 | const ThresholdData2_ThresholdValue11 = "ThresholdValue11" |
| 86 | const ThresholdData2_ThresholdValue12 = "ThresholdValue12" |
| 87 | const ThresholdData2_ThresholdValue13 = "ThresholdValue13" |
| 88 | const ThresholdData2_ThresholdValue14 = "ThresholdValue14" |
| 89 | |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 90 | func init() { |
| 91 | thresholddata2BME = &ManagedEntityDefinition{ |
| 92 | Name: "ThresholdData2", |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 93 | ClassID: ThresholdData2ClassID, |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 94 | MessageTypes: mapset.NewSetWith( |
| 95 | Create, |
| 96 | Delete, |
| 97 | Get, |
| 98 | Set, |
| 99 | ), |
| 100 | AllowedAttributeMask: 0xfe00, |
| 101 | AttributeDefinitions: AttributeDefinitionMap{ |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 102 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 103 | 1: Uint32Field(ThresholdData2_ThresholdValue8, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 104 | 2: Uint32Field(ThresholdData2_ThresholdValue9, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 105 | 3: Uint32Field(ThresholdData2_ThresholdValue10, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 106 | 4: Uint32Field(ThresholdData2_ThresholdValue11, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 107 | 5: Uint32Field(ThresholdData2_ThresholdValue12, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5), |
| 108 | 6: Uint32Field(ThresholdData2_ThresholdValue13, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6), |
| 109 | 7: Uint32Field(ThresholdData2_ThresholdValue14, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 110 | }, |
| 111 | Access: CreatedByOlt, |
| 112 | Support: UnknownSupport, |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | // NewThresholdData2 (class ID 274) creates the basic |
| 117 | // Managed Entity definition that is used to validate an ME of this type that |
| 118 | // is received from or transmitted to the OMCC. |
| 119 | func NewThresholdData2(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 120 | return NewManagedEntity(*thresholddata2BME, params...) |
| 121 | } |