blob: 08d99ee0d49ef1eb7e605e5bc106d9c56e6d9aca [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// TwdmChannelManagedEntityClassID is the 16-bit ID for the OMCI
26// Managed entity TWDM channel managed entity
27const TwdmChannelManagedEntityClassID ClassID = ClassID(443)
28
29var twdmchannelmanagedentityBME *ManagedEntityDefinition
30
31// TwdmChannelManagedEntity (class ID #443)
32// This ME provides an anchor for the MEs involved in collection of PM statistics per TWDM channel,
33// as stipulated by clause 14 of [ITU-T-G.989.3]. Instances of this ME are instantiated
34// autonomously by the ONU.
35//
36// Relationships
37// One or more instances of this ME are implicitly associated with the TWDM System profile ME. The
38// number of instances created is announced by the total TWDM channel number attribute of the TWDM
39// system profile ME.
40//
41// Attributes
42// Managed Entity Id
43// Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
44// number is represented as 0xSSBB, where SS indicates the ONU slot ID, and BB is the TWDM channel
45// ME number assigned by the ONU itself, starting from 0 in the ascending order. (R) (mandatory)
46// (2-bytes)
47//
48// Active Channel Indication
49// Active channel indication: The default value is false. The ONU sets the attribute to true when
50// it receives the Channel_Profile PLOAM messages for that channel. The ONU clears the attribute
51// when it receives the Channel_Profile PLOAM message marked ``void'' for that channel. (R)
52// (mandatory) (1-byte)
53//
54// Operational Channel Indication
55// Operational channel indication: A Boolean attribute that is set to true for an active TWDM
56// channel in which the ONT is currently operating. The operational statistic is accumulated in the
57// PM history data MEs associated with that TWDM channel. (R) (mandatory) (1-byte)
58//
59// Downstream Wavelength Channel
60// Downstream wavelength channel: For an active TWDM channel, this attribute identifies the
61// downstream wavelength channel in reference to Table 11-2 of [ITU-T-G.989.2]. For an inactive
62// channel it has value 0xFF. (R) (mandatory) (1-byte)
63//
64// Upstream Wavelength Channel
65// Upstream wavelength channel: For an active TWDM channel, this attribute identifies the upstream
66// wavelength channel in reference to Table VIII-5 of [ITU-T-G.989.2]. For an inactive channel its
67// value of 0xFF. (R) (mandatory) (1-byte)
68//
69type TwdmChannelManagedEntity struct {
70 ManagedEntityDefinition
71 Attributes AttributeValueMap
72}
73
74func init() {
75 twdmchannelmanagedentityBME = &ManagedEntityDefinition{
76 Name: "TwdmChannelManagedEntity",
77 ClassID: 443,
78 MessageTypes: mapset.NewSetWith(
79 Get,
80 ),
81 AllowedAttributeMask: 0xf000,
82 AttributeDefinitions: AttributeDefinitionMap{
83 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
84 1: ByteField("ActiveChannelIndication", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
85 2: ByteField("OperationalChannelIndication", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
86 3: ByteField("DownstreamWavelengthChannel", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
87 4: ByteField("UpstreamWavelengthChannel", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
88 },
89 Access: CreatedByOnu,
90 Support: UnknownSupport,
91 }
92}
93
94// NewTwdmChannelManagedEntity (class ID 443) creates the basic
95// Managed Entity definition that is used to validate an ME of this type that
96// is received from or transmitted to the OMCC.
97func NewTwdmChannelManagedEntity(params ...ParamData) (*ManagedEntity, OmciErrors) {
98 return NewManagedEntity(*twdmchannelmanagedentityBME, params...)
99}