blob: 6392971bdd9736a0b780eb85c77fb6a334fdbd99 [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// IpHostPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
26// Managed entity IP host performance monitoring history data
27const IpHostPerformanceMonitoringHistoryDataClassID ClassID = ClassID(135)
28
29var iphostperformancemonitoringhistorydataBME *ManagedEntityDefinition
30
31// IpHostPerformanceMonitoringHistoryData (class ID #135)
32// This ME collects PM data related to an IP host. Instances of this ME are created and deleted by
33// 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 IP host config data or IPv6 host
39// config data ME.
40//
41// Attributes
42// Managed Entity Id
43// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
44// identical ID, this ME is implicitly linked to an instance of the IP host configuration data or
45// IPv6 host configuration data ME. (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: This attribute points to an instance of the threshold data 1 ME that
53// contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
54// data 2 ME is optional. (R,-W, set-by-create) (mandatory) (2-bytes)
55//
56// Icmp Errors
57// ICMP errors: This attribute counts ICMP errors received. (R) (mandatory) (4-bytes)
58//
59// Dns Errors
60// DNS errors: This attribute counts DNS errors received. (R) (mandatory) (4-bytes)
61//
62// Dhcp Timeouts
63// DHCP timeouts: This attribute counts DHCP timeouts. (R) (optional) (2 bytes)
64//
65// Ip Address Conflict
66// IP address conflict: This attribute is incremented whenever the ONU detects a conflicting IP
67// address on the network. A conflicting IP address is one that has the same value as the one
68// currently assigned to the ONU. (R) (optional) (2 bytes)
69//
70// Out Of Memory
71// Out of memory: This attribute is incremented whenever the ONU encounters an out of memory
72// condition in the IP stack. (R) (optional) (2 bytes)
73//
74// Internal Error
75// Internal error: This attribute is incremented whenever the ONU encounters an internal error
76// condition such as a driver interface failure in the IP stack. (R) (optional) (2-bytes)
77//
78type IpHostPerformanceMonitoringHistoryData struct {
79 ManagedEntityDefinition
80 Attributes AttributeValueMap
81}
82
83func init() {
84 iphostperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
85 Name: "IpHostPerformanceMonitoringHistoryData",
86 ClassID: 135,
87 MessageTypes: mapset.NewSetWith(
88 Create,
89 Delete,
90 Get,
91 Set,
92 ),
93 AllowedAttributeMask: 0xff00,
94 AttributeDefinitions: AttributeDefinitionMap{
95 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
96 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
97 2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
98 3: Uint32Field("IcmpErrors", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
99 4: Uint32Field("DnsErrors", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
100 5: Uint16Field("DhcpTimeouts", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
101 6: Uint16Field("IpAddressConflict", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
102 7: Uint16Field("OutOfMemory", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
103 8: Uint16Field("InternalError", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
104 },
105 Access: CreatedByOlt,
106 Support: UnknownSupport,
107 }
108}
109
110// NewIpHostPerformanceMonitoringHistoryData (class ID 135) creates the basic
111// Managed Entity definition that is used to validate an ME of this type that
112// is received from or transmitted to the OMCC.
113func NewIpHostPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
114 return NewManagedEntity(*iphostperformancemonitoringhistorydataBME, params...)
115}