Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 4 | * |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 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 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 8 | * |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 10 | * |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 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 | */ |
Himani Chawla | ac1f5ad | 2021-02-04 21:21:54 +0530 | [diff] [blame] | 17 | /* |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 18 | * 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // GemPortNetworkCtpClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity GEM port network CTP |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 30 | const GemPortNetworkCtpClassID = ClassID(268) // 0x010c |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 31 | |
| 32 | var gemportnetworkctpBME *ManagedEntityDefinition |
| 33 | |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 34 | // GemPortNetworkCtp (Class ID: #268 / 0x010c) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 35 | // 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 |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 59 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 60 | // (2-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 61 | // |
| 62 | // Port_Id |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 63 | // Port-ID: This attribute is the port-ID of the GEM port associated with this CTP. (RWSC) |
| 64 | // (mandatory) (2-bytes) |
| 65 | // |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 66 | // 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 |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 76 | // 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 Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 78 | // |
| 79 | // Traffic Management Pointer For Upstream |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 80 | // 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 Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 85 | // |
| 86 | // Traffic Descriptor Profile Pointer For Upstream |
| 87 | // See also Appendix II. |
| 88 | // |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 89 | // 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 Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 97 | // Uni Counter |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 98 | // This attribute reports the number of instances of UNI-G ME associated with this GEM port network |
| 99 | // CTP. (R) (optional) (1-byte) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 100 | // |
| 101 | // Priority Queue Pointer For Down Stream |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 102 | // 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 Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 108 | // 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 |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 113 | // 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 Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 116 | // |
| 117 | // Traffic Descriptor Profile Pointer For Downstream |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 118 | // 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 Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 126 | // See also Appendix II. |
| 127 | // |
| 128 | // Encryption Key Ring |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 129 | // 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 Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 143 | // Other values are reserved. |
| 144 | // |
| 145 | type GemPortNetworkCtp struct { |
| 146 | ManagedEntityDefinition |
| 147 | Attributes AttributeValueMap |
| 148 | } |
| 149 | |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 150 | // Attribute name constants |
| 151 | |
| 152 | const GemPortNetworkCtp_PortId = "PortId" |
| 153 | const GemPortNetworkCtp_TContPointer = "TContPointer" |
| 154 | const GemPortNetworkCtp_Direction = "Direction" |
| 155 | const GemPortNetworkCtp_TrafficManagementPointerForUpstream = "TrafficManagementPointerForUpstream" |
| 156 | const GemPortNetworkCtp_TrafficDescriptorProfilePointerForUpstream = "TrafficDescriptorProfilePointerForUpstream" |
| 157 | const GemPortNetworkCtp_UniCounter = "UniCounter" |
| 158 | const GemPortNetworkCtp_PriorityQueuePointerForDownStream = "PriorityQueuePointerForDownStream" |
| 159 | const GemPortNetworkCtp_EncryptionState = "EncryptionState" |
| 160 | const GemPortNetworkCtp_TrafficDescriptorProfilePointerForDownstream = "TrafficDescriptorProfilePointerForDownstream" |
| 161 | const GemPortNetworkCtp_EncryptionKeyRing = "EncryptionKeyRing" |
| 162 | |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 163 | func init() { |
| 164 | gemportnetworkctpBME = &ManagedEntityDefinition{ |
| 165 | Name: "GemPortNetworkCtp", |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 166 | ClassID: GemPortNetworkCtpClassID, |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 167 | MessageTypes: mapset.NewSetWith( |
| 168 | Create, |
| 169 | Delete, |
| 170 | Get, |
| 171 | Set, |
| 172 | ), |
| 173 | AllowedAttributeMask: 0xffc0, |
| 174 | AttributeDefinitions: AttributeDefinitionMap{ |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 175 | 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 Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 186 | }, |
| 187 | Access: CreatedByOlt, |
| 188 | Support: UnknownSupport, |
Himani Chawla | ac1f5ad | 2021-02-04 21:21:54 +0530 | [diff] [blame] | 189 | Alarms: AlarmMap{ |
| 190 | 5: "End-to-end loss of continuity", |
| 191 | }, |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 192 | } |
| 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. |
| 198 | func NewGemPortNetworkCtp(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 199 | return NewManagedEntity(*gemportnetworkctpBME, params...) |
| 200 | } |