Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 | package generated |
| 21 | |
| 22 | import "github.com/deckarep/golang-set" |
| 23 | |
| 24 | const EthernetFlowTerminationPointClassId ClassID = ClassID(286) |
| 25 | |
| 26 | var ethernetflowterminationpointBME *ManagedEntityDefinition |
| 27 | |
| 28 | // EthernetFlowTerminationPoint (class ID #286) |
| 29 | // The Ethernet flow TP contains the attributes necessary to originate and terminate Ethernet |
| 30 | // frames in the ONU. It is appropriate when transporting pseudowire services via layer 2. |
| 31 | // Instances of this ME are created and deleted by the OLT. |
| 32 | // |
| 33 | // Relationships |
| 34 | // One Ethernet flow TP ME exists for each distinct pseudowire service that is transported via |
| 35 | // layer 2. |
| 36 | // |
| 37 | // Attributes |
| 38 | // Managed Entity Id |
| 39 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an |
| 40 | // identical ID, this ME is implicitly linked to a pseudowire TP ME. (R, setbycreate) (mandatory) |
| 41 | // (2 bytes) |
| 42 | // |
| 43 | // Destination Mac |
| 44 | // Destination MAC: This attribute specifies the destination MAC address of upstream Ethernet |
| 45 | // frames. (R, W, setbycreate) (mandatory) (6 bytes) |
| 46 | // |
| 47 | // Source Mac |
| 48 | // Source MAC: This attribute specifies the near-end MAC address. It is established by nonOMCI |
| 49 | // means (e.g., factory programmed into ONU flash memory) and is included here for information |
| 50 | // only. (R) (mandatory) (6 bytes) |
| 51 | // |
| 52 | // Tag Policy |
| 53 | // (R, W, setbycreate) (mandatory) (1 byte) |
| 54 | // |
| 55 | // Tci |
| 56 | // TCI: If the tag policy calls for tagging of upstream Ethernet frames, this attribute specifies |
| 57 | // the tag control information, which includes the VLAN tag, P bits and CFI bit. (R, W) (optional) |
| 58 | // (2 bytes) |
| 59 | // |
| 60 | // Loopback |
| 61 | // (R, W) (mandatory) (1 byte) |
| 62 | // |
| 63 | type EthernetFlowTerminationPoint struct { |
| 64 | ManagedEntityDefinition |
| 65 | Attributes AttributeValueMap |
| 66 | } |
| 67 | |
| 68 | func init() { |
| 69 | ethernetflowterminationpointBME = &ManagedEntityDefinition{ |
| 70 | Name: "EthernetFlowTerminationPoint", |
| 71 | ClassID: 286, |
| 72 | MessageTypes: mapset.NewSetWith( |
| 73 | Create, |
| 74 | Delete, |
| 75 | Get, |
| 76 | Set, |
| 77 | ), |
| 78 | AllowedAttributeMask: 0XF800, |
| 79 | AttributeDefinitions: AttributeDefinitionMap{ |
| 80 | 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, false, 0), |
| 81 | 1: MultiByteField("DestinationMac", 6, nil, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 1), |
| 82 | 2: MultiByteField("SourceMac", 6, nil, mapset.NewSetWith(Read), false, false, false, false, 2), |
| 83 | 3: ByteField("TagPolicy", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 3), |
| 84 | 4: Uint16Field("Tci", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 4), |
| 85 | 5: ByteField("Loopback", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 5), |
| 86 | }, |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | // NewEthernetFlowTerminationPoint (class ID 286 creates the basic |
| 91 | // Managed Entity definition that is used to validate an ME of this type that |
| 92 | // is received from the wire, about to be sent on the wire. |
| 93 | func NewEthernetFlowTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 94 | return NewManagedEntity(ethernetflowterminationpointBME, params...) |
| 95 | } |