blob: 69a6cb3600f90dfc2cf2af7a9851503100cd04da [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
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 */
20package generated
21
22import "github.com/deckarep/golang-set"
23
24const TrafficSchedulerClassId ClassID = ClassID(278)
25
26var trafficschedulerBME *ManagedEntityDefinition
27
28// TrafficScheduler (class ID #278)
29// NOTE 1 – In [ITU-T G.984.4], this ME is called a traffic scheduler-G.
30//
31// An instance of this ME represents a logical object that can control upstream GEM packets. A
32// traffic scheduler can accommodate GEM packets after a priority queue or other traffic scheduler
33// and transfer them towards the next traffic scheduler or T-CONT. Because T-CONTs and traffic
34// schedulers are created autonomously by the ONU, the ONU vendor predetermines the most complex
35// traffic handling model it is prepared to support; the OLT may use less than the ONU's full
36// capabilities, but cannot ask for more. See Appendix II for more details.
37//
38// After the ONU creates instances of the T-CONT ME, it then autonomously creates instances of the
39// traffic scheduler ME.
40//
41// Relationships
42// The traffic scheduler ME may be related to a T-CONT or other traffic schedulers through pointer
43// attributes.
44//
45// Attributes
46// Managed Entity Id
47// Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2 byte
48// number indicates the physical capability that realizes the traffic scheduler. The first byte is
49// the slot ID of the circuit pack with which this traffic scheduler is associated. For a traffic
50// scheduler that is not associated with a circuit pack, the first byte is 0xFF. The second byte is
51// the traffic scheduler id, assigned by the ONU itself. Traffic schedulers are numbered in
52// ascending order with the range 0..0xFF in each circuit pack or in the ONU core. (R) (mandatory)
53// (2 bytes)
54//
55// T_Cont Pointer
56// NOTE 2 – This attribute is read-only unless otherwise specified by the QoS configuration
57// flexibility attribute of the ONU2-G ME. If flexible configuration is not supported, the ONU
58// should reject an attempt to set the TCONT pointer attribute with a parameter error result-reason
59// code.
60//
61// Traffic Scheduler Pointer
62// Traffic scheduler pointer: This attribute points to another traffic scheduler ME instance that
63// may serve this traffic scheduler. This pointer is used when this traffic scheduler is connected
64// to another traffic scheduler; it is null (0) otherwise. (R) (mandatory) (2 bytes)
65//
66// Policy
67// NOTE 3 – This attribute is read-only unless otherwise specified by the QoS configuration
68// flexibility attribute of the ONU2-G ME. If flexible configuration is not supported, the ONU
69// should reject an attempt to set the policy attribute with a parameter error result-reason code.
70//
71// Priority_Weight
72// Upon ME instantiation, the ONU sets this attribute to 0. (R, W) (mandatory) (1 byte)
73//
74type TrafficScheduler struct {
75 ManagedEntityDefinition
76 Attributes AttributeValueMap
77}
78
79func init() {
80 trafficschedulerBME = &ManagedEntityDefinition{
81 Name: "TrafficScheduler",
82 ClassID: 278,
83 MessageTypes: mapset.NewSetWith(
84 Get,
85 Set,
86 ),
87 AllowedAttributeMask: 0XF000,
88 AttributeDefinitions: AttributeDefinitionMap{
89 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read), false, false, false, false, 0),
90 1: Uint16Field("TContPointer", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 1),
91 2: Uint16Field("TrafficSchedulerPointer", 0, mapset.NewSetWith(Read), false, false, false, false, 2),
92 3: ByteField("Policy", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 3),
93 4: ByteField("PriorityWeight", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 4),
94 },
95 }
96}
97
98// NewTrafficScheduler (class ID 278 creates the basic
99// Managed Entity definition that is used to validate an ME of this type that
100// is received from the wire, about to be sent on the wire.
101func NewTrafficScheduler(params ...ParamData) (*ManagedEntity, OmciErrors) {
102 return NewManagedEntity(trafficschedulerBME, params...)
103}