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 | // AniGClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity ANI-G |
| 30 | const AniGClassID ClassID = ClassID(263) |
| 31 | |
| 32 | var anigBME *ManagedEntityDefinition |
| 33 | |
| 34 | // AniG (class ID #263) |
| 35 | // This ME organizes data associated with each access network interface supported by a GPON ONU. |
| 36 | // The ONU automatically creates one instance of this ME for each PON physical port. |
| 37 | // |
| 38 | // Relationships |
| 39 | // An instance of this ME is associated with each instance of a physical PON interface. |
| 40 | // |
| 41 | // Attributes |
| 42 | // Managed Entity Id |
| 43 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. Its value |
| 44 | // indicates the physical position of the PON interface. The first byte is the slot ID, defined in |
| 45 | // clause 9.1.5. The second byte is the port ID. (R) (mandatory) (2-bytes) |
| 46 | // |
| 47 | // Sr Indication |
| 48 | // SR indication: This Boolean attribute indicates the ONU's capability to report queue status for |
| 49 | // DBA. The value true means that status reporting is available for all TCONTs that are associated |
| 50 | // with the ANI. (R) (mandatory) (1-byte) |
| 51 | // |
| 52 | // Total TCont Number |
| 53 | // Total TCONT number: This attribute indicates the total number of T-CONTs that can be supported |
| 54 | // on this ANI. (R) (mandatory) (2-bytes) |
| 55 | // |
| 56 | // Gem Block Length |
| 57 | // In all other ITU-T PON systems, the unit for queue occupancy reporting is fixed in at 4-bytes by |
| 58 | // the respective TC layer specification. |
| 59 | // |
| 60 | // Piggyback Dba Reporting |
| 61 | // (R) (mandatory) (1-byte) |
| 62 | // |
| 63 | // Deprecated |
| 64 | // Deprecated: This attribute should be set to 0 by the ONU and ignored by the OLT. (R) (mandatory) |
| 65 | // (1-byte) |
| 66 | // |
| 67 | // Signal Fail Threshold |
| 68 | // Signal fail (SF) threshold: This attribute specifies the downstream bit error rate (BER) |
| 69 | // threshold to detect the SF alarm. When this value is y, the BER threshold is 10-y. Valid values |
| 70 | // are 3..8. Upon ME instantiation, the ONU sets this attribute to 5. (R,-W) (mandatory) (1-byte) |
| 71 | // |
| 72 | // Signal Degrade Threshold |
| 73 | // Signal degrade (SD) threshold: This attribute specifies the downstream BER threshold to detect |
| 74 | // the SD alarm. When this value is x, the BER threshold for SD is 10-x. Valid values are 4..10. |
| 75 | // The SD threshold must be lower than the SF threshold; i.e., x-> y. Upon ME instantiation, the |
| 76 | // ONU sets this attribute to 9. (R,-W) (mandatory) (1-byte) |
| 77 | // |
| 78 | // Arc |
| 79 | // ARC: See clause A.1.4.3. (R,-W) (optional) (1-byte) |
| 80 | // |
| 81 | // Arc Interval |
| 82 | // ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte) |
| 83 | // |
| 84 | // Optical Signal Level |
| 85 | // Optical signal level: This attribute reports the current measurement of the total downstream |
| 86 | // optical signal level. Its value is a 2s complement integer referred to 1- mW (i.e., 1-dBm), with |
| 87 | // 0.002 dB granularity. (R) (optional) (2-bytes) |
| 88 | // |
| 89 | // Lower Optical Threshold |
| 90 | // Lower optical threshold: This attribute specifies the optical level the ONU uses to declare the |
| 91 | // downstream low received optical power alarm. Valid values are -127 dBm (coded as 254) to 0 dBm |
| 92 | // (coded as 0) in 0.5 dB increments. The default value 0xFF selects the ONU's internal policy. |
| 93 | // (R,-W) (optional) (1-byte) |
| 94 | // |
| 95 | // Upper Optical Threshold |
| 96 | // Upper optical threshold: This attribute specifies the optical level the ONU uses to declare the |
| 97 | // downstream high received optical power alarm. Valid values are -127 dBm (coded as 254) to 0 dBm |
| 98 | // (coded as 0) in 0.5 dB increments. The default value 0xFF selects the ONU's internal policy. |
| 99 | // (R,-W) (optional) (1-byte) |
| 100 | // |
| 101 | // Onu Response Time |
| 102 | // (R) (optional) (2-bytes) |
| 103 | // |
| 104 | // Transmit Optical Level |
| 105 | // Transmit optical level: This attribute reports the current measurement of mean optical launch |
| 106 | // power. Its value is a 2s complement integer referred to 1-mW (i.e., 1-dBm), with 0.002 dB |
| 107 | // granularity. (R) (optional) (2-bytes) |
| 108 | // |
| 109 | // Lower Transmit Power Threshold |
| 110 | // Lower transmit power threshold: This attribute specifies the minimum mean optical launch power |
| 111 | // that the ONU uses to declare the low transmit optical power alarm. Its value is a 2s complement |
| 112 | // integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value -63.5 (0x81) |
| 113 | // selects the ONU's internal policy. (R,-W) (optional) (1-byte) |
| 114 | // |
| 115 | // Upper Transmit Power Threshold |
| 116 | // Upper transmit power threshold: This attribute specifies the maximum mean optical launch power |
| 117 | // that the ONU uses to declare the high transmit optical power alarm. Its value is a 2s complement |
| 118 | // integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value -63.5 (0x81) |
| 119 | // selects the ONU's internal policy. (R,-W) (optional) (1-byte) |
| 120 | // |
| 121 | type AniG struct { |
| 122 | ManagedEntityDefinition |
| 123 | Attributes AttributeValueMap |
| 124 | } |
| 125 | |
| 126 | func init() { |
| 127 | anigBME = &ManagedEntityDefinition{ |
| 128 | Name: "AniG", |
| 129 | ClassID: 263, |
| 130 | MessageTypes: mapset.NewSetWith( |
| 131 | Get, |
| 132 | Set, |
| 133 | Test, |
| 134 | ), |
| 135 | AllowedAttributeMask: 0xffff, |
| 136 | AttributeDefinitions: AttributeDefinitionMap{ |
| 137 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 138 | 1: ByteField("SrIndication", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 139 | 2: Uint16Field("TotalTcontNumber", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2), |
| 140 | 3: Uint16Field("GemBlockLength", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 141 | 4: ByteField("PiggybackDbaReporting", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 142 | 5: ByteField("Deprecated", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, true, 5), |
| 143 | 6: ByteField("SignalFailThreshold", UnsignedIntegerAttributeType, 0x0400, 5, mapset.NewSetWith(Read, Write), false, false, false, 6), |
| 144 | 7: ByteField("SignalDegradeThreshold", UnsignedIntegerAttributeType, 0x0200, 9, mapset.NewSetWith(Read, Write), false, false, false, 7), |
| 145 | 8: ByteField("Arc", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), true, true, false, 8), |
| 146 | 9: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9), |
| 147 | 10: Uint16Field("OpticalSignalLevel", SignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10), |
| 148 | 11: ByteField("LowerOpticalThreshold", SignedIntegerAttributeType, 0x0020, 255, mapset.NewSetWith(Read, Write), false, true, false, 11), |
| 149 | 12: ByteField("UpperOpticalThreshold", SignedIntegerAttributeType, 0x0010, 255, mapset.NewSetWith(Read, Write), false, true, false, 12), |
| 150 | 13: Uint16Field("OnuResponseTime", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13), |
| 151 | 14: Uint16Field("TransmitOpticalLevel", SignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14), |
| 152 | 15: ByteField("LowerTransmitPowerThreshold", SignedIntegerAttributeType, 0x0002, 129, mapset.NewSetWith(Read, Write), false, true, false, 15), |
| 153 | 16: ByteField("UpperTransmitPowerThreshold", SignedIntegerAttributeType, 0x0001, 129, mapset.NewSetWith(Read, Write), false, true, false, 16), |
| 154 | }, |
| 155 | Access: CreatedByOnu, |
| 156 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 157 | Alarms: AlarmMap{ |
| 158 | 0: "Low received optical power", |
| 159 | 1: "High received optical power", |
| 160 | 2: "SF", |
| 161 | 3: "SD", |
| 162 | 4: "Low transmit optical power", |
| 163 | 5: "High transmit optical power", |
| 164 | 6: "Laser bias current", |
| 165 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 166 | } |
| 167 | } |
| 168 | |
| 169 | // NewAniG (class ID 263) creates the basic |
| 170 | // Managed Entity definition that is used to validate an ME of this type that |
| 171 | // is received from or transmitted to the OMCC. |
| 172 | func NewAniG(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 173 | return NewManagedEntity(*anigBME, params...) |
| 174 | } |