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