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 |
| 30 | const GemPortNetworkCtpClassID ClassID = ClassID(268) |
| 31 | |
| 32 | var gemportnetworkctpBME *ManagedEntityDefinition |
| 33 | |
| 34 | // GemPortNetworkCtp (class ID #268) |
| 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 |
| 59 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate) |
| 60 | // (mandatory) (2-bytes) |
| 61 | // |
| 62 | // Port_Id |
| 63 | // NOTE 1 - While nothing forbids the existence of several GEM port network CTPs with the same |
| 64 | // port-ID value, downstream traffic is modelled as being delivered to all such GEM port network |
| 65 | // CTPs. Be aware of potential difficulties associated with defining downstream flows and |
| 66 | // aggregating PM statistics. |
| 67 | // |
| 68 | // T_Cont Pointer |
| 69 | // T-CONT pointer: This attribute points to a T-CONT instance. (R,-W, setbycreate) (mandatory) |
| 70 | // (2-bytes) |
| 71 | // |
| 72 | // Direction |
| 73 | // Direction: This attribute specifies whether the GEM port is used for UNI-to-ANI (1), ANI-to-UNI |
| 74 | // (2), or bidirectional (3) connection. (R,-W, setbycreate) (mandatory) (1-byte) |
| 75 | // |
| 76 | // Traffic Management Pointer For Upstream |
| 77 | // Traffic management pointer for upstream: If the traffic management option attribute in the ONU-G |
| 78 | // ME is 0 (priority controlled) or 2 (priority and rate controlled), this pointer specifies the |
| 79 | // priority queue ME serving this GEM port network CTP. If the traffic management option attribute |
| 80 | // is 1 (rate controlled), this attribute redundantly points to the TCONT serving this GEM port |
| 81 | // network CTP. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 82 | // |
| 83 | // Traffic Descriptor Profile Pointer For Upstream |
| 84 | // See also Appendix II. |
| 85 | // |
| 86 | // Uni Counter |
| 87 | // UNI counter: This attribute reports the number of instances of UNI-G ME associated with this GEM |
| 88 | // port network CTP. (R) (optional) (1-byte) |
| 89 | // |
| 90 | // Priority Queue Pointer For Down Stream |
| 91 | // NOTE 2 - If the GEM port network CTP is associated with more than one UNI (downstream |
| 92 | // multicast), the downstream priority queue pointer defines a pattern (e.g., queue number 3 for a |
| 93 | // given UNI) to be replicated (i.e., to queue number 3) at the other affected UNIs. |
| 94 | // |
| 95 | // Encryption State |
| 96 | // Encryption state: This attribute indicates the current state of the GEM port network CTP's |
| 97 | // encryption. Legal values are defined to be the same as those of the security mode attribute of |
| 98 | // the ONU2-G, with the exception that attribute value 0 indicates an unencrypted GEM port. (R) |
| 99 | // (optional) (1-byte) |
| 100 | // |
| 101 | // Traffic Descriptor Profile Pointer For Downstream |
| 102 | // See also Appendix II. |
| 103 | // |
| 104 | // Encryption Key Ring |
| 105 | // Other values are reserved. |
| 106 | // |
| 107 | type GemPortNetworkCtp struct { |
| 108 | ManagedEntityDefinition |
| 109 | Attributes AttributeValueMap |
| 110 | } |
| 111 | |
| 112 | func init() { |
| 113 | gemportnetworkctpBME = &ManagedEntityDefinition{ |
| 114 | Name: "GemPortNetworkCtp", |
| 115 | ClassID: 268, |
| 116 | MessageTypes: mapset.NewSetWith( |
| 117 | Create, |
| 118 | Delete, |
| 119 | Get, |
| 120 | Set, |
| 121 | ), |
| 122 | AllowedAttributeMask: 0xffc0, |
| 123 | AttributeDefinitions: AttributeDefinitionMap{ |
| 124 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 125 | 1: Uint16Field("PortId", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 126 | 2: Uint16Field("TContPointer", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 127 | 3: ByteField("Direction", EnumerationAttributeType, 0x2000, 3, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 128 | 4: Uint16Field("TrafficManagementPointerForUpstream", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 129 | 5: Uint16Field("TrafficDescriptorProfilePointerForUpstream", PointerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5), |
| 130 | 6: ByteField("UniCounter", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6), |
| 131 | 7: Uint16Field("PriorityQueuePointerForDownStream", PointerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 132 | 8: ByteField("EncryptionState", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8), |
| 133 | 9: Uint16Field("TrafficDescriptorProfilePointerForDownstream", PointerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9), |
| 134 | 10: ByteField("EncryptionKeyRing", EnumerationAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10), |
| 135 | }, |
| 136 | Access: CreatedByOlt, |
| 137 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 138 | Alarms: AlarmMap{ |
| 139 | 5: "End-to-end loss of continuity", |
| 140 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 141 | } |
| 142 | } |
| 143 | |
| 144 | // NewGemPortNetworkCtp (class ID 268) creates the basic |
| 145 | // Managed Entity definition that is used to validate an ME of this type that |
| 146 | // is received from or transmitted to the OMCC. |
| 147 | func NewGemPortNetworkCtp(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 148 | return NewManagedEntity(*gemportnetworkctpBME, params...) |
| 149 | } |