blob: 0c9c8c9f1cfbda8d2b45c4cb8e625e0ae90d3e68 [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// GemPortNetworkCtpPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
26// Managed entity GEM port network CTP performance monitoring history data
27const GemPortNetworkCtpPerformanceMonitoringHistoryDataClassID ClassID = ClassID(341)
28
29var gemportnetworkctpperformancemonitoringhistorydataBME *ManagedEntityDefinition
30
31// GemPortNetworkCtpPerformanceMonitoringHistoryData (class ID #341)
32// This ME collects GEM frame PM data associated with a GEM port network CTP. Instances of this ME
33// are created and deleted by the OLT.
34//
35// NOTE 1 - One might expect to find some form of impaired or discarded frame count associated with
36// a GEM port. However, the only impairment that might be detected at the GEM frame level would be
37// a corrupted GEM frame header. In this case, no part of the header could be considered reliable
38// including the port ID. For this reason, there is no impaired or discarded frame count in this
39// ME.
40//
41// NOTE 2 - This ME replaces the GEM port performance history data ME and is preferred for new
42// implementations.
43//
44// For a complete discussion of generic PM architecture, refer to clause I.4.
45//
46// Relationships
47// An instance of this ME is associated with an instance of the GEM port network CTP ME.
48//
49// Attributes
50// Managed Entity Id
51// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
52// identical ID, this ME is implicitly linked to an instance of the GEM port network CTP. (R,
53// setbycreate) (mandatory) (2-bytes)
54//
55// Interval End Time
56// Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
57// (mandatory) (1-byte)
58//
59// Threshold Data 1_2 Id
60// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
61// contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
62// data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
63//
64// Transmitted Gem Frames
65// Transmitted GEM frames: This attribute counts GEM frames transmitted on the monitored GEM port.
66// (R) (mandatory) (4-bytes)
67//
68// Received Gem Frames
69// Received GEM frames: This attribute counts GEM frames received correctly on the monitored GEM
70// port. A correctly received GEM frame is one that does not contain uncorrectable errors and has a
71// valid header error check (HEC). (R) (mandatory) (4-bytes)
72//
73// Received Payload Bytes
74// Received payload bytes: This attribute counts user payload bytes received on the monitored GEM
75// port. (R) (mandatory) (8-bytes)
76//
77// Transmitted Payload Bytes
78// Transmitted payload bytes: This attribute counts user payload bytes transmitted on the monitored
79// GEM port. (R) (mandatory) (8-bytes)
80//
81// Encryption Key Errors
82// NOTE 4 - GEM PM counts each non-idle GEM frame, whether it contains an entire user frame or only
83// a fragment of a user frame.
84//
85type GemPortNetworkCtpPerformanceMonitoringHistoryData struct {
86 ManagedEntityDefinition
87 Attributes AttributeValueMap
88}
89
90func init() {
91 gemportnetworkctpperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
92 Name: "GemPortNetworkCtpPerformanceMonitoringHistoryData",
93 ClassID: 341,
94 MessageTypes: mapset.NewSetWith(
95 Create,
96 Delete,
97 Get,
98 Set,
99 ),
100 AllowedAttributeMask: 0xfe00,
101 AttributeDefinitions: AttributeDefinitionMap{
102 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
103 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
104 2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
105 3: Uint32Field("TransmittedGemFrames", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
106 4: Uint32Field("ReceivedGemFrames", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
107 5: Uint64Field("ReceivedPayloadBytes", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
108 6: Uint64Field("TransmittedPayloadBytes", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
109 7: Uint32Field("EncryptionKeyErrors", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
110 },
111 Access: CreatedByOlt,
112 Support: UnknownSupport,
113 }
114}
115
116// NewGemPortNetworkCtpPerformanceMonitoringHistoryData (class ID 341) 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 NewGemPortNetworkCtpPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
120 return NewManagedEntity(*gemportnetworkctpperformancemonitoringhistorydataBME, params...)
121}