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