blob: 29c25afff95cfcdc137db220dbda70fd8ed4eebc [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// TContClassID is the 16-bit ID for the OMCI
26// Managed entity T-CONT
27const TContClassID ClassID = ClassID(262)
28
29var tcontBME *ManagedEntityDefinition
30
31// TCont (class ID #262)
32// An instance of the traffic container ME T-CONT represents a logical connection group associated
33// with a G-PON PLOAM layer alloc-ID. A T-CONT can accommodate GEM packets in priority queues or
34// traffic schedulers that exist in the GEM layer.
35//
36// The ONU autonomously creates instances of this ME. The OLT can discover the number of TCONT
37// instances via the ANI-G ME. When the ONU's MIB is reset or created for the first time, all
38// supported T-CONTs are created. The OLT provisions alloc-IDs to the ONU via the PLOAM channel.
39// Via the OMCI, the OLT must then set the alloc-ID attributes in the T-CONTs that it wants to
40// activate for user traffic, to create the appropriate association with the allocation ID in the
41// PLOAM channel. There should be a one-to-one relationship between allocation IDs and T-CONT MEs;
42// the connection of multiple T-CONTs to a single allocation ID is undefined.
43//
44// The allocation ID that matches the ONU-ID itself is defined to be the default alloc-ID. This
45// allocID is used to carry the OMCC. The default alloc-ID can also be used to carry user traffic,
46// and hence can be assigned to one of the T-CONT MEs. However, this OMCI relationship only
47// pertains to user traffic, and the OMCC relationship is unaffected. It can also be true that the
48// OMCC is not contained in any T-CONT ME construct; rather, that the OMCC remains outside of the
49// OMCI, and that the OMCI is not used to manage the OMCC in any way. Multiplexing of the OMCC and
50// user data in GPON systems is discussed in clause B.2.4.
51//
52// Relationships
53// One or more instances of this ME are associated with an instance of a circuit pack that supports
54// a PON interface function, or with the ONU-G itself.
55//
56// Attributes
57// Managed Entity Id
58// Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
59// number indicates the physical capability that realizes the TCONT. It may be represented as
60// 0xSSBB, where SS indicates the slot ID that contains this T-CONT (0 for the ONU as a whole), and
61// BB is the TCONT ID, numbered by the ONU itself. T-CONTs are numbered in ascending order, with
62// the range 0..255 in each slot. (R) (mandatory) (2-bytes)
63//
64// Alloc_Id
65// Alloc-ID: This attribute links the T-CONT with the alloc-ID assigned by the OLT in the
66// assign_alloc-ID PLOAM message. The respective TC layer specification should be referenced for
67// the legal values for that system. Prior to the setting of this attribute by the OLT, this
68// attribute has an unambiguously unusable initial value, namely the value 0x00FF or 0xFFFF for
69// ITU-T G.984 systems, and the value 0xFFFF for all other ITU-T GTC based PON systems. (R,-W)
70// (mandatory) (2-bytes)
71//
72// Deprecated
73// Deprecated: The ONU should set this attribute to the value 1, and the OLT should ignore it. (R)
74// (mandatory) (1-byte)
75//
76// Policy
77// NOTE - This attribute is read-only, unless otherwise specified by the QoS configuration
78// flexibility attribute of the ONU2-G ME. If flexible configuration is not supported, the ONU
79// should reject an attempt to set it with a parameter error result-reason code.
80//
81type TCont struct {
82 ManagedEntityDefinition
83 Attributes AttributeValueMap
84}
85
86func init() {
87 tcontBME = &ManagedEntityDefinition{
88 Name: "TCont",
89 ClassID: 262,
90 MessageTypes: mapset.NewSetWith(
91 Get,
92 Set,
93 ),
94 AllowedAttributeMask: 0xe000,
95 AttributeDefinitions: AttributeDefinitionMap{
96 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
97 1: Uint16Field("AllocId", UnsignedIntegerAttributeType, 0x8000, 65535, mapset.NewSetWith(Read, Write), false, false, false, 1),
98 2: ByteField("Deprecated", UnsignedIntegerAttributeType, 0x4000, 1, mapset.NewSetWith(Read), false, false, true, 2),
99 3: ByteField("Policy", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
100 },
101 Access: CreatedByOnu,
102 Support: UnknownSupport,
103 }
104}
105
106// NewTCont (class ID 262) creates the basic
107// Managed Entity definition that is used to validate an ME of this type that
108// is received from or transmitted to the OMCC.
109func NewTCont(params ...ParamData) (*ManagedEntity, OmciErrors) {
110 return NewManagedEntity(*tcontBME, params...)
111}