blob: d2401d843925dc7876348644e9565b55c5f419ab [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Girish Gowdra161d27a2021-05-05 12:01:44 -070017/*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// EthernetFlowTerminationPointClassID is the 16-bit ID for the OMCI
29// Managed entity Ethernet flow termination point
Andrea Campanella10426e22021-10-15 17:58:04 +020030const EthernetFlowTerminationPointClassID = ClassID(286) // 0x011e
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var ethernetflowterminationpointBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// EthernetFlowTerminationPoint (Class ID: #286 / 0x011e)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035// The Ethernet flow TP contains the attributes necessary to originate and terminate Ethernet
Matteo Scandolof9d43412021-01-12 11:11:34 -080036// frames in the ONU. It is appropriate when transporting pseudowire services via layer-2.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070037// 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
Andrea Campanella10426e22021-10-15 17:58:04 +020045// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070047//
48// Destination Mac
Andrea Campanella10426e22021-10-15 17:58:04 +020049// This attribute specifies the destination MAC address of upstream Ethernet frames. (R,-W,
50// setbycreate) (mandatory) (6-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070051//
52// Source Mac
Andrea Campanella10426e22021-10-15 17:58:04 +020053// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070056//
57// Tag Policy
Andrea Campanella10426e22021-10-15 17:58:04 +020058// 0 untagged frame
59//
60// 1 tagged frame
61//
Matteo Scandolof9d43412021-01-12 11:11:34 -080062// (R,-W, setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070063//
Andrea Campanella10426e22021-10-15 17:58:04 +020064// This attribute specifies the tagging policy to be applied to upstream Ethernet frames.
65//
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070066// Tci
Andrea Campanella10426e22021-10-15 17:58:04 +020067// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -080069// (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070070//
71// Loopback
Andrea Campanella10426e22021-10-15 17:58:04 +020072// This attribute sets the loopback configuration as follows.
73//
74// 0 No loopback
75//
76// 1 Loopback of downstream traffic at MAC client
77//
Matteo Scandolof9d43412021-01-12 11:11:34 -080078// (R,-W) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070079//
80type EthernetFlowTerminationPoint struct {
81 ManagedEntityDefinition
82 Attributes AttributeValueMap
83}
84
85func init() {
86 ethernetflowterminationpointBME = &ManagedEntityDefinition{
87 Name: "EthernetFlowTerminationPoint",
88 ClassID: 286,
89 MessageTypes: mapset.NewSetWith(
90 Create,
91 Delete,
92 Get,
93 Set,
94 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080095 AllowedAttributeMask: 0xf800,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070096 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080097 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
98 1: MultiByteField("DestinationMac", OctetsAttributeType, 0x8000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
99 2: MultiByteField("SourceMac", OctetsAttributeType, 0x4000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, false, false, 2),
100 3: ByteField("TagPolicy", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
101 4: Uint16Field("Tci", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
102 5: ByteField("Loopback", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700103 },
Matteo Scandolof9d43412021-01-12 11:11:34 -0800104 Access: CreatedByOlt,
105 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700106 }
107}
108
Matteo Scandolof9d43412021-01-12 11:11:34 -0800109// NewEthernetFlowTerminationPoint (class ID 286) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700110// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800111// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700112func NewEthernetFlowTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800113 return NewManagedEntity(*ethernetflowterminationpointBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700114}