Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * Unless required by applicable law or agreed to in writing, software |
| 9 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | * See the License for the specific language governing permissions and |
| 12 | * limitations under the License. |
| 13 | */ |
| 14 | /* |
| 15 | * NOTE: This file was generated, manual edits will be overwritten! |
| 16 | * |
| 17 | * Generated by 'goCodeGenerator.py': |
| 18 | * https://github.com/cboling/OMCI-parser/README.md |
| 19 | */ |
| 20 | package generated |
| 21 | |
| 22 | import "github.com/deckarep/golang-set" |
| 23 | |
| 24 | const OnuDataClassId ClassID = ClassID(2) |
| 25 | |
| 26 | var onudataBME *ManagedEntityDefinition |
| 27 | |
| 28 | // OnuData (class ID #2) |
| 29 | // This ME models the MIB itself. Clause I.1.3 explains the use of this ME with respect to MIB |
| 30 | // synchronization. |
| 31 | // |
| 32 | // The ONU automatically creates an instance of this ME, and updates the associated attributes |
| 33 | // according to data within the ONU itself. |
| 34 | // |
| 35 | // Relationships |
| 36 | // One instance of this ME is contained in an ONU. |
| 37 | // |
| 38 | // Attributes |
| 39 | // Managed Entity Id |
| 40 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only |
| 41 | // one instance, number 0. (R) (mandatory) (2 bytes) |
| 42 | // |
| 43 | // Mib Data Sync |
| 44 | // MIB data sync: This attribute is used to check the alignment of the MIB of the ONU with the |
| 45 | // corresponding MIB in the OLT. MIB data sync relies on this attribute, which is a sequence number |
| 46 | // that can be checked by the OLT to see if the MIB snapshots for the OLT and ONU match. Refer to |
| 47 | // clause I.1.2.1 for a detailed description of this attribute. Upon ME instantiation, the ONU sets |
| 48 | // this attribute to 0. (R, W) (mandatory) (1 byte) |
| 49 | // |
| 50 | type OnuData struct { |
| 51 | ManagedEntityDefinition |
| 52 | Attributes AttributeValueMap |
| 53 | } |
| 54 | |
| 55 | func init() { |
| 56 | onudataBME = &ManagedEntityDefinition{ |
| 57 | Name: "OnuData", |
| 58 | ClassID: 2, |
| 59 | MessageTypes: mapset.NewSetWith( |
| 60 | Get, |
| 61 | GetAllAlarms, |
| 62 | GetAllAlarmsNext, |
| 63 | MibReset, |
| 64 | MibUpload, |
| 65 | MibUploadNext, |
| 66 | Set, |
| 67 | ), |
| 68 | AllowedAttributeMask: 0X8000, |
| 69 | AttributeDefinitions: AttributeDefinitionMap{ |
| 70 | 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read), false, false, false, false, 0), |
| 71 | 1: ByteField("MibDataSync", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 1), |
| 72 | }, |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | // NewOnuData (class ID 2 creates the basic |
| 77 | // Managed Entity definition that is used to validate an ME of this type that |
| 78 | // is received from the wire, about to be sent on the wire. |
| 79 | func NewOnuData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 80 | return NewManagedEntity(onudataBME, params...) |
| 81 | } |