blob: 17a4b9e6be025c659e0332f13731f13b7390ecb3 [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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080017 /*
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
30const EthernetFlowTerminationPointClassID ClassID = ClassID(286)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var ethernetflowterminationpointBME *ManagedEntityDefinition
33
34// EthernetFlowTerminationPoint (class ID #286)
35// 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
45// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
46// identical ID, this ME is implicitly linked to a pseudowire TP ME. (R, setbycreate) (mandatory)
Matteo Scandolof9d43412021-01-12 11:11:34 -080047// (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070048//
49// Destination Mac
50// Destination MAC: This attribute specifies the destination MAC address of upstream Ethernet
Matteo Scandolof9d43412021-01-12 11:11:34 -080051// frames. (R,-W, setbycreate) (mandatory) (6-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070052//
53// Source Mac
54// Source MAC: This attribute specifies the near-end MAC address. It is established by nonOMCI
55// means (e.g., factory programmed into ONU flash memory) and is included here for information
Matteo Scandolof9d43412021-01-12 11:11:34 -080056// only. (R) (mandatory) (6-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070057//
58// Tag Policy
Matteo Scandolof9d43412021-01-12 11:11:34 -080059// (R,-W, setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070060//
61// Tci
62// TCI: If the tag policy calls for tagging of upstream Ethernet frames, this attribute specifies
Matteo Scandolof9d43412021-01-12 11:11:34 -080063// the tag control information, which includes the VLAN tag, P bits and CFI bit. (R,-W) (optional)
64// (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070065//
66// Loopback
Matteo Scandolof9d43412021-01-12 11:11:34 -080067// (R,-W) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070068//
69type EthernetFlowTerminationPoint struct {
70 ManagedEntityDefinition
71 Attributes AttributeValueMap
72}
73
74func init() {
75 ethernetflowterminationpointBME = &ManagedEntityDefinition{
76 Name: "EthernetFlowTerminationPoint",
77 ClassID: 286,
78 MessageTypes: mapset.NewSetWith(
79 Create,
80 Delete,
81 Get,
82 Set,
83 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080084 AllowedAttributeMask: 0xf800,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070085 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080086 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
87 1: MultiByteField("DestinationMac", OctetsAttributeType, 0x8000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
88 2: MultiByteField("SourceMac", OctetsAttributeType, 0x4000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, false, false, 2),
89 3: ByteField("TagPolicy", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
90 4: Uint16Field("Tci", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
91 5: ByteField("Loopback", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070092 },
Matteo Scandolof9d43412021-01-12 11:11:34 -080093 Access: CreatedByOlt,
94 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070095 }
96}
97
Matteo Scandolof9d43412021-01-12 11:11:34 -080098// NewEthernetFlowTerminationPoint (class ID 286) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070099// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800100// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700101func NewEthernetFlowTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800102 return NewManagedEntity(*ethernetflowterminationpointBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700103}