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 | // ReAniGClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity RE ANI-G |
| 30 | const ReAniGClassID ClassID = ClassID(313) |
| 31 | |
| 32 | var reanigBME *ManagedEntityDefinition |
| 33 | |
| 34 | // ReAniG (class ID #313) |
| 35 | // This ME organizes data associated with each R'/S' physical interface of an RE if the RE supports |
| 36 | // OEO regeneration in either direction. The management ONU automatically creates one instance of |
| 37 | // this ME for each R'/S' physical port (uni- or bidirectional) as follows. |
| 38 | // |
| 39 | // o When the RE has mid-span PON RE ANI interface ports built into its factory configuration. |
| 40 | // |
| 41 | // o When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE ANI type. |
| 42 | // |
| 43 | // o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the midspan |
| 44 | // PON RE ANI type. Note that the installation of a plug-and-play card may indicate the presence of |
| 45 | // a mid-span PON RE ANI port via equipment ID as well as its type attribute, and indeed may cause |
| 46 | // the management ONU to instantiate a port-mapping package to specify the ports precisely. |
| 47 | // |
| 48 | // The management ONU automatically deletes instances of this ME when a cardholder is neither |
| 49 | // provisioned to expect a mid-span PON RE ANI circuit pack, nor is it equipped with a mid-span PON |
| 50 | // RE ANI circuit pack. |
| 51 | // |
| 52 | // As illustrated in Figure 8.2.10-4, an RE ANI-G may share the physical port with an RE downstream |
| 53 | // amplifier. The ONU declares a shared configuration through the port-mapping package combined |
| 54 | // port table, whose structure defines one ME as the master. It is recommended that the RE ANI-G be |
| 55 | // the master, with the RE downstream amplifier as a secondary ME. |
| 56 | // |
| 57 | // The administrative state, operational state and ARC attributes of the master ME override similar |
| 58 | // attributes in secondary MEs associated with the same port. In the secondary ME, these attributes |
| 59 | // are present, but cause no action when written and have undefined values when read. The RE |
| 60 | // downstream amplifier should use its provisionable downstream alarm thresholds and should declare |
| 61 | // downstream alarms as necessary; other isomorphic alarms should be declared by the RE ANI-G. The |
| 62 | // test action should be addressed to the master ME. |
| 63 | // |
| 64 | // Relationships |
| 65 | // An instance of this ME is associated with each R'/S' physical interface of an RE that includes |
| 66 | // OEO regeneration in either direction, and with one or more instances of the PPTP RE UNI. It may |
| 67 | // also be associated with an RE downstream amplifier. |
| 68 | // |
| 69 | // Attributes |
| 70 | // Managed Entity Id |
| 71 | // NOTE 1 - This ME ID may be identical to that of an RE downstream amplifier if it shares the same |
| 72 | // physical slot and port. |
| 73 | // |
| 74 | // Administrative State |
| 75 | // NOTE 2 - When an RE supports multiple PONs, or protected access to a single PON, its primary |
| 76 | // ANI-G cannot be completely shut down, due to a loss of the management communications capability. |
| 77 | // Complete blocking of service and removal of power may nevertheless be appropriate for secondary |
| 78 | // RE ANI-Gs. Administrative lock suppresses alarms and notifications for an RE ANI-G, be it either |
| 79 | // primary or secondary. |
| 80 | // |
| 81 | // Operational State |
| 82 | // Operational state: This attribute indicates whether the ME is capable of performing its |
| 83 | // function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte) |
| 84 | // |
| 85 | // Arc |
| 86 | // ARC: See clause A.1.4.3. (R,-W) (optional) (1-byte) |
| 87 | // |
| 88 | // Arc Interval |
| 89 | // ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte) |
| 90 | // |
| 91 | // Optical Signal Level |
| 92 | // Optical signal level: This attribute reports the current measurement of total downstream optical |
| 93 | // power. Its value is a 2s complement integer referred to 1-mW (i.e., dBm), with 0.002-dB |
| 94 | // granularity. (R) (optional) (2-bytes) |
| 95 | // |
| 96 | // Lower Optical Threshold |
| 97 | // Lower optical threshold: This attribute specifies the optical level that the RE uses to declare |
| 98 | // the downstream low received optical power alarm. Valid values are -127-dBm (coded as 254) to |
| 99 | // 0-dBm (coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal |
| 100 | // policy. (R,-W) (optional) (1-byte) |
| 101 | // |
| 102 | // Upper Optical Threshold |
| 103 | // Upper optical threshold: This attribute specifies the optical level that the RE uses to declare |
| 104 | // the downstream high received optical power alarm. Valid values are -127-dBm (coded as 254) to |
| 105 | // 0-dBm (coded as 0) in 0.5 dB increments. The default value 0xFF selects the RE's internal |
| 106 | // policy. (R,-W) (optional) (1-byte) |
| 107 | // |
| 108 | // Transmit Optical Level |
| 109 | // Transmit optical level: This attribute reports the current measurement of mean optical launch |
| 110 | // power. Its value is a 2s complement integer referred to 1-mW (i.e., dBm), with 0.002-dB |
| 111 | // granularity. (R) (optional) (2-bytes) |
| 112 | // |
| 113 | // Lower Transmit Power Threshold |
| 114 | // Lower transmit power threshold: This attribute specifies the minimum mean optical launch power |
| 115 | // that the RE uses to declare the low transmit optical power alarm. Its value is a 2s-complement |
| 116 | // integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects |
| 117 | // the RE's internal policy. (R,-W) (optional) (1-byte) |
| 118 | // |
| 119 | // Upper Transmit Power Threshold |
| 120 | // Upper transmit power threshold: This attribute specifies the maximum mean optical launch power |
| 121 | // that the RE uses to declare the high transmit optical power alarm. Its value is a 2s-complement |
| 122 | // integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects |
| 123 | // the RE's internal policy. (R,-W) (optional) (1-byte) |
| 124 | // |
| 125 | // Usage Mode |
| 126 | // 3 This R'/S' interface is used as the uplink for both the embedded management ONU and one or |
| 127 | // more PPTP RE UNI(s) (in a time division fashion). |
| 128 | // |
| 129 | // Target Upstream Frequency |
| 130 | // Target upstream frequency: This attribute specifies the frequency of the converted upstream |
| 131 | // signal on the optical trunk line (OTL), in gigahertz. The converted frequency must conform to |
| 132 | // the frequency plan specified in [ITUT G.984.6]. The value 0 means that the upstream signal |
| 133 | // frequency remains the same as the original frequency; no frequency conversion is done. If the RE |
| 134 | // does not support provisionable upstream frequency (wavelength), this attribute should take the |
| 135 | // fixed value representing the RE's capability and the RE should deny attempts to set the value of |
| 136 | // the attribute. If the RE does support provisionable upstream frequency conversion, the default |
| 137 | // value of this attribute is 0. (R, W) (optional) (4 bytes). |
| 138 | // |
| 139 | // Target Downstream Frequency |
| 140 | // Target downstream frequency: This attribute specifies the frequency of the downstream signal |
| 141 | // received by the RE on the OTL, in gigahertz. The incoming frequency must conform to the |
| 142 | // frequency plan specified in [ITUT G.984.6]. The default value 0 means that the downstream |
| 143 | // frequency remains the same as its original frequency; no frequency conversion is done. If the RE |
| 144 | // does not support provisionable downstream frequency selectivity, this attribute should take the |
| 145 | // fixed value representing the RE's capability, and the RE should deny attempts to set the value |
| 146 | // of the attribute. If the RE does support provisionable downstream frequency selectivity, the |
| 147 | // default value of this attribute is 0. (R, W) (optional) (4 bytes). |
| 148 | // |
| 149 | // Upstream Signal Transmission Mode |
| 150 | // Upstream signal transmission mode: When true, this Boolean attribute enables conversion from |
| 151 | // burst mode to continuous mode. The default value false specifies burst mode upstream |
| 152 | // transmission. If the RE does not have the ability to convert from burst to continuous mode |
| 153 | // transmission, it should deny attempts to set this attribute to true. (R, W) (optional) (1 byte) |
| 154 | // |
| 155 | type ReAniG struct { |
| 156 | ManagedEntityDefinition |
| 157 | Attributes AttributeValueMap |
| 158 | } |
| 159 | |
| 160 | func init() { |
| 161 | reanigBME = &ManagedEntityDefinition{ |
| 162 | Name: "ReAniG", |
| 163 | ClassID: 313, |
| 164 | MessageTypes: mapset.NewSetWith( |
| 165 | Get, |
| 166 | Set, |
| 167 | ), |
| 168 | AllowedAttributeMask: 0xfffc, |
| 169 | AttributeDefinitions: AttributeDefinitionMap{ |
| 170 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 171 | 1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 172 | 2: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2), |
| 173 | 3: ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3), |
| 174 | 4: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4), |
| 175 | 5: Uint16Field("OpticalSignalLevel", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5), |
| 176 | 6: ByteField("LowerOpticalThreshold", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6), |
| 177 | 7: ByteField("UpperOpticalThreshold", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7), |
| 178 | 8: Uint16Field("TransmitOpticalLevel", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8), |
| 179 | 9: ByteField("LowerTransmitPowerThreshold", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9), |
| 180 | 10: ByteField("UpperTransmitPowerThreshold", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10), |
| 181 | 11: ByteField("UsageMode", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11), |
| 182 | 12: Uint32Field("TargetUpstreamFrequency", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12), |
| 183 | 13: Uint32Field("TargetDownstreamFrequency", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13), |
| 184 | 14: ByteField("UpstreamSignalTransmissionMode", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14), |
| 185 | }, |
| 186 | Access: CreatedByOnu, |
| 187 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame^] | 188 | Alarms: AlarmMap{ |
| 189 | 0: "Low received optical power", |
| 190 | 1: "High received optical power", |
| 191 | 2: "Low transmit optical power", |
| 192 | 3: "High transmit optical power", |
| 193 | 4: "High laser bias current", |
| 194 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 195 | } |
| 196 | } |
| 197 | |
| 198 | // NewReAniG (class ID 313) creates the basic |
| 199 | // Managed Entity definition that is used to validate an ME of this type that |
| 200 | // is received from or transmitted to the OMCC. |
| 201 | func NewReAniG(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 202 | return NewManagedEntity(*reanigBME, params...) |
| 203 | } |