blob: d94d9ab9d68b04f01b788646a168fa02f05ebfd5 [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// VpNetworkCtpClassID is the 16-bit ID for the OMCI
26// Managed entity VP network CTP
27const VpNetworkCtpClassID ClassID = ClassID(269)
28
29var vpnetworkctpBME *ManagedEntityDefinition
30
31// VpNetworkCtp (class ID #269)
32// NOTE - In [ITU-T G.984.4], this ME is called VP network CTP-G.
33//
34// This ME represents the termination of VP links on an ONU. It aggregates connectivity
35// functionality from the network view and alarms from the network element view as well as
36// artefacts from trails. Instances of this ME are created and deleted by the OLT.
37//
38// An instance of the VP network CTP ME can be deleted only when no ATM IW VCC TP is associated
39// with it. It is the responsibility of the OLT to ensure that this condition is met.
40//
41// Relationships
42// Zero or more instances of the VP network CTP ME may exist for each instance of the IW VCC TP ME.
43//
44// Attributes
45// Managed Entity Id
46// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
47// (mandatory) (2-bytes)
48//
49// Vpi Value
50// VPI value: This attribute identifies the VPI value associated with the VP link being terminated.
51// (R,-W, setbycreate) (mandatory) (2-bytes)
52//
53// Uni Pointer
54// UNI pointer: This pointer indicates the xDSL PPTP UNI associated with this VP TP. The bearer
55// channel may be indicated by the two MSBs of the pointer. (R,-W, setbycreate) (mandatory)
56// (2-bytes)
57//
58// Direction
59// Direction: This attribute specifies whether the VP link is used for UNI-to-ANI (value-1), ANI-
60// to-UNI (value-2), or bidirectional (value 3) connection. (R,-W, setbycreate) (mandatory)
61// (1-byte)
62//
63// Deprecated 1
64// Deprecated 1: Not used; should be set to 0. (R,-W, setbycreate) (mandatory) (2-bytes)
65//
66// Deprecated 2
67// Deprecated 2: Not used; should be set to 0. (R,-W, setbycreate) (mandatory) (2-bytes)
68//
69// Deprecated 3
70// Deprecated 3: Not used; should be set to 0. (R,-W, setbycreate) (optional) (2-bytes)
71//
72// Deprecated 4
73// Deprecated 4: Not used; if present, should be set to 0. (R) (optional) (1-byte)
74//
75type VpNetworkCtp struct {
76 ManagedEntityDefinition
77 Attributes AttributeValueMap
78}
79
80func init() {
81 vpnetworkctpBME = &ManagedEntityDefinition{
82 Name: "VpNetworkCtp",
83 ClassID: 269,
84 MessageTypes: mapset.NewSetWith(
85 Create,
86 Delete,
87 Get,
88 Set,
89 ),
90 AllowedAttributeMask: 0xfe00,
91 AttributeDefinitions: AttributeDefinitionMap{
92 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
93 1: Uint16Field("VpiValue", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
94 2: Uint16Field("UniPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
95 3: ByteField("Direction", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
96 4: Uint16Field("Deprecated1", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, 4),
97 5: Uint16Field("Deprecated2", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, 5),
98 6: Uint16Field("Deprecated3", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, true, 6),
99 7: ByteField("Deprecated4", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, true, 7),
100 },
101 Access: CreatedByOlt,
102 Support: UnknownSupport,
103 }
104}
105
106// NewVpNetworkCtp (class ID 269) creates the basic
107// Managed Entity definition that is used to validate an ME of this type that
108// is received from or transmitted to the OMCC.
109func NewVpNetworkCtp(params ...ParamData) (*ManagedEntity, OmciErrors) {
110 return NewManagedEntity(*vpnetworkctpBME, params...)
111}