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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 8 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [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 | 2d51f05 | 2021-02-09 09:04:15 -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 | // MulticastSubscriberConfigInfoClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Multicast subscriber config info |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const MulticastSubscriberConfigInfoClassID = ClassID(310) // 0x0136 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var multicastsubscriberconfiginfoBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // MulticastSubscriberConfigInfo (Class ID: #310 / 0x0136) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME organizes data associated with multicast management at subscriber ports of IEEE-802.1 |
| 36 | // bridges, including IEEE-802.1p mappers when the provisioning model is mapper-based rather than |
| 37 | // bridge-based. Instances of this ME are created and deleted by the OLT. Because of backward |
| 38 | // compatibility considerations, a subscriber port without an associated multicast subscriber |
| 39 | // config info ME would be expected to support unrestricted multicast access; this ME may therefore |
| 40 | // be viewed as restrictive, rather than permissive. |
| 41 | // |
| 42 | // Through separate attributes, this ME supports either a single multicast operations profile in |
| 43 | // its backward compatible form, or a list of multicast operations profiles instead (the list may |
| 44 | // of course contain a single entry). The OLT can determine whether the ONU supports the multiple |
| 45 | // profile capability by performing a get operation on the optional multicast service package table |
| 46 | // attribute, which exists only on ONUs that are prepared to support the feature. |
| 47 | // |
| 48 | // Relationships |
| 49 | // An instance of this ME is associated with one instance of the MAC bridge port configuration data |
| 50 | // or the IEEE-802.1p mapper service profile. |
| 51 | // |
| 52 | // Attributes |
| 53 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 54 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 55 | // implicitly linked to an instance of the MAC bridge port configuration data or IEEE-802.1p mapper |
| 56 | // ME. (R, setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 57 | // |
| 58 | // Me Type |
| 59 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 60 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 61 | // This attribute indicates the type of the ME implicitly linked by the ME ID attribute. |
| 62 | // |
| 63 | // 0 MAC bridge port config data |
| 64 | // |
| 65 | // 1 IEEE-802.1p mapper service profile |
| 66 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 67 | // Multicast Operations Profile Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 68 | // This attribute points to an instance of the multicast operations profile. This attribute is |
| 69 | // ignored by the ONU if a non-empty multicast service package table attribute is present. (R,W, |
| 70 | // set-by-create) (mandatory) (2 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 71 | // |
| 72 | // Max Simultaneous Groups |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 73 | // This attribute specifies the maximum number of dynamic multicast groups that may be replicated |
| 74 | // to the client port at any one time. The recommended default value 0 specifies that no |
| 75 | // administrative limit is to be imposed. (R,-W, setbycreate) (optional) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 76 | // |
| 77 | // Max Multicast Bandwidth |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 78 | // This attribute specifies the maximum imputed dynamic bandwidth, in bytes per second, that may be |
| 79 | // delivered to the client port at any one time. The recommended default value 0 specifies that no |
| 80 | // administrative limit is to be imposed. (R,-W, setbycreate) (optional) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 81 | // |
| 82 | // Bandwidth Enforcement |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 83 | // The recommended default value of this Boolean attribute is false, and specifies that attempts to |
| 84 | // exceed the max multicast bandwidth be counted but honoured. The value true specifies that such |
| 85 | // attempts be counted and denied. The imputed bandwidth value is taken from the dynamic access |
| 86 | // control list table, both for a new join request and for pre-existing groups. (R,-W, setbycreate) |
| 87 | // (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 88 | // |
| 89 | // Multicast Service Package Table |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 90 | // This attribute is a list that specifies one or more multicast service packages. When the ONU |
| 91 | // receives an IGMP/MLD join request, it searches the multicast service package table in row key |
| 92 | // order, matching the VID (UNI) field (several rows can share the same VID). For each VID (UNI) |
| 93 | // match, the multicast operations profile pointer is used to access the ME that contains the |
| 94 | // attributes associated with the service package. The search stops when all requested multicast |
| 95 | // groups have been found and dealt with. |
| 96 | // |
| 97 | // Each list entry is a vector of six components as follow. |
| 98 | // |
| 99 | // - Table control (2-bytes) |
| 100 | // |
| 101 | // The first 2-bytes of each entry contain a key into the table. It is the responsibility of the |
| 102 | // OLT to assign and track table keys and content. Since row keys are created by the OLT, they may |
| 103 | // be densely or sparsely packed. |
| 104 | // |
| 105 | // The two MSBs of this field determine the meaning of a set operation. These bits are returned as |
| 106 | // 00 during get next operations. |
| 107 | // |
| 108 | // Bits 14..11 are reserved. Bits 10..1 are the row key itself. |
| 109 | // |
| 110 | // - VID (UNI). The value in this field is compared with the VID of upstream IGMP/MLD messages, and |
| 111 | // is used to decide whether to honour a join request. (2 bytes) |
| 112 | // |
| 113 | // Values: |
| 114 | // |
| 115 | // 0..4095 - Matched against the VID of the IGMP/MLD message. 0 indicates a priority-tagged |
| 116 | // message, whose P bits are ignored. |
| 117 | // |
| 118 | // 4096 - Matches untagged IGMP/MLD messages only. |
| 119 | // |
| 120 | // 4097 - Matches tagged messages only, but ignores the value of the VID. |
| 121 | // |
| 122 | // 0xFFFF - Unspecified. |
| 123 | // |
| 124 | // The VID (UNI) comparison occurs prior to any action defined by the upstream IGMP tag control |
| 125 | // attribute in an associated multicast operations profile (or alternatively, before any |
| 126 | // modification by a possible (extended) VLAN tagging operation configuration data ME). |
| 127 | // |
| 128 | // - Max simultaneous groups. This field specifies the maximum number of dynamic multicast groups |
| 129 | // that may be replicated to the client port at any one time, for the multicast service package |
| 130 | // that is associated with this row. The value 0 specifies that no administrative limit is to be |
| 131 | // imposed. (2-bytes) |
| 132 | // |
| 133 | // - Max multicast bandwidth. This field specifies the maximum imputed dynamic bandwidth, in bytes |
| 134 | // per second, that may be delivered to the client port at any one time, for the multicast service |
| 135 | // package that is associated with this row. The value 0 specifies that no administrative limit is |
| 136 | // to be imposed. (4-bytes) |
| 137 | // |
| 138 | // NOTE - The port is also constrained by the global max simultaneous groups and max multicast |
| 139 | // bandwidth attributes of the multicast subscriber config info ME. |
| 140 | // |
| 141 | // - Multicast operations profile pointer. This field contains the ME ID of the multicast |
| 142 | // operations profile ME associated with this service package. (2 bytes) |
| 143 | // |
| 144 | // - Reserved (8 bytes) |
| 145 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 146 | // (R,-W) (optional) (20N bytes, where N is the number of entries in the table) |
| 147 | // |
| 148 | // Allowed Preview Groups Table |
| 149 | // Each list entry begins with a table control field: |
| 150 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 151 | // This attribute is a list that specifies the preview groups that are currently allowed for the |
| 152 | // UNI associated with this ME. It is intended to support paid viewing of a multicast group that |
| 153 | // may or may not have been previewed. |
| 154 | // |
| 155 | // When an IGMP/MLD join request is received, the order of search precedence is as follows. |
| 156 | // |
| 157 | // 1. Multicast operations profile(s), fully authorized groups |
| 158 | // |
| 159 | // 2. This attribute, the allowed preview groups table |
| 160 | // |
| 161 | // 3. Multicast operations profile(s), preview-only groups |
| 162 | // |
| 163 | // If the first match is a group listed in this attribute, the ONU forwards the group to the UNI |
| 164 | // until the group is removed from this list or until the subscriber leaves the group. |
| 165 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 166 | type MulticastSubscriberConfigInfo struct { |
| 167 | ManagedEntityDefinition |
| 168 | Attributes AttributeValueMap |
| 169 | } |
| 170 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 171 | // Attribute name constants |
| 172 | |
| 173 | const MulticastSubscriberConfigInfo_MeType = "MeType" |
| 174 | const MulticastSubscriberConfigInfo_MulticastOperationsProfilePointer = "MulticastOperationsProfilePointer" |
| 175 | const MulticastSubscriberConfigInfo_MaxSimultaneousGroups = "MaxSimultaneousGroups" |
| 176 | const MulticastSubscriberConfigInfo_MaxMulticastBandwidth = "MaxMulticastBandwidth" |
| 177 | const MulticastSubscriberConfigInfo_BandwidthEnforcement = "BandwidthEnforcement" |
| 178 | const MulticastSubscriberConfigInfo_MulticastServicePackageTable = "MulticastServicePackageTable" |
| 179 | const MulticastSubscriberConfigInfo_AllowedPreviewGroupsTable = "AllowedPreviewGroupsTable" |
| 180 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 181 | func init() { |
| 182 | multicastsubscriberconfiginfoBME = &ManagedEntityDefinition{ |
| 183 | Name: "MulticastSubscriberConfigInfo", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 184 | ClassID: MulticastSubscriberConfigInfoClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 185 | MessageTypes: mapset.NewSetWith( |
| 186 | Create, |
| 187 | Delete, |
| 188 | Get, |
| 189 | GetNext, |
| 190 | Set, |
Chip Boling | 2d51f05 | 2021-02-09 09:04:15 -0600 | [diff] [blame] | 191 | SetTable, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 192 | ), |
| 193 | AllowedAttributeMask: 0xfe00, |
| 194 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 195 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 196 | 1: ByteField(MulticastSubscriberConfigInfo_MeType, EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 197 | 2: Uint16Field(MulticastSubscriberConfigInfo_MulticastOperationsProfilePointer, PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 198 | 3: Uint16Field(MulticastSubscriberConfigInfo_MaxSimultaneousGroups, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3), |
| 199 | 4: Uint32Field(MulticastSubscriberConfigInfo_MaxMulticastBandwidth, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4), |
| 200 | 5: ByteField(MulticastSubscriberConfigInfo_BandwidthEnforcement, EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5), |
| 201 | 6: TableField(MulticastSubscriberConfigInfo_MulticastServicePackageTable, TableAttributeType, 0x0400, TableInfo{nil, 20}, mapset.NewSetWith(Read, Write), false, true, false, 6), |
| 202 | 7: TableField(MulticastSubscriberConfigInfo_AllowedPreviewGroupsTable, TableAttributeType, 0x0200, TableInfo{nil, 22}, mapset.NewSetWith(Read, Write), false, false, false, 7), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 203 | }, |
| 204 | Access: CreatedByOlt, |
| 205 | Support: UnknownSupport, |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | // NewMulticastSubscriberConfigInfo (class ID 310) creates the basic |
| 210 | // Managed Entity definition that is used to validate an ME of this type that |
| 211 | // is received from or transmitted to the OMCC. |
| 212 | func NewMulticastSubscriberConfigInfo(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 213 | return NewManagedEntity(*multicastsubscriberconfiginfoBME, params...) |
| 214 | } |