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