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 | */ |
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 | // PseudowireTerminationPointClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Pseudowire termination point |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const PseudowireTerminationPointClassID = ClassID(282) // 0x011a |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var pseudowireterminationpointBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // PseudowireTerminationPoint (Class ID: #282 / 0x011a) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // The pseudowire TP supports packetized (rather than TDM) transport of TDM services, transported |
| 36 | // either directly over Ethernet, over UDP/IP or over MPLS. Instances of this ME are created and |
| 37 | // deleted by the OLT. |
| 38 | // |
| 39 | // Relationships |
| 40 | // One pseudowire TP ME exists for each distinct TDM service that is mapped to a pseudowire. |
| 41 | // |
| 42 | // Attributes |
| 43 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 44 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 45 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 46 | // |
| 47 | // Underlying Transport |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 48 | // 2 MPLS |
| 49 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 50 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 51 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 52 | // Underlying transport: |
| 53 | // |
| 54 | // 0 Ethernet, MEF 8 |
| 55 | // |
| 56 | // 1 UDP/IP |
| 57 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 58 | // Service Type |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 59 | // This attribute specifies the basic service type, either a transparent bit pipe or an |
| 60 | // encapsulation that recognizes the underlying structure of the payload. |
| 61 | // |
| 62 | // 0 Basic unstructured (also known as structure agnostic) |
| 63 | // |
| 64 | // 1 Octet-aligned unstructured, structure agnostic. Applicable only to DS1, a mode in which each |
| 65 | // frame of 193 bits is encapsulated in 25 bytes with 7 padding bits. |
| 66 | // |
| 67 | // 2 Structured (structure-locked) |
| 68 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 69 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 70 | // |
| 71 | // Signalling |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 72 | // 1 CAS, to be carried in the same packet stream as the payload |
| 73 | // |
| 74 | // 2 CAS, to be carried in a separate signalling channel |
| 75 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 76 | // (R,-W, setbycreate) (mandatory for structured service type) (1-byte) |
| 77 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 78 | // 0 No signalling visible at this layer |
| 79 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 80 | // Tdm Uni Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 81 | // If service type-= structured, this attribute points to a logical N-* 64-kbit/s subport CTP. |
| 82 | // Otherwise, this attribute points to a PPTP CES UNI. (R,-W, setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 83 | // |
| 84 | // North_Side Pointer |
| 85 | // North-side pointer: When the pseudowire service is transported via IP, as indicated by the |
| 86 | // underlying transport attribute, the northside pointer attribute points to an instance of the |
| 87 | // TCP/UDP config data ME. When the pseudowire service is transported directly over Ethernet, the |
| 88 | // north-side pointer attribute is not used - the linkage to the Ethernet flow TP is implicit in |
| 89 | // the ME IDs. When the pseudowire service is transported over MPLS, the northside pointer |
| 90 | // attribute points to an instance of the MPLS PW TP. (R, W, setbycreate) (mandatory) (2 bytes) |
| 91 | // |
| 92 | // Far_End Ip Info |
| 93 | // A null pointer is appropriate if the pseudowire is not transported via IP. (R,-W, setbycreate) |
| 94 | // (mandatory for IP transport) (2-bytes) |
| 95 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 96 | // Far-end IP info: When the pseudowire service is transported via IP, this attribute points to a |
| 97 | // large string ME that contains the URI of the far-end TP, e.g., |
| 98 | // |
| 99 | // udp://192.168.100.221:5000 |
| 100 | // |
| 101 | // udp://pwe3srvr.int.example.net:2222 |
| 102 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 103 | // Payload Size |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 104 | // Number of payload bytes per packet. Valid only if service type-= basic unstructured or octet- |
| 105 | // aligned unstructured. Valid choices depend on the TDM service, but must include the following. |
| 106 | // Other choices are at the vendor's discretion. |
| 107 | // |
| 108 | // DS1 192 |
| 109 | // |
| 110 | // DS1 200, required only if an octet-aligned unstructured service is supported |
| 111 | // |
| 112 | // E1 256 |
| 113 | // |
| 114 | // DS3 1024 |
| 115 | // |
| 116 | // E3 1024 |
| 117 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 118 | // (R,-W, setbycreate) (mandatory for unstructured service) (2-bytes) |
| 119 | // |
| 120 | // Payload Encapsulation Delay |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 121 | // Number of 125-us frames to be encapsulated in each pseudowire packet. Valid only if service |
| 122 | // type-= structured. The minimum set of choices for various TDM services is listed in the |
| 123 | // following table, and is affected by the possible presence of in-band signalling. Other choices |
| 124 | // are at the vendor's discretion. |
| 125 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 126 | // (R,-W, setbycreate) (mandatory for structured service) (1-byte) |
| 127 | // |
| 128 | // Timing Mode |
| 129 | // (R,-W) (mandatory) (1-byte) |
| 130 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 131 | // This attribute selects the timing mode of the TDM service. If RTP is used, this attribute must |
| 132 | // be set to be consistent with the value of the RTP timestamp mode attribute in the RTP pseudowire |
| 133 | // parameters ME, or its equivalent, at the far end. |
| 134 | // |
| 135 | // 0 Network timing (default) |
| 136 | // |
| 137 | // 1 Differential timing |
| 138 | // |
| 139 | // 2 Adaptive timing |
| 140 | // |
| 141 | // 3 Loop timing: local TDM transmit clock derived from local TDM receive stream |
| 142 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 143 | // Transmit Circuit Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 144 | // This attribute is a pair of emulated circuit ID (ECID) values that the ONU transmits in the |
| 145 | // direction from the TDM termination towards the packet-switched network (PSN). MEF 8 ECIDs lie in |
| 146 | // the range 1..1048575 (220-- 1). To allow for the possibility of other transport (L2TP) in the |
| 147 | // future, each ECID is allocated 4-bytes. |
| 148 | // |
| 149 | // The first value is used for the payload ECID; the second is used for the optional separate |
| 150 | // signalling ECID. The first ECID is required for all MEF 8 pseudowires; the second is required |
| 151 | // only if signalling is to be carried in a distinct channel. If signalling is not present, or is |
| 152 | // carried in the same channel as the payload, the second ECID should be set to 0. |
| 153 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 154 | // (R,-W) (mandatory for MEF 8 transport) (8-bytes) |
| 155 | // |
| 156 | // Expected Circuit Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 157 | // This attribute is a pair of ECID values that the ONU can expect in the direction from the PSN |
| 158 | // towards the TDM termination. Checking ECIDs may be a way to detect circuit misconnection. MEF 8 |
| 159 | // ECIDs lie in the range 1..1048575 (220-- 1). To allow for the possibility of other transport |
| 160 | // (L2TP) in the future, each ECID is allocated 4-bytes. |
| 161 | // |
| 162 | // The first value is used for the payload ECID; the second is used for the optional separate |
| 163 | // signalling ECID. In both cases, the default value 0 indicates that no ECID checking is expected. |
| 164 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 165 | // (R,-W) (optional for MEF 8 transport) (8-bytes) |
| 166 | // |
| 167 | // Received Circuit Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 168 | // This attribute indicates the actual ECID(s) received on the payload and signalling channels, |
| 169 | // respectively. It may be used for diagnostic purposes. (R) (optional for MEF 8 transport) |
| 170 | // (8-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 171 | // |
| 172 | // Exception Policy |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 173 | // This attribute points to an instance of the pseudowire maintenance profile ME. If the pointer |
| 174 | // has its default value 0, the ONU's internal defaults apply. (R,-W) (optional) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 175 | // |
| 176 | // Arc |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 177 | // See clause A.1.4.3. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 178 | // |
| 179 | // Arc Interval |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 180 | // See clause A.1.4.3. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 181 | // |
| 182 | type PseudowireTerminationPoint struct { |
| 183 | ManagedEntityDefinition |
| 184 | Attributes AttributeValueMap |
| 185 | } |
| 186 | |
| 187 | func init() { |
| 188 | pseudowireterminationpointBME = &ManagedEntityDefinition{ |
| 189 | Name: "PseudowireTerminationPoint", |
| 190 | ClassID: 282, |
| 191 | MessageTypes: mapset.NewSetWith( |
| 192 | Create, |
| 193 | Delete, |
| 194 | Get, |
| 195 | Set, |
| 196 | ), |
| 197 | AllowedAttributeMask: 0xfffe, |
| 198 | AttributeDefinitions: AttributeDefinitionMap{ |
| 199 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 200 | 1: ByteField("UnderlyingTransport", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 201 | 2: ByteField("ServiceType", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 202 | 3: ByteField("Signalling", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 203 | 4: Uint16Field("TdmUniPointer", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 204 | 5: Uint16Field("NorthSidePointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5), |
| 205 | 6: Uint16Field("FarEndIpInfo", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6), |
| 206 | 7: Uint16Field("PayloadSize", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 207 | 8: ByteField("PayloadEncapsulationDelay", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8), |
| 208 | 9: ByteField("TimingMode", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9), |
| 209 | 10: Uint64Field("TransmitCircuitId", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10), |
| 210 | 11: Uint64Field("ExpectedCircuitId", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11), |
| 211 | 12: Uint64Field("ReceivedCircuitId", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12), |
| 212 | 13: Uint16Field("ExceptionPolicy", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13), |
| 213 | 14: ByteField("Arc", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), true, true, false, 14), |
| 214 | 15: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15), |
| 215 | }, |
| 216 | Access: CreatedByOlt, |
| 217 | Support: UnknownSupport, |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | // NewPseudowireTerminationPoint (class ID 282) creates the basic |
| 222 | // Managed Entity definition that is used to validate an ME of this type that |
| 223 | // is received from or transmitted to the OMCC. |
| 224 | func NewPseudowireTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 225 | return NewManagedEntity(*pseudowireterminationpointBME, params...) |
| 226 | } |