blob: 26b08280c3d1cdcbc0ecbf10e15e4fda463c095c [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
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 */
20package generated
21
22import "github.com/deckarep/golang-set"
23
24const EnergyConsumptionPerformanceMonitoringHistoryDataClassId ClassID = ClassID(343)
25
26var energyconsumptionperformancemonitoringhistorydataBME *ManagedEntityDefinition
27
28// EnergyConsumptionPerformanceMonitoringHistoryData (class ID #343)
29// This ME collects PM data associated with the ONU's energy consumption. The time spent in various
30// low-power states is recorded as a measure of their utility. Furthermore, the ONU may also
31// include the equivalent of a watt-hour meter, which can be sampled from time to time to measure
32// actual power consumed.
33//
34// For a complete discussion of generic PM architecture, refer to clause I.4.
35//
36// Relationships
37// An instance of this ME is associated with the ONU in its entirety.
38//
39// Attributes
40// Managed Entity Id
41// Managed entity ID: This attribute uniquely identifies each instance of this ME. The ME ID must
42// be 0. (R, set-by-create) (mandatory) (2 bytes)
43//
44// Interval End Time
45// Interval end time: This attribute identifies the most recently finished 15 min interval. (R)
46// (mandatory) (1 byte)
47//
48// Threshold Data 1_2 Id
49// Threshold data 1/2 ID: No thresholds are defined for this ME. For uniformity with other PMs, the
50// attribute is retained and shown as mandatory, but it should be set to a null pointer. (R, W,
51// set-by-create) (mandatory) (2 bytes)
52//
53// Doze Time
54// Doze time: This attribute records the time during which the ONU was in doze energy conservation
55// mode, measured in microseconds. If watchful sleep is enabled in the ONU dynamic power management
56// control ME, the ONU ignores this attribute. (R) (mandatory) (4 bytes)
57//
58// Cyclic Sleep Time
59// Cyclic sleep time: This attribute records the time during which the ONU was in cyclic sleep
60// energy conservation mode, measured in microseconds. If watchful sleep is enabled in the ONU
61// dynamic power management control ME, the ONU ignores this attribute. (R) (mandatory) (4 bytes)
62//
63// Watchful Sleep Time
64// Watchful sleep time: This attribute records the time during which the ONU was in watchful sleep
65// energy conservation mode, measured in microseconds. (R) (mandatory) (4 bytes)
66//
67// Energy Consumed
68// Energy consumed: This attribute records the energy consumed by the ONU, measured in millijoules.
69// (R) (optional) (4 bytes)
70//
71type EnergyConsumptionPerformanceMonitoringHistoryData struct {
72 ManagedEntityDefinition
73 Attributes AttributeValueMap
74}
75
76func init() {
77 energyconsumptionperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
78 Name: "EnergyConsumptionPerformanceMonitoringHistoryData",
79 ClassID: 343,
80 MessageTypes: mapset.NewSetWith(
81 Create,
82 Delete,
83 Get,
84 Set,
85 ),
86 AllowedAttributeMask: 0XFC00,
87 AttributeDefinitions: AttributeDefinitionMap{
88 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, false, 0),
89 1: ByteField("IntervalEndTime", 0, mapset.NewSetWith(Read), false, false, false, false, 1),
90 2: Uint16Field("ThresholdData12Id", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 2),
91 3: Uint32Field("DozeTime", 0, mapset.NewSetWith(Read), false, false, false, false, 3),
92 4: Uint32Field("CyclicSleepTime", 0, mapset.NewSetWith(Read), false, false, false, false, 4),
93 5: Uint32Field("WatchfulSleepTime", 0, mapset.NewSetWith(Read), false, false, false, false, 5),
94 6: Uint32Field("EnergyConsumed", 0, mapset.NewSetWith(Read), false, false, true, false, 6),
95 },
96 }
97}
98
99// NewEnergyConsumptionPerformanceMonitoringHistoryData (class ID 343 creates the basic
100// Managed Entity definition that is used to validate an ME of this type that
101// is received from the wire, about to be sent on the wire.
102func NewEnergyConsumptionPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
103 return NewManagedEntity(energyconsumptionperformancemonitoringhistorydataBME, params...)
104}