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 | // ThresholdData1ClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Threshold data 1 |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 30 | const ThresholdData1ClassID = ClassID(273) // 0x0111 |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 31 | |
| 32 | var thresholddata1BME *ManagedEntityDefinition |
| 33 | |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 34 | // ThresholdData1 (Class ID: #273 / 0x0111) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 35 | // Threshold data are partitioned into two MEs for historical reasons. An instance of this ME, |
| 36 | // together with an optional instance of the threshold data 2 ME, contains threshold values for |
| 37 | // counters in PM history data MEs. |
| 38 | // |
| 39 | // For a complete discussion of generic PM architecture, refer to clause I.4. |
| 40 | // |
| 41 | // Instances of this ME are created and deleted by the OLT. |
| 42 | // |
| 43 | // Relationships |
| 44 | // An instance of this ME may be related to multiple instances of PM history data type MEs.//// Paired instances of threshold data 1 ME and threshold data 2 ME are implicitly linked together |
| 45 | // through a common ME ID. |
| 46 | // |
| 47 | // Attributes |
| 48 | // Managed Entity Id |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 49 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 50 | // (2-bytes) |
| 51 | // |
| 52 | // The following seven attributes specify threshold values for seven thresholded counters in |
| 53 | // associated PM history data MEs. The definition of each PM history ME includes a table that links |
| 54 | // each thresholded counter to one of these threshold value attributes. |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 55 | // |
| 56 | // Threshold Value_1 |
| 57 | // Threshold value-1: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 58 | // |
| 59 | // Threshold Value_2 |
| 60 | // Threshold value-2: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 61 | // |
| 62 | // Threshold Value_3 |
| 63 | // Threshold value-3: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 64 | // |
| 65 | // Threshold Value_4 |
| 66 | // Threshold value-4: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 67 | // |
| 68 | // Threshold Value_5 |
| 69 | // Threshold value-5: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 70 | // |
| 71 | // Threshold Value_6 |
| 72 | // Threshold value-6: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 73 | // |
| 74 | // Threshold Value_7 |
| 75 | // Threshold value-7: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 76 | // |
| 77 | type ThresholdData1 struct { |
| 78 | ManagedEntityDefinition |
| 79 | Attributes AttributeValueMap |
| 80 | } |
| 81 | |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame^] | 82 | // Attribute name constants |
| 83 | |
| 84 | const ThresholdData1_ThresholdValue1 = "ThresholdValue1" |
| 85 | const ThresholdData1_ThresholdValue2 = "ThresholdValue2" |
| 86 | const ThresholdData1_ThresholdValue3 = "ThresholdValue3" |
| 87 | const ThresholdData1_ThresholdValue4 = "ThresholdValue4" |
| 88 | const ThresholdData1_ThresholdValue5 = "ThresholdValue5" |
| 89 | const ThresholdData1_ThresholdValue6 = "ThresholdValue6" |
| 90 | const ThresholdData1_ThresholdValue7 = "ThresholdValue7" |
| 91 | |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 92 | func init() { |
| 93 | thresholddata1BME = &ManagedEntityDefinition{ |
| 94 | Name: "ThresholdData1", |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame^] | 95 | ClassID: ThresholdData1ClassID, |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 96 | MessageTypes: mapset.NewSetWith( |
| 97 | Create, |
| 98 | Delete, |
| 99 | Get, |
| 100 | Set, |
| 101 | ), |
| 102 | AllowedAttributeMask: 0xfe00, |
| 103 | AttributeDefinitions: AttributeDefinitionMap{ |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame^] | 104 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 105 | 1: Uint32Field(ThresholdData1_ThresholdValue1, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 106 | 2: Uint32Field(ThresholdData1_ThresholdValue2, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 107 | 3: Uint32Field(ThresholdData1_ThresholdValue3, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 108 | 4: Uint32Field(ThresholdData1_ThresholdValue4, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 109 | 5: Uint32Field(ThresholdData1_ThresholdValue5, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5), |
| 110 | 6: Uint32Field(ThresholdData1_ThresholdValue6, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6), |
| 111 | 7: Uint32Field(ThresholdData1_ThresholdValue7, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 112 | }, |
| 113 | Access: CreatedByOlt, |
| 114 | Support: UnknownSupport, |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | // NewThresholdData1 (class ID 273) creates the basic |
| 119 | // Managed Entity definition that is used to validate an ME of this type that |
| 120 | // is received from or transmitted to the OMCC. |
| 121 | func NewThresholdData1(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 122 | return NewManagedEntity(*thresholddata1BME, params...) |
| 123 | } |