blob: f1508db632b2c5a67f0d9062c76f98547b223113 [file] [log] [blame]
Matteo Scandolof9d43412021-01-12 11:11:34 -08001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Matteo Scandolof9d43412021-01-12 11:11:34 -08005 * 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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Matteo Scandolof9d43412021-01-12 11:11:34 -08009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Matteo Scandolof9d43412021-01-12 11:11:34 -080011 * 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 */
Girish Gowdra161d27a2021-05-05 12:01:44 -070017/*
Matteo Scandolof9d43412021-01-12 11:11:34 -080018 * 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
Andrea Campanella10426e22021-10-15 17:58:04 +020030const ThresholdData2ClassID = ClassID(274) // 0x0112
Matteo Scandolof9d43412021-01-12 11:11:34 -080031
32var thresholddata2BME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// ThresholdData2 (Class ID: #274 / 0x0112)
Matteo Scandolof9d43412021-01-12 11:11:34 -080035// 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
Andrea Campanella10426e22021-10-15 17:58:04 +020047// 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.
Matteo Scandolof9d43412021-01-12 11:11:34 -080053//
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
Elia Battiston9bfe1102022-02-03 10:38:03 +010080// 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
Matteo Scandolof9d43412021-01-12 11:11:34 -080090func init() {
91 thresholddata2BME = &ManagedEntityDefinition{
92 Name: "ThresholdData2",
Elia Battiston9bfe1102022-02-03 10:38:03 +010093 ClassID: ThresholdData2ClassID,
Matteo Scandolof9d43412021-01-12 11:11:34 -080094 MessageTypes: mapset.NewSetWith(
95 Create,
96 Delete,
97 Get,
98 Set,
99 ),
100 AllowedAttributeMask: 0xfe00,
101 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100102 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),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800110 },
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}