mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 4 | * |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [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 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 8 | * |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 10 | * |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [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 | // OnuManufacturingDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity ONU manufacturing data |
| 30 | const OnuManufacturingDataClassID = ClassID(456) // 0x01c8 |
| 31 | |
| 32 | var onumanufacturingdataBME *ManagedEntityDefinition |
| 33 | |
| 34 | // OnuManufacturingData (Class ID: #456 / 0x01c8) |
| 35 | // This ME contains additional manufacturing attributes associated with a PON ONU. The |
| 36 | // manufacturing data is expected to match the content of an ONU label. The ONU automatically |
| 37 | // creates an instance of this ME. Its attributes are populated according to data within the ONU |
| 38 | // itself. |
| 39 | // |
| 40 | // Relationships |
| 41 | // This ME is paired with the ONU-G entity. |
| 42 | // |
| 43 | // Attributes |
| 44 | // Managed Entity Id |
| 45 | // This attribute uniquely identifies each instance of this ME. There is only one instance, number |
| 46 | // 0. (R) (mandatory) (2-bytes) |
| 47 | // |
| 48 | // Manufacturer Name |
| 49 | // This attribute contains the manufacturer name of this physical ONU. The preferred value is the |
| 50 | // manufacturer name string printed on the ONU itself (if present). (R) (optional) (25 bytes) |
| 51 | // |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 52 | // Serial Number 1 |
| 53 | // Serial number part 1, serial number part 2: These two attributes may be regarded as an ASCII |
| 54 | // string of up to 32 bytes whose length is a left justified manufacturer's serial number for this |
| 55 | // physical ONU. The preferred value is the manufacturer serial number string printed on the ONU |
| 56 | // itself (if present). (R) (optional) (25-bytes*2 attributes) |
| 57 | // |
| 58 | // Serial Number 2 |
| 59 | // Serial number part 1, serial number part 2: These two attributes may be regarded as an ASCII |
| 60 | // string of up to 32 bytes whose length is a left justified manufacturer's serial number for this |
| 61 | // physical ONU. The preferred value is the manufacturer serial number string printed on the ONU |
| 62 | // itself (if present). (R) (optional) (25-bytes*2 attributes) |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 63 | // |
| 64 | // Model Name |
| 65 | // This attribute contains the vendor specific model name identifier string. The preferred value is |
| 66 | // the customer-visible part number which may be printed on the component itself. (R) (optional) |
| 67 | // (25 bytes) |
| 68 | // |
| 69 | // Manufacturing Date |
| 70 | // This attribute contains the date of manufacturer of this physical ONU. The preferred value is |
| 71 | // the date of the manufacturer printed on the ONU itself (if present). (R) (optional) (25 bytes) |
| 72 | // |
| 73 | // Hardware_Revision |
| 74 | // Hardware-revision: This attribute contains the hardware revision of this physical ONU. The |
| 75 | // preferred value is the hardware revision printed on the ONU itself (if present). (R) (optional) |
| 76 | // (25 bytes) |
| 77 | // |
| 78 | // Firmware_Revision |
| 79 | // Firmware-revision: This attribute contains the vendor specific firmware revision of this |
| 80 | // physical ONU. (R) (optional) (25 bytes) |
| 81 | // |
| 82 | type OnuManufacturingData struct { |
| 83 | ManagedEntityDefinition |
| 84 | Attributes AttributeValueMap |
| 85 | } |
| 86 | |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 87 | // Attribute name constants |
| 88 | |
| 89 | const OnuManufacturingData_ManufacturerName = "ManufacturerName" |
| 90 | const OnuManufacturingData_SerialNumber1 = "SerialNumber1" |
| 91 | const OnuManufacturingData_SerialNumber2 = "SerialNumber2" |
| 92 | const OnuManufacturingData_ModelName = "ModelName" |
| 93 | const OnuManufacturingData_ManufacturingDate = "ManufacturingDate" |
| 94 | const OnuManufacturingData_HardwareRevision = "HardwareRevision" |
| 95 | const OnuManufacturingData_FirmwareRevision = "FirmwareRevision" |
| 96 | |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 97 | func init() { |
| 98 | onumanufacturingdataBME = &ManagedEntityDefinition{ |
| 99 | Name: "OnuManufacturingData", |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 100 | ClassID: OnuManufacturingDataClassID, |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 101 | MessageTypes: mapset.NewSetWith( |
| 102 | Get, |
| 103 | ), |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 104 | AllowedAttributeMask: 0xfe00, |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 105 | AttributeDefinitions: AttributeDefinitionMap{ |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 106 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 107 | 1: MultiByteField(OnuManufacturingData_ManufacturerName, OctetsAttributeType, 0x8000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 1), |
| 108 | 2: MultiByteField(OnuManufacturingData_SerialNumber1, OctetsAttributeType, 0x4000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 2), |
| 109 | 3: MultiByteField(OnuManufacturingData_SerialNumber2, OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 3), |
| 110 | 4: MultiByteField(OnuManufacturingData_ModelName, OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 4), |
| 111 | 5: MultiByteField(OnuManufacturingData_ManufacturingDate, OctetsAttributeType, 0x0800, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 5), |
| 112 | 6: MultiByteField(OnuManufacturingData_HardwareRevision, OctetsAttributeType, 0x0400, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 6), |
| 113 | 7: MultiByteField(OnuManufacturingData_FirmwareRevision, OctetsAttributeType, 0x0200, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 7), |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 114 | }, |
| 115 | Access: CreatedByOnu, |
| 116 | Support: UnknownSupport, |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | // NewOnuManufacturingData (class ID 456) creates the basic |
| 121 | // Managed Entity definition that is used to validate an ME of this type that |
| 122 | // is received from or transmitted to the OMCC. |
| 123 | func NewOnuManufacturingData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 124 | return NewManagedEntity(*onumanufacturingdataBME, params...) |
| 125 | } |