blob: ad0766c25cc5ef9be4e5ac5db1166619ed3d0c3e [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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 */
Himani Chawlaac1f5ad2021-02-04 21:21:54 +053017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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// GemPortNetworkCtpClassID is the 16-bit ID for the OMCI
29// Managed entity GEM port network CTP
mpagenko836a1fd2021-11-01 16:12:42 +000030const GemPortNetworkCtpClassID = ClassID(268) // 0x010c
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var gemportnetworkctpBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// GemPortNetworkCtp (Class ID: #268 / 0x010c)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// This ME represents the termination of a GEM port on an ONU. This ME aggregates connectivity
36// functionality from the network view and alarms from the network element view as well as
37// artefacts from trails.
38//
39// Instances of the GEM port network CTP ME are created and deleted by the OLT. An instance of GEM
40// port network CTP can be deleted only when no GEM IW TP or GEM port network CTP PM history data
41// are associated with it. It is the responsibility of the OLT to make sure that the ONU
42// configuration meets this condition.
43//
44// In ITU-T G.984 systems, when a GEM port network CTP is created, its encryption state is by
45// default not encrypted. If the OLT wishes to configure the GEM port to use encryption, it must
46// send the appropriate PLOAM message. This applies equally to new CTPs and to CTPs that are re-
47// created after an MIB reset.
48//
49// In ITU-T G.987 systems, GEM ports are dynamically encrypted. If it is intended to encrypt the
50// GEM port, the OLT must configure a key ring to be used, and the key must be known to the ONU at
51// run time.
52//
53// Relationships
54// An instance of the GEM port network CTP ME may be associated with an instance of the T-CONT and
55// GEM IW TP MEs.
56//
57// Attributes
58// Managed Entity Id
mpagenko836a1fd2021-11-01 16:12:42 +000059// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
60// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000061//
62// Port_Id
mpagenko836a1fd2021-11-01 16:12:42 +000063// Port-ID: This attribute is the port-ID of the GEM port associated with this CTP. (RWSC)
64// (mandatory) (2-bytes)
65//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000066// NOTE 1 - While nothing forbids the existence of several GEM port network CTPs with the same
67// port-ID value, downstream traffic is modelled as being delivered to all such GEM port network
68// CTPs. Be aware of potential difficulties associated with defining downstream flows and
69// aggregating PM statistics.
70//
71// T_Cont Pointer
72// T-CONT pointer: This attribute points to a T-CONT instance. (R,-W, setbycreate) (mandatory)
73// (2-bytes)
74//
75// Direction
mpagenko836a1fd2021-11-01 16:12:42 +000076// This attribute specifies whether the GEM port is used for UNI-to-ANI (1), ANI-to-UNI (2), or
77// bidirectional (3) connection. (R,-W, setbycreate) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000078//
79// Traffic Management Pointer For Upstream
mpagenko836a1fd2021-11-01 16:12:42 +000080// If the traffic management option attribute in the ONU-G ME is 0 (priority controlled) or 2
81// (priority and rate controlled), this pointer specifies the priority queue ME serving this GEM
82// port network CTP. If the traffic management option attribute is 1 (rate controlled), this
83// attribute redundantly points to the TCONT serving this GEM port network CTP. (R,-W, setbycreate)
84// (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000085//
86// Traffic Descriptor Profile Pointer For Upstream
87// See also Appendix II.
88//
mpagenko836a1fd2021-11-01 16:12:42 +000089// This attribute points to the instance of the traffic descriptor ME that contains the upstream
90// traffic parameters for this GEM port network CTP. This attribute is used when the traffic
91// management option attribute in the ONU-G ME is 1 (rate controlled), specifying the PIR/PBS to
92// which the upstream traffic is shaped. This attribute is also used when the traffic management
93// option attribute in the ONU-G ME is 2 (priority and rate controlled), specifying the
94// CIR/CBS/PIR/PBS to which the upstream traffic is policed. (R,-W, setbycreate) (optional)
95// (2-bytes)
96//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000097// Uni Counter
mpagenko836a1fd2021-11-01 16:12:42 +000098// This attribute reports the number of instances of UNI-G ME associated with this GEM port network
99// CTP. (R) (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000100//
101// Priority Queue Pointer For Down Stream
mpagenko836a1fd2021-11-01 16:12:42 +0000102// Priority queue pointer for downstream: This attribute points to the instance of the priority
103// queue used for this GEM port network CTP in the downstream direction. It is the responsibility
104// of the OLT to provision the downstream pointer in a way that is consistent with the bridge and
105// mapper connectivity. If the pointer is null, downstream queueing is determined by other
106// mechanisms in the ONU. (R,-W, setbycreate) (mandatory) (2-bytes)
107//
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000108// NOTE 2 - If the GEM port network CTP is associated with more than one UNI (downstream
109// multicast), the downstream priority queue pointer defines a pattern (e.g., queue number 3 for a
110// given UNI) to be replicated (i.e., to queue number 3) at the other affected UNIs.
111//
112// Encryption State
mpagenko836a1fd2021-11-01 16:12:42 +0000113// This attribute indicates the current state of the GEM port network CTP's encryption. Legal
114// values are defined to be the same as those of the security mode attribute of the ONU2-G, with
115// the exception that attribute value 0 indicates an unencrypted GEM port. (R) (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000116//
117// Traffic Descriptor Profile Pointer For Downstream
mpagenko836a1fd2021-11-01 16:12:42 +0000118// This attribute points to the instance of the traffic descriptor ME that contains the downstream
119// traffic parameters for this GEM port network CTP. This attribute is used when the traffic
120// management option attribute in the ONU-G ME is 1 (rate controlled), specifying the PIR/PBS to
121// which the downstream traffic is shaped. This attribute is also used when the traffic management
122// option attribute in the ONU-G ME is 2 (priority and rate controlled), specifying the
123// CIR/CBS/PIR/PBS to which the downstream traffic is policed. (R,-W, setbycreate) (optional)
124// (2-bytes)
125//
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000126// See also Appendix II.
127//
128// Encryption Key Ring
mpagenko836a1fd2021-11-01 16:12:42 +0000129// This attribute is defined in ITU-T G.987 systems only. It specifies whether the associated GEM
130// port is encrypted, and if so, which key ring it uses. (R, W, setbycreate) (optional) (1 byte)
131//
132// 0 (default) No encryption. The downstream key index is ignored, and upstream traffic is
133// transmitted with key index 0.
134//
135// 1 Unicast payload encryption in both directions. Keys are generated by the ONU and transmitted
136// to the OLT via the PLOAM channel.
137//
138// 2 Broadcast (multicast) encryption. Keys are generated by the OLT and distributed via the OMCI.
139//
140// 3 Unicast encryption, downstream only. Keys are generated by the ONU and transmitted to the OLT
141// via the PLOAM channel.
142//
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000143// Other values are reserved.
144//
145type GemPortNetworkCtp struct {
146 ManagedEntityDefinition
147 Attributes AttributeValueMap
148}
149
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000150// Attribute name constants
151
152const GemPortNetworkCtp_PortId = "PortId"
153const GemPortNetworkCtp_TContPointer = "TContPointer"
154const GemPortNetworkCtp_Direction = "Direction"
155const GemPortNetworkCtp_TrafficManagementPointerForUpstream = "TrafficManagementPointerForUpstream"
156const GemPortNetworkCtp_TrafficDescriptorProfilePointerForUpstream = "TrafficDescriptorProfilePointerForUpstream"
157const GemPortNetworkCtp_UniCounter = "UniCounter"
158const GemPortNetworkCtp_PriorityQueuePointerForDownStream = "PriorityQueuePointerForDownStream"
159const GemPortNetworkCtp_EncryptionState = "EncryptionState"
160const GemPortNetworkCtp_TrafficDescriptorProfilePointerForDownstream = "TrafficDescriptorProfilePointerForDownstream"
161const GemPortNetworkCtp_EncryptionKeyRing = "EncryptionKeyRing"
162
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000163func init() {
164 gemportnetworkctpBME = &ManagedEntityDefinition{
165 Name: "GemPortNetworkCtp",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000166 ClassID: GemPortNetworkCtpClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000167 MessageTypes: mapset.NewSetWith(
168 Create,
169 Delete,
170 Get,
171 Set,
172 ),
173 AllowedAttributeMask: 0xffc0,
174 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000175 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
176 1: Uint16Field(GemPortNetworkCtp_PortId, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
177 2: Uint16Field(GemPortNetworkCtp_TContPointer, PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
178 3: ByteField(GemPortNetworkCtp_Direction, EnumerationAttributeType, 0x2000, 3, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
179 4: Uint16Field(GemPortNetworkCtp_TrafficManagementPointerForUpstream, PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
180 5: Uint16Field(GemPortNetworkCtp_TrafficDescriptorProfilePointerForUpstream, PointerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
181 6: ByteField(GemPortNetworkCtp_UniCounter, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
182 7: Uint16Field(GemPortNetworkCtp_PriorityQueuePointerForDownStream, PointerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
183 8: ByteField(GemPortNetworkCtp_EncryptionState, EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
184 9: Uint16Field(GemPortNetworkCtp_TrafficDescriptorProfilePointerForDownstream, PointerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
185 10: ByteField(GemPortNetworkCtp_EncryptionKeyRing, EnumerationAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000186 },
187 Access: CreatedByOlt,
188 Support: UnknownSupport,
Himani Chawlaac1f5ad2021-02-04 21:21:54 +0530189 Alarms: AlarmMap{
190 5: "End-to-end loss of continuity",
191 },
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000192 }
193}
194
195// NewGemPortNetworkCtp (class ID 268) creates the basic
196// Managed Entity definition that is used to validate an ME of this type that
197// is received from or transmitted to the OMCC.
198func NewGemPortNetworkCtp(params ...ParamData) (*ManagedEntity, OmciErrors) {
199 return NewManagedEntity(*gemportnetworkctpBME, params...)
200}