blob: b9f65658a4cbacc287eec871f091a8a6e4b80625 [file] [log] [blame]
Andrea Campanella10426e22021-10-15 17:58:04 +02001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Andrea Campanella10426e22021-10-15 17:58:04 +02005 * 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 Battiston9bfe1102022-02-03 10:38:03 +01008 *
Andrea Campanella10426e22021-10-15 17:58:04 +02009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Andrea Campanella10426e22021-10-15 17:58:04 +020011 * 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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// MulticastSubscriberMonitorClassID is the 16-bit ID for the OMCI
29// Managed entity Multicast subscriber monitor
30const MulticastSubscriberMonitorClassID = ClassID(311) // 0x0137
31
32var multicastsubscribermonitorBME *ManagedEntityDefinition
33
34// MulticastSubscriberMonitor (Class ID: #311 / 0x0137)
35// This ME provides the current status of each port with respect to its multicast subscriptions. It
36// may be useful for status monitoring or debugging purposes. The status table includes all dynamic
37// groups currently subscribed by the port.
38//
39// Relationships
40// Instances of this ME are created and deleted at the request of the OLT. One instance may exist
41// for each IEEE-802.1 UNI configured to support multicast subscription.
42//
43// Attributes
44// Managed Entity Id
45// This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is
46// implicitly linked to an instance of the MAC bridge port configuration data or IEEE-802.1p mapper
47// ME. (R,-setbycreate) (mandatory) (2-bytes)
48//
49// Me Type
50// This attribute indicates the type of the ME implicitly linked by the ME ID attribute.
51//
52// 0 MAC bridge port config data
53//
54// 1 IEEE-802.1p mapper service profile
55//
56// (R,-W, setbycreate) (mandatory) (1-byte)
57//
58// Current Multicast Bandwidth
59// This attribute is the ONU's (BE) estimate of the actual bandwidth currently being delivered to
60// this particular MAC bridge port over all dynamic multicast groups. (R) (optional) (4-bytes)
61//
62// Join Messages Counter
63// This attribute counts the number of times the corresponding subscriber sent a join message that
64// was accepted. When full, the counter rolls over to 0. (R) (optional) (4-bytes)
65//
66// Bandwidth Exceeded Counter
67// This attribute counts the number of join messages that did exceed, or would have exceeded, the
68// max multicast bandwidth, whether accepted or denied. When full, the counter rolls over to 0. (R)
69// (optional) (4-bytes)
70//
71// Ipv4 Active Group List Table
72// This attribute lists the groups from one of the related dynamic access control list tables or
73// the allowed preview groups table that are currently being actively forwarded, along with the
74// actual bandwidth of each. If a join has been recognized from more than one IPv4 source address
75// for a given group on this UNI, there will be one table entry for each. Each table entry has the
76// following form.
77//
78// - VLAN ID, 0 if not used (2-bytes)
79//
80// - Source IP address, 0.0.0.0 if not used (4-bytes)
81//
82// - Multicast destination IP address (4-bytes)
83//
84// - Best efforts actual bandwidth estimate, bytes per second (4-bytes)
85//
86// - Client (set-top box) IP address, i.e., the IP address of the device currently joined (4-bytes)
87//
88// - Time since the most recent join of this client to the IP channel, in seconds (4-bytes)
89//
90// - Reserved (2-bytes)
91//
92// (R) (mandatory) (24N bytes)
93//
94// Ipv6 Active Group List Table
95// - Time since the most recent join of this client to the IP channel, in seconds (4-bytes)
96//
97// (R) (optional) (58N bytes)
98//
99// This attribute lists the groups from one of the related dynamic access control list tables or
100// the allowed preview groups table that are currently being actively forwarded, along with the
101// actual bandwidth of each. If a join has been recognized from more than one IPv6 source address
102// for a given group on this UNI, there will be one table entry for each. In mixed IPv4-IPv6
103// scenarios, it is possible that some fields might be IPv4, in which case their 12 most
104// significant bytes of the given field are set to zero. Each table entry has the form:
105//
106// - VLAN ID, 0 if not used (2-bytes)
107//
108// - Source IP address, 0 if not used (16-bytes)
109//
110// - Multicast destination IP address (16-bytes)
111//
112// - Best efforts actual bandwidth estimate, bytes per second (4-bytes)
113//
114// - Client (set-top box) IP address, i.e., the IP address of the device currently joined
115// (16-bytes)
116//
117type MulticastSubscriberMonitor struct {
118 ManagedEntityDefinition
119 Attributes AttributeValueMap
120}
121
Elia Battiston9bfe1102022-02-03 10:38:03 +0100122// Attribute name constants
123
124const MulticastSubscriberMonitor_MeType = "MeType"
125const MulticastSubscriberMonitor_CurrentMulticastBandwidth = "CurrentMulticastBandwidth"
126const MulticastSubscriberMonitor_JoinMessagesCounter = "JoinMessagesCounter"
127const MulticastSubscriberMonitor_BandwidthExceededCounter = "BandwidthExceededCounter"
128const MulticastSubscriberMonitor_Ipv4ActiveGroupListTable = "Ipv4ActiveGroupListTable"
129const MulticastSubscriberMonitor_Ipv6ActiveGroupListTable = "Ipv6ActiveGroupListTable"
130
Andrea Campanella10426e22021-10-15 17:58:04 +0200131func init() {
132 multicastsubscribermonitorBME = &ManagedEntityDefinition{
133 Name: "MulticastSubscriberMonitor",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100134 ClassID: MulticastSubscriberMonitorClassID,
Andrea Campanella10426e22021-10-15 17:58:04 +0200135 MessageTypes: mapset.NewSetWith(
136 Create,
137 Delete,
138 Get,
139 GetNext,
140 Set,
141 ),
142 AllowedAttributeMask: 0xfc00,
143 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100144 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
145 1: ByteField(MulticastSubscriberMonitor_MeType, EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
146 2: Uint32Field(MulticastSubscriberMonitor_CurrentMulticastBandwidth, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, true, false, 2),
147 3: Uint32Field(MulticastSubscriberMonitor_JoinMessagesCounter, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
148 4: Uint32Field(MulticastSubscriberMonitor_BandwidthExceededCounter, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
149 5: TableField(MulticastSubscriberMonitor_Ipv4ActiveGroupListTable, TableAttributeType, 0x0800, TableInfo{nil, 24}, mapset.NewSetWith(Read), false, false, false, 5),
150 6: TableField(MulticastSubscriberMonitor_Ipv6ActiveGroupListTable, TableAttributeType, 0x0400, TableInfo{nil, 58}, mapset.NewSetWith(Read), false, true, false, 6),
Andrea Campanella10426e22021-10-15 17:58:04 +0200151 },
152 Access: CreatedByOlt,
153 Support: UnknownSupport,
154 }
155}
156
157// NewMulticastSubscriberMonitor (class ID 311) creates the basic
158// Managed Entity definition that is used to validate an ME of this type that
159// is received from or transmitted to the OMCC.
160func NewMulticastSubscriberMonitor(params ...ParamData) (*ManagedEntity, OmciErrors) {
161 return NewManagedEntity(*multicastsubscribermonitorBME, params...)
162}