blob: ad61f87a3af4bce7a27a2b06eaf2ff7c19abb9d0 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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 Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// Ieee8021PMapperServiceProfileClassID is the 16-bit ID for the OMCI
29// Managed entity IEEE 802.1p mapper service profile
Chip Boling610117d2021-09-09 11:24:34 -050030const Ieee8021PMapperServiceProfileClassID = ClassID(130) // 0x0082
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var ieee8021pmapperserviceprofileBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// Ieee8021PMapperServiceProfile (Class ID: #130 / 0x0082)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME associates the priorities of IEEE 802.1p [IEEE 802.1D] priority tagged frames with
36// specific connections. This ME directs upstream traffic to the designated GEM ports. Downstream
37// traffic arriving on any of the IEEE 802.1p mapper's GEM ports is directed to the mapper's root
38// TP. Other mechanisms exist to direct downstream traffic, specifically a direct pointer to a
39// downstream queue from the GEM port network CTP. If such an alternative is used, it should be
40// provisioned to be consistent with the flow model of the mapper.
41//
42// Instances of this ME are created and deleted by the OLT.
43//
44// Relationships
45// At its root, an instance of this ME may be associated with zero or one instance of a PPTP UNI,
46// MAC bridge port configuration data, or any type of IW TP ME that carries IEEE 802 traffic. Each
47// of its eight branches is associated with zero or one GEM IW TP.
48//
49// Attributes
50// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050051// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
52// (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060053//
54// Tp Pointer
Chip Boling610117d2021-09-09 11:24:34 -050055// This attribute points to an instance of the associated TP.
56//
57// If the optional TP type attribute is not supported, the TP pointer indicates bridging mapping
58// with the value 0xFFFF; the TP pointer may also point to a PPTP Ethernet UNI.
59//
60// The TP type value 0 also indicates bridging mapping, and the TP pointer should be set to 0xFFFF.
61//
62// In all other cases, the TP type is determined by the TP type attribute.
63//
Chip Boling6e27b352020-02-14 09:10:01 -060064// (R,-W, setbycreate) (mandatory) (2-bytes)
65//
Chip Boling610117d2021-09-09 11:24:34 -050066// Each of the following eight attributes points to the GEM IW TP associated with the stated P-bit
67// value. The null pointer 0xFFFF specifies that frames with the associated priority are to be
68// discarded.
69//
Chip Boling6e27b352020-02-14 09:10:01 -060070// Interwork Tp Pointer For P_Bit Priority 0
71// Interwork TP pointer for P-bit priority 0: (R,-W, setbycreate) (mandatory) (2-bytes)
72//
73// Interwork Tp Pointer For P_Bit Priority 1
74// Interwork TP pointer for P-bit priority 1: (R,-W, setbycreate) (mandatory) (2-bytes)
75//
76// Interwork Tp Pointer For P_Bit Priority 2
77// Interwork TP pointer for P-bit priority 2: (R,-W, setbycreate) (mandatory) (2-bytes)
78//
79// Interwork Tp Pointer For P_Bit Priority 3
80// Interwork TP pointer for P-bit priority 3: (R,-W, setbycreate) (mandatory) (2-bytes)
81//
82// Interwork Tp Pointer For P_Bit Priority 4
83// Interwork TP pointer for P-bit priority 4: (R,-W, setbycreate) (mandatory) (2-bytes)
84//
85// Interwork Tp Pointer For P_Bit Priority 5
86// Interwork TP pointer for P-bit priority 5: (R,-W, setbycreate) (mandatory) (2-bytes)
87//
88// Interwork Tp Pointer For P_Bit Priority 6
89// Interwork TP pointer for P-bit priority 6: (R,-W, setbycreate) (mandatory) (2-bytes)
90//
91// Interwork Tp Pointer For P_Bit Priority 7
92// Interwork TP pointer for P-bit priority 7: (R,-W, setbycreate) (mandatory) (2-bytes)
93//
94// Unmarked Frame Option
Chip Boling610117d2021-09-09 11:24:34 -050095// This attribute specifies how the ONU should handle untagged Ethernet frames received across the
96// associated interface. Although it does not alter the frame in any way, the ONU routes the frame
97// as if it were tagged with P bits (PCP field) according to the following code points.
98//
99// 0 Derive implied PCP field from DSCP bits of received frame
100//
101// 1 Set implied PCP field to a fixed value specified by the default P-bit assumption attribute
102//
103// (R,-W, setbycreate) (mandatory) (1-byte)
104//
Chip Boling6e27b352020-02-14 09:10:01 -0600105// Untagged downstream frames are passed through the mapper transparently.
106//
107// Dscp To P Bit Mapping
108// NOTE - If certain bits in the DSCP field are to be ignored in the mapping process, the attribute
109// should be provisioned such that all possible values of those bits produce the same P-bit
110// mapping. This can be applied to the case where instead of full DSCP, the operator wishes to
111// adopt the priority mechanism based on IP precedence, which needs only the three MSBs of the DSCP
112// field.
113//
Chip Boling610117d2021-09-09 11:24:34 -0500114// DSCP to P-bit mapping: This attribute is valid when the unmarked frame option attribute is set
115// to 0. The DSCP to P-bit attribute can be considered a bit string sequence of 64 3-bit groupings.
116// The 64 sequence entries represent the possible values of the 6-bit DSCP field. Each 3-bit
117// grouping specifies the P-bit value to which the associated DSCP value should be mapped. The
118// unmarked frame is then directed to the GEM IW TP indicated by the interwork TP pointer mappings.
119// (R,-W) (mandatory) (24-bytes)
120//
Chip Boling6e27b352020-02-14 09:10:01 -0600121// Default P Bit Assumption
122// Default P-bit assumption: This attribute is valid when the unmarked frame option attribute is
123// set to 1. In its LSBs, the default Pbit assumption attribute contains the default PCP field to
124// be assumed. The unmodified frame is then directed to the GEM IW TP indicated by the interwork TP
125// pointer mappings. (R,-W, setbycreate) (mandatory) (1-byte)
126//
127// Tp Type
Chip Boling610117d2021-09-09 11:24:34 -0500128// This attribute identifies the type of TP associated with the mapper.
129//
130// 0 Mapper used for bridging-mapping
131//
132// 1 Mapper directly associated with a PPTP Ethernet UNI
133//
134// 2 Mapper directly associated with an IP host config data or IPv6 host config data ME
135//
136// 3 Mapper directly associated with an Ethernet flow termination point
137//
138// 4 Mapper directly associated with a PPTP xDSL UNI
139//
140// 5 Reserved
141//
142// 6 Mapper directly associated with a PPTP MoCA UNI
143//
144// 7 Mapper directly associated with a virtual Ethernet interface point
145//
146// 8 Mapper directly associated with an IW VCC termination point
147//
148// 9 Mapper directly associated with an EFM bonding group
149//
Chip Boling6e27b352020-02-14 09:10:01 -0600150// (R,-W, setbycreate) (optional) (1-byte)
151//
152type Ieee8021PMapperServiceProfile struct {
153 ManagedEntityDefinition
154 Attributes AttributeValueMap
155}
156
Chip Boling8cdd6392022-01-27 08:43:37 -0600157// Attribute name constants
158
159const Ieee8021PMapperServiceProfile_TpPointer = "TpPointer"
160const Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority0 = "InterworkTpPointerForPBitPriority0"
161const Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority1 = "InterworkTpPointerForPBitPriority1"
162const Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority2 = "InterworkTpPointerForPBitPriority2"
163const Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority3 = "InterworkTpPointerForPBitPriority3"
164const Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority4 = "InterworkTpPointerForPBitPriority4"
165const Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority5 = "InterworkTpPointerForPBitPriority5"
166const Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority6 = "InterworkTpPointerForPBitPriority6"
167const Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority7 = "InterworkTpPointerForPBitPriority7"
168const Ieee8021PMapperServiceProfile_UnmarkedFrameOption = "UnmarkedFrameOption"
169const Ieee8021PMapperServiceProfile_DscpToPBitMapping = "DscpToPBitMapping"
170const Ieee8021PMapperServiceProfile_DefaultPBitAssumption = "DefaultPBitAssumption"
171const Ieee8021PMapperServiceProfile_TpType = "TpType"
172
Chip Boling6e27b352020-02-14 09:10:01 -0600173func init() {
174 ieee8021pmapperserviceprofileBME = &ManagedEntityDefinition{
175 Name: "Ieee8021PMapperServiceProfile",
Chip Boling8cdd6392022-01-27 08:43:37 -0600176 ClassID: Ieee8021PMapperServiceProfileClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600177 MessageTypes: mapset.NewSetWith(
178 Create,
179 Delete,
180 Get,
181 Set,
182 ),
183 AllowedAttributeMask: 0xfff8,
184 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600185 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
186 1: Uint16Field(Ieee8021PMapperServiceProfile_TpPointer, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
187 2: Uint16Field(Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority0, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
188 3: Uint16Field(Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority1, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
189 4: Uint16Field(Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority2, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
190 5: Uint16Field(Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority3, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
191 6: Uint16Field(Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority4, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
192 7: Uint16Field(Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority5, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
193 8: Uint16Field(Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority6, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
194 9: Uint16Field(Ieee8021PMapperServiceProfile_InterworkTpPointerForPBitPriority7, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
195 10: ByteField(Ieee8021PMapperServiceProfile_UnmarkedFrameOption, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
196 11: MultiByteField(Ieee8021PMapperServiceProfile_DscpToPBitMapping, OctetsAttributeType, 0x0020, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, false, false, 11),
197 12: ByteField(Ieee8021PMapperServiceProfile_DefaultPBitAssumption, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
198 13: ByteField(Ieee8021PMapperServiceProfile_TpType, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
Chip Boling6e27b352020-02-14 09:10:01 -0600199 },
200 Access: CreatedByOlt,
201 Support: UnknownSupport,
202 }
203}
204
205// NewIeee8021PMapperServiceProfile (class ID 130) creates the basic
206// Managed Entity definition that is used to validate an ME of this type that
207// is received from or transmitted to the OMCC.
208func NewIeee8021PMapperServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
209 return NewManagedEntity(*ieee8021pmapperserviceprofileBME, params...)
210}