blob: a38e1c51030892035d9fa917d5e5f156261fc178 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// EfmBondingLinkClassID is the 16-bit ID for the OMCI
29// Managed entity EFM bonding link
Andrea Campanella10426e22021-10-15 17:58:04 +020030const EfmBondingLinkClassID = ClassID(419) // 0x01a3
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var efmbondinglinkBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// EfmBondingLink (Class ID: #419 / 0x01a3)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035// The EFM bonding link represents a link that can be bonded with other links to form a group. In
36// [IEEE 802.3], a bonding group is known as a PAF and a link is known as a PME. Instances of this
37// ME are created and deleted by the OLT.
38//
39// Relationships
40// An instance of this ME may be associated with zero or one instance of an EFM bonding group.
41//
42// Attributes
43// Managed Entity Id
Andrea Campanella10426e22021-10-15 17:58:04 +020044// This attribute uniquely identifies each instance of this ME. The two MSBs of the first byte are
45// the bearer channel ID. Excluding the first 2-bits of the first byte, the remaining part of the
46// ME ID is identical to that of this ME's parent PPTP xDSL UNI part 1.
47//
Matteo Scandolof9d43412021-01-12 11:11:34 -080048// NOTE - This attribute has the same meaning as the Stream ID in clause C.3.1.2 of [ITU-T
49// G.998.2], except that it cannot be changed. (R, setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070050//
51// Associated Group Me Id
Andrea Campanella10426e22021-10-15 17:58:04 +020052// This attribute is the ME ID of the bonding group to which this link is associated. Changing this
53// attribute moves the link from one group to another. Setting this attribute to an ME ID that has
54// not yet been provisioned will result in this link being placed in a single-link group that
55// contains only this link. The default value for this attribute is the null pointer, 0xFFFF.
56// (R,-W, setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070057//
58// Link Alarm Enable
Andrea Campanella10426e22021-10-15 17:58:04 +020059// This bit mapped attribute enables the group down and group partial alarms. A bit value of 1
60// means "enable".
61//
62// Bit Meaning
63//
64// 1 (LSB) Link down
65//
66// 2-8 Reserved
67//
Matteo Scandolof9d43412021-01-12 11:11:34 -080068// (R,-W, setbycreate) (mandatory) (1-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070069//
70type EfmBondingLink struct {
71 ManagedEntityDefinition
72 Attributes AttributeValueMap
73}
74
Elia Battiston9bfe1102022-02-03 10:38:03 +010075// Attribute name constants
76
77const EfmBondingLink_AssociatedGroupMeId = "AssociatedGroupMeId"
78const EfmBondingLink_LinkAlarmEnable = "LinkAlarmEnable"
79
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070080func init() {
81 efmbondinglinkBME = &ManagedEntityDefinition{
82 Name: "EfmBondingLink",
Elia Battiston9bfe1102022-02-03 10:38:03 +010083 ClassID: EfmBondingLinkClassID,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070084 MessageTypes: mapset.NewSetWith(
85 Create,
86 Delete,
87 Get,
88 Set,
89 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080090 AllowedAttributeMask: 0xc000,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070091 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +010092 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
93 1: Uint16Field(EfmBondingLink_AssociatedGroupMeId, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
94 2: ByteField(EfmBondingLink_LinkAlarmEnable, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
Matteo Scandolof9d43412021-01-12 11:11:34 -080095 },
96 Access: CreatedByOlt,
97 Support: UnknownSupport,
98 Alarms: AlarmMap{
99 0: "Link down",
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700100 },
101 }
102}
103
Andrea Campanella10426e22021-10-15 17:58:04 +0200104// NewEfmBondingLink (class ID 419) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700105// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800106// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700107func NewEfmBondingLink(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800108 return NewManagedEntity(*efmbondinglinkBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700109}