blob: a98d619164510088ba2d992f1c207cd560bf8ee2 [file] [log] [blame]
Matteo Scandolof9d43412021-01-12 11:11:34 -08001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
4
5 * 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
8
9 * http://www.apache.org/licenses/LICENSE-2.0
10
11 * 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 Scandolof9d43412021-01-12 11:11:34 -080018 * 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
30const Ieee8021PMapperServiceProfileClassID ClassID = ClassID(130)
31
32var ieee8021pmapperserviceprofileBME *ManagedEntityDefinition
33
34// Ieee8021PMapperServiceProfile (class ID #130)
35// 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
51// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
52// (mandatory) (2-bytes)
53//
54// Tp Pointer
55// (R,-W, setbycreate) (mandatory) (2-bytes)
56//
57// Interwork Tp Pointer For P_Bit Priority 0
58// Interwork TP pointer for P-bit priority 0: (R,-W, setbycreate) (mandatory) (2-bytes)
59//
60// Interwork Tp Pointer For P_Bit Priority 1
61// Interwork TP pointer for P-bit priority 1: (R,-W, setbycreate) (mandatory) (2-bytes)
62//
63// Interwork Tp Pointer For P_Bit Priority 2
64// Interwork TP pointer for P-bit priority 2: (R,-W, setbycreate) (mandatory) (2-bytes)
65//
66// Interwork Tp Pointer For P_Bit Priority 3
67// Interwork TP pointer for P-bit priority 3: (R,-W, setbycreate) (mandatory) (2-bytes)
68//
69// Interwork Tp Pointer For P_Bit Priority 4
70// Interwork TP pointer for P-bit priority 4: (R,-W, setbycreate) (mandatory) (2-bytes)
71//
72// Interwork Tp Pointer For P_Bit Priority 5
73// Interwork TP pointer for P-bit priority 5: (R,-W, setbycreate) (mandatory) (2-bytes)
74//
75// Interwork Tp Pointer For P_Bit Priority 6
76// Interwork TP pointer for P-bit priority 6: (R,-W, setbycreate) (mandatory) (2-bytes)
77//
78// Interwork Tp Pointer For P_Bit Priority 7
79// Interwork TP pointer for P-bit priority 7: (R,-W, setbycreate) (mandatory) (2-bytes)
80//
81// Unmarked Frame Option
82// Untagged downstream frames are passed through the mapper transparently.
83//
84// Dscp To P Bit Mapping
85// NOTE - If certain bits in the DSCP field are to be ignored in the mapping process, the attribute
86// should be provisioned such that all possible values of those bits produce the same P-bit
87// mapping. This can be applied to the case where instead of full DSCP, the operator wishes to
88// adopt the priority mechanism based on IP precedence, which needs only the three MSBs of the DSCP
89// field.
90//
91// Default P Bit Assumption
92// Default P-bit assumption: This attribute is valid when the unmarked frame option attribute is
93// set to 1. In its LSBs, the default Pbit assumption attribute contains the default PCP field to
94// be assumed. The unmodified frame is then directed to the GEM IW TP indicated by the interwork TP
95// pointer mappings. (R,-W, setbycreate) (mandatory) (1-byte)
96//
97// Tp Type
98// (R,-W, setbycreate) (optional) (1-byte)
99//
100type Ieee8021PMapperServiceProfile struct {
101 ManagedEntityDefinition
102 Attributes AttributeValueMap
103}
104
105func init() {
106 ieee8021pmapperserviceprofileBME = &ManagedEntityDefinition{
107 Name: "Ieee8021PMapperServiceProfile",
108 ClassID: 130,
109 MessageTypes: mapset.NewSetWith(
110 Create,
111 Delete,
112 Get,
113 Set,
114 ),
115 AllowedAttributeMask: 0xfff8,
116 AttributeDefinitions: AttributeDefinitionMap{
117 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
118 1: Uint16Field("TpPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
119 2: Uint16Field("InterworkTpPointerForPBitPriority0", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
120 3: Uint16Field("InterworkTpPointerForPBitPriority1", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
121 4: Uint16Field("InterworkTpPointerForPBitPriority2", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
122 5: Uint16Field("InterworkTpPointerForPBitPriority3", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
123 6: Uint16Field("InterworkTpPointerForPBitPriority4", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
124 7: Uint16Field("InterworkTpPointerForPBitPriority5", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
125 8: Uint16Field("InterworkTpPointerForPBitPriority6", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
126 9: Uint16Field("InterworkTpPointerForPBitPriority7", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
127 10: ByteField("UnmarkedFrameOption", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
128 11: MultiByteField("DscpToPBitMapping", OctetsAttributeType, 0x0020, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, false, false, 11),
129 12: ByteField("DefaultPBitAssumption", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
130 13: ByteField("TpType", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
131 },
132 Access: CreatedByOlt,
133 Support: UnknownSupport,
134 }
135}
136
137// NewIeee8021PMapperServiceProfile (class ID 130) creates the basic
138// Managed Entity definition that is used to validate an ME of this type that
139// is received from or transmitted to the OMCC.
140func NewIeee8021PMapperServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
141 return NewManagedEntity(*ieee8021pmapperserviceprofileBME, params...)
142}