Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 1 | /* |
| 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 | */ |
David K. Bainbridge | d80007b | 2021-04-12 12:22:29 +0000 | [diff] [blame] | 17 | /* |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 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 | // ManagedEntityMeClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Managed entity ME |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame^] | 30 | const ManagedEntityMeClassID = ClassID(288) // 0x0120 |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 31 | |
| 32 | var managedentitymeBME *ManagedEntityDefinition |
| 33 | |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame^] | 34 | // ManagedEntityMe (Class ID: #288 / 0x0120) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 35 | // The ME describes the details of each ME that is supported by the ONU. This ME is not included in |
| 36 | // an MIB upload. |
| 37 | // |
| 38 | // Relationships |
| 39 | // One or more MEs are related to the OMCI object entity. |
| 40 | // |
| 41 | // Attributes |
| 42 | // Managed Entity Id |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame^] | 43 | // This attribute uniquely identifies each instance of this ME. Its value is equal to the ME type |
| 44 | // value, and is the same as the code found in the ME type table attribute of the OMCI ME and |
| 45 | // Table-11.2.41. (R) (mandatory) (2-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 46 | // |
| 47 | // Name |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame^] | 48 | // This attribute contains a 25-byte ASCII coded mnemonic tag for the ME type. Strings shorter than |
| 49 | // 25-bytes are padded with null characters. (R) (mandatory) (25-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 50 | // |
| 51 | // Attributes Table |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame^] | 52 | // This table contains pointers to the attribute MEs that describe each of this ME's attributes. |
| 53 | // (R) (mandatory) (2 * X bytes, where X is the number of entries in the table.) |
| 54 | // |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 55 | // NOTE - The ME ID attribute is not included in the list, since the type of this attribute is |
| 56 | // fixed. |
| 57 | // |
| 58 | // Access |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame^] | 59 | // This attribute represents who creates this ME. The following code points are defined. |
| 60 | // |
| 61 | // 1 Created by the ONU |
| 62 | // |
| 63 | // 2 Created by the OLT |
| 64 | // |
| 65 | // 3 Created by both the ONU and OLT |
| 66 | // |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 67 | // (R) (mandatory) (1-byte) |
| 68 | // |
| 69 | // Alarms Table |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame^] | 70 | // This attribute lists the alarm codes that are supported. (R) (mandatory) (Y bytes, where Y is |
| 71 | // the number of entries in the table.) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 72 | // |
| 73 | // Avcs Table |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame^] | 74 | // This attribute lists the AVCs that are supported. (R) (mandatory) (Z bytes, where Z is the |
| 75 | // number of entries in the table.) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 76 | // |
| 77 | // Actions |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame^] | 78 | // This attribute lists the action codes supported on this object, formatted as a bit map. The |
| 79 | // action codes are the MTs from Table-11.2.2-1. The LSB represents action 0, and so on. (R) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 80 | // (mandatory) (4-bytes) |
| 81 | // |
| 82 | // Instances Table |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame^] | 83 | // This attribute is a list of pointers to all instances of this ME. (R) (mandatory) (2 * V bytes, |
| 84 | // where V is the number of entries in the table.) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 85 | // |
| 86 | // Support |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame^] | 87 | // This attribute represents the support capability of this ME in the ONU's implementation. This |
| 88 | // attribute does not declare whether the OMCI implementation complies with the Recommendations, |
| 89 | // but whether it complies with the OMCI declaration itself. The following code points are defined. |
| 90 | // |
| 91 | // 1 Supported (supported as defined in this object) |
| 92 | // |
| 93 | // 2 Unsupported (OMCI returns error code if accessed) |
| 94 | // |
| 95 | // 3 Partially supported (some aspects of ME supported) |
| 96 | // |
| 97 | // 4 Ignored (OMCI supported, but underlying function is not) |
| 98 | // |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 99 | // (R) (mandatory) (1-byte) |
| 100 | // |
| 101 | type ManagedEntityMe struct { |
| 102 | ManagedEntityDefinition |
| 103 | Attributes AttributeValueMap |
| 104 | } |
| 105 | |
| 106 | func init() { |
| 107 | managedentitymeBME = &ManagedEntityDefinition{ |
| 108 | Name: "ManagedEntityMe", |
| 109 | ClassID: 288, |
| 110 | MessageTypes: mapset.NewSetWith( |
| 111 | Get, |
| 112 | GetNext, |
| 113 | ), |
| 114 | AllowedAttributeMask: 0xff00, |
| 115 | AttributeDefinitions: AttributeDefinitionMap{ |
| 116 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 117 | 1: MultiByteField("Name", OctetsAttributeType, 0x8000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1), |
| 118 | 2: TableField("AttributesTable", TableAttributeType, 0x4000, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 2), |
| 119 | 3: ByteField("Access", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 120 | 4: TableField("AlarmsTable", TableAttributeType, 0x1000, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 4), |
| 121 | 5: TableField("AvcsTable", TableAttributeType, 0x0800, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 5), |
| 122 | 6: Uint32Field("Actions", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 123 | 7: TableField("InstancesTable", TableAttributeType, 0x0200, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 7), |
| 124 | 8: ByteField("Support", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 125 | }, |
| 126 | Access: CreatedByOnu, |
| 127 | Support: UnknownSupport, |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | // NewManagedEntityMe (class ID 288) creates the basic |
| 132 | // Managed Entity definition that is used to validate an ME of this type that |
| 133 | // is received from or transmitted to the OMCC. |
| 134 | func NewManagedEntityMe(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 135 | return NewManagedEntity(*managedentitymeBME, params...) |
| 136 | } |