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 | */ |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [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 | // ReUpstreamAmplifierClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity RE upstream amplifier |
| 30 | const ReUpstreamAmplifierClassID ClassID = ClassID(315) |
| 31 | |
| 32 | var reupstreamamplifierBME *ManagedEntityDefinition |
| 33 | |
| 34 | // ReUpstreamAmplifier (class ID #315) |
| 35 | // This ME organizes data associated with each upstream RE optical amplifier (OA) supported by the |
| 36 | // RE. The management ONU automatically creates one instance of this ME for each upstream OA as |
| 37 | // follows. |
| 38 | // |
| 39 | // o When the RE has mid-span PON RE upstream OA 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 upstream OA |
| 42 | // type. |
| 43 | // |
| 44 | // o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the mid- |
| 45 | // span PON RE upstream OA type. Note that the installation of a plug-and-play card may indicate |
| 46 | // the presence of a mid-span PON RE upstream OA via equipment ID as well as its type attribute, |
| 47 | // and indeed may cause the management ONU to instantiate a port-mapping package to specify the |
| 48 | // ports precisely. |
| 49 | // |
| 50 | // The management ONU automatically deletes instances of this ME when a cardholder is neither |
| 51 | // provisioned to expect a mid-span PON RE upstream OA circuit pack, nor is it equipped with a mid- |
| 52 | // span PON RE upstream OA circuit pack. |
| 53 | // |
| 54 | // Relationships |
| 55 | // An instance of this ME is associated with an upstream OA, and with an instance of a circuit |
| 56 | // pack. If the RE includes OEO regeneration in either direction, the RE upstream amplifier is also |
| 57 | // associated with a PPTP RE UNI. Refer to clause-9.14.2 for further discussion. |
| 58 | // |
| 59 | // Attributes |
| 60 | // Managed Entity Id |
| 61 | // NOTE 1 - This ME ID may be identical to that of a PPTP RE UNI if it shares the same physical |
| 62 | // slot and port. |
| 63 | // |
| 64 | // Administrative State |
| 65 | // NOTE 2 - Administrative lock of an RE upstream amplifier results in LOS from any downstream |
| 66 | // ONUs. |
| 67 | // |
| 68 | // Operational State |
| 69 | // Operational state: This attribute indicates whether the ME is capable of performing its |
| 70 | // function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte) |
| 71 | // |
| 72 | // Operational Mode |
| 73 | // (R,-W) (mandatory) (1-byte) |
| 74 | // |
| 75 | // Arc |
| 76 | // ARC: See clause A.1.4.3. (R,-W) (optional) (1-byte) |
| 77 | // |
| 78 | // Arc Interval |
| 79 | // ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte) |
| 80 | // |
| 81 | // Re Downstream Amplifier Pointer |
| 82 | // RE downstream amplifier pointer: This attribute points to an RE downstream amplifier instance. |
| 83 | // The default value is 0xFFFF, a null pointer. (R,-W) (mandatory) (2-bytes) |
| 84 | // |
| 85 | // Total Optical Receive Signal Level Table |
| 86 | // Total optical receive signal level table: This table attribute reports a series of measurements |
| 87 | // of time-averaged input upstream optical signal power. The measurement circuit should have a |
| 88 | // temporal response similar to a simple 1 pole low pass filter, with an effective time constant on |
| 89 | // the order of a GTC frame time. Each table entry has a 2-byte frame counter field (most |
| 90 | // significant end), and a 2-byte power measurement field. The frame counter field contains the |
| 91 | // least significant 16-bits of the superframe counter received closest to the time of the |
| 92 | // measurement. The power measurement field is a 2s-complement integer referred to 1-mW (i.e., |
| 93 | // dBm), with 0.002-dB granularity. The RE equipment should add entries to this table as frequently |
| 94 | // as is reasonable. The RE should clear the table once it is read by the OLT. (R) (optional) (4-* |
| 95 | // N-bytes, where N is the number of measurements present.) |
| 96 | // |
| 97 | // Per Burst Receive Signal Level Table |
| 98 | // Per burst receive signal level table: This table attribute reports the most recent measurement |
| 99 | // of received burst upstream optical signal power. Each table entry has a 2-byte ONU-ID field |
| 100 | // (most significant end), and a 2-byte power measurement field. The power measurement field is a |
| 101 | // 2s-complement integer referred to 1-mW (i.e.,-dBm), with 0.002-dB granularity. (R) (optional) |
| 102 | // (4-* N-bytes, where N is the number of distinct ONUs connected to the S'/R' interface.) |
| 103 | // |
| 104 | // Lower Receive Optical Threshold |
| 105 | // Lower receive optical threshold: This attribute specifies the optical level that the RE uses to |
| 106 | // declare the low received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm |
| 107 | // (coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal policy. |
| 108 | // (R,-W) (optional) (1-byte) |
| 109 | // |
| 110 | // Upper Receive Optical Threshold |
| 111 | // Upper receive optical threshold: This attribute specifies the optical level that the RE uses to |
| 112 | // declare the high received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm |
| 113 | // (coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal policy. |
| 114 | // (R,-W) (optional) (1-byte) |
| 115 | // |
| 116 | // Transmit Optical Signal Level |
| 117 | // Transmit optical signal level: This attribute reports the current measurement of the mean |
| 118 | // optical launch power of the upstream OA. Its value is a 2s-complement integer referred to 1-mW |
| 119 | // (i.e., dBm), with 0.002-dB granularity. (R) (optional) (2-bytes) |
| 120 | // |
| 121 | // Lower Transmit Optical Threshold |
| 122 | // Lower transmit optical threshold: This attribute specifies the minimum mean optical launch power |
| 123 | // that the RE uses to declare the low transmit optical power alarm. Its value is a 2s-complement |
| 124 | // integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects |
| 125 | // the RE's internal policy. (R,-W) (optional) (1-byte) |
| 126 | // |
| 127 | // Upper Transmit Optical Threshold |
| 128 | // Upper transmit optical threshold: This attribute specifies the maximum mean optical launch power |
| 129 | // that the RE uses to declare the high transmit optical power alarm. Its value is a 2s complement |
| 130 | // integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects |
| 131 | // the RE's internal policy. (R,-W) (optional) (1-byte) |
| 132 | // |
| 133 | type ReUpstreamAmplifier struct { |
| 134 | ManagedEntityDefinition |
| 135 | Attributes AttributeValueMap |
| 136 | } |
| 137 | |
| 138 | func init() { |
| 139 | reupstreamamplifierBME = &ManagedEntityDefinition{ |
| 140 | Name: "ReUpstreamAmplifier", |
| 141 | ClassID: 315, |
| 142 | MessageTypes: mapset.NewSetWith( |
| 143 | Get, |
| 144 | GetNext, |
| 145 | Set, |
| 146 | ), |
| 147 | AllowedAttributeMask: 0xfff8, |
| 148 | AttributeDefinitions: AttributeDefinitionMap{ |
| 149 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 150 | 1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 151 | 2: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2), |
| 152 | 3: ByteField("OperationalMode", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 153 | 4: ByteField("Arc", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), true, true, false, 4), |
| 154 | 5: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5), |
| 155 | 6: Uint16Field("ReDownstreamAmplifierPointer", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6), |
| 156 | 7: TableField("TotalOpticalReceiveSignalLevelTable", TableAttributeType, 0x0200, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 7), |
| 157 | 8: TableField("PerBurstReceiveSignalLevelTable", TableAttributeType, 0x0100, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 8), |
| 158 | 9: ByteField("LowerReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9), |
| 159 | 10: ByteField("UpperReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10), |
| 160 | 11: Uint16Field("TransmitOpticalSignalLevel", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11), |
| 161 | 12: ByteField("LowerTransmitOpticalThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12), |
| 162 | 13: ByteField("UpperTransmitOpticalThreshold", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13), |
| 163 | }, |
| 164 | Access: CreatedByOnu, |
| 165 | Support: UnknownSupport, |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | // NewReUpstreamAmplifier (class ID 315) 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 NewReUpstreamAmplifier(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 173 | return NewManagedEntity(*reupstreamamplifierBME, params...) |
| 174 | } |