blob: 9799cf8b5b83ac4e150a885edf85dc2f3a520b3e [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080017 /*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// Dot1AgMaintenanceDomainClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1ag maintenance domain
30const Dot1AgMaintenanceDomainClassID ClassID = ClassID(299)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var 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
Matteo Scandolof9d43412021-01-12 11:11:34 -080049// 0xFFFF are reserved. (R, setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070050//
51// Md Level
52// MD level: This attribute ranges from 0..7 and specifies the maintenance level of this MD. Higher
Matteo Scandolof9d43412021-01-12 11:11:34 -080053// numbers have wider geographic scope. (R,-W, setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070054//
55// Md Name Format
56// MD name format: This attribute specifies one of several possible formats for the MD name
Matteo Scandolof9d43412021-01-12 11:11:34 -080057// attribute. (R,-W, setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070058//
59// Md Name 1 Md Name 2
Matteo Scandolof9d43412021-01-12 11:11:34 -080060// MD name 1, MD name 2:These two attributes may be regarded as a 50-byte octet string whose value
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070061// 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
Matteo Scandolof9d43412021-01-12 11:11:34 -080064// length is determined by the MD name format. If the MD has no name (MD name format-=-0), this
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070065// 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
Matteo Scandolof9d43412021-01-12 11:11:34 -080067// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070069//
70// Maintenance Domain Intermediate Point Half Function Mhf Creation
Matteo Scandolof9d43412021-01-12 11:11:34 -080071// (R,-W, setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070072//
73// Sender Id Permission
Matteo Scandolof9d43412021-01-12 11:11:34 -080074// (R,-W, setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070075//
76type Dot1AgMaintenanceDomain struct {
77 ManagedEntityDefinition
78 Attributes AttributeValueMap
79}
80
81func init() {
82 dot1agmaintenancedomainBME = &ManagedEntityDefinition{
83 Name: "Dot1AgMaintenanceDomain",
84 ClassID: 299,
85 MessageTypes: mapset.NewSetWith(
86 Create,
87 Delete,
88 Get,
89 Set,
90 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080091 AllowedAttributeMask: 0xf800,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070092 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080093 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),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070099 },
Matteo Scandolof9d43412021-01-12 11:11:34 -0800100 Access: CreatedByOlt,
101 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700102 }
103}
104
Matteo Scandolof9d43412021-01-12 11:11:34 -0800105// NewDot1AgMaintenanceDomain (class ID 299) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700106// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800107// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700108func NewDot1AgMaintenanceDomain(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800109 return NewManagedEntity(*dot1agmaintenancedomainBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700110}