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 | // EthernetFlowTerminationPointClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Ethernet flow termination point |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const EthernetFlowTerminationPointClassID = ClassID(286) // 0x011e |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var ethernetflowterminationpointBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // EthernetFlowTerminationPoint (Class ID: #286 / 0x011e) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // The Ethernet flow TP contains the attributes necessary to originate and terminate Ethernet |
| 36 | // frames in the ONU. It is appropriate when transporting pseudowire services via layer-2. |
| 37 | // Instances of this ME are created and deleted by the OLT. |
| 38 | // |
| 39 | // Relationships |
| 40 | // One Ethernet flow TP ME exists for each distinct pseudowire service that is transported via |
| 41 | // layer 2. |
| 42 | // |
| 43 | // Attributes |
| 44 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 45 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 46 | // implicitly linked to a pseudowire TP ME. (R, setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 47 | // |
| 48 | // Destination Mac |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 49 | // This attribute specifies the destination MAC address of upstream Ethernet frames. (R,-W, |
| 50 | // setbycreate) (mandatory) (6-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 51 | // |
| 52 | // Source Mac |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 53 | // This attribute specifies the near-end MAC address. It is established by nonOMCI means (e.g., |
| 54 | // factory programmed into ONU flash memory) and is included here for information only. (R) |
| 55 | // (mandatory) (6-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 56 | // |
| 57 | // Tag Policy |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 58 | // 0 untagged frame |
| 59 | // |
| 60 | // 1 tagged frame |
| 61 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 62 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 63 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 64 | // This attribute specifies the tagging policy to be applied to upstream Ethernet frames. |
| 65 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 66 | // Tci |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 67 | // If the tag policy calls for tagging of upstream Ethernet frames, this attribute specifies the |
| 68 | // tag control information, which includes the VLAN tag, P bits and CFI bit. (R,-W) (optional) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 69 | // (2-bytes) |
| 70 | // |
| 71 | // Loopback |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 72 | // This attribute sets the loopback configuration as follows. |
| 73 | // |
| 74 | // 0 No loopback |
| 75 | // |
| 76 | // 1 Loopback of downstream traffic at MAC client |
| 77 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 78 | // (R,-W) (mandatory) (1-byte) |
| 79 | // |
| 80 | type EthernetFlowTerminationPoint struct { |
| 81 | ManagedEntityDefinition |
| 82 | Attributes AttributeValueMap |
| 83 | } |
| 84 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 85 | // Attribute name constants |
| 86 | |
| 87 | const EthernetFlowTerminationPoint_DestinationMac = "DestinationMac" |
| 88 | const EthernetFlowTerminationPoint_SourceMac = "SourceMac" |
| 89 | const EthernetFlowTerminationPoint_TagPolicy = "TagPolicy" |
| 90 | const EthernetFlowTerminationPoint_Tci = "Tci" |
| 91 | const EthernetFlowTerminationPoint_Loopback = "Loopback" |
| 92 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 93 | func init() { |
| 94 | ethernetflowterminationpointBME = &ManagedEntityDefinition{ |
| 95 | Name: "EthernetFlowTerminationPoint", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 96 | ClassID: EthernetFlowTerminationPointClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 97 | MessageTypes: mapset.NewSetWith( |
| 98 | Create, |
| 99 | Delete, |
| 100 | Get, |
| 101 | Set, |
| 102 | ), |
| 103 | AllowedAttributeMask: 0xf800, |
| 104 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 105 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 106 | 1: MultiByteField(EthernetFlowTerminationPoint_DestinationMac, OctetsAttributeType, 0x8000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 107 | 2: MultiByteField(EthernetFlowTerminationPoint_SourceMac, OctetsAttributeType, 0x4000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, false, false, 2), |
| 108 | 3: ByteField(EthernetFlowTerminationPoint_TagPolicy, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 109 | 4: Uint16Field(EthernetFlowTerminationPoint_Tci, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4), |
| 110 | 5: ByteField(EthernetFlowTerminationPoint_Loopback, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 111 | }, |
| 112 | Access: CreatedByOlt, |
| 113 | Support: UnknownSupport, |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | // NewEthernetFlowTerminationPoint (class ID 286) creates the basic |
| 118 | // Managed Entity definition that is used to validate an ME of this type that |
| 119 | // is received from or transmitted to the OMCC. |
| 120 | func NewEthernetFlowTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 121 | return NewManagedEntity(*ethernetflowterminationpointBME, params...) |
| 122 | } |