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