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