blob: 37964fb721a235d6b91ec04153d9618cf8431461 [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
Chip Boling610117d2021-09-09 11:24:34 -050030const VpNetworkCtpClassID = ClassID(269) // 0x010d
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var vpnetworkctpBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// VpNetworkCtp (Class ID: #269 / 0x010d)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050049// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
Chip Boling6e27b352020-02-14 09:10:01 -060050// (2-bytes)
51//
Chip Boling610117d2021-09-09 11:24:34 -050052// Vpi Value
53// This attribute identifies the VPI value associated with the VP link being terminated. (R,-W,
54// setbycreate) (mandatory) (2-bytes)
55//
56// Uni Pointer
57// This pointer indicates the xDSL PPTP UNI associated with this VP TP. The bearer channel may be
58// indicated by the two MSBs of the pointer. (R,-W, setbycreate) (mandatory) (2-bytes)
59//
Chip Boling6e27b352020-02-14 09:10:01 -060060// Direction
Chip Boling610117d2021-09-09 11:24:34 -050061// This attribute specifies whether the VP link is used for UNI-to-ANI (value-1), ANI-to-UNI
62// (value-2), or bidirectional (value 3) connection. (R,-W, setbycreate) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060063//
64// Deprecated 1
Chip Boling610117d2021-09-09 11:24:34 -050065// Not used; should be set to 0. (R,-W, setbycreate) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060066//
67// Deprecated 2
Chip Boling610117d2021-09-09 11:24:34 -050068// Not used; should be set to 0. (R,-W, setbycreate) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060069//
70// Deprecated 3
Chip Boling610117d2021-09-09 11:24:34 -050071// Not used; should be set to 0. (R,-W, setbycreate) (optional) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060072//
73// Deprecated 4
Chip Boling610117d2021-09-09 11:24:34 -050074// Not used; if present, should be set to 0. (R) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060075//
76type VpNetworkCtp struct {
77 ManagedEntityDefinition
78 Attributes AttributeValueMap
79}
80
81func init() {
82 vpnetworkctpBME = &ManagedEntityDefinition{
83 Name: "VpNetworkCtp",
84 ClassID: 269,
85 MessageTypes: mapset.NewSetWith(
86 Create,
87 Delete,
88 Get,
89 Set,
90 ),
91 AllowedAttributeMask: 0xfe00,
92 AttributeDefinitions: AttributeDefinitionMap{
93 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
94 1: Uint16Field("VpiValue", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
95 2: Uint16Field("UniPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
96 3: ByteField("Direction", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
97 4: Uint16Field("Deprecated1", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, 4),
98 5: Uint16Field("Deprecated2", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, 5),
99 6: Uint16Field("Deprecated3", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, true, 6),
100 7: ByteField("Deprecated4", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, true, 7),
101 },
102 Access: CreatedByOlt,
103 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600104 Alarms: AlarmMap{
105 0: "VP AIS LMIR",
106 1: "VP RDI LMIR",
107 2: "VP AIS LMIG",
108 3: "VP RDI LMIG",
109 4: "Segment loss of continuity",
110 5: "End-to-end loss of continuity",
111 },
Chip Boling6e27b352020-02-14 09:10:01 -0600112 }
113}
114
115// NewVpNetworkCtp (class ID 269) creates the basic
116// Managed Entity definition that is used to validate an ME of this type that
117// is received from or transmitted to the OMCC.
118func NewVpNetworkCtp(params ...ParamData) (*ManagedEntity, OmciErrors) {
119 return NewManagedEntity(*vpnetworkctpBME, params...)
120}