blob: f6ccb85014260d0b264b23bcf9801aff2a36ca73 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
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
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// ThresholdData2ClassID is the 16-bit ID for the OMCI
26// Managed entity Threshold data 2
27const ThresholdData2ClassID ClassID = ClassID(274)
28
29var thresholddata2BME *ManagedEntityDefinition
30
31// ThresholdData2 (class ID #274)
32// Together with an instance of the threshold data 1 ME, an instance of this ME contains threshold
33// values for counters maintained in one or more instances of PM history data MEs.
34//
35// For a complete discussion of generic PM architecture, refer to clause-I.4.
36//
37// Instances of this ME are created and deleted by the OLT.
38//
39// Relationships
40// Refer to the relationships of the threshold data 1 ME.
41//
42// Attributes
43// Managed Entity Id
44// Managed entity ID: This attribute uniquely identifies each instance of this ME. Its value is the
45// same as that of the paired threshold data-1-instance. (R, setbycreate) (mandatory) (2-bytes)
46//
47// Threshold Value_8
48// Threshold value-8: (R,-W, setbycreate) (mandatory) (4-bytes)
49//
50// Threshold Value_9
51// Threshold value-9: (R,-W, setbycreate) (mandatory) (4-bytes)
52//
53// Threshold Value_10
54// Threshold value-10: (R,-W, setbycreate) (mandatory) (4-bytes)
55//
56// Threshold Value_11
57// Threshold value-11: (R,-W, setbycreate) (mandatory) (4-bytes)
58//
59// Threshold Value_12
60// Threshold value-12: (R,-W, setbycreate) (mandatory) (4-bytes)
61//
62// Threshold Value_13
63// Threshold value-13: (R,-W, setbycreate) (mandatory) (4-bytes)
64//
65// Threshold Value_14
66// Threshold value-14: (R,-W, setbycreate) (mandatory) (4-bytes)
67//
68type ThresholdData2 struct {
69 ManagedEntityDefinition
70 Attributes AttributeValueMap
71}
72
73func init() {
74 thresholddata2BME = &ManagedEntityDefinition{
75 Name: "ThresholdData2",
76 ClassID: 274,
77 MessageTypes: mapset.NewSetWith(
78 Create,
79 Delete,
80 Get,
81 Set,
82 ),
83 AllowedAttributeMask: 0xfe00,
84 AttributeDefinitions: AttributeDefinitionMap{
85 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
86 1: Uint32Field("ThresholdValue8", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
87 2: Uint32Field("ThresholdValue9", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
88 3: Uint32Field("ThresholdValue10", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
89 4: Uint32Field("ThresholdValue11", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
90 5: Uint32Field("ThresholdValue12", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
91 6: Uint32Field("ThresholdValue13", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
92 7: Uint32Field("ThresholdValue14", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
93 },
94 Access: CreatedByOlt,
95 Support: UnknownSupport,
96 }
97}
98
99// NewThresholdData2 (class ID 274) creates the basic
100// Managed Entity definition that is used to validate an ME of this type that
101// is received from or transmitted to the OMCC.
102func NewThresholdData2(params ...ParamData) (*ManagedEntity, OmciErrors) {
103 return NewManagedEntity(*thresholddata2BME, params...)
104}