mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame^] | 4 | * |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [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 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame^] | 8 | * |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame^] | 10 | * |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [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 | */ |
| 17 | /* |
| 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 | // PhysicalPathTerminationPointVideoAniClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Physical path termination point video ANI |
| 30 | const PhysicalPathTerminationPointVideoAniClassID = ClassID(90) // 0x005a |
| 31 | |
| 32 | var physicalpathterminationpointvideoaniBME *ManagedEntityDefinition |
| 33 | |
| 34 | // PhysicalPathTerminationPointVideoAni (Class ID: #90 / 0x005a) |
| 35 | // This ME represents an RF video ANI in the ONU, where physical paths terminate and physical path |
| 36 | // level functions are performed. |
| 37 | // |
| 38 | // The ONU automatically creates an instance of this ME per port as follows. |
| 39 | // |
| 40 | // o When the ONU has video ANI ports built into its factory configuration. |
| 41 | // |
| 42 | // o When a cardholder is provisioned to expect a circuit pack of the video ANI type. |
| 43 | // |
| 44 | // o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the video |
| 45 | // ANI type. Note that the installation of a plug-and-play card may indicate the presence of video |
| 46 | // ANI ports via equipment ID as well as its type, and indeed may cause the ONU to instantiate a |
| 47 | // port-mapping package that specifies video ANI ports. |
| 48 | // |
| 49 | // The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to |
| 50 | // expect a video ANI circuit pack, nor is it equipped with a video ANI circuit pack. |
| 51 | // |
| 52 | // Relationships |
| 53 | // An instance of this ME is associated with each instance of a real or pre-provisioned video ANI |
| 54 | // port. |
| 55 | // |
| 56 | // Attributes |
| 57 | // Managed Entity Id |
| 58 | // This attribute uniquely identifies each instance of this ME. This 2-byte number indicates the |
| 59 | // physical position of the ANI. The first byte is the slot ID (defined in clause 9.1.5). The |
| 60 | // second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes) |
| 61 | // |
| 62 | // Administrative State |
| 63 | // This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative |
| 64 | // state is further described in clause-A.1.6. (R,-W) (mandatory) (1-byte) |
| 65 | // |
| 66 | // Operational State |
| 67 | // This attribute indicates whether the ME is capable of performing its function. Valid values are |
| 68 | // enabled (0) and disabled (1). (R) (optional) (1-byte) |
| 69 | // |
| 70 | // Arc |
| 71 | // See clause A.1.4.3. (R,-W) (optional) (1-byte) |
| 72 | // |
| 73 | // Arc Interval |
| 74 | // See clause A.1.4.3. (R,-W) (optional) (1-byte) |
| 75 | // |
| 76 | // Frequency Range Low |
| 77 | // This attribute indicates the lower of the two possible frequency ranges supported. Different |
| 78 | // frequency ranges are indicated by code points: |
| 79 | // |
| 80 | // 0 No low band |
| 81 | // |
| 82 | // 1 50..550 MHz |
| 83 | // |
| 84 | // 2 50..750 MHz |
| 85 | // |
| 86 | // 3 50..870 MHz |
| 87 | // |
| 88 | // 4..255 Reserved |
| 89 | // |
| 90 | // (R) (mandatory) (1-byte) |
| 91 | // |
| 92 | // Frequency Range High |
| 93 | // This attribute indicates the higher of the two frequency ranges supported. Different frequency |
| 94 | // ranges are indicated by code points: |
| 95 | // |
| 96 | // 0 No high band |
| 97 | // |
| 98 | // 1 550..750 MHz |
| 99 | // |
| 100 | // 2 550..870 MHz |
| 101 | // |
| 102 | // 3 950..2050 MHz |
| 103 | // |
| 104 | // 4 2150..3250 MHz |
| 105 | // |
| 106 | // 5 950..3250 MHz |
| 107 | // |
| 108 | // 6..255 Reserved |
| 109 | // |
| 110 | // (R) (mandatory) (1-byte) |
| 111 | // |
| 112 | // Signal Capability |
| 113 | // 0 No signal level measurement capability |
| 114 | // |
| 115 | // 1 Total optical power level |
| 116 | // |
| 117 | // 2 Fixed frequency pilot tone power level |
| 118 | // |
| 119 | // 3 Total optical power level and fixed frequency pilot tone power level |
| 120 | // |
| 121 | // 4 Variable frequency pilot tone power level |
| 122 | // |
| 123 | // 5 Total optical power level and variable frequency pilot tone power level |
| 124 | // |
| 125 | // 6 Broadband RF power level |
| 126 | // |
| 127 | // 7 Total optical power level and broadband RF power level |
| 128 | // |
| 129 | // 8..255 Reserved |
| 130 | // |
| 131 | // (R) (mandatory) (1-byte) |
| 132 | // |
| 133 | // This attribute indicates the capability of the ONU to measure the video signal level. |
| 134 | // Capabilities are indicated by code points, as follows. |
| 135 | // |
| 136 | // Optical Signal Level |
| 137 | // This attribute is an unsigned integer that returns the current measurement of the total optical |
| 138 | // signal level. The unit of this attribute is decibel-microwatt optical. |
| 139 | // |
| 140 | // o If signal capability-= 0, 2, 4 or 6, this attribute is undefined. |
| 141 | // |
| 142 | // o If signal capability-=1, 3, 5 or 7, this attribute describes the total optical power that is |
| 143 | // generating photocurrent on the receiver. |
| 144 | // |
| 145 | // (R) (optional) (1-byte) |
| 146 | // |
| 147 | // Pilot Signal Level |
| 148 | // This attribute indicates the current measurement of the pilot signal level or broadband RF |
| 149 | // level. The unit of this attribute is decibel-microvolt at the RF video service port. |
| 150 | // |
| 151 | // o If signal capability-= 0 or 1, then this attribute is undefined. |
| 152 | // |
| 153 | // o If signal capability-= 2, 3, 4 or 5, this attribute reports the pilot signal level at the |
| 154 | // output of the video UNI. |
| 155 | // |
| 156 | // o If signal capability-= 6 or 7, this attribute reports the total RF power level at the output |
| 157 | // of the video UNI. |
| 158 | // |
| 159 | // (R) (optional) (1-byte) |
| 160 | // |
| 161 | // Signal Level Min |
| 162 | // This attribute indicates the minimum optical RF power per channel that results in a CNR of |
| 163 | // 47-dBc for a channel of 4.5 MHz bandwidth at a receive optical power of -5-dBm. The unit of this |
| 164 | // attribute is decibel-microwatt optical. (R) (mandatory) (1-byte) |
| 165 | // |
| 166 | // Signal Level Max |
| 167 | // This attribute indicates the maximum optical RF power per channel that results in a CTB of |
| 168 | // -57-dBc for an 80-channel ensemble of carriers at a perchannel optical modulation index (OMI) of |
| 169 | // 3.5%. The unit of this attribute is decibel-microwatt optical. (R) (mandatory) (1-byte) |
| 170 | // |
| 171 | // Pilot Frequency |
| 172 | // This attribute specifies the frequency of the pilot channel receiver. The unit of this attribute |
| 173 | // is hertz. |
| 174 | // |
| 175 | // o If signal capability-= 0, 1, 6 or 7, this attribute is undefined. |
| 176 | // |
| 177 | // o If signal capability-= 2 or 3, this attribute is functionally RO. |
| 178 | // |
| 179 | // o If signal capability-= 4 or 5, this attribute is RW. |
| 180 | // |
| 181 | // (R,-W) (optional) (4-bytes) |
| 182 | // |
| 183 | // Agc Mode |
| 184 | // This attribute allows the discovery and configuration of the ONU's AGC capabilities. The |
| 185 | // attribute contains a code point for several AGC types. The ONU displays the currently used AGC |
| 186 | // mode. The OLT can discover new modes via the set command; the ONU denies attempts to set an |
| 187 | // unsupported mode. The code points are as follows. |
| 188 | // |
| 189 | // 0 No AGC |
| 190 | // |
| 191 | // 1 Broadband RF AGC |
| 192 | // |
| 193 | // 2 Optical AGC |
| 194 | // |
| 195 | // 3..255 Reserved |
| 196 | // |
| 197 | // (R,-W) (optional) (1-byte) |
| 198 | // |
| 199 | // Agc Setting |
| 200 | // This attribute indicates the measurement offset that the ONU should use in AGC. The attribute |
| 201 | // has a step size of 0.1-dB, represented as a signed integer. |
| 202 | // |
| 203 | // The theoretical nominal RF signal is 80 channels of NTSC video, each with a per-channel OMI of |
| 204 | // 3.5%. An ONU presented with such a signal should produce its specified output when this |
| 205 | // attribute is set to zero. |
| 206 | // |
| 207 | // If total optical power is used for AGC, this attribute provides the OMI offset for any NTSC |
| 208 | // carriers present from the theoretical 3.5% value. For example, if the actual signal uses an OMI |
| 209 | // of 7.0% per channel (3-dB higher), then the ONU should be given an AGC setting of 30 (coded |
| 210 | // 0x1E). |
| 211 | // |
| 212 | // If broadband RF power is used for AGC, this attribute provides the total power offset for any |
| 213 | // NTSC carriers present from the theoretical 80-channel value. For example, if an actual signal |
| 214 | // contains 40 NTSC channels (3-dB lower), then the ONU should be given an AGC setting of -30 |
| 215 | // (coded 0xE2). |
| 216 | // |
| 217 | // (R,-W) (optional) (1-byte) |
| 218 | // |
| 219 | // Video Lower Optical Threshold |
| 220 | // This attribute specifies the optical level used to declare the video OOR low alarm. Valid values |
| 221 | // are -12 to +6-dBm in 0.1-dB increments, represented as a 2s complement integer. (Coding -120 to |
| 222 | // +60, where 0x00-= 0-dBm, 0x88-= -12.0 dBm, etc.) Upon ME instantiation, the ONU sets this |
| 223 | // attribute to 0xA1 (-9.5-dBm). (R,-W) (optional) (1-byte) |
| 224 | // |
| 225 | // NOTE - Because the power measurement returned in the optical signal level attribute has a |
| 226 | // resolution of 1-dB, it is possible that the measured value could appear to be in-range, even |
| 227 | // though an out-of-range alarm has been declared against a threshold with 0.1-dB resolution. |
| 228 | // |
| 229 | // Video Upper Optical Threshold |
| 230 | // This attribute specifies the optical level used to declare the video OOR high alarm. Valid |
| 231 | // values are -12 to +6-dBm in 0.1-dB increments, represented as a 2s complement integer. (Coding |
| 232 | // -120 to +60, 0x00-= 0-dBm, 0x88-= -12.0-dBm, etc.) Upon ME instantiation, the ONU sets this |
| 233 | // attribute to 0x19 (+2.5-dBm). (R,-W) (optional) (1-byte) |
| 234 | // |
| 235 | type PhysicalPathTerminationPointVideoAni struct { |
| 236 | ManagedEntityDefinition |
| 237 | Attributes AttributeValueMap |
| 238 | } |
| 239 | |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame^] | 240 | // Attribute name constants |
| 241 | |
| 242 | const PhysicalPathTerminationPointVideoAni_AdministrativeState = "AdministrativeState" |
| 243 | const PhysicalPathTerminationPointVideoAni_OperationalState = "OperationalState" |
| 244 | const PhysicalPathTerminationPointVideoAni_Arc = "Arc" |
| 245 | const PhysicalPathTerminationPointVideoAni_ArcInterval = "ArcInterval" |
| 246 | const PhysicalPathTerminationPointVideoAni_FrequencyRangeLow = "FrequencyRangeLow" |
| 247 | const PhysicalPathTerminationPointVideoAni_FrequencyRangeHigh = "FrequencyRangeHigh" |
| 248 | const PhysicalPathTerminationPointVideoAni_SignalCapability = "SignalCapability" |
| 249 | const PhysicalPathTerminationPointVideoAni_OpticalSignalLevel = "OpticalSignalLevel" |
| 250 | const PhysicalPathTerminationPointVideoAni_PilotSignalLevel = "PilotSignalLevel" |
| 251 | const PhysicalPathTerminationPointVideoAni_SignalLevelMin = "SignalLevelMin" |
| 252 | const PhysicalPathTerminationPointVideoAni_SignalLevelMax = "SignalLevelMax" |
| 253 | const PhysicalPathTerminationPointVideoAni_PilotFrequency = "PilotFrequency" |
| 254 | const PhysicalPathTerminationPointVideoAni_AgcMode = "AgcMode" |
| 255 | const PhysicalPathTerminationPointVideoAni_AgcSetting = "AgcSetting" |
| 256 | const PhysicalPathTerminationPointVideoAni_VideoLowerOpticalThreshold = "VideoLowerOpticalThreshold" |
| 257 | const PhysicalPathTerminationPointVideoAni_VideoUpperOpticalThreshold = "VideoUpperOpticalThreshold" |
| 258 | |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 259 | func init() { |
| 260 | physicalpathterminationpointvideoaniBME = &ManagedEntityDefinition{ |
| 261 | Name: "PhysicalPathTerminationPointVideoAni", |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame^] | 262 | ClassID: PhysicalPathTerminationPointVideoAniClassID, |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 263 | MessageTypes: mapset.NewSetWith( |
| 264 | Get, |
| 265 | Set, |
| 266 | ), |
| 267 | AllowedAttributeMask: 0xffff, |
| 268 | AttributeDefinitions: AttributeDefinitionMap{ |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame^] | 269 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 270 | 1: ByteField(PhysicalPathTerminationPointVideoAni_AdministrativeState, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 271 | 2: ByteField(PhysicalPathTerminationPointVideoAni_OperationalState, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2), |
| 272 | 3: ByteField(PhysicalPathTerminationPointVideoAni_Arc, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3), |
| 273 | 4: ByteField(PhysicalPathTerminationPointVideoAni_ArcInterval, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4), |
| 274 | 5: ByteField(PhysicalPathTerminationPointVideoAni_FrequencyRangeLow, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 275 | 6: ByteField(PhysicalPathTerminationPointVideoAni_FrequencyRangeHigh, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 276 | 7: ByteField(PhysicalPathTerminationPointVideoAni_SignalCapability, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 277 | 8: ByteField(PhysicalPathTerminationPointVideoAni_OpticalSignalLevel, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8), |
| 278 | 9: ByteField(PhysicalPathTerminationPointVideoAni_PilotSignalLevel, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9), |
| 279 | 10: ByteField(PhysicalPathTerminationPointVideoAni_SignalLevelMin, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 280 | 11: ByteField(PhysicalPathTerminationPointVideoAni_SignalLevelMax, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
| 281 | 12: Uint32Field(PhysicalPathTerminationPointVideoAni_PilotFrequency, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12), |
| 282 | 13: ByteField(PhysicalPathTerminationPointVideoAni_AgcMode, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13), |
| 283 | 14: ByteField(PhysicalPathTerminationPointVideoAni_AgcSetting, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14), |
| 284 | 15: ByteField(PhysicalPathTerminationPointVideoAni_VideoLowerOpticalThreshold, UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15), |
| 285 | 16: ByteField(PhysicalPathTerminationPointVideoAni_VideoUpperOpticalThreshold, UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, Write), false, true, false, 16), |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 286 | }, |
| 287 | Access: CreatedByOnu, |
| 288 | Support: UnknownSupport, |
| 289 | Alarms: AlarmMap{ |
| 290 | 0: "Video LOS", |
| 291 | 1: "Video OOR low", |
| 292 | 2: "Video OOR high", |
| 293 | }, |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | // NewPhysicalPathTerminationPointVideoAni (class ID 90) creates the basic |
| 298 | // Managed Entity definition that is used to validate an ME of this type that |
| 299 | // is received from or transmitted to the OMCC. |
| 300 | func NewPhysicalPathTerminationPointVideoAni(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 301 | return NewManagedEntity(*physicalpathterminationpointvideoaniBME, params...) |
| 302 | } |