blob: 19003c2808db4f49949db0910f1b349d5cff2269 [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// TcpUdpPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
26// Managed entity TCP/UDP performance monitoring history data
27const TcpUdpPerformanceMonitoringHistoryDataClassID ClassID = ClassID(342)
28
29var tcpudpperformancemonitoringhistorydataBME *ManagedEntityDefinition
30
31// TcpUdpPerformanceMonitoringHistoryData (class ID #342)
32// This ME collects PM data related to a TCP or UDP port. Instances of this ME are created and
33// deleted by the OLT.
34//
35// For a complete discussion of generic PM architecture, refer to clause I.4.
36//
37// Relationships
38// An instance of this ME is associated with an instance of the TCP/UDP config data ME.
39//
40// Attributes
41// Managed Entity Id
42// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
43// identical ID, this ME is implicitly linked to an instance of the TCP/UDP config data ME. (R,
44// setbycreate) (mandatory) (2-bytes)
45//
46// Interval End Time
47// Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
48// (mandatory) (1-byte)
49//
50// Threshold Data 1_2 Id
51// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
52// contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
53// data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
54//
55// Socket Failed
56// Socket failed: This attribute is incremented when an attempt to create a socket associated with
57// a port fails. (R) (mandatory) (2-bytes)
58//
59// Listen Failed
60// Listen failed: This attribute is incremented when an attempt by a service to listen for a
61// request on a port fails. (R) (mandatory) (2-bytes)
62//
63// Bind Failed
64// Bind failed: This attribute is incremented when an attempt by a service to bind to a port fails.
65// (R) (mandatory) (2-bytes)
66//
67// Accept Failed
68// Accept failed: This attribute is incremented when an attempt to accept a connection on a port
69// fails. (R) (mandatory) (2-bytes)
70//
71// Select Failed
72// Select failed: This attribute is incremented when an attempt to perform a select on a group of
73// ports fails. (R) (mandatory) (2-bytes)
74//
75type TcpUdpPerformanceMonitoringHistoryData struct {
76 ManagedEntityDefinition
77 Attributes AttributeValueMap
78}
79
80func init() {
81 tcpudpperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
82 Name: "TcpUdpPerformanceMonitoringHistoryData",
83 ClassID: 342,
84 MessageTypes: mapset.NewSetWith(
85 Create,
86 Delete,
87 Get,
88 Set,
89 ),
90 AllowedAttributeMask: 0xfe00,
91 AttributeDefinitions: AttributeDefinitionMap{
92 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
93 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
94 2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
95 3: Uint16Field("SocketFailed", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
96 4: Uint16Field("ListenFailed", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
97 5: Uint16Field("BindFailed", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
98 6: Uint16Field("AcceptFailed", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
99 7: Uint16Field("SelectFailed", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
100 },
101 Access: CreatedByOlt,
102 Support: UnknownSupport,
103 }
104}
105
106// NewTcpUdpPerformanceMonitoringHistoryData (class ID 342) creates the basic
107// Managed Entity definition that is used to validate an ME of this type that
108// is received from or transmitted to the OMCC.
109func NewTcpUdpPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
110 return NewManagedEntity(*tcpudpperformancemonitoringhistorydataBME, params...)
111}