blob: c6fcd4ba856af2565a8e8d49b4490cfa6558065a [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// EfmBondingGroupClassID is the 16-bit ID for the OMCI
26// Managed entity EFM bonding group
27const EfmBondingGroupClassID ClassID = ClassID(419)
28
29var efmbondinggroupBME *ManagedEntityDefinition
30
31// EfmBondingGroup (class ID #419)
32// The EFM bonding group represents a group of links that are bonded. In [IEEE 802.3], a bonding
33// group is known as a PAF [physical medium entity (PME) aggregation function] and a link is known
34// as a PME instance of this ME are created and deleted by the OLT.
35//
36// Relationships
37// An instance of this ME may be associated with zero or more instances of an EFM bonding link.
38//
39// Attributes
40// Managed Entity Id
41// Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
42// reserved. (R, setbycreate) (mandatory) (2-bytes)
43//
44// Group Id
45// Group ID: This attribute is the unique number representing this bonding group. See clause
46// C.3.1.1 of [ITU-T G.998.2]. (R,-W, setbycreate) (mandatory) (6-bytes)
47//
48// Minimum Upstream Group Rate
49// Minimum upstream group rate: This attribute sets the minimum upstream group rate, in bits per
50// second, for this EFM Group. This attribute is used to determine the group US rate low alarm
51// status. The group US rate low alarm means that the aggregate upstream rate of all active links
52// associated with this group is less than the minimum upstream group rate. The default value for
53// this rate is zero. (R,-W) (mandatory, setbycreate) (4-bytes)
54//
55// Minimum Downstream Group Rate
56// Minimum downstream group rate: This attribute sets the minimum downstream group rate, in bits
57// per second, for this EFM Group. This attribute is used to determine the group DS rate low alarm
58// status. The group DS rate low alarm means that the aggregate downstream rate of all active links
59// associated with this group is less than the minimum downstream group rate. The default value for
60// this rate is zero. (R,-W) (mandatory) (4-bytes, setbycreate)
61//
62// Group Alarm Enable
63// (R,-W, setbycreate) (mandatory) (1-byte)
64//
65type EfmBondingGroup struct {
66 ManagedEntityDefinition
67 Attributes AttributeValueMap
68}
69
70func init() {
71 efmbondinggroupBME = &ManagedEntityDefinition{
72 Name: "EfmBondingGroup",
73 ClassID: 419,
74 MessageTypes: mapset.NewSetWith(
75 Create,
76 Delete,
77 Get,
78 Set,
79 ),
80 AllowedAttributeMask: 0xf000,
81 AttributeDefinitions: AttributeDefinitionMap{
82 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
83 1: MultiByteField("GroupId", OctetsAttributeType, 0x8000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
84 2: Uint32Field("MinimumUpstreamGroupRate", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
85 3: Uint32Field("MinimumDownstreamGroupRate", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
86 4: ByteField("GroupAlarmEnable", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
87 },
88 Access: CreatedByOlt,
89 Support: UnknownSupport,
90 }
91}
92
93// NewEfmBondingGroup (class ID 419) creates the basic
94// Managed Entity definition that is used to validate an ME of this type that
95// is received from or transmitted to the OMCC.
96func NewEfmBondingGroup(params ...ParamData) (*ManagedEntity, OmciErrors) {
97 return NewManagedEntity(*efmbondinggroupBME, params...)
98}