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