blob: af565ddab9e4349559251ed2faed1e1aa506e448 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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 Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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 */
Chip Boling34ebcb62021-02-02 12:13:58 -060017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// VpNetworkCtpClassID is the 16-bit ID for the OMCI
29// Managed entity VP network CTP
30const VpNetworkCtpClassID ClassID = ClassID(269)
31
32var vpnetworkctpBME *ManagedEntityDefinition
33
34// VpNetworkCtp (class ID #269)
35// NOTE - In [ITU-T G.984.4], this ME is called VP network CTP-G.
36//
37// This ME represents the termination of VP links on an ONU. It aggregates connectivity
38// functionality from the network view and alarms from the network element view as well as
39// artefacts from trails. Instances of this ME are created and deleted by the OLT.
40//
41// An instance of the VP network CTP ME can be deleted only when no ATM IW VCC TP is associated
42// with it. It is the responsibility of the OLT to ensure that this condition is met.
43//
44// Relationships
45// Zero or more instances of the VP network CTP ME may exist for each instance of the IW VCC TP ME.
46//
47// Attributes
48// Managed Entity Id
49// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
50// (mandatory) (2-bytes)
51//
52// Vpi Value
53// VPI value: This attribute identifies the VPI value associated with the VP link being terminated.
54// (R,-W, setbycreate) (mandatory) (2-bytes)
55//
56// Uni Pointer
57// UNI pointer: This pointer indicates the xDSL PPTP UNI associated with this VP TP. The bearer
58// channel may be indicated by the two MSBs of the pointer. (R,-W, setbycreate) (mandatory)
59// (2-bytes)
60//
61// Direction
62// Direction: This attribute specifies whether the VP link is used for UNI-to-ANI (value-1), ANI-
63// to-UNI (value-2), or bidirectional (value 3) connection. (R,-W, setbycreate) (mandatory)
64// (1-byte)
65//
66// Deprecated 1
67// Deprecated 1: Not used; should be set to 0. (R,-W, setbycreate) (mandatory) (2-bytes)
68//
69// Deprecated 2
70// Deprecated 2: Not used; should be set to 0. (R,-W, setbycreate) (mandatory) (2-bytes)
71//
72// Deprecated 3
73// Deprecated 3: Not used; should be set to 0. (R,-W, setbycreate) (optional) (2-bytes)
74//
75// Deprecated 4
76// Deprecated 4: Not used; if present, should be set to 0. (R) (optional) (1-byte)
77//
78type VpNetworkCtp struct {
79 ManagedEntityDefinition
80 Attributes AttributeValueMap
81}
82
83func init() {
84 vpnetworkctpBME = &ManagedEntityDefinition{
85 Name: "VpNetworkCtp",
86 ClassID: 269,
87 MessageTypes: mapset.NewSetWith(
88 Create,
89 Delete,
90 Get,
91 Set,
92 ),
93 AllowedAttributeMask: 0xfe00,
94 AttributeDefinitions: AttributeDefinitionMap{
95 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
96 1: Uint16Field("VpiValue", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
97 2: Uint16Field("UniPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
98 3: ByteField("Direction", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
99 4: Uint16Field("Deprecated1", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, 4),
100 5: Uint16Field("Deprecated2", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, 5),
101 6: Uint16Field("Deprecated3", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, true, 6),
102 7: ByteField("Deprecated4", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, true, 7),
103 },
104 Access: CreatedByOlt,
105 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600106 Alarms: AlarmMap{
107 0: "VP AIS LMIR",
108 1: "VP RDI LMIR",
109 2: "VP AIS LMIG",
110 3: "VP RDI LMIG",
111 4: "Segment loss of continuity",
112 5: "End-to-end loss of continuity",
113 },
Chip Boling6e27b352020-02-14 09:10:01 -0600114 }
115}
116
117// NewVpNetworkCtp (class ID 269) creates the basic
118// Managed Entity definition that is used to validate an ME of this type that
119// is received from or transmitted to the OMCC.
120func NewVpNetworkCtp(params ...ParamData) (*ManagedEntity, OmciErrors) {
121 return NewManagedEntity(*vpnetworkctpBME, params...)
122}