blob: 68096591f6e8b0de545ed4521e57d71510ae22a5 [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
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
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 */
Girish Gowdra161d27a2021-05-05 12:01:44 -070017/*
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// VoipVoiceCtpClassID is the 16-bit ID for the OMCI
29// Managed entity VoIP voice CTP
Andrea Campanella10426e22021-10-15 17:58:04 +020030const VoipVoiceCtpClassID = ClassID(139) // 0x008b
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var voipvoicectpBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// VoipVoiceCtp (Class ID: #139 / 0x008b)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035// The VoIP voice CTP defines the attributes necessary to associate a specified VoIP service (SIP,
Matteo Scandolof9d43412021-01-12 11:11:34 -080036// ITUT-H.248) with a POTS UNI. This entity is conditionally required for ONUs that offer VoIP
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070037// services. If a non-OMCI interface is used to manage VoIP signalling, this ME is unnecessary.
38//
39// An instance of this ME is created and deleted by the OLT. A VoIP voice CTP ME is needed for each
40// PPTP POTS UNI served by VoIP.
41//
42// Relationships
43// An instance of this ME links a PPTP POTS UNI ME with a VoIP media profile and a SIP user data or
44// media gateway controller (MGC) config data ME.
45//
46// Attributes
47// Managed Entity Id
Andrea Campanella10426e22021-10-15 17:58:04 +020048// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
49// (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070050//
51// User Protocol Pointer
Andrea Campanella10426e22021-10-15 17:58:04 +020052// This attribute points to signalling protocol data. If the signalling protocol used attribute of
53// the VoIP config data ME specifies that the ONU's signalling protocol is SIP, this attribute
54// points to a SIP user data ME, which in turn points to a SIP agent config data ME. If the
55// signalling protocol is ITU-T-H.248, this attribute points directly to an MGC config data ME.
56// (R,-W, setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070057//
58// Pptp Pointer
Andrea Campanella10426e22021-10-15 17:58:04 +020059// This attribute points to the PPTP POTS UNI ME that serves the analogue telephone port. (R,-W,
60// setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070061//
62// V O Ip Media Profile Pointer
Matteo Scandolof9d43412021-01-12 11:11:34 -080063// VoIP media profile pointer: This attribute points to an associated VoIP media profile. (R,-W,
64// setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070065//
66// Signalling Code
Andrea Campanella10426e22021-10-15 17:58:04 +020067// 3 Loop reverse battery
68//
69// 4 Coin first
70//
71// 5 Dial tone first
72//
73// 6 Multi-party
74//
Matteo Scandolof9d43412021-01-12 11:11:34 -080075// (R,-W, setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070076//
Andrea Campanella10426e22021-10-15 17:58:04 +020077// This attribute specifies the POTS-side signalling as follows.
78//
79// 1 Loop start
80//
81// 2 Ground start
82//
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070083type VoipVoiceCtp struct {
84 ManagedEntityDefinition
85 Attributes AttributeValueMap
86}
87
Elia Battiston9bfe1102022-02-03 10:38:03 +010088// Attribute name constants
89
90const VoipVoiceCtp_UserProtocolPointer = "UserProtocolPointer"
91const VoipVoiceCtp_PptpPointer = "PptpPointer"
92const VoipVoiceCtp_VOIpMediaProfilePointer = "VOIpMediaProfilePointer"
93const VoipVoiceCtp_SignallingCode = "SignallingCode"
94
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070095func init() {
96 voipvoicectpBME = &ManagedEntityDefinition{
97 Name: "VoipVoiceCtp",
Elia Battiston9bfe1102022-02-03 10:38:03 +010098 ClassID: VoipVoiceCtpClassID,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070099 MessageTypes: mapset.NewSetWith(
100 Create,
101 Delete,
102 Get,
103 Set,
104 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800105 AllowedAttributeMask: 0xf000,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700106 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100107 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
108 1: Uint16Field(VoipVoiceCtp_UserProtocolPointer, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
109 2: Uint16Field(VoipVoiceCtp_PptpPointer, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
110 3: Uint16Field(VoipVoiceCtp_VOIpMediaProfilePointer, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
111 4: ByteField(VoipVoiceCtp_SignallingCode, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700112 },
Matteo Scandolof9d43412021-01-12 11:11:34 -0800113 Access: CreatedByOlt,
114 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700115 }
116}
117
Matteo Scandolof9d43412021-01-12 11:11:34 -0800118// NewVoipVoiceCtp (class ID 139) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700119// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800120// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700121func NewVoipVoiceCtp(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800122 return NewManagedEntity(*voipvoicectpBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700123}