Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 | |
| 21 | package generated |
| 22 | |
| 23 | import "github.com/deckarep/golang-set" |
| 24 | |
| 25 | // ThresholdData1ClassID is the 16-bit ID for the OMCI |
| 26 | // Managed entity Threshold data 1 |
| 27 | const ThresholdData1ClassID ClassID = ClassID(273) |
| 28 | |
| 29 | var thresholddata1BME *ManagedEntityDefinition |
| 30 | |
| 31 | // ThresholdData1 (class ID #273) |
| 32 | // Threshold data are partitioned into two MEs for historical reasons. An instance of this ME, |
| 33 | // together with an optional instance of the threshold data 2 ME, contains threshold values for |
| 34 | // counters in PM history data MEs. |
| 35 | // |
| 36 | // For a complete discussion of generic PM architecture, refer to clause I.4. |
| 37 | // |
| 38 | // Instances of this ME are created and deleted by the OLT. |
| 39 | // |
| 40 | // Relationships |
| 41 | // 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 |
| 42 | // through a common ME ID. |
| 43 | // |
| 44 | // Attributes |
| 45 | // Managed Entity Id |
| 46 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate) |
| 47 | // (mandatory) (2-bytes) |
| 48 | // |
| 49 | // Threshold Value_1 |
| 50 | // Threshold value-1: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 51 | // |
| 52 | // Threshold Value_2 |
| 53 | // Threshold value-2: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 54 | // |
| 55 | // Threshold Value_3 |
| 56 | // Threshold value-3: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 57 | // |
| 58 | // Threshold Value_4 |
| 59 | // Threshold value-4: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 60 | // |
| 61 | // Threshold Value_5 |
| 62 | // Threshold value-5: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 63 | // |
| 64 | // Threshold Value_6 |
| 65 | // Threshold value-6: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 66 | // |
| 67 | // Threshold Value_7 |
| 68 | // Threshold value-7: (R,-W, setbycreate) (mandatory) (4-bytes) |
| 69 | // |
| 70 | type ThresholdData1 struct { |
| 71 | ManagedEntityDefinition |
| 72 | Attributes AttributeValueMap |
| 73 | } |
| 74 | |
| 75 | func init() { |
| 76 | thresholddata1BME = &ManagedEntityDefinition{ |
| 77 | Name: "ThresholdData1", |
| 78 | ClassID: 273, |
| 79 | MessageTypes: mapset.NewSetWith( |
| 80 | Create, |
| 81 | Delete, |
| 82 | Get, |
| 83 | Set, |
| 84 | ), |
| 85 | AllowedAttributeMask: 0xfe00, |
| 86 | AttributeDefinitions: AttributeDefinitionMap{ |
| 87 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 88 | 1: Uint32Field("ThresholdValue1", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 89 | 2: Uint32Field("ThresholdValue2", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 90 | 3: Uint32Field("ThresholdValue3", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 91 | 4: Uint32Field("ThresholdValue4", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 92 | 5: Uint32Field("ThresholdValue5", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5), |
| 93 | 6: Uint32Field("ThresholdValue6", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6), |
| 94 | 7: Uint32Field("ThresholdValue7", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 95 | }, |
| 96 | Access: CreatedByOlt, |
| 97 | Support: UnknownSupport, |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | // NewThresholdData1 (class ID 273) creates the basic |
| 102 | // Managed Entity definition that is used to validate an ME of this type that |
| 103 | // is received from or transmitted to the OMCC. |
| 104 | func NewThresholdData1(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 105 | return NewManagedEntity(*thresholddata1BME, params...) |
| 106 | } |