blob: 6c1c3a0758b7678512d881a6902de9bc54d75609 [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// VoipVoiceCtpClassID is the 16-bit ID for the OMCI
26// Managed entity VoIP voice CTP
27const VoipVoiceCtpClassID ClassID = ClassID(139)
28
29var voipvoicectpBME *ManagedEntityDefinition
30
31// VoipVoiceCtp (class ID #139)
32// The VoIP voice CTP defines the attributes necessary to associate a specified VoIP service (SIP,
33// ITUT-H.248) with a POTS UNI. This entity is conditionally required for ONUs that offer VoIP
34// services. If a non-OMCI interface is used to manage VoIP signalling, this ME is unnecessary.
35//
36// An instance of this ME is created and deleted by the OLT. A VoIP voice CTP ME is needed for each
37// PPTP POTS UNI served by VoIP.
38//
39// Relationships
40// An instance of this ME links a PPTP POTS UNI ME with a VoIP media profile and a SIP user data or
41// media gateway controller (MGC) config data ME.
42//
43// Attributes
44// Managed Entity Id
45// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
46// (mandatory) (2-bytes)
47//
48// User Protocol Pointer
49// User protocol pointer: This attribute points to signalling protocol data. If the signalling
50// protocol used attribute of the VoIP config data ME specifies that the ONU's signalling protocol
51// is SIP, this attribute points to a SIP user data ME, which in turn points to a SIP agent config
52// data ME. If the signalling protocol is ITU-T-H.248, this attribute points directly to an MGC
53// config data ME. (R,-W, setbycreate) (mandatory) (2-bytes)
54//
55// Pptp Pointer
56// PPTP pointer: This attribute points to the PPTP POTS UNI ME that serves the analogue telephone
57// port. (R,-W, setbycreate) (mandatory) (2-bytes)
58//
59// V O Ip Media Profile Pointer
60// VoIP media profile pointer: This attribute points to an associated VoIP media profile. (R,-W,
61// setbycreate) (mandatory) (2-bytes)
62//
63// Signalling Code
64// (R,-W, setbycreate) (mandatory) (1-byte)
65//
66type VoipVoiceCtp struct {
67 ManagedEntityDefinition
68 Attributes AttributeValueMap
69}
70
71func init() {
72 voipvoicectpBME = &ManagedEntityDefinition{
73 Name: "VoipVoiceCtp",
74 ClassID: 139,
75 MessageTypes: mapset.NewSetWith(
76 Create,
77 Delete,
78 Get,
79 Set,
80 ),
81 AllowedAttributeMask: 0xf000,
82 AttributeDefinitions: AttributeDefinitionMap{
83 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
84 1: Uint16Field("UserProtocolPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
85 2: Uint16Field("PptpPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
86 3: Uint16Field("VOIpMediaProfilePointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
87 4: ByteField("SignallingCode", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
88 },
89 Access: CreatedByOlt,
90 Support: UnknownSupport,
91 }
92}
93
94// NewVoipVoiceCtp (class ID 139) creates the basic
95// Managed Entity definition that is used to validate an ME of this type that
96// is received from or transmitted to the OMCC.
97func NewVoipVoiceCtp(params ...ParamData) (*ManagedEntity, OmciErrors) {
98 return NewManagedEntity(*voipvoicectpBME, params...)
99}