blob: 0b38dac5bcea26ed573edd53d4f20c9a4965cb68 [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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 */
David K. Bainbridged80007b2021-04-12 12:22:29 +000017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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// TwdmChannelManagedEntityClassID is the 16-bit ID for the OMCI
29// Managed entity TWDM channel managed entity
mpagenko836a1fd2021-11-01 16:12:42 +000030const TwdmChannelManagedEntityClassID = ClassID(443) // 0x01bb
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var twdmchannelmanagedentityBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// TwdmChannelManagedEntity (Class ID: #443 / 0x01bb)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// This ME provides an anchor for the MEs involved in collection of PM statistics per TWDM channel,
36// as stipulated by clause 14 of [ITU-T-G.989.3]. Instances of this ME are instantiated
37// autonomously by the ONU.
38//
39// Relationships
40// One or more instances of this ME are implicitly associated with the TWDM System profile ME. The
41// number of instances created is announced by the total TWDM channel number attribute of the TWDM
42// system profile ME.
43//
44// Attributes
45// Managed Entity Id
mpagenko836a1fd2021-11-01 16:12:42 +000046// This attribute uniquely identifies each instance of this ME. This 2-byte number is represented
47// as 0xSSBB, where SS indicates the ONU slot ID, and BB is the TWDM channel ME number assigned by
48// the ONU itself, starting from 0 in the ascending order. (R) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000049//
50// Active Channel Indication
mpagenko836a1fd2021-11-01 16:12:42 +000051// The default value is false. The ONU sets the attribute to true when it receives the
52// Channel_Profile PLOAM messages for that channel. The ONU clears the attribute when it receives
53// the Channel_Profile PLOAM message marked ``void'' for that channel. (R) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000054//
55// Operational Channel Indication
mpagenko836a1fd2021-11-01 16:12:42 +000056// A Boolean attribute that is set to true for an active TWDM channel in which the ONT is currently
57// operating. The operational statistic is accumulated in the PM history data MEs associated with
58// that TWDM channel. (R) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000059//
60// Downstream Wavelength Channel
mpagenko836a1fd2021-11-01 16:12:42 +000061// For an active TWDM channel, this attribute identifies the downstream wavelength channel in
62// reference to Table 11-2 of [ITU-T-G.989.2]. For an inactive channel it has value 0xFF. (R)
63// (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000064//
65// Upstream Wavelength Channel
mpagenko836a1fd2021-11-01 16:12:42 +000066// For an active TWDM channel, this attribute identifies the upstream wavelength channel in
67// reference to Table VIII-5 of [ITU-T-G.989.2]. For an inactive channel its value of 0xFF. (R)
68// (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000069//
70type TwdmChannelManagedEntity struct {
71 ManagedEntityDefinition
72 Attributes AttributeValueMap
73}
74
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000075// Attribute name constants
76
77const TwdmChannelManagedEntity_ActiveChannelIndication = "ActiveChannelIndication"
78const TwdmChannelManagedEntity_OperationalChannelIndication = "OperationalChannelIndication"
79const TwdmChannelManagedEntity_DownstreamWavelengthChannel = "DownstreamWavelengthChannel"
80const TwdmChannelManagedEntity_UpstreamWavelengthChannel = "UpstreamWavelengthChannel"
81
Holger Hildebrandtfa074992020-03-27 15:42:06 +000082func init() {
83 twdmchannelmanagedentityBME = &ManagedEntityDefinition{
84 Name: "TwdmChannelManagedEntity",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000085 ClassID: TwdmChannelManagedEntityClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +000086 MessageTypes: mapset.NewSetWith(
87 Get,
88 ),
89 AllowedAttributeMask: 0xf000,
90 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000091 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
92 1: ByteField(TwdmChannelManagedEntity_ActiveChannelIndication, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
93 2: ByteField(TwdmChannelManagedEntity_OperationalChannelIndication, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
94 3: ByteField(TwdmChannelManagedEntity_DownstreamWavelengthChannel, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
95 4: ByteField(TwdmChannelManagedEntity_UpstreamWavelengthChannel, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
Holger Hildebrandtfa074992020-03-27 15:42:06 +000096 },
97 Access: CreatedByOnu,
98 Support: UnknownSupport,
99 }
100}
101
102// NewTwdmChannelManagedEntity (class ID 443) creates the basic
103// Managed Entity definition that is used to validate an ME of this type that
104// is received from or transmitted to the OMCC.
105func NewTwdmChannelManagedEntity(params ...ParamData) (*ManagedEntity, OmciErrors) {
106 return NewManagedEntity(*twdmchannelmanagedentityBME, params...)
107}