Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 | */ |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const GemPortNetworkCtpClassID = ClassID(268) // 0x010c |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var gemportnetworkctpBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // GemPortNetworkCtp (Class ID: #268 / 0x010c) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 59 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 60 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 61 | // |
| 62 | // Port_Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 78 | // |
| 79 | // Traffic Management Pointer For Upstream |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 85 | // |
| 86 | // Traffic Descriptor Profile Pointer For Upstream |
| 87 | // See also Appendix II. |
| 88 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 97 | // Uni Counter |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 100 | // |
| 101 | // Priority Queue Pointer For Down Stream |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 116 | // |
| 117 | // Traffic Descriptor Profile Pointer For Downstream |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 126 | // See also Appendix II. |
| 127 | // |
| 128 | // Encryption Key Ring |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 143 | // Other values are reserved. |
| 144 | // |
| 145 | type GemPortNetworkCtp struct { |
| 146 | ManagedEntityDefinition |
| 147 | Attributes AttributeValueMap |
| 148 | } |
| 149 | |
| 150 | func init() { |
| 151 | gemportnetworkctpBME = &ManagedEntityDefinition{ |
| 152 | Name: "GemPortNetworkCtp", |
| 153 | ClassID: 268, |
| 154 | MessageTypes: mapset.NewSetWith( |
| 155 | Create, |
| 156 | Delete, |
| 157 | Get, |
| 158 | Set, |
| 159 | ), |
| 160 | AllowedAttributeMask: 0xffc0, |
| 161 | AttributeDefinitions: AttributeDefinitionMap{ |
| 162 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 163 | 1: Uint16Field("PortId", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 164 | 2: Uint16Field("TContPointer", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 165 | 3: ByteField("Direction", EnumerationAttributeType, 0x2000, 3, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 166 | 4: Uint16Field("TrafficManagementPointerForUpstream", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 167 | 5: Uint16Field("TrafficDescriptorProfilePointerForUpstream", PointerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5), |
| 168 | 6: ByteField("UniCounter", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6), |
| 169 | 7: Uint16Field("PriorityQueuePointerForDownStream", PointerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 170 | 8: ByteField("EncryptionState", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8), |
| 171 | 9: Uint16Field("TrafficDescriptorProfilePointerForDownstream", PointerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9), |
| 172 | 10: ByteField("EncryptionKeyRing", EnumerationAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10), |
| 173 | }, |
| 174 | Access: CreatedByOlt, |
| 175 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 176 | Alarms: AlarmMap{ |
| 177 | 5: "End-to-end loss of continuity", |
| 178 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 179 | } |
| 180 | } |
| 181 | |
| 182 | // NewGemPortNetworkCtp (class ID 268) creates the basic |
| 183 | // Managed Entity definition that is used to validate an ME of this type that |
| 184 | // is received from or transmitted to the OMCC. |
| 185 | func NewGemPortNetworkCtp(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 186 | return NewManagedEntity(*gemportnetworkctpBME, params...) |
| 187 | } |