blob: 3cd0975e4ca90a5cb95a9909cd919904674de047 [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
4
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
Andrea Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
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
80func init() {
81 thresholddata2BME = &ManagedEntityDefinition{
82 Name: "ThresholdData2",
83 ClassID: 274,
84 MessageTypes: mapset.NewSetWith(
85 Create,
86 Delete,
87 Get,
88 Set,
89 ),
90 AllowedAttributeMask: 0xfe00,
91 AttributeDefinitions: AttributeDefinitionMap{
92 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
93 1: Uint32Field("ThresholdValue8", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
94 2: Uint32Field("ThresholdValue9", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
95 3: Uint32Field("ThresholdValue10", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
96 4: Uint32Field("ThresholdValue11", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
97 5: Uint32Field("ThresholdValue12", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
98 6: Uint32Field("ThresholdValue13", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
99 7: Uint32Field("ThresholdValue14", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
100 },
101 Access: CreatedByOlt,
102 Support: UnknownSupport,
103 }
104}
105
106// NewThresholdData2 (class ID 274) creates the basic
107// Managed Entity definition that is used to validate an ME of this type that
108// is received from or transmitted to the OMCC.
109func NewThresholdData2(params ...ParamData) (*ManagedEntity, OmciErrors) {
110 return NewManagedEntity(*thresholddata2BME, params...)
111}