blob: 1932b6b9faeda6491d4f22ad07c471f24c6d5d82 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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 Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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 Boling2d51f052021-02-09 09:04:15 -060017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// MulticastSubscriberConfigInfoClassID is the 16-bit ID for the OMCI
29// Managed entity Multicast subscriber config info
Chip Boling610117d2021-09-09 11:24:34 -050030const MulticastSubscriberConfigInfoClassID = ClassID(310) // 0x0136
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var multicastsubscriberconfiginfoBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// MulticastSubscriberConfigInfo (Class ID: #310 / 0x0136)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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 Boling610117d2021-09-09 11:24:34 -050054// 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 Boling6e27b352020-02-14 09:10:01 -060057//
58// Me Type
59// (R,-W, setbycreate) (mandatory) (1-byte)
60//
Chip Boling610117d2021-09-09 11:24:34 -050061// 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 Boling6e27b352020-02-14 09:10:01 -060067// Multicast Operations Profile Pointer
Chip Boling610117d2021-09-09 11:24:34 -050068// 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 Boling6e27b352020-02-14 09:10:01 -060071//
72// Max Simultaneous Groups
Chip Boling610117d2021-09-09 11:24:34 -050073// 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 Boling6e27b352020-02-14 09:10:01 -060076//
77// Max Multicast Bandwidth
Chip Boling610117d2021-09-09 11:24:34 -050078// 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 Boling6e27b352020-02-14 09:10:01 -060081//
82// Bandwidth Enforcement
Chip Boling610117d2021-09-09 11:24:34 -050083// 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 Boling6e27b352020-02-14 09:10:01 -060088//
89// Multicast Service Package Table
Chip Boling610117d2021-09-09 11:24:34 -050090// 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 Boling6e27b352020-02-14 09:10:01 -0600146// (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 Boling610117d2021-09-09 11:24:34 -0500151// 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 Boling6e27b352020-02-14 09:10:01 -0600166type MulticastSubscriberConfigInfo struct {
167 ManagedEntityDefinition
168 Attributes AttributeValueMap
169}
170
171func init() {
172 multicastsubscriberconfiginfoBME = &ManagedEntityDefinition{
173 Name: "MulticastSubscriberConfigInfo",
174 ClassID: 310,
175 MessageTypes: mapset.NewSetWith(
176 Create,
177 Delete,
178 Get,
179 GetNext,
180 Set,
Chip Boling2d51f052021-02-09 09:04:15 -0600181 SetTable,
Chip Boling6e27b352020-02-14 09:10:01 -0600182 ),
183 AllowedAttributeMask: 0xfe00,
184 AttributeDefinitions: AttributeDefinitionMap{
185 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
186 1: ByteField("MeType", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
187 2: Uint16Field("MulticastOperationsProfilePointer", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
188 3: Uint16Field("MaxSimultaneousGroups", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
189 4: Uint32Field("MaxMulticastBandwidth", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
190 5: ByteField("BandwidthEnforcement", EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
191 6: TableField("MulticastServicePackageTable", TableAttributeType, 0x0400, TableInfo{nil, 20}, mapset.NewSetWith(Read, Write), false, true, false, 6),
192 7: TableField("AllowedPreviewGroupsTable", TableAttributeType, 0x0200, TableInfo{nil, 22}, mapset.NewSetWith(Read, Write), false, false, false, 7),
193 },
194 Access: CreatedByOlt,
195 Support: UnknownSupport,
196 }
197}
198
199// NewMulticastSubscriberConfigInfo (class ID 310) creates the basic
200// Managed Entity definition that is used to validate an ME of this type that
201// is received from or transmitted to the OMCC.
202func NewMulticastSubscriberConfigInfo(params ...ParamData) (*ManagedEntity, OmciErrors) {
203 return NewManagedEntity(*multicastsubscriberconfiginfoBME, params...)
204}