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