Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
| 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 |
| 8 | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 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 | // MulticastSubscriberMonitorClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Multicast subscriber monitor |
| 30 | const MulticastSubscriberMonitorClassID = ClassID(311) // 0x0137 |
| 31 | |
| 32 | var 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 | // |
| 117 | type MulticastSubscriberMonitor struct { |
| 118 | ManagedEntityDefinition |
| 119 | Attributes AttributeValueMap |
| 120 | } |
| 121 | |
| 122 | func init() { |
| 123 | multicastsubscribermonitorBME = &ManagedEntityDefinition{ |
| 124 | Name: "MulticastSubscriberMonitor", |
| 125 | ClassID: 311, |
| 126 | MessageTypes: mapset.NewSetWith( |
| 127 | Create, |
| 128 | Delete, |
| 129 | Get, |
| 130 | GetNext, |
| 131 | Set, |
| 132 | ), |
| 133 | AllowedAttributeMask: 0xfc00, |
| 134 | AttributeDefinitions: AttributeDefinitionMap{ |
| 135 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 136 | 1: ByteField("MeType", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 137 | 2: Uint32Field("CurrentMulticastBandwidth", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, true, false, 2), |
| 138 | 3: Uint32Field("JoinMessagesCounter", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3), |
| 139 | 4: Uint32Field("BandwidthExceededCounter", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4), |
| 140 | 5: TableField("Ipv4ActiveGroupListTable", TableAttributeType, 0x0800, TableInfo{nil, 24}, mapset.NewSetWith(Read), false, false, false, 5), |
| 141 | 6: TableField("Ipv6ActiveGroupListTable", TableAttributeType, 0x0400, TableInfo{nil, 58}, mapset.NewSetWith(Read), false, true, false, 6), |
| 142 | }, |
| 143 | Access: CreatedByOlt, |
| 144 | Support: UnknownSupport, |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | // NewMulticastSubscriberMonitor (class ID 311) creates the basic |
| 149 | // Managed Entity definition that is used to validate an ME of this type that |
| 150 | // is received from or transmitted to the OMCC. |
| 151 | func NewMulticastSubscriberMonitor(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 152 | return NewManagedEntity(*multicastsubscribermonitorBME, params...) |
| 153 | } |