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 | // ExtendedVlanTaggingOperationConfigurationDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Extended VLAN tagging operation configuration data |
| 30 | const ExtendedVlanTaggingOperationConfigurationDataClassID ClassID = ClassID(171) |
| 31 | |
| 32 | var extendedvlantaggingoperationconfigurationdataBME *ManagedEntityDefinition |
| 33 | |
| 34 | // ExtendedVlanTaggingOperationConfigurationData (class ID #171) |
| 35 | // This ME organizes data associated with VLAN tagging. Regardless of its point of attachment, the |
| 36 | // specified tagging operations refer to the upstream direction. Instances of this ME are created |
| 37 | // and deleted by the OLT. |
| 38 | // |
| 39 | // Relationships |
| 40 | // Zero or one instance of this ME may exist for an instance of any ME that can terminate or modify |
| 41 | // an Ethernet stream.//// When this ME is associated with a UNI-side TP, it performs its upstream classification and |
| 42 | // tagging operations before offering the upstream frame to other filtering, bridging or switching |
| 43 | // functions. In the downstream direction, the defined inverse operation is the last operation |
| 44 | // performed on the frame before offering it to the UNI-side termination.//// When this ME is associated with an ANI-side TP, it performs its upstream classification and |
| 45 | // tagging operations as the last step before transmission to the OLT, after having received the |
| 46 | // upstream frame from other filtering, bridging or switching functions. In the downstream |
| 47 | // direction, the defined inverse operation is the first operation performed on the frame before |
| 48 | // offering it to possible filter, bridge or switch functions. |
| 49 | // |
| 50 | // Attributes |
| 51 | // Managed Entity Id |
| 52 | // Managed entity ID: This attribute provides a unique number for each instance of this ME. (R, |
| 53 | // setbycreate) (mandatory) (2-bytes) |
| 54 | // |
| 55 | // Association Type |
| 56 | // When the extended VLAN tagging ME is associated with the ANI side, it behaves as an upstream |
| 57 | // egress rule, and as a downstream ingress rule when the downstream mode attribute is equal to 0. |
| 58 | // When the extended VLAN tagging ME is associated with the UNI side, the extended VLAN tagging ME |
| 59 | // behaves as an upstream ingress rule, and as a downstream egress rule when the downstream mode |
| 60 | // attribute is equal to 0. |
| 61 | // |
| 62 | // Received Frame Vlan Tagging Operation Table Max Size |
| 63 | // Received frame VLAN tagging operation table max size: This attribute indicates the maximum |
| 64 | // number of entries that can be set in the received frame VLAN tagging operation table. (R) |
| 65 | // (mandatory) (2-bytes) |
| 66 | // |
| 67 | // Input Tpid |
| 68 | // Input TPID: This attribute gives the special TPID value for operations on the input (filtering) |
| 69 | // side of the table. Typical values include 0x88A8 and 0x9100. (R,-W) (mandatory) (2-bytes) |
| 70 | // |
| 71 | // Output Tpid |
| 72 | // Output TPID: This attribute gives the special TPID value for operations on the output (tagging) |
| 73 | // side of the table. Typical values include 0x88A8 and 0x9100. (R,-W) (mandatory) (2-bytes) |
| 74 | // |
| 75 | // Downstream Mode |
| 76 | // All other values are reserved. (R, W) (mandatory) (1 byte) |
| 77 | // |
| 78 | // Received Frame Vlan Tagging Operation Table |
| 79 | // 111 Set TPID-=-output TPID, DEI = 1 |
| 80 | // |
| 81 | // Associated Me Pointer |
| 82 | // NOTE 5 - When the association type is xDSL, the two MSBs may be used to indicate a bearer |
| 83 | // channel. |
| 84 | // |
| 85 | // Dscp To P Bit Mapping |
| 86 | // NOTE 6 - If certain bits in the DSCP field are to be ignored in the mapping process, the |
| 87 | // attribute should be provisioned such that all possible values of those bits produce the same |
| 88 | // P-bit mapping. This can be applied to the case where instead of full DSCP, the operator wishes |
| 89 | // to adopt the priority mechanism based on IP precedence, which needs only the three MSBs of the |
| 90 | // DSCP field. |
| 91 | // |
| 92 | type ExtendedVlanTaggingOperationConfigurationData struct { |
| 93 | ManagedEntityDefinition |
| 94 | Attributes AttributeValueMap |
| 95 | } |
| 96 | |
| 97 | func init() { |
| 98 | extendedvlantaggingoperationconfigurationdataBME = &ManagedEntityDefinition{ |
| 99 | Name: "ExtendedVlanTaggingOperationConfigurationData", |
| 100 | ClassID: 171, |
| 101 | MessageTypes: mapset.NewSetWith( |
| 102 | Create, |
| 103 | Delete, |
| 104 | Get, |
| 105 | GetNext, |
| 106 | Set, |
| 107 | ), |
| 108 | AllowedAttributeMask: 0xff00, |
| 109 | AttributeDefinitions: AttributeDefinitionMap{ |
| 110 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 111 | 1: ByteField("AssociationType", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 112 | 2: Uint16Field("ReceivedFrameVlanTaggingOperationTableMaxSize", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2), |
| 113 | 3: Uint16Field("InputTpid", UnsignedIntegerAttributeType, 0x2000, 34984, mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 114 | 4: Uint16Field("OutputTpid", UnsignedIntegerAttributeType, 0x1000, 34984, mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 115 | 5: ByteField("DownstreamMode", EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5), |
| 116 | 6: TableField("ReceivedFrameVlanTaggingOperationTable", TableAttributeType, 0x0400, TableInfo{nil, 16}, mapset.NewSetWith(Read, Write), false, false, false, 6), |
| 117 | 7: Uint16Field("AssociatedMePointer", PointerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 118 | 8: MultiByteField("DscpToPBitMapping", OctetsAttributeType, 0x0100, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, true, false, 8), |
| 119 | }, |
| 120 | Access: CreatedByOlt, |
| 121 | Support: UnknownSupport, |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | // NewExtendedVlanTaggingOperationConfigurationData (class ID 171) creates the basic |
| 126 | // Managed Entity definition that is used to validate an ME of this type that |
| 127 | // is received from or transmitted to the OMCC. |
| 128 | func NewExtendedVlanTaggingOperationConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 129 | return NewManagedEntity(*extendedvlantaggingoperationconfigurationdataBME, params...) |
| 130 | } |