blob: 763aed903a7046468176b8ac54e3a242cb8b8bb9 [file] [log] [blame]
mpagenko836a1fd2021-11-01 16:12:42 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
mpagenko836a1fd2021-11-01 16:12:42 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
mpagenko836a1fd2021-11-01 16:12:42 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
mpagenko836a1fd2021-11-01 16:12:42 +000011 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000074// Attribute name constants
75
76const OnuRemoteDebug_CommandFormat = "CommandFormat"
77const OnuRemoteDebug_Command = "Command"
78const OnuRemoteDebug_ReplyTable = "ReplyTable"
79
mpagenko836a1fd2021-11-01 16:12:42 +000080func init() {
81 onuremotedebugBME = &ManagedEntityDefinition{
82 Name: "OnuRemoteDebug",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000083 ClassID: OnuRemoteDebugClassID,
mpagenko836a1fd2021-11-01 16:12:42 +000084 MessageTypes: mapset.NewSetWith(
85 Get,
86 GetNext,
87 Set,
88 ),
89 AllowedAttributeMask: 0xe000,
90 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000091 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
92 1: ByteField(OnuRemoteDebug_CommandFormat, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
93 2: MultiByteField(OnuRemoteDebug_Command, OctetsAttributeType, 0x4000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Write), false, false, false, 2),
94 3: TableField(OnuRemoteDebug_ReplyTable, TableAttributeType, 0x2000, TableInfo{nil, -1}, mapset.NewSetWith(Read), false, false, false, 3),
mpagenko836a1fd2021-11-01 16:12:42 +000095 },
96 Access: CreatedByOnu,
97 Support: UnknownSupport,
98 }
99}
100
101// NewOnuRemoteDebug (class ID 158) creates the basic
102// Managed Entity definition that is used to validate an ME of this type that
103// is received from or transmitted to the OMCC.
104func NewOnuRemoteDebug(params ...ParamData) (*ManagedEntity, OmciErrors) {
105 return NewManagedEntity(*onuremotedebugBME, params...)
106}