Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 8 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 10 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 | */ |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 23 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 28 | // MulticastGemInterworkingTerminationPointClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Multicast GEM interworking termination point |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 30 | const MulticastGemInterworkingTerminationPointClassID = ClassID(281) // 0x0119 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 31 | |
| 32 | var multicastgeminterworkingterminationpointBME *ManagedEntityDefinition |
| 33 | |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 34 | // MulticastGemInterworkingTerminationPoint (Class ID: #281 / 0x0119) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 35 | // An instance of this ME represents a point in a G-PON ONU where a multicast service interworks |
| 36 | // with the GEM layer. At this point, a multicast bit stream is reconstructed from GEM packets. |
| 37 | // |
| 38 | // Instances of this ME are created and deleted by the OLT. |
| 39 | // |
| 40 | // Multicast interworking GEM modes of operation |
| 41 | // |
| 42 | // The default multicast operation of the PON is where all the multicast content streams are |
| 43 | // carried in one PON layer connection (GEM port). This connection is then specified in the first |
| 44 | // entry of the IPv4 or IPv6 multicast address table, as the case may be. This single entry also |
| 45 | // specifies an all-inclusive IP multicast destination address (DA) range (e.g., 224.0.0.0 to |
| 46 | // 239.255.255.255 in the case of IPv4). The ONU then filters the traffic based on either Ethernet |
| 47 | // MAC addresses or IP addresses. The associated GEM port network CTP ME specifies the GEM port-ID |
| 48 | // that supports all multicast connections. |
| 49 | // |
| 50 | // In the default multicast operation, all multicast content streams are placed in one PON layer |
| 51 | // connection (GEM port). The OLT sets up a completely conventional model, a pointer from the |
| 52 | // multicast GEM IW termination to a GEM port network CTP. The OLT configures the GEM port-ID of |
| 53 | // the GEM port network CTP into the appropriate multicast address table attribute(s), along with |
| 54 | // the other table fields that specify the range of IP multicast DAs. The ONU accepts the entire |
| 55 | // multicast stream through the designated GEM port, then filters the traffic based on either the |
| 56 | // Ethernet MAC address or IP DA. |
| 57 | // |
| 58 | // An optional multicast configuration supports separate multicast streams carried over separate |
| 59 | // PON layer connections, i.e., on separate GEM ports. This permits the ONU to filter multicast |
| 60 | // streams at the GEM level, which is efficient in hardware, while ignoring other multicast streams |
| 61 | // that may be of interest to other ONUs on the PON. |
| 62 | // |
| 63 | // After configuring the explicit model for the first multicast GEM port, the OLT supports multiple |
| 64 | // multicast GEM ports by then configuring additional entries into the multicast address table(s), |
| 65 | // entries with different GEM port-IDs. The OMCI model is defined such that these ports are |
| 66 | // implicitly grouped together and served by the single explicit GEM port network CTP. No |
| 67 | // additional GEM network CTPs need be created or linked for the additional GEM ports. |
| 68 | // |
| 69 | // Several multicast GEM IW TPs can exist, each linked to separate bridge ports or mappers to serve |
| 70 | // different communities of interest in a complex ONU. |
| 71 | // |
| 72 | // Discovery of multicast support |
| 73 | // |
| 74 | // The OLT uses the multicast GEM IW TP entity as the means to discover the ONU's multicast |
| 75 | // capability. This entity is mandatory if multicast is supported by the ONU. If the OLT attempts |
| 76 | // to create this entity on an ONU that does not support multicast, the create command fails. The |
| 77 | // create or set command also fails if the OLT attempts to exploit optional features that the ONU |
| 78 | // does not support, e.g., in attempting to write a multicast address table with more than a single |
| 79 | // entry or to create multiple multicast GEM IW TPs. |
| 80 | // |
| 81 | // This ME is defined by a similarity to the unicast GEM IW TP, and a number of its attributes are |
| 82 | // not meaningful in a multicast context. These attributes are set to 0 and not used, as indicated |
| 83 | // in the following. |
| 84 | // |
| 85 | // Relationships |
| 86 | // An instance of this ME exists for each occurrence of transformation of GEM packets into a |
| 87 | // multicast data stream. |
| 88 | // |
| 89 | // Attributes |
| 90 | // Managed Entity Id |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 91 | // This attribute uniquely identifies each instance of this ME. The value 0xFFFF is reserved. (R, |
| 92 | // setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 93 | // |
| 94 | // Gem Port Network Ctp Connectivity Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 95 | // This attribute points to an instance of the GEM port network CTP that is associated with this |
| 96 | // multicast GEM IW TP. (R,-W, setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 97 | // |
| 98 | // Interworking Option |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 99 | // 3 Reserved |
| 100 | // |
| 101 | // 5 IEEE 802.1p mapper |
| 102 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 103 | // (R,-W, setbycreate) (mandatory) (1-byte) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 104 | // |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 105 | // This attribute identifies the type of non-GEM function that is being interworked. The option can |
| 106 | // be as follows. |
| 107 | // |
| 108 | // 0 This value is a "no-op" or "don't care". It should be used when the multicast GEM IW TP is |
| 109 | // associated with several functions of different types. It can optionally be used in all cases, |
| 110 | // since the necessary information is available elsewhere. The previous code points are retained |
| 111 | // for backward compatibility: |
| 112 | // |
| 113 | // 1 MAC bridged LAN |
| 114 | // |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 115 | // Service Profile Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 116 | // This attribute is set to 0 and not used. For backward compatibility, it may also be set to point |
| 117 | // to a MAC bridge service profile or IEEE 802.1p mapper service profile. (R,-W, setbycreate) |
| 118 | // (mandatory) (2-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 119 | // |
| 120 | // Not Used 1 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 121 | // This attribute is set to 0 and not used. (R,-W, setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 122 | // |
| 123 | // Pptp Counter |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 124 | // This attribute represents the number of instances of PPTP MEs associated with this instance of |
| 125 | // the multicast GEM IW TP. This attribute conveys no information that is not available elsewhere; |
| 126 | // it may be set to 0xFF and not used. (R) (optional) (1-byte) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 127 | // |
| 128 | // Operational State |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 129 | // This attribute indicates whether the ME is capable of performing its function. Valid values are |
| 130 | // enabled (0) and disabled (1). (R) (optional) (1-byte) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 131 | // |
| 132 | // Gal Profile Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 133 | // This attribute is set to 0 and not used. For backward compatibility, it may also be set to point |
| 134 | // to a GAL Ethernet profile. (R,-W, setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 135 | // |
| 136 | // Not Used 2 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 137 | // This attribute is set to 0 and not used. (R,-W, setbycreate) (mandatory) (1-byte) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 138 | // |
| 139 | // Ipv4 Multicast Address Table |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 140 | // This attribute maps IP multicast addresses to PON layer addresses. Each entry contains the |
| 141 | // following. |
| 142 | // |
| 143 | // GEM port-ID 2-bytes |
| 144 | // |
| 145 | // Secondary key 2-bytes |
| 146 | // |
| 147 | // IP multicast DA range start 4-bytes |
| 148 | // |
| 149 | // IP multicast DA range stop 4-bytes |
| 150 | // |
| 151 | // The first four bytes of each entry are treated as a key into the list. The secondary key allows |
| 152 | // the table to contain more than a single range for a given GEM port. |
| 153 | // |
| 154 | // A set action to a particular value overwrites any existing entry with the same first four bytes. |
| 155 | // If the last eight bytes of a set command are all zero, that entry is deleted from the list, as |
| 156 | // the IP address 0.0.0.0 is not valid. |
| 157 | // |
| 158 | // (R,-W) (mandatory) (12N bytes, where N is the number of entries in the list.) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 159 | // |
| 160 | // Ipv6 Multicast Address Table |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 161 | // This attribute maps IPv6 multicast DAs to PON layer addresses. Each entry contains: |
| 162 | // |
| 163 | // GEM port-ID 2-bytes |
| 164 | // |
| 165 | // Secondary key 2-bytes |
| 166 | // |
| 167 | // Least significant bytes, |
| 168 | // |
| 169 | // IP multicast DA range start 4-bytes |
| 170 | // |
| 171 | // Least significant bytes, |
| 172 | // |
| 173 | // IP multicast DA range stop 4-bytes |
| 174 | // |
| 175 | // Most significant bytes, IP DA 12-bytes |
| 176 | // |
| 177 | // The first four bytes of each entry are treated as a key into the list. The secondary key allows |
| 178 | // the table to contain more than a single range for a given GEM port. |
| 179 | // |
| 180 | // A set action to a particular value overwrites any existing entry with the same first four bytes. |
| 181 | // If the last 20 bytes of a set command are all zero, that entry is deleted from the list. |
| 182 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 183 | // (R,-W) (optional) (24N bytes, where N is the number of entries in the list.) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 184 | // |
| 185 | type MulticastGemInterworkingTerminationPoint struct { |
| 186 | ManagedEntityDefinition |
| 187 | Attributes AttributeValueMap |
| 188 | } |
| 189 | |
| 190 | func init() { |
| 191 | multicastgeminterworkingterminationpointBME = &ManagedEntityDefinition{ |
| 192 | Name: "MulticastGemInterworkingTerminationPoint", |
| 193 | ClassID: 281, |
| 194 | MessageTypes: mapset.NewSetWith( |
| 195 | Create, |
| 196 | Delete, |
| 197 | Get, |
| 198 | GetNext, |
| 199 | Set, |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 200 | SetTable, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 201 | ), |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 202 | AllowedAttributeMask: 0xffc0, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 203 | AttributeDefinitions: AttributeDefinitionMap{ |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 204 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 205 | 1: Uint16Field("GemPortNetworkCtpConnectivityPointer", PointerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 206 | 2: ByteField("InterworkingOption", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 207 | 3: Uint16Field("ServiceProfilePointer", PointerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 208 | 4: Uint16Field("NotUsed1", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 209 | 5: ByteField("PptpCounter", UnsignedIntegerAttributeType, 0x0800, 255, mapset.NewSetWith(Read), false, true, false, 5), |
| 210 | 6: ByteField("OperationalState", EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read), true, true, false, 6), |
| 211 | 7: Uint16Field("GalProfilePointer", PointerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 212 | 8: ByteField("NotUsed2", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8), |
| 213 | 9: TableField("Ipv4MulticastAddressTable", TableAttributeType, 0x0080, TableInfo{nil, 12}, mapset.NewSetWith(Read, Write), false, false, false, 9), |
| 214 | 10: TableField("Ipv6MulticastAddressTable", TableAttributeType, 0x0040, TableInfo{nil, 24}, mapset.NewSetWith(Read, Write), false, true, false, 10), |
| 215 | }, |
| 216 | Access: CreatedByOlt, |
| 217 | Support: UnknownSupport, |
| 218 | Alarms: AlarmMap{ |
| 219 | 0: "Deprecated", |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 220 | }, |
| 221 | } |
| 222 | } |
| 223 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 224 | // NewMulticastGemInterworkingTerminationPoint (class ID 281) creates the basic |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 225 | // Managed Entity definition that is used to validate an ME of this type that |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 226 | // is received from or transmitted to the OMCC. |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 227 | func NewMulticastGemInterworkingTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) { |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 228 | return NewManagedEntity(*multicastgeminterworkingterminationpointBME, params...) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 229 | } |