Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 | */ |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 | // Dot1AgMaintenanceDomainClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Dot1ag maintenance domain |
| 30 | const Dot1AgMaintenanceDomainClassID ClassID = ClassID(299) |
| 31 | |
| 32 | var dot1agmaintenancedomainBME *ManagedEntityDefinition |
| 33 | |
| 34 | // Dot1AgMaintenanceDomain (class ID #299) |
| 35 | // In [IEEE 802.1ag], a maintenance domain (MD) is a context within which configuration fault |
| 36 | // management (CFM) connectivity verification can occur. Individual services (maintenance |
| 37 | // associations, MAs) exist within an MD. An MD is created and deleted by the OLT. The MD ME is |
| 38 | // specified by [IEEE 802.1ag] in such a way that the same provisioning can be used for all |
| 39 | // associated systems in a network; the OMCI definition accordingly avoids ONU-specific information |
| 40 | // such as pointers. |
| 41 | // |
| 42 | // Relationships |
| 43 | // Several MDs may be associated with a given bridge, at various MD levels, and a given MD may be |
| 44 | // associated with any number of bridges. |
| 45 | // |
| 46 | // Attributes |
| 47 | // Managed Entity Id |
| 48 | // Managed entity ID: This attribute uniquely identifies an instance of this ME. The values 0 and |
| 49 | // 0xFFFF are reserved. (R, setbycreate) (mandatory) (2-bytes) |
| 50 | // |
| 51 | // Md Level |
| 52 | // MD level: This attribute ranges from 0..7 and specifies the maintenance level of this MD. Higher |
| 53 | // numbers have wider geographic scope. (R,-W, setbycreate) (mandatory) (1-byte) |
| 54 | // |
| 55 | // Md Name Format |
| 56 | // MD name format: This attribute specifies one of several possible formats for the MD name |
| 57 | // attribute. (R,-W, setbycreate) (mandatory) (1-byte) |
| 58 | // |
| 59 | // Md Name 1 Md Name 2 |
| 60 | // MD name 1, MD name 2:These two attributes may be regarded as a 50-byte octet string whose value |
| 61 | // is the left-justified maintenance domain name. The MD name may or may not be a printable |
| 62 | // character string, so an octet string is the appropriate representation. If the MD name format |
| 63 | // specifies a DNS-like name or a character string, the string is null-terminated; otherwise, its |
| 64 | // length is determined by the MD name format. If the MD has no name (MD name format-=-0), this |
| 65 | // attribute is undefined. Note that binary comparisons of the MD name are made in other CFM state |
| 66 | // machines, so blanks, alphabetic case, etc., are significant. Also, note that the MD name and the |
| 67 | // MA name must be packed (with additional bytes) into 48-byte CFM message headers. (R,-W) |
| 68 | // (mandatory if MD name format is not 1) (25-bytes * 2 attributes) |
| 69 | // |
| 70 | // Maintenance Domain Intermediate Point Half Function Mhf Creation |
| 71 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 72 | // |
| 73 | // Sender Id Permission |
| 74 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 75 | // |
| 76 | type Dot1AgMaintenanceDomain struct { |
| 77 | ManagedEntityDefinition |
| 78 | Attributes AttributeValueMap |
| 79 | } |
| 80 | |
| 81 | func init() { |
| 82 | dot1agmaintenancedomainBME = &ManagedEntityDefinition{ |
| 83 | Name: "Dot1AgMaintenanceDomain", |
| 84 | ClassID: 299, |
| 85 | MessageTypes: mapset.NewSetWith( |
| 86 | Create, |
| 87 | Delete, |
| 88 | Get, |
| 89 | Set, |
| 90 | ), |
| 91 | AllowedAttributeMask: 0xf800, |
| 92 | AttributeDefinitions: AttributeDefinitionMap{ |
| 93 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 94 | 1: ByteField("MdLevel", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 95 | 2: ByteField("MdNameFormat", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 96 | 3: MultiByteField("MdName1MdName2", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 97 | 4: ByteField("MaintenanceDomainIntermediatePointHalfFunctionMhfCreation", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 98 | 5: ByteField("SenderIdPermission", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5), |
| 99 | }, |
| 100 | Access: CreatedByOlt, |
| 101 | Support: UnknownSupport, |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | // NewDot1AgMaintenanceDomain (class ID 299) creates the basic |
| 106 | // Managed Entity definition that is used to validate an ME of this type that |
| 107 | // is received from or transmitted to the OMCC. |
| 108 | func NewDot1AgMaintenanceDomain(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 109 | return NewManagedEntity(*dot1agmaintenancedomainBME, params...) |
| 110 | } |