Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * Unless required by applicable law or agreed to in writing, software |
| 9 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | * See the License for the specific language governing permissions and |
| 12 | * limitations under the License. |
| 13 | */ |
| 14 | /* |
| 15 | * NOTE: This file was generated, manual edits will be overwritten! |
| 16 | * |
| 17 | * Generated by 'goCodeGenerator.py': |
| 18 | * https://github.com/cboling/OMCI-parser/README.md |
| 19 | */ |
| 20 | package generated |
| 21 | |
| 22 | import "github.com/deckarep/golang-set" |
| 23 | |
| 24 | const ThresholdData1ClassId ClassID = ClassID(273) |
| 25 | |
| 26 | var thresholddata1BME *ManagedEntityDefinition |
| 27 | |
| 28 | // ThresholdData1 (class ID #273) |
| 29 | // Threshold data are partitioned into two MEs for historical reasons. An instance of this ME, |
| 30 | // together with an optional instance of the threshold data 2 ME, contains threshold values for |
| 31 | // counters in PM history data MEs. |
| 32 | // |
| 33 | // For a complete discussion of generic PM architecture, refer to clause I.4. |
| 34 | // |
| 35 | // Instances of this ME are created and deleted by the OLT. |
| 36 | // |
| 37 | // Relationships |
| 38 | // 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 |
| 39 | // through a common ME ID. |
| 40 | // |
| 41 | // Attributes |
| 42 | // Managed Entity Id |
| 43 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate) |
| 44 | // (mandatory) (2 bytes) |
| 45 | // |
| 46 | // Threshold Value_1 |
| 47 | // Threshold value 1: (R, W, setbycreate) (mandatory) (4 bytes) |
| 48 | // |
| 49 | // Threshold Value_2 |
| 50 | // Threshold value 2: (R, W, setbycreate) (mandatory) (4 bytes) |
| 51 | // |
| 52 | // Threshold Value_3 |
| 53 | // Threshold value 3: (R, W, setbycreate) (mandatory) (4 bytes) |
| 54 | // |
| 55 | // Threshold Value_4 |
| 56 | // Threshold value 4: (R, W, setbycreate) (mandatory) (4 bytes) |
| 57 | // |
| 58 | // Threshold Value_5 |
| 59 | // Threshold value 5: (R, W, setbycreate) (mandatory) (4 bytes) |
| 60 | // |
| 61 | // Threshold Value_6 |
| 62 | // Threshold value 6: (R, W, setbycreate) (mandatory) (4 bytes) |
| 63 | // |
| 64 | // Threshold Value_7 |
| 65 | // Threshold value 7: (R, W, setbycreate) (mandatory) (4 bytes) |
| 66 | // |
| 67 | type ThresholdData1 struct { |
| 68 | ManagedEntityDefinition |
| 69 | Attributes AttributeValueMap |
| 70 | } |
| 71 | |
| 72 | func init() { |
| 73 | thresholddata1BME = &ManagedEntityDefinition{ |
| 74 | Name: "ThresholdData1", |
| 75 | ClassID: 273, |
| 76 | MessageTypes: mapset.NewSetWith( |
| 77 | Create, |
| 78 | Delete, |
| 79 | Get, |
| 80 | Set, |
| 81 | ), |
| 82 | AllowedAttributeMask: 0XFE00, |
| 83 | AttributeDefinitions: AttributeDefinitionMap{ |
| 84 | 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, false, 0), |
| 85 | 1: Uint32Field("ThresholdValue1", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 1), |
| 86 | 2: Uint32Field("ThresholdValue2", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 2), |
| 87 | 3: Uint32Field("ThresholdValue3", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 3), |
| 88 | 4: Uint32Field("ThresholdValue4", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 4), |
| 89 | 5: Uint32Field("ThresholdValue5", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 5), |
| 90 | 6: Uint32Field("ThresholdValue6", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 6), |
| 91 | 7: Uint32Field("ThresholdValue7", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 7), |
| 92 | }, |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | // NewThresholdData1 (class ID 273 creates the basic |
| 97 | // Managed Entity definition that is used to validate an ME of this type that |
| 98 | // is received from the wire, about to be sent on the wire. |
| 99 | func NewThresholdData1(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 100 | return NewManagedEntity(thresholddata1BME, params...) |
| 101 | } |