blob: 8750bbf7bff8e40719684aec19a504a484a5e78f [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
4
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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080017 /*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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// TwdmChannelManagedEntityClassID is the 16-bit ID for the OMCI
29// Managed entity TWDM channel managed entity
30const TwdmChannelManagedEntityClassID ClassID = ClassID(443)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var twdmchannelmanagedentityBME *ManagedEntityDefinition
33
34// TwdmChannelManagedEntity (class ID #443)
35// This ME provides an anchor for the MEs involved in collection of PM statistics per TWDM channel,
Matteo Scandolof9d43412021-01-12 11:11:34 -080036// as stipulated by clause 14 of [ITU-T-G.989.3]. Instances of this ME are instantiated
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070037// 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
Matteo Scandolof9d43412021-01-12 11:11:34 -080046// Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070047// number is represented as 0xSSBB, where SS indicates the ONU slot ID, and BB is the TWDM channel
48// ME number assigned by the ONU itself, starting from 0 in the ascending order. (R) (mandatory)
Matteo Scandolof9d43412021-01-12 11:11:34 -080049// (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070050//
51// Active Channel Indication
52// Active channel indication: The default value is false. The ONU sets the attribute to true when
53// it receives the Channel_Profile PLOAM messages for that channel. The ONU clears the attribute
Matteo Scandolof9d43412021-01-12 11:11:34 -080054// when it receives the Channel_Profile PLOAM message marked ``void'' for that channel. (R)
55// (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070056//
57// Operational Channel Indication
58// Operational channel indication: A Boolean attribute that is set to true for an active TWDM
59// channel in which the ONT is currently operating. The operational statistic is accumulated in the
Matteo Scandolof9d43412021-01-12 11:11:34 -080060// PM history data MEs associated with that TWDM channel. (R) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070061//
62// Downstream Wavelength Channel
63// Downstream wavelength channel: For an active TWDM channel, this attribute identifies the
Matteo Scandolof9d43412021-01-12 11:11:34 -080064// downstream wavelength channel in reference to Table 11-2 of [ITU-T-G.989.2]. For an inactive
65// channel it has value 0xFF. (R) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070066//
67// Upstream Wavelength Channel
68// Upstream wavelength channel: For an active TWDM channel, this attribute identifies the upstream
Matteo Scandolof9d43412021-01-12 11:11:34 -080069// wavelength channel in reference to Table VIII-5 of [ITU-T-G.989.2]. For an inactive channel its
70// value of 0xFF. (R) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070071//
72type TwdmChannelManagedEntity struct {
73 ManagedEntityDefinition
74 Attributes AttributeValueMap
75}
76
77func init() {
78 twdmchannelmanagedentityBME = &ManagedEntityDefinition{
79 Name: "TwdmChannelManagedEntity",
80 ClassID: 443,
81 MessageTypes: mapset.NewSetWith(
82 Get,
83 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080084 AllowedAttributeMask: 0xf000,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070085 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080086 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
87 1: ByteField("ActiveChannelIndication", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
88 2: ByteField("OperationalChannelIndication", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
89 3: ByteField("DownstreamWavelengthChannel", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
90 4: ByteField("UpstreamWavelengthChannel", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070091 },
Matteo Scandolof9d43412021-01-12 11:11:34 -080092 Access: CreatedByOnu,
93 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070094 }
95}
96
Matteo Scandolof9d43412021-01-12 11:11:34 -080097// NewTwdmChannelManagedEntity (class ID 443) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070098// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -080099// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700100func NewTwdmChannelManagedEntity(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800101 return NewManagedEntity(*twdmchannelmanagedentityBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700102}