blob: 5a242acda89eeb0ea35393056fdf3d1cba07f3c0 [file] [log] [blame]
Chip Boling610117d2021-09-09 11:24:34 -05001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
4
5 * 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
8
9 * http://www.apache.org/licenses/LICENSE-2.0
10
11 * 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 */
17/*
18 * 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 */
23
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// OnuRemoteDebugClassID is the 16-bit ID for the OMCI
29// Managed entity ONU remote debug
30const OnuRemoteDebugClassID = ClassID(158) // 0x009e
31
32var onuremotedebugBME *ManagedEntityDefinition
33
34// OnuRemoteDebug (Class ID: #158 / 0x009e)
35// This ME is used to send vendor-specific debug commands to the ONU and receive vendor-specific
36// replies back for processing on the OLT. This allows for the remote debugging of an ONU that may
37// not be accessible by other means. The command format may have two modes, one being text and the
38// other free format. In text format, both the command and reply are ASCII strings, but are
39// otherwise unconstrained. In free format, the content and format of command and reply are vendor-
40// specific.
41//
42// An ONU that supports remote debugging automatically creates an instance of this ME. It is not
43// reported during an MIB upload.
44//
45// Relationships
46// One instance of this ME is associated with the ONU ME.
47//
48// Attributes
49// Managed Entity Id
50// This attribute uniquely identifies each instance of this ME. There is only one instance, number
51// 0. (R) (mandatory) (2-bytes)
52//
53// Command Format
54// This attribute defines the format of the command and reply attributes. The value 0 defines ASCII
55// string format, while 1 specifies free format. (R) (mandatory) (1-byte)
56//
57// Command
58// This attribute is used to send a command to the ONU. The format of the command is defined by the
59// command format. If the format is ASCII string, the command should be null terminated unless the
60// string is exactly 25-bytes long. The action of setting this attribute should trigger the ONU to
61// discard any previous command reply information and execute the current debugging command. (W)
62// (mandatory) (25-bytes)
63//
64// Reply Table
65// This attribute is used to pass reply information back to the OLT. Its format is defined by the
66// command format attribute. The get, get next action sequence must be used with this attribute,
67// since its size is unspecified. (R) (mandatory) (N bytes)
68//
69type OnuRemoteDebug struct {
70 ManagedEntityDefinition
71 Attributes AttributeValueMap
72}
73
74func init() {
75 onuremotedebugBME = &ManagedEntityDefinition{
76 Name: "OnuRemoteDebug",
77 ClassID: 158,
78 MessageTypes: mapset.NewSetWith(
79 Get,
80 GetNext,
81 Set,
82 ),
83 AllowedAttributeMask: 0xe000,
84 AttributeDefinitions: AttributeDefinitionMap{
85 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
86 1: ByteField("CommandFormat", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
87 2: MultiByteField("Command", OctetsAttributeType, 0x4000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Write), false, false, false, 2),
88 3: TableField("ReplyTable", TableAttributeType, 0x2000, TableInfo{nil, -1}, mapset.NewSetWith(Read), false, false, false, 3),
89 },
90 Access: CreatedByOnu,
91 Support: UnknownSupport,
92 }
93}
94
95// NewOnuRemoteDebug (class ID 158) creates the basic
96// Managed Entity definition that is used to validate an ME of this type that
97// is received from or transmitted to the OMCC.
98func NewOnuRemoteDebug(params ...ParamData) (*ManagedEntity, OmciErrors) {
99 return NewManagedEntity(*onuremotedebugBME, params...)
100}