Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame] | 4 | * |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [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 |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame] | 8 | * |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame] | 10 | * |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [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 | */ |
| 17 | /* |
| 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 | // GemInterworkingTerminationPointClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity GEM interworking termination point |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 30 | const GemInterworkingTerminationPointClassID = ClassID(266) // 0x010a |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 31 | |
| 32 | var geminterworkingterminationpointBME *ManagedEntityDefinition |
| 33 | |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 34 | // GemInterworkingTerminationPoint (Class ID: #266 / 0x010a) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 35 | // An instance of this ME represents a point in the ONU where the IW of a bearer service (usually |
| 36 | // Ethernet) to the GEM layer takes place. At this point, GEM packets are generated from the bearer |
| 37 | // bit stream (e.g., Ethernet) or the bearer bit stream is reconstructed from GEM packets. |
| 38 | // |
| 39 | // Instances of this ME are created and deleted by the OLT. |
| 40 | // |
| 41 | // Relationships |
| 42 | // One instance of this ME exists for each transformation of a data stream into GEM frames and vice |
| 43 | // versa. |
| 44 | // |
| 45 | // Attributes |
| 46 | // Managed Entity Id |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 47 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 48 | // (2-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 49 | // |
| 50 | // Gem Port Network Ctp Connectivity Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 51 | // This attribute points to an instance of the GEM port network CTP. (R,-W, setbycreate) |
| 52 | // (mandatory) (2-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 53 | // |
| 54 | // Interworking Option |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 55 | // This attribute identifies the type of non-GEM function that is being interworked. The options |
| 56 | // are as follows. |
| 57 | // |
| 58 | // 0 Circuit-emulated TDM |
| 59 | // |
| 60 | // 1 MAC bridged LAN |
| 61 | // |
| 62 | // 2 Reserved |
| 63 | // |
| 64 | // 3 Reserved |
| 65 | // |
| 66 | // 4 Video return path |
| 67 | // |
| 68 | // 5 IEEE 802.1p mapper |
| 69 | // |
| 70 | // 6 Downstream broadcast |
| 71 | // |
| 72 | // 7 MPLS PW TDM service |
| 73 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 74 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 75 | // |
| 76 | // Service Profile Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 77 | // This attribute points to an instance of a service profile: |
| 78 | // |
| 79 | // CES service profile if IW option-=-0 |
| 80 | // |
| 81 | // MAC bridge service profile if IW option-=-1 |
| 82 | // |
| 83 | // Video return path service profile if IW option-=-4 |
| 84 | // |
| 85 | // IEEE 802.1p mapper service profile if IW option-=-5 |
| 86 | // |
| 87 | // Null pointer if IW option-=-6 |
| 88 | // |
| 89 | // CES service profile if IW option-=-7 |
| 90 | // |
| 91 | // (R,-W, setbycreate) (mandatory) (2-bytes) |
| 92 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 93 | // NOTE - The video return path (VRP) service profile is defined in [ITU-T G.984.4]. |
| 94 | // |
| 95 | // Interworking Termination Point Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 96 | // This attribute is used for the CES and IEEE 802.1p mapper service without a MAC bridge. |
| 97 | // Depending on the service provided, it points to the associated instance of the following MEs: |
| 98 | // |
| 99 | // PPTP CES UNI |
| 100 | // |
| 101 | // Logical N * 64 kbit/s sub-port CTP |
| 102 | // |
| 103 | // PPTP Ethernet UNI |
| 104 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 105 | // In all other GEM services, the relationship between the related service TP and this GEM IW TP is |
| 106 | // derived from other ME relations; this attribute is set to a null pointer and not used. (R,-W, |
| 107 | // setbycreate) (mandatory) (2-bytes) |
| 108 | // |
| 109 | // Pptp Counter |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 110 | // This value reports the number of PPTP ME instances associated with this GEM IW TP. (R) |
| 111 | // (optional) (1-byte) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 112 | // |
| 113 | // Operational State |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 114 | // This attribute indicates whether the ME is capable of performing its function. Valid values are |
| 115 | // enabled (0) and disabled (1). (R) (optional) (1-byte) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 116 | // |
| 117 | // Gal Profile Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 118 | // 5 GAL Ethernet profile for IEEE 802.1p mapper |
| 119 | // |
| 120 | // 6 Null pointer |
| 121 | // |
| 122 | // 7 Null pointer |
| 123 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 124 | // (R,-W, setbycreate) (mandatory) (2-bytes) |
| 125 | // |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 126 | // This attribute points to an instance of the GAL profile. The relationship between the IW option |
| 127 | // and the related GAL profile is as follows. |
| 128 | // |
| 129 | // Interworking option GAL profile type |
| 130 | // |
| 131 | // 0 Null pointer |
| 132 | // |
| 133 | // 1 GAL Ethernet profile |
| 134 | // |
| 135 | // 3 GAL Ethernet profile for data service |
| 136 | // |
| 137 | // 4 GAL Ethernet profile for video return path |
| 138 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 139 | // Gal Loopback Configuration |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 140 | // This attribute sets the loopback configuration when using GEM mode: |
| 141 | // |
| 142 | // 0 No loopback |
| 143 | // |
| 144 | // 1 Loopback of downstream traffic after GAL |
| 145 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 146 | // The default value of this attribute is 0. When the IW option is 6 (downstream broadcast), this |
| 147 | // attribute is not used. (R,-W) (mandatory) (1-byte) |
| 148 | // |
| 149 | type GemInterworkingTerminationPoint struct { |
| 150 | ManagedEntityDefinition |
| 151 | Attributes AttributeValueMap |
| 152 | } |
| 153 | |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame] | 154 | // Attribute name constants |
| 155 | |
| 156 | const GemInterworkingTerminationPoint_GemPortNetworkCtpConnectivityPointer = "GemPortNetworkCtpConnectivityPointer" |
| 157 | const GemInterworkingTerminationPoint_InterworkingOption = "InterworkingOption" |
| 158 | const GemInterworkingTerminationPoint_ServiceProfilePointer = "ServiceProfilePointer" |
| 159 | const GemInterworkingTerminationPoint_InterworkingTerminationPointPointer = "InterworkingTerminationPointPointer" |
| 160 | const GemInterworkingTerminationPoint_PptpCounter = "PptpCounter" |
| 161 | const GemInterworkingTerminationPoint_OperationalState = "OperationalState" |
| 162 | const GemInterworkingTerminationPoint_GalProfilePointer = "GalProfilePointer" |
| 163 | const GemInterworkingTerminationPoint_GalLoopbackConfiguration = "GalLoopbackConfiguration" |
| 164 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 165 | func init() { |
| 166 | geminterworkingterminationpointBME = &ManagedEntityDefinition{ |
| 167 | Name: "GemInterworkingTerminationPoint", |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame] | 168 | ClassID: GemInterworkingTerminationPointClassID, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 169 | MessageTypes: mapset.NewSetWith( |
| 170 | Create, |
| 171 | Delete, |
| 172 | Get, |
| 173 | Set, |
| 174 | ), |
| 175 | AllowedAttributeMask: 0xff00, |
| 176 | AttributeDefinitions: AttributeDefinitionMap{ |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame] | 177 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 178 | 1: Uint16Field(GemInterworkingTerminationPoint_GemPortNetworkCtpConnectivityPointer, PointerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 179 | 2: ByteField(GemInterworkingTerminationPoint_InterworkingOption, EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 180 | 3: Uint16Field(GemInterworkingTerminationPoint_ServiceProfilePointer, PointerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 181 | 4: Uint16Field(GemInterworkingTerminationPoint_InterworkingTerminationPointPointer, PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 182 | 5: ByteField(GemInterworkingTerminationPoint_PptpCounter, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5), |
| 183 | 6: ByteField(GemInterworkingTerminationPoint_OperationalState, EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read), true, true, false, 6), |
| 184 | 7: Uint16Field(GemInterworkingTerminationPoint_GalProfilePointer, PointerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 185 | 8: ByteField(GemInterworkingTerminationPoint_GalLoopbackConfiguration, EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8), |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 186 | }, |
| 187 | Access: CreatedByOlt, |
| 188 | Support: UnknownSupport, |
| 189 | Alarms: AlarmMap{ |
| 190 | 0: "Deprecated", |
| 191 | }, |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | // NewGemInterworkingTerminationPoint (class ID 266) 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 NewGemInterworkingTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 199 | return NewManagedEntity(*geminterworkingterminationpointBME, params...) |
| 200 | } |