blob: af74f1c6f075ede09378d734bec6d00cd6526a4b [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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 */
Himani Chawlaac1f5ad2021-02-04 21:21:54 +053017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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// SipUserDataClassID is the 16-bit ID for the OMCI
29// Managed entity SIP user data
mpagenko836a1fd2021-11-01 16:12:42 +000030const SipUserDataClassID = ClassID(153) // 0x0099
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var sipuserdataBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// SipUserData (Class ID: #153 / 0x0099)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// The SIP user data defines the user specific configuration attributes associated with a specific
36// VoIP CTP. This entity is conditionally required for ONUs that offer VoIP SIP services. If a non-
37// OMCI interface is used to manage SIP for VoIP, this ME is unnecessary. The non-OMCI interface
38// supplies the necessary data, which may be read back to the OLT via the SIP config portal ME.
39//
40// An instance of this ME is created and deleted by the OLT. A SIP user data instance is required
41// for each POTS UNI port using SIP protocol and configured by the OMCI.
42//
43// Relationships
44// An instance of this ME is associated with one VoIP voice CTP ME and a PPTP POTS UNI.
45//
46// Attributes
47// Managed Entity Id
mpagenko836a1fd2021-11-01 16:12:42 +000048// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
49// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000050//
51// Sip Agent Pointer
mpagenko836a1fd2021-11-01 16:12:42 +000052// This attribute points to the SIP agent config data ME to be used for signalling. (R,-W,
Holger Hildebrandtfa074992020-03-27 15:42:06 +000053// setbycreate) (mandatory) (2-bytes)
54//
mpagenko836a1fd2021-11-01 16:12:42 +000055// User Part Aor
56// This attribute points to a large string that contains the user identification part of the
57// address of record. This can take the form of an alphanumeric string or the subscriber's
58// directory number. A null pointer indicates the absence of an AOR. (R,-W, setbycreate)
59// (mandatory) (2-bytes)
60//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000061// Sip Display Name
mpagenko836a1fd2021-11-01 16:12:42 +000062// This ASCII string attribute defines the customer ID used for the display attribute in outgoing
63// SIP messages. The default value is null (all zero bytes) (R,-W) (mandatory) (25-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000064//
65// Username And Password
mpagenko836a1fd2021-11-01 16:12:42 +000066// This attribute points to an authentication security method ME that contains the SIP user name
67// and password used for authentication. A null pointer indicates no username and password. (R,-W,
68// setbycreate) (mandatory) (2)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000069//
70// Voicemail Server Sip Uri
mpagenko836a1fd2021-11-01 16:12:42 +000071// This attribute points to a network address ME that contains the name (IP address or URI) of the
72// SIP voicemail server for SIP signalling messages. A null pointer indicates the absence of a SIP
73// voicemail server. (R,-W, setbycreate) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000074//
75// Voicemail Subscription Expiration Time
mpagenko836a1fd2021-11-01 16:12:42 +000076// This attribute defines the voicemail subscription expiration time in seconds. If this value is
77// 0, the SIP agent uses an implementation-specific value. This attribute is recommended to be set
78// to 3600-s by default. (R,-W, setbycreate) (mandatory) (4-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000079//
80// Network Dial Plan Pointer
mpagenko836a1fd2021-11-01 16:12:42 +000081// This attribute points to a network dial plan table. A null pointer indicates the absence of a
82// network dial plan. (R,-W, setbycreate) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000083//
84// Application Services Profile Pointer
mpagenko836a1fd2021-11-01 16:12:42 +000085// This attribute points to a VoIP application services profile. (R,-W, setbycreate) (mandatory)
86// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000087//
88// Feature Code Pointer
mpagenko836a1fd2021-11-01 16:12:42 +000089// This attribute points to the VoIP feature access codes ME for this subscriber. A null pointer
90// indicates the absence of a VoIP feature access codes ME. (R,-W, set-by-create) (mandatory)
91// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000092//
93// Pptp Pointer
mpagenko836a1fd2021-11-01 16:12:42 +000094// This attribute points to the PPTP POTS UNI ME that provides the analogue telephony adaptor (ATA)
95// function. (R,-W, setbycreate) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000096//
97// Release Timer
mpagenko836a1fd2021-11-01 16:12:42 +000098// This attribute contains a release timer defined in seconds. The value 0 specifies that the ONU
99// is to use its internal default. The default value of this attribute is 10-s. (R,-W) (optional)
100// (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000101//
102// Receiver Off Hook Roh Timer
103// Receiver off hook (ROH) timer: This attribute defines the time in seconds for the ROH condition
104// before ROH tone is applied. The value 0 disables ROH timing. The value 0xFF specifies that the
105// ONU is to use its internal default, which may or may not be the same as the 15-s OMCI default
106// value. (R,-W) (optional) (1-byte)
107//
108type SipUserData struct {
109 ManagedEntityDefinition
110 Attributes AttributeValueMap
111}
112
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000113// Attribute name constants
114
115const SipUserData_SipAgentPointer = "SipAgentPointer"
116const SipUserData_UserPartAor = "UserPartAor"
117const SipUserData_SipDisplayName = "SipDisplayName"
118const SipUserData_UsernameAndPassword = "UsernameAndPassword"
119const SipUserData_VoicemailServerSipUri = "VoicemailServerSipUri"
120const SipUserData_VoicemailSubscriptionExpirationTime = "VoicemailSubscriptionExpirationTime"
121const SipUserData_NetworkDialPlanPointer = "NetworkDialPlanPointer"
122const SipUserData_ApplicationServicesProfilePointer = "ApplicationServicesProfilePointer"
123const SipUserData_FeatureCodePointer = "FeatureCodePointer"
124const SipUserData_PptpPointer = "PptpPointer"
125const SipUserData_ReleaseTimer = "ReleaseTimer"
126const SipUserData_ReceiverOffHookRohTimer = "ReceiverOffHookRohTimer"
127
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000128func init() {
129 sipuserdataBME = &ManagedEntityDefinition{
130 Name: "SipUserData",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000131 ClassID: SipUserDataClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000132 MessageTypes: mapset.NewSetWith(
133 Create,
134 Delete,
135 Get,
136 Set,
137 ),
138 AllowedAttributeMask: 0xfff0,
139 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000140 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
141 1: Uint16Field(SipUserData_SipAgentPointer, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
142 2: Uint16Field(SipUserData_UserPartAor, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
143 3: MultiByteField(SipUserData_SipDisplayName, OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
144 4: Uint16Field(SipUserData_UsernameAndPassword, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
145 5: Uint16Field(SipUserData_VoicemailServerSipUri, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
146 6: Uint32Field(SipUserData_VoicemailSubscriptionExpirationTime, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
147 7: Uint16Field(SipUserData_NetworkDialPlanPointer, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
148 8: Uint16Field(SipUserData_ApplicationServicesProfilePointer, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
149 9: Uint16Field(SipUserData_FeatureCodePointer, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
150 10: Uint16Field(SipUserData_PptpPointer, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
151 11: ByteField(SipUserData_ReleaseTimer, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
152 12: ByteField(SipUserData_ReceiverOffHookRohTimer, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000153 },
154 Access: CreatedByOlt,
155 Support: UnknownSupport,
Himani Chawlaac1f5ad2021-02-04 21:21:54 +0530156 Alarms: AlarmMap{
157 0: "SIP-UA register auth",
158 1: "SIP-UA register timeout",
159 2: "SIP-UA register fail",
160 },
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000161 }
162}
163
164// NewSipUserData (class ID 153) creates the basic
165// Managed Entity definition that is used to validate an ME of this type that
166// is received from or transmitted to the OMCC.
167func NewSipUserData(params ...ParamData) (*ManagedEntity, OmciErrors) {
168 return NewManagedEntity(*sipuserdataBME, params...)
169}