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 | */ |
David K. Bainbridge | adf422d | 2021-04-09 16:06:41 +0000 | [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 | // Dot1AgMaintenanceAssociationClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Dot1ag maintenance association |
| 30 | const Dot1AgMaintenanceAssociationClassID ClassID = ClassID(300) |
| 31 | |
| 32 | var dot1agmaintenanceassociationBME *ManagedEntityDefinition |
| 33 | |
| 34 | // Dot1AgMaintenanceAssociation (class ID #300) |
| 35 | // This ME models an [IEEE 802.1ag] service defined on a bridge port. An MA is a set of endpoints |
| 36 | // on opposite sides of a network, all existing at a defined maintenance level. One of the |
| 37 | // endpoints resides on the local ONU; the others are understood to be configured in a consistent |
| 38 | // way on external equipment. [ITUT Y.1731] refers to the MA as a maintenance entity group (MEG). |
| 39 | // |
| 40 | // An MA is created and deleted by the OLT. |
| 41 | // |
| 42 | // Relationships |
| 43 | // Any number of MAs may be associated with a given MD, or may stand on their own without an MD. |
| 44 | // One or more MAs may be associated with a MAC bridge or an IEEE 802.1p mapper. An MA exists at |
| 45 | // one of eight possible maintenance levels. |
| 46 | // |
| 47 | // Attributes |
| 48 | // Managed Entity Id |
| 49 | // Managed entity ID: This attribute uniquely identifies an instance of this ME. The values 0 and |
| 50 | // 0xFFFF are reserved. (R, setbycreate) (mandatory) (2-bytes) |
| 51 | // |
| 52 | // Md Pointer |
| 53 | // MD pointer: This pointer specifies the dot1ag maintenance domain with which this MA is |
| 54 | // associated. A null pointer specifies that the MA is not associated with an MD. (R,-W, |
| 55 | // setbycreate) (mandatory) (2-bytes) |
| 56 | // |
| 57 | // Short Ma Name Format |
| 58 | // Short MA name format: This attribute specifies one of several possible formats for the short MA |
| 59 | // name attribute. Value 1, the primary VLAN ID, is recommended to be the default. (R,-W, |
| 60 | // setbycreate) (mandatory) (1-byte) |
| 61 | // |
| 62 | // Short Ma Name 1, Short Ma Name 2 |
| 63 | // Short MA name 1, Short MA name 2: These two attributes may be regarded as an octet string whose |
| 64 | // value is the left-justified MA name. Because the MA name may or may not be a printable character |
| 65 | // string, an octet string is the appropriate representation. If the short MA name format specifies |
| 66 | // a character string, the string is null-terminated; otherwise, its length is determined by the |
| 67 | // short MA name format. Note that binary comparisons of the short MA name are made in other CFM |
| 68 | // state machines, so blanks, alphabetic case, etc., are significant. Also, note that the MD name |
| 69 | // and the MA short name must be packed (with additional bytes) into 48-byte CFM message headers. |
| 70 | // (R,-W) (mandatory) (25-bytes * 2 attributes) |
| 71 | // |
| 72 | // Continuity Check Message Ccm Interval |
| 73 | // Short intervals should be used judiciously, as they can interfere with the network's ability to |
| 74 | // handle subscriber traffic. The recommended value is 1-s. (R,-W, setbycreate) (mandatory) |
| 75 | // (1-byte) |
| 76 | // |
| 77 | // Associated Vlans |
| 78 | // Associated VLANs: This attribute is a list of up to 12 VLAN IDs with which this MA is |
| 79 | // associated. Once a set of VLANs is defined, the ONU should deny operations to other dot1ag MAs |
| 80 | // or dot1ag default MD level entries that conflict with the set membership. The all-zeros value |
| 81 | // indicates that this MA is not associated with any VLANs. Assuming that the attribute is not 0, |
| 82 | // the first entry is understood to be the primary VLAN. Except forwarded linktrace messages |
| 83 | // (LTMs), CFM messages emitted by MPs in this MA are tagged with the primary VLAN ID. (R,-W) |
| 84 | // (mandatory) (2-bytes/entry * 12-entries-=-24-bytes) |
| 85 | // |
| 86 | // Mhf Creation |
| 87 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 88 | // |
| 89 | // Sender Id Permission |
| 90 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 91 | // |
| 92 | type Dot1AgMaintenanceAssociation struct { |
| 93 | ManagedEntityDefinition |
| 94 | Attributes AttributeValueMap |
| 95 | } |
| 96 | |
| 97 | func init() { |
| 98 | dot1agmaintenanceassociationBME = &ManagedEntityDefinition{ |
| 99 | Name: "Dot1AgMaintenanceAssociation", |
| 100 | ClassID: 300, |
| 101 | MessageTypes: mapset.NewSetWith( |
| 102 | Create, |
| 103 | Delete, |
| 104 | Get, |
| 105 | Set, |
| 106 | ), |
| 107 | AllowedAttributeMask: 0xfe00, |
| 108 | AttributeDefinitions: AttributeDefinitionMap{ |
| 109 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 110 | 1: Uint16Field("MdPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 111 | 2: ByteField("ShortMaNameFormat", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 112 | 3: MultiByteField("ShortMaName1,ShortMaName2", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 113 | 4: ByteField("ContinuityCheckMessageCcmInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 114 | 5: MultiByteField("AssociatedVlans", OctetsAttributeType, 0x0800, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, false, false, 5), |
| 115 | 6: ByteField("MhfCreation", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6), |
| 116 | 7: ByteField("SenderIdPermission", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7), |
| 117 | }, |
| 118 | Access: CreatedByOlt, |
| 119 | Support: UnknownSupport, |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | // NewDot1AgMaintenanceAssociation (class ID 300) creates the basic |
| 124 | // Managed Entity definition that is used to validate an ME of this type that |
| 125 | // is received from or transmitted to the OMCC. |
| 126 | func NewDot1AgMaintenanceAssociation(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 127 | return NewManagedEntity(*dot1agmaintenanceassociationBME, params...) |
| 128 | } |