blob: fa56871ad13c328fc7ee1a98b66867883f55d676 [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// Ieee8021PMapperServiceProfileClassID is the 16-bit ID for the OMCI
26// Managed entity IEEE 802.1p mapper service profile
27const Ieee8021PMapperServiceProfileClassID ClassID = ClassID(130)
28
29var ieee8021pmapperserviceprofileBME *ManagedEntityDefinition
30
31// Ieee8021PMapperServiceProfile (class ID #130)
32// This ME associates the priorities of IEEE 802.1p [IEEE 802.1D] priority tagged frames with
33// specific connections. This ME directs upstream traffic to the designated GEM ports. Downstream
34// traffic arriving on any of the IEEE 802.1p mapper's GEM ports is directed to the mapper's root
35// TP. Other mechanisms exist to direct downstream traffic, specifically a direct pointer to a
36// downstream queue from the GEM port network CTP. If such an alternative is used, it should be
37// provisioned to be consistent with the flow model of the mapper.
38//
39// Instances of this ME are created and deleted by the OLT.
40//
41// Relationships
42// At its root, an instance of this ME may be associated with zero or one instance of a PPTP UNI,
43// MAC bridge port configuration data, or any type of IW TP ME that carries IEEE 802 traffic. Each
44// of its eight branches is associated with zero or one GEM IW TP.
45//
46// Attributes
47// Managed Entity Id
48// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
49// (mandatory) (2-bytes)
50//
51// Tp Pointer
52// (R,-W, setbycreate) (mandatory) (2-bytes)
53//
54// Interwork Tp Pointer For P_Bit Priority 0
55// Interwork TP pointer for P-bit priority 0: (R,-W, setbycreate) (mandatory) (2-bytes)
56//
57// Interwork Tp Pointer For P_Bit Priority 1
58// Interwork TP pointer for P-bit priority 1: (R,-W, setbycreate) (mandatory) (2-bytes)
59//
60// Interwork Tp Pointer For P_Bit Priority 2
61// Interwork TP pointer for P-bit priority 2: (R,-W, setbycreate) (mandatory) (2-bytes)
62//
63// Interwork Tp Pointer For P_Bit Priority 3
64// Interwork TP pointer for P-bit priority 3: (R,-W, setbycreate) (mandatory) (2-bytes)
65//
66// Interwork Tp Pointer For P_Bit Priority 4
67// Interwork TP pointer for P-bit priority 4: (R,-W, setbycreate) (mandatory) (2-bytes)
68//
69// Interwork Tp Pointer For P_Bit Priority 5
70// Interwork TP pointer for P-bit priority 5: (R,-W, setbycreate) (mandatory) (2-bytes)
71//
72// Interwork Tp Pointer For P_Bit Priority 6
73// Interwork TP pointer for P-bit priority 6: (R,-W, setbycreate) (mandatory) (2-bytes)
74//
75// Interwork Tp Pointer For P_Bit Priority 7
76// Interwork TP pointer for P-bit priority 7: (R,-W, setbycreate) (mandatory) (2-bytes)
77//
78// Unmarked Frame Option
79// Untagged downstream frames are passed through the mapper transparently.
80//
81// Dscp To P Bit Mapping
82// NOTE - If certain bits in the DSCP field are to be ignored in the mapping process, the attribute
83// should be provisioned such that all possible values of those bits produce the same P-bit
84// mapping. This can be applied to the case where instead of full DSCP, the operator wishes to
85// adopt the priority mechanism based on IP precedence, which needs only the three MSBs of the DSCP
86// field.
87//
88// Default P Bit Assumption
89// Default P-bit assumption: This attribute is valid when the unmarked frame option attribute is
90// set to 1. In its LSBs, the default Pbit assumption attribute contains the default PCP field to
91// be assumed. The unmodified frame is then directed to the GEM IW TP indicated by the interwork TP
92// pointer mappings. (R,-W, setbycreate) (mandatory) (1-byte)
93//
94// Tp Type
95// (R,-W, setbycreate) (optional) (1-byte)
96//
97type Ieee8021PMapperServiceProfile struct {
98 ManagedEntityDefinition
99 Attributes AttributeValueMap
100}
101
102func init() {
103 ieee8021pmapperserviceprofileBME = &ManagedEntityDefinition{
104 Name: "Ieee8021PMapperServiceProfile",
105 ClassID: 130,
106 MessageTypes: mapset.NewSetWith(
107 Create,
108 Delete,
109 Get,
110 Set,
111 ),
112 AllowedAttributeMask: 0xfff8,
113 AttributeDefinitions: AttributeDefinitionMap{
114 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
115 1: Uint16Field("TpPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
116 2: Uint16Field("InterworkTpPointerForPBitPriority0", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
117 3: Uint16Field("InterworkTpPointerForPBitPriority1", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
118 4: Uint16Field("InterworkTpPointerForPBitPriority2", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
119 5: Uint16Field("InterworkTpPointerForPBitPriority3", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
120 6: Uint16Field("InterworkTpPointerForPBitPriority4", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
121 7: Uint16Field("InterworkTpPointerForPBitPriority5", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
122 8: Uint16Field("InterworkTpPointerForPBitPriority6", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
123 9: Uint16Field("InterworkTpPointerForPBitPriority7", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
124 10: ByteField("UnmarkedFrameOption", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
125 11: MultiByteField("DscpToPBitMapping", OctetsAttributeType, 0x0020, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, false, false, 11),
126 12: ByteField("DefaultPBitAssumption", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
127 13: ByteField("TpType", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
128 },
129 Access: CreatedByOlt,
130 Support: UnknownSupport,
131 }
132}
133
134// NewIeee8021PMapperServiceProfile (class ID 130) creates the basic
135// Managed Entity definition that is used to validate an ME of this type that
136// is received from or transmitted to the OMCC.
137func NewIeee8021PMapperServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
138 return NewManagedEntity(*ieee8021pmapperserviceprofileBME, params...)
139}