blob: f1508db632b2c5a67f0d9062c76f98547b223113 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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
Chip Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// ThresholdData2ClassID is the 16-bit ID for the OMCI
29// Managed entity Threshold data 2
Chip Boling610117d2021-09-09 11:24:34 -050030const ThresholdData2ClassID = ClassID(274) // 0x0112
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var thresholddata2BME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// ThresholdData2 (Class ID: #274 / 0x0112)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050047// 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.
Chip Boling6e27b352020-02-14 09:10:01 -060053//
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//
75type ThresholdData2 struct {
76 ManagedEntityDefinition
77 Attributes AttributeValueMap
78}
79
Chip Boling8cdd6392022-01-27 08:43:37 -060080// Attribute name constants
81
82const ThresholdData2_ThresholdValue8 = "ThresholdValue8"
83const ThresholdData2_ThresholdValue9 = "ThresholdValue9"
84const ThresholdData2_ThresholdValue10 = "ThresholdValue10"
85const ThresholdData2_ThresholdValue11 = "ThresholdValue11"
86const ThresholdData2_ThresholdValue12 = "ThresholdValue12"
87const ThresholdData2_ThresholdValue13 = "ThresholdValue13"
88const ThresholdData2_ThresholdValue14 = "ThresholdValue14"
89
Chip Boling6e27b352020-02-14 09:10:01 -060090func init() {
91 thresholddata2BME = &ManagedEntityDefinition{
92 Name: "ThresholdData2",
Chip Boling8cdd6392022-01-27 08:43:37 -060093 ClassID: ThresholdData2ClassID,
Chip Boling6e27b352020-02-14 09:10:01 -060094 MessageTypes: mapset.NewSetWith(
95 Create,
96 Delete,
97 Get,
98 Set,
99 ),
100 AllowedAttributeMask: 0xfe00,
101 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600102 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),
Chip Boling6e27b352020-02-14 09:10:01 -0600110 },
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.
119func NewThresholdData2(params ...ParamData) (*ManagedEntity, OmciErrors) {
120 return NewManagedEntity(*thresholddata2BME, params...)
121}