Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 4 | * |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 8 | * |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 10 | * |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // OnuRemoteDebugClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity ONU remote debug |
| 30 | const OnuRemoteDebugClassID = ClassID(158) // 0x009e |
| 31 | |
| 32 | var 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 | // |
| 69 | type OnuRemoteDebug struct { |
| 70 | ManagedEntityDefinition |
| 71 | Attributes AttributeValueMap |
| 72 | } |
| 73 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 74 | // Attribute name constants |
| 75 | |
| 76 | const OnuRemoteDebug_CommandFormat = "CommandFormat" |
| 77 | const OnuRemoteDebug_Command = "Command" |
| 78 | const OnuRemoteDebug_ReplyTable = "ReplyTable" |
| 79 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 80 | func init() { |
| 81 | onuremotedebugBME = &ManagedEntityDefinition{ |
| 82 | Name: "OnuRemoteDebug", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 83 | ClassID: OnuRemoteDebugClassID, |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 84 | MessageTypes: mapset.NewSetWith( |
| 85 | Get, |
| 86 | GetNext, |
| 87 | Set, |
| 88 | ), |
| 89 | AllowedAttributeMask: 0xe000, |
| 90 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 91 | 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), |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 95 | }, |
| 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. |
| 104 | func NewOnuRemoteDebug(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 105 | return NewManagedEntity(*onuremotedebugBME, params...) |
| 106 | } |