Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * Unless required by applicable law or agreed to in writing, software |
| 9 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | * See the License for the specific language governing permissions and |
| 12 | * limitations under the License. |
| 13 | */ |
| 14 | /* |
| 15 | * NOTE: This file was generated, manual edits will be overwritten! |
| 16 | * |
| 17 | * Generated by 'goCodeGenerator.py': |
| 18 | * https://github.com/cboling/OMCI-parser/README.md |
| 19 | */ |
| 20 | |
| 21 | package generated |
| 22 | |
| 23 | import "github.com/deckarep/golang-set" |
| 24 | |
| 25 | // MplsPseudowireTerminationPointClassID is the 16-bit ID for the OMCI |
| 26 | // Managed entity MPLS pseudowire termination point |
| 27 | const MplsPseudowireTerminationPointClassID ClassID = ClassID(333) |
| 28 | |
| 29 | var mplspseudowireterminationpointBME *ManagedEntityDefinition |
| 30 | |
| 31 | // MplsPseudowireTerminationPoint (class ID #333) |
| 32 | // This ME contains the configuration data of a pseudowire whose underlying transport method is |
| 33 | // MPLS. Instances of this ME are created and deleted by the OLT. |
| 34 | // |
| 35 | // Relationships |
| 36 | // Zero or one instance of this ME is associated with each instance of the pseudowire TP ME. |
| 37 | // |
| 38 | // Attributes |
| 39 | // Managed Entity Id |
| 40 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, |
| 41 | // setbycreate)-(mandatory) (2 bytes) |
| 42 | // |
| 43 | // Tp Type |
| 44 | // (R, W, setbycreate) (mandatory) (1 byte) |
| 45 | // |
| 46 | // Tp Pointer |
| 47 | // TP pointer: This attribute points to the instance of the TP associated with this MPLS PW TP. The |
| 48 | // type of the associated TP is determined by the TP type attribute. (R, W, setbycreate) |
| 49 | // (mandatory) (2 bytes) |
| 50 | // |
| 51 | // Mpls Label Indicator |
| 52 | // (R, W, setbycreate) (mandatory) (1 byte) |
| 53 | // |
| 54 | // Mpls Pw Direction |
| 55 | // (R, W, setbycreate) (mandatory) (1 byte) |
| 56 | // |
| 57 | // Mpls Pw Uplink Label |
| 58 | // MPLS PW uplink label: This attribute specifies the label of the inner MPLS pseudowire upstream. |
| 59 | // The attribute is not meaningful for unidirectional downstream PWs. (R, W, setbycreate) |
| 60 | // (mandatory) (4 bytes) |
| 61 | // |
| 62 | // Mpls Pw Downlink Label |
| 63 | // MPLS PW downlink label: This attribute specifies the label of the inner MPLS pseudowire |
| 64 | // downstream. The attribute is not meaningful for unidirectional upstream PWs. (R, W, setbycreate) |
| 65 | // (mandatory) (4 bytes) |
| 66 | // |
| 67 | // Mpls Pw Tc |
| 68 | // NOTE 1 - The TC field was previously known as EXP. Refer to [bIETF-RFC-5462]. |
| 69 | // |
| 70 | // Mpls Tunnel Direction |
| 71 | // (R, W, setbycreate) (mandatory for double-labelled case) (1 byte) |
| 72 | // |
| 73 | // Mpls Tunnel Uplink Label |
| 74 | // MPLS tunnel uplink label: This attribute specifies the (outer) label for the upstream MPLS |
| 75 | // tunnel. If the MPLS tunnel is downstream only, this attribute should be set to 0. (R, W, |
| 76 | // setbycreate) (mandatory for double-labelled case) (4 bytes) |
| 77 | // |
| 78 | // Mpls Tunnel Downlink Label |
| 79 | // MPLS tunnel downlink label: This attribute specifies the (outer) label for the downstream MPLS |
| 80 | // tunnel. If the MPLS tunnel is upstream only, this attribute should be set to 0. (R, W, |
| 81 | // setbycreate) (mandatory for double-labelled case) (4 bytes) |
| 82 | // |
| 83 | // Mpls Tunnel Tc |
| 84 | // NOTE 2 - The TC field was previously known as EXP. Refer to [bIETF-RFC-5462]. |
| 85 | // |
| 86 | // Pseudowire Type |
| 87 | // (R, W, setbycreate) (mandatory) (2 bytes) |
| 88 | // |
| 89 | // Pseudowire Control Word Preference |
| 90 | // Pseudowire control word preference: When set to true, this Boolean attribute specifies that a |
| 91 | // control word is to be sent with each packet. Some PW types mandate the use of a control word in |
| 92 | // any event. In such cases, the value configured for this attribute has no effect on the presence |
| 93 | // of the control word. (R, W, setbycreate) (optional) (1 byte) |
| 94 | // |
| 95 | // Administrative State |
| 96 | // Administrative state: This attribute locks (1) and unlocks (0) the functions performed by the |
| 97 | // MPLS pseudowire TP. Administrative state is further described in clause-A.1.6. (R,-W) (optional) |
| 98 | // (1-byte) |
| 99 | // |
| 100 | // Operational State |
| 101 | // Operational state: This attribute reports whether the ME is currently capable of performing its |
| 102 | // function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte) |
| 103 | // |
| 104 | type MplsPseudowireTerminationPoint struct { |
| 105 | ManagedEntityDefinition |
| 106 | Attributes AttributeValueMap |
| 107 | } |
| 108 | |
| 109 | func init() { |
| 110 | mplspseudowireterminationpointBME = &ManagedEntityDefinition{ |
| 111 | Name: "MplsPseudowireTerminationPoint", |
| 112 | ClassID: 333, |
| 113 | MessageTypes: mapset.NewSetWith( |
| 114 | Create, |
| 115 | Delete, |
| 116 | Get, |
| 117 | Set, |
| 118 | ), |
| 119 | AllowedAttributeMask: 0xfffe, |
| 120 | AttributeDefinitions: AttributeDefinitionMap{ |
| 121 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 122 | 1: ByteField("TpType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 123 | 2: Uint16Field("TpPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 124 | 3: ByteField("MplsLabelIndicator", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 125 | 4: ByteField("MplsPwDirection", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 126 | 5: Uint32Field("MplsPwUplinkLabel", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5), |
| 127 | 6: Uint32Field("MplsPwDownlinkLabel", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6), |
| 128 | 7: ByteField("MplsPwTc", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 129 | 8: ByteField("MplsTunnelDirection", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8), |
| 130 | 9: Uint32Field("MplsTunnelUplinkLabel", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9), |
| 131 | 10: Uint32Field("MplsTunnelDownlinkLabel", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10), |
| 132 | 11: ByteField("MplsTunnelTc", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11), |
| 133 | 12: Uint16Field("PseudowireType", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12), |
| 134 | 13: ByteField("PseudowireControlWordPreference", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13), |
| 135 | 14: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14), |
| 136 | 15: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), true, true, false, 15), |
| 137 | }, |
| 138 | Access: CreatedByOlt, |
| 139 | Support: UnknownSupport, |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | // NewMplsPseudowireTerminationPoint (class ID 333) creates the basic |
| 144 | // Managed Entity definition that is used to validate an ME of this type that |
| 145 | // is received from or transmitted to the OMCC. |
| 146 | func NewMplsPseudowireTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 147 | return NewManagedEntity(*mplspseudowireterminationpointBME, params...) |
| 148 | } |