Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [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 | */ |
| 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 | // |
| 52 | // Serial Number Part 1, Serial Number Part 2 |
| 53 | // These two attributes may be regarded as an ASCII string of up to 32 bytes whose length is a left |
| 54 | // justified manufacturer's serial number for this physical ONU. The preferred value is the |
| 55 | // manufacturer serial number string printed on the ONU itself (if present). (R) (optional) |
| 56 | // (25-bytes*2 attributes) |
| 57 | // |
| 58 | // Model Name |
| 59 | // This attribute contains the vendor specific model name identifier string. The preferred value is |
| 60 | // the customer-visible part number which may be printed on the component itself. (R) (optional) |
| 61 | // (25 bytes) |
| 62 | // |
| 63 | // Manufacturing Date |
| 64 | // This attribute contains the date of manufacturer of this physical ONU. The preferred value is |
| 65 | // the date of the manufacturer printed on the ONU itself (if present). (R) (optional) (25 bytes) |
| 66 | // |
| 67 | // Hardware_Revision |
| 68 | // Hardware-revision: This attribute contains the hardware revision of this physical ONU. The |
| 69 | // preferred value is the hardware revision printed on the ONU itself (if present). (R) (optional) |
| 70 | // (25 bytes) |
| 71 | // |
| 72 | // Firmware_Revision |
| 73 | // Firmware-revision: This attribute contains the vendor specific firmware revision of this |
| 74 | // physical ONU. (R) (optional) (25 bytes) |
| 75 | // |
| 76 | type OnuManufacturingData struct { |
| 77 | ManagedEntityDefinition |
| 78 | Attributes AttributeValueMap |
| 79 | } |
| 80 | |
| 81 | func init() { |
| 82 | onumanufacturingdataBME = &ManagedEntityDefinition{ |
| 83 | Name: "OnuManufacturingData", |
| 84 | ClassID: 456, |
| 85 | MessageTypes: mapset.NewSetWith( |
| 86 | Get, |
| 87 | ), |
| 88 | AllowedAttributeMask: 0xfc00, |
| 89 | AttributeDefinitions: AttributeDefinitionMap{ |
| 90 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 91 | 1: MultiByteField("ManufacturerName", OctetsAttributeType, 0x8000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 1), |
| 92 | 2: MultiByteField("SerialNumberPart1,SerialNumberPart2", OctetsAttributeType, 0x4000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 2), |
| 93 | 3: MultiByteField("ModelName", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 3), |
| 94 | 4: MultiByteField("ManufacturingDate", OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 4), |
| 95 | 5: MultiByteField("HardwareRevision", OctetsAttributeType, 0x0800, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 5), |
| 96 | 6: MultiByteField("FirmwareRevision", OctetsAttributeType, 0x0400, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 6), |
| 97 | }, |
| 98 | Access: CreatedByOnu, |
| 99 | Support: UnknownSupport, |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | // NewOnuManufacturingData (class ID 456) creates the basic |
| 104 | // Managed Entity definition that is used to validate an ME of this type that |
| 105 | // is received from or transmitted to the OMCC. |
| 106 | func NewOnuManufacturingData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 107 | return NewManagedEntity(*onumanufacturingdataBME, params...) |
| 108 | } |