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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 8 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [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 | */ |
David K. Bainbridge | adf422d | 2021-04-09 16:06:41 +0000 | [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 | // PseudowireMaintenanceProfileClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Pseudowire maintenance profile |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const PseudowireMaintenanceProfileClassID = ClassID(284) // 0x011c |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var pseudowiremaintenanceprofileBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // PseudowireMaintenanceProfile (Class ID: #284 / 0x011c) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // The pseudowire maintenance profile permits the configuration of pseudowire service exception |
| 36 | // handling. It is created and deleted by the OLT. |
| 37 | // |
| 38 | // The settings, and indeed existence, of a pseudowire maintenance profile affect the behaviour of |
| 39 | // the pseudowire PM history data ME only in establishing criteria for counting SESs, but in no |
| 40 | // other way. The pseudowire maintenance profile primarily affects the alarms declared by the |
| 41 | // subscribing pseudowire TP. |
| 42 | // |
| 43 | // Relationships |
| 44 | // One or more instances of the pseudowire TP may point to an instance of the pseudowire |
| 45 | // maintenance profile. If the pseudowire TP does not refer to a pseudowire maintenance profile, |
| 46 | // the ONU's default exception handling is implied. |
| 47 | // |
| 48 | // Attributes |
| 49 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 50 | // This attribute uniquely identifies each instance of this ME. The value 0 is reserved. (R, |
| 51 | // setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 52 | // |
| 53 | // Jitter Buffer Maximum Depth |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 54 | // This attribute specifies the desired maximum depth of the playout buffer in the PSN to the TDM |
| 55 | // direction. The value is expressed as a multiple of the 125-vs frame rate. The default value 0 |
| 56 | // selects the ONU's internal policy. (R,-W, setbycreate) (optional) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 57 | // |
| 58 | // Jitter Buffer Desired Depth |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 59 | // This attribute specifies the desired nominal fill depth of the playout buffer in the PSN to the |
| 60 | // TDM direction. The value is expressed as a multiple of the 125-vs frame rate. The default value |
| 61 | // 0 selects the ONU's internal policy. (R,-W, setbycreate) (optional) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 62 | // |
| 63 | // Fill Policy |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 64 | // This attribute defines the payload bit pattern to be applied towards the TDM service if no |
| 65 | // payload packet is available to play out. The default value 0 specifies that the ONU apply its |
| 66 | // internal policy. |
| 67 | // |
| 68 | // 0 ONU default, vendor-specific (recommended: AIS for unstructured service, all 1s for structured |
| 69 | // service) |
| 70 | // |
| 71 | // 1 Play out AIS according to the service definition (for example, DS3 AIS) |
| 72 | // |
| 73 | // 2 Play out all 1s |
| 74 | // |
| 75 | // 3 Play out all 0s |
| 76 | // |
| 77 | // 4 Repeat the previous data |
| 78 | // |
| 79 | // 5 Play out DS1 idle (Appendix C of [b-ATIS-0600403]) |
| 80 | // |
| 81 | // 6..15 Reserved for future standardization |
| 82 | // |
| 83 | // 16..255 Vendor-specific, not to be standardized |
| 84 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 85 | // (R,-W, setbycreate) (optional) (1-byte) |
| 86 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 87 | // Four pairs of alarm-related policy attributes, defined in the following, share common behaviour. |
| 88 | // |
| 89 | // The alarm declaration policy attribute defines the anomaly rate that causes the corresponding |
| 90 | // alarm to be declared. It is an integer percentage between 1..100. If this density of anomalies |
| 91 | // occurs during the alarm onset soak interval, the alarm is declared. The default value 0 selects |
| 92 | // the ONU's internal policy. |
| 93 | // |
| 94 | // The alarm clear policy attribute defines the anomaly rate that causes the corresponding alarm to |
| 95 | // be cleared. It is an integer percentage between 0..99. If no more than this density of anomalies |
| 96 | // occurs during the alarm clear soak interval, the alarm is cleared. The default value 255 selects |
| 97 | // the ONU's internal policy. |
| 98 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 99 | // Misconnected Packets Declaration Policy |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 100 | // (R,-W, setbycreate) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 101 | // |
| 102 | // Misconnected Packets Clear Policy |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 103 | // (R,-W, setbycreate) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 104 | // |
| 105 | // Loss Of Packets Declaration Policy |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 106 | // (R,-W, setbycreate) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 107 | // |
| 108 | // Loss Of Packets Clear Policy |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 109 | // (R,-W, setbycreate) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 110 | // |
| 111 | // Buffer Overrun_Underrun Declaration Policy |
| 112 | // Buffer overrun/underrun declaration policy: (R,-W, setbycreate) (optional) (1-byte) |
| 113 | // |
| 114 | // Buffer Overrun_Underrun Clear Policy |
| 115 | // Buffer overrun/underrun clear policy: (R,-W, setbycreate) (optional) (1-byte) |
| 116 | // |
| 117 | // Malformed Packets Declaration Policy |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 118 | // (R,-W, setbycreate) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 119 | // |
| 120 | // Malformed Packets Clear Policy |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 121 | // (R,-W, setbycreate) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 122 | // |
| 123 | // R_Bit Transmit Set Policy |
| 124 | // R-bit transmit set policy: This attribute defines the number of consecutive lost packets that |
| 125 | // causes the transmitted R bit to be set in the TDM to the PSN direction, indicating lost packets |
| 126 | // to the far end. The default value 0 selects the ONU's internal policy. (R,-W, setbycreate) |
| 127 | // (optional) (1-byte) |
| 128 | // |
| 129 | // R_Bit Transmit Clear Policy |
| 130 | // R-bit transmit clear policy: This attribute defines the number of consecutive valid packets that |
| 131 | // causes the transmitted R bit to be cleared in the TDM to the PSN direction, removing the remote |
| 132 | // failure indication to the far end. The default value 0 selects the ONU's internal policy. (R,-W, |
| 133 | // setbycreate) (optional) (1-byte) |
| 134 | // |
| 135 | // R_Bit Receive Policy |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 136 | // R-bit receive policy: This attribute defines the action towards the N-*-64 TDM interface when |
| 137 | // remote failure is indicated on packets received from the PSN (either Rbit set or M-=-0b10 while |
| 138 | // the L bit is cleared). |
| 139 | // |
| 140 | // 0 Do nothing (recommended to be the default) |
| 141 | // |
| 142 | // 1 Play out service-specific RAI/REI/RDI code |
| 143 | // |
| 144 | // 2 Send channel idle signalling and idle channel payload to all DS0s comprising the service |
| 145 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 146 | // (R,-W, setbycreate) (optional) (1-byte) |
| 147 | // |
| 148 | // L Bit Receive Policy |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 149 | // This attribute defines the action towards the TDM interface when farend TDM failure is indicated |
| 150 | // on packets received from the PSN (L bit set). |
| 151 | // |
| 152 | // 0 Play out service-specific AIS (recommended to be the default) |
| 153 | // |
| 154 | // 1 Repeat last received packet |
| 155 | // |
| 156 | // 2 Send channel idle signalling and idle channel payload to all DS0s comprising the service |
| 157 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 158 | // (R,-W, setbycreate) (optional) (1-byte) |
| 159 | // |
| 160 | // Ses Threshold |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 161 | // Number of lost, malformed or otherwise unusable packets expected in the PSN to the TDM direction |
| 162 | // within a 1-s interval that causes an SES to be counted. Stray packets do not count towards an |
| 163 | // SES, nor do packets whose L bit is set at the far end. The value 0 specifies that the ONU uses |
| 164 | // its internal default, which is not necessarily the same as the recommended default value 3. (R, |
| 165 | // W, set-by-create) (optional) (2 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 166 | // |
| 167 | type PseudowireMaintenanceProfile struct { |
| 168 | ManagedEntityDefinition |
| 169 | Attributes AttributeValueMap |
| 170 | } |
| 171 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 172 | // Attribute name constants |
| 173 | |
| 174 | const PseudowireMaintenanceProfile_JitterBufferMaximumDepth = "JitterBufferMaximumDepth" |
| 175 | const PseudowireMaintenanceProfile_JitterBufferDesiredDepth = "JitterBufferDesiredDepth" |
| 176 | const PseudowireMaintenanceProfile_FillPolicy = "FillPolicy" |
| 177 | const PseudowireMaintenanceProfile_MisconnectedPacketsDeclarationPolicy = "MisconnectedPacketsDeclarationPolicy" |
| 178 | const PseudowireMaintenanceProfile_MisconnectedPacketsClearPolicy = "MisconnectedPacketsClearPolicy" |
| 179 | const PseudowireMaintenanceProfile_LossOfPacketsDeclarationPolicy = "LossOfPacketsDeclarationPolicy" |
| 180 | const PseudowireMaintenanceProfile_LossOfPacketsClearPolicy = "LossOfPacketsClearPolicy" |
| 181 | const PseudowireMaintenanceProfile_BufferOverrunUnderrunDeclarationPolicy = "BufferOverrunUnderrunDeclarationPolicy" |
| 182 | const PseudowireMaintenanceProfile_BufferOverrunUnderrunClearPolicy = "BufferOverrunUnderrunClearPolicy" |
| 183 | const PseudowireMaintenanceProfile_MalformedPacketsDeclarationPolicy = "MalformedPacketsDeclarationPolicy" |
| 184 | const PseudowireMaintenanceProfile_MalformedPacketsClearPolicy = "MalformedPacketsClearPolicy" |
| 185 | const PseudowireMaintenanceProfile_RBitTransmitSetPolicy = "RBitTransmitSetPolicy" |
| 186 | const PseudowireMaintenanceProfile_RBitTransmitClearPolicy = "RBitTransmitClearPolicy" |
| 187 | const PseudowireMaintenanceProfile_RBitReceivePolicy = "RBitReceivePolicy" |
| 188 | const PseudowireMaintenanceProfile_LBitReceivePolicy = "LBitReceivePolicy" |
| 189 | const PseudowireMaintenanceProfile_SesThreshold = "SesThreshold" |
| 190 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 191 | func init() { |
| 192 | pseudowiremaintenanceprofileBME = &ManagedEntityDefinition{ |
| 193 | Name: "PseudowireMaintenanceProfile", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 194 | ClassID: PseudowireMaintenanceProfileClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 195 | MessageTypes: mapset.NewSetWith( |
| 196 | Create, |
| 197 | Delete, |
| 198 | Get, |
| 199 | Set, |
| 200 | ), |
| 201 | AllowedAttributeMask: 0xffff, |
| 202 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 203 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 204 | 1: Uint16Field(PseudowireMaintenanceProfile_JitterBufferMaximumDepth, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 1), |
| 205 | 2: Uint16Field(PseudowireMaintenanceProfile_JitterBufferDesiredDepth, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2), |
| 206 | 3: ByteField(PseudowireMaintenanceProfile_FillPolicy, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3), |
| 207 | 4: ByteField(PseudowireMaintenanceProfile_MisconnectedPacketsDeclarationPolicy, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4), |
| 208 | 5: ByteField(PseudowireMaintenanceProfile_MisconnectedPacketsClearPolicy, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5), |
| 209 | 6: ByteField(PseudowireMaintenanceProfile_LossOfPacketsDeclarationPolicy, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6), |
| 210 | 7: ByteField(PseudowireMaintenanceProfile_LossOfPacketsClearPolicy, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7), |
| 211 | 8: ByteField(PseudowireMaintenanceProfile_BufferOverrunUnderrunDeclarationPolicy, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 8), |
| 212 | 9: ByteField(PseudowireMaintenanceProfile_BufferOverrunUnderrunClearPolicy, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9), |
| 213 | 10: ByteField(PseudowireMaintenanceProfile_MalformedPacketsDeclarationPolicy, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10), |
| 214 | 11: ByteField(PseudowireMaintenanceProfile_MalformedPacketsClearPolicy, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 11), |
| 215 | 12: ByteField(PseudowireMaintenanceProfile_RBitTransmitSetPolicy, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 12), |
| 216 | 13: ByteField(PseudowireMaintenanceProfile_RBitTransmitClearPolicy, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13), |
| 217 | 14: ByteField(PseudowireMaintenanceProfile_RBitReceivePolicy, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14), |
| 218 | 15: ByteField(PseudowireMaintenanceProfile_LBitReceivePolicy, UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 15), |
| 219 | 16: Uint16Field(PseudowireMaintenanceProfile_SesThreshold, UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 16), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 220 | }, |
| 221 | Access: CreatedByOlt, |
| 222 | Support: UnknownSupport, |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | // NewPseudowireMaintenanceProfile (class ID 284) creates the basic |
| 227 | // Managed Entity definition that is used to validate an ME of this type that |
| 228 | // is received from or transmitted to the OMCC. |
| 229 | func NewPseudowireMaintenanceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 230 | return NewManagedEntity(*pseudowiremaintenanceprofileBME, params...) |
| 231 | } |