Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 18 | * NOTE: This file was generated, manual edits will be overwritten! |
| 19 | * |
| 20 | * Generated by 'goCodeGenerator.py': |
| 21 | * https://github.com/cboling/OMCI-parser/README.md |
| 22 | */ |
| 23 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // MgcPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity MGC performance monitoring history data |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const MgcPerformanceMonitoringHistoryDataClassID = ClassID(156) // 0x009c |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var mgcperformancemonitoringhistorydataBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // MgcPerformanceMonitoringHistoryData (Class ID: #156 / 0x009c) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // The MGC monitoring data ME provides run-time statistics for an active MGC association. Instances |
| 36 | // of this ME are created and deleted by the OLT. |
| 37 | // |
| 38 | // For a complete discussion of generic PM architecture, refer to clause I.4. |
| 39 | // |
| 40 | // Relationships |
| 41 | // An instance of this ME is associated with an instance of the MGC config data or MGC config |
| 42 | // portal ME. |
| 43 | // |
| 44 | // Attributes |
| 45 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 46 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 47 | // implicitly linked to an instance of the associated MGC config data or to the MGC config portal |
| 48 | // ME. If a non-OMCI configuration method is used for VoIP, there can be only one live ME instance, |
| 49 | // associated with the MGC config portal, and with ME ID 0. (R, setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 50 | // |
| 51 | // Interval End Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 52 | // This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 53 | // |
| 54 | // Threshold Data 1_2 Id |
| 55 | // Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that |
| 56 | // contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold |
| 57 | // data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 58 | // |
| 59 | // Received Messages |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 60 | // This attribute counts the number of received Megaco messages on this association, as defined by |
| 61 | // [ITUT H.341]. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 62 | // |
| 63 | // Received Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 64 | // This attribute counts the total number of octets received on this association, as defined by |
| 65 | // [ITU-T H.341]. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 66 | // |
| 67 | // Sent Messages |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 68 | // This attribute counts the total number of Megaco messages sent over this association, as defined |
| 69 | // by [ITU-T H.341]. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 70 | // |
| 71 | // Sent Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 72 | // This attribute counts the total number of octets sent over this association, as defined by |
| 73 | // [ITU-T H.341]. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 74 | // |
| 75 | // Protocol Errors |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 76 | // This attribute counts the total number of errors detected on this association, as defined by |
| 77 | // [ITU-T H.341]. This includes: |
| 78 | // |
| 79 | // o syntax errors detected in a given received message; |
| 80 | // |
| 81 | // o outgoing transactions that failed for protocol reasons. |
| 82 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 83 | // (R) (mandatory) (4-bytes) |
| 84 | // |
| 85 | // Transport Losses |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 86 | // This attribute counts the total number of transport losses (e.g., socket problems) detected on |
| 87 | // this association. A link loss is defined as loss of communication with the remote entity due to |
| 88 | // hardware/transient problems, or problems in related software. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 89 | // |
| 90 | // Last Detected Event |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 91 | // This attribute reports the last event detected on this association. This includes events such as |
| 92 | // the link failing or being set up. Under normal circumstances, a get action on this attribute |
| 93 | // would return 0 to indicate no abnormal activity. This field is an enumeration as follows. |
| 94 | // |
| 95 | // 0 No event - No event has yet been detected during this PM interval. |
| 96 | // |
| 97 | // 1 Link up - The transport link underpinning the association came up. |
| 98 | // |
| 99 | // 2 Link down - The transport link underpinning the association went down. |
| 100 | // |
| 101 | // 3 Persistent error - A persistent error was detected on the link (such as the socket/TCP |
| 102 | // connection to the remote node could not be set up). |
| 103 | // |
| 104 | // 4 Local shutdown - The association was brought down intentionally by the local application. |
| 105 | // |
| 106 | // 5 Failover down - The association was brought down as part of failover processing. |
| 107 | // |
| 108 | // 255 Other event - The latest event does not match any in the list. |
| 109 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 110 | // (R) (mandatory) (1-byte) |
| 111 | // |
| 112 | // Last Detected Event Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 113 | // This attribute reports the time in seconds since the last event on this association was |
| 114 | // detected, as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 115 | // |
| 116 | // Last Detected Reset Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 117 | // This attribute reports the time in seconds since these statistics were last reset, as defined by |
| 118 | // [ITU-T H.341]. Under normal circumstances, a get action on this attribute would return 900-s to |
| 119 | // indicate a completed 15-min interval. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 120 | // |
| 121 | type MgcPerformanceMonitoringHistoryData struct { |
| 122 | ManagedEntityDefinition |
| 123 | Attributes AttributeValueMap |
| 124 | } |
| 125 | |
| 126 | func init() { |
| 127 | mgcperformancemonitoringhistorydataBME = &ManagedEntityDefinition{ |
| 128 | Name: "MgcPerformanceMonitoringHistoryData", |
| 129 | ClassID: 156, |
| 130 | MessageTypes: mapset.NewSetWith( |
| 131 | Create, |
| 132 | Delete, |
| 133 | Get, |
| 134 | Set, |
Chip Boling | 2d51f05 | 2021-02-09 09:04:15 -0600 | [diff] [blame] | 135 | GetCurrentData, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 136 | ), |
| 137 | AllowedAttributeMask: 0xffe0, |
| 138 | AttributeDefinitions: AttributeDefinitionMap{ |
| 139 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 140 | 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 141 | 2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 142 | 3: Uint32Field("ReceivedMessages", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 143 | 4: Uint32Field("ReceivedOctets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 144 | 5: Uint32Field("SentMessages", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 145 | 6: Uint32Field("SentOctets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 146 | 7: Uint32Field("ProtocolErrors", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 147 | 8: Uint32Field("TransportLosses", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 148 | 9: ByteField("LastDetectedEvent", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 149 | 10: Uint32Field("LastDetectedEventTime", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 150 | 11: Uint32Field("LastDetectedResetTime", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
| 151 | }, |
| 152 | Access: CreatedByOlt, |
| 153 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 154 | Alarms: AlarmMap{ |
| 155 | 0: "MGCP protocol errors", |
| 156 | 1: "MGCP transport losses", |
| 157 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 158 | } |
| 159 | } |
| 160 | |
| 161 | // NewMgcPerformanceMonitoringHistoryData (class ID 156) creates the basic |
| 162 | // Managed Entity definition that is used to validate an ME of this type that |
| 163 | // is received from or transmitted to the OMCC. |
| 164 | func NewMgcPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 165 | return NewManagedEntity(*mgcperformancemonitoringhistorydataBME, params...) |
| 166 | } |