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