blob: eebe5a1f7d016cdf3549818df864e5cf8cbefaeb [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// GemPortNetworkCtpClassID is the 16-bit ID for the OMCI
26// Managed entity GEM port network CTP
27const GemPortNetworkCtpClassID ClassID = ClassID(268)
28
29var gemportnetworkctpBME *ManagedEntityDefinition
30
31// GemPortNetworkCtp (class ID #268)
32// This ME represents the termination of a GEM port on an ONU. This ME aggregates connectivity
33// functionality from the network view and alarms from the network element view as well as
34// artefacts from trails.
35//
36// Instances of the GEM port network CTP ME are created and deleted by the OLT. An instance of GEM
37// port network CTP can be deleted only when no GEM IW TP or GEM port network CTP PM history data
38// are associated with it. It is the responsibility of the OLT to make sure that the ONU
39// configuration meets this condition.
40//
41// In ITU-T G.984 systems, when a GEM port network CTP is created, its encryption state is by
42// default not encrypted. If the OLT wishes to configure the GEM port to use encryption, it must
43// send the appropriate PLOAM message. This applies equally to new CTPs and to CTPs that are re-
44// created after an MIB reset.
45//
46// In ITU-T G.987 systems, GEM ports are dynamically encrypted. If it is intended to encrypt the
47// GEM port, the OLT must configure a key ring to be used, and the key must be known to the ONU at
48// run time.
49//
50// Relationships
51// An instance of the GEM port network CTP ME may be associated with an instance of the T-CONT and
52// GEM IW TP MEs.
53//
54// Attributes
55// Managed Entity Id
56// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
57// (mandatory) (2-bytes)
58//
59// Port_Id
60// NOTE 1 - While nothing forbids the existence of several GEM port network CTPs with the same
61// port-ID value, downstream traffic is modelled as being delivered to all such GEM port network
62// CTPs. Be aware of potential difficulties associated with defining downstream flows and
63// aggregating PM statistics.
64//
65// T_Cont Pointer
66// T-CONT pointer: This attribute points to a T-CONT instance. (R,-W, setbycreate) (mandatory)
67// (2-bytes)
68//
69// Direction
70// Direction: This attribute specifies whether the GEM port is used for UNI-to-ANI (1), ANI-to-UNI
71// (2), or bidirectional (3) connection. (R,-W, setbycreate) (mandatory) (1-byte)
72//
73// Traffic Management Pointer For Upstream
74// Traffic management pointer for upstream: If the traffic management option attribute in the ONU-G
75// ME is 0 (priority controlled) or 2 (priority and rate controlled), this pointer specifies the
76// priority queue ME serving this GEM port network CTP. If the traffic management option attribute
77// is 1 (rate controlled), this attribute redundantly points to the TCONT serving this GEM port
78// network CTP. (R,-W, setbycreate) (mandatory) (2-bytes)
79//
80// Traffic Descriptor Profile Pointer For Upstream
81// See also Appendix II.
82//
83// Uni Counter
84// UNI counter: This attribute reports the number of instances of UNI-G ME associated with this GEM
85// port network CTP. (R) (optional) (1-byte)
86//
87// Priority Queue Pointer For Down Stream
88// NOTE 2 - If the GEM port network CTP is associated with more than one UNI (downstream
89// multicast), the downstream priority queue pointer defines a pattern (e.g., queue number 3 for a
90// given UNI) to be replicated (i.e., to queue number 3) at the other affected UNIs.
91//
92// Encryption State
93// Encryption state: This attribute indicates the current state of the GEM port network CTP's
94// encryption. Legal values are defined to be the same as those of the security mode attribute of
95// the ONU2-G, with the exception that attribute value 0 indicates an unencrypted GEM port. (R)
96// (optional) (1-byte)
97//
98// Traffic Descriptor Profile Pointer For Downstream
99// See also Appendix II.
100//
101// Encryption Key Ring
102// Other values are reserved.
103//
104type GemPortNetworkCtp struct {
105 ManagedEntityDefinition
106 Attributes AttributeValueMap
107}
108
109func init() {
110 gemportnetworkctpBME = &ManagedEntityDefinition{
111 Name: "GemPortNetworkCtp",
112 ClassID: 268,
113 MessageTypes: mapset.NewSetWith(
114 Create,
115 Delete,
116 Get,
117 Set,
118 ),
119 AllowedAttributeMask: 0xffc0,
120 AttributeDefinitions: AttributeDefinitionMap{
121 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
122 1: Uint16Field("PortId", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
123 2: Uint16Field("TContPointer", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
124 3: ByteField("Direction", EnumerationAttributeType, 0x2000, 3, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
125 4: Uint16Field("TrafficManagementPointerForUpstream", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
126 5: Uint16Field("TrafficDescriptorProfilePointerForUpstream", PointerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
127 6: ByteField("UniCounter", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
128 7: Uint16Field("PriorityQueuePointerForDownStream", PointerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
129 8: ByteField("EncryptionState", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
130 9: Uint16Field("TrafficDescriptorProfilePointerForDownstream", PointerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
131 10: ByteField("EncryptionKeyRing", EnumerationAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10),
132 },
133 Access: CreatedByOlt,
134 Support: UnknownSupport,
135 }
136}
137
138// NewGemPortNetworkCtp (class ID 268) creates the basic
139// Managed Entity definition that is used to validate an ME of this type that
140// is received from or transmitted to the OMCC.
141func NewGemPortNetworkCtp(params ...ParamData) (*ManagedEntity, OmciErrors) {
142 return NewManagedEntity(*gemportnetworkctpBME, params...)
143}