blob: dcbe99edf066e56de2b6984a97c2b65c31953280 [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// SipUserDataClassID is the 16-bit ID for the OMCI
29// Managed entity SIP user data
Chip Boling610117d2021-09-09 11:24:34 -050030const SipUserDataClassID = ClassID(153) // 0x0099
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var sipuserdataBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// SipUserData (Class ID: #153 / 0x0099)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050048// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
49// (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060050//
51// Sip Agent Pointer
Chip Boling610117d2021-09-09 11:24:34 -050052// This attribute points to the SIP agent config data ME to be used for signalling. (R,-W,
Chip Boling6e27b352020-02-14 09:10:01 -060053// setbycreate) (mandatory) (2-bytes)
54//
Chip Boling610117d2021-09-09 11:24:34 -050055// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060061// Sip Display Name
Chip Boling610117d2021-09-09 11:24:34 -050062// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060064//
65// Username And Password
Chip Boling610117d2021-09-09 11:24:34 -050066// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060069//
70// Voicemail Server Sip Uri
Chip Boling610117d2021-09-09 11:24:34 -050071// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060074//
75// Voicemail Subscription Expiration Time
Chip Boling610117d2021-09-09 11:24:34 -050076// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060079//
80// Network Dial Plan Pointer
Chip Boling610117d2021-09-09 11:24:34 -050081// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060083//
84// Application Services Profile Pointer
Chip Boling610117d2021-09-09 11:24:34 -050085// This attribute points to a VoIP application services profile. (R,-W, setbycreate) (mandatory)
86// (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060087//
88// Feature Code Pointer
Chip Boling610117d2021-09-09 11:24:34 -050089// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060092//
93// Pptp Pointer
Chip Boling610117d2021-09-09 11:24:34 -050094// This attribute points to the PPTP POTS UNI ME that provides the analogue telephony adaptor (ATA)
95// function. (R,-W, setbycreate) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060096//
97// Release Timer
Chip Boling610117d2021-09-09 11:24:34 -050098// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600101//
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
113func init() {
114 sipuserdataBME = &ManagedEntityDefinition{
115 Name: "SipUserData",
116 ClassID: 153,
117 MessageTypes: mapset.NewSetWith(
118 Create,
119 Delete,
120 Get,
121 Set,
122 ),
123 AllowedAttributeMask: 0xfff0,
124 AttributeDefinitions: AttributeDefinitionMap{
125 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
126 1: Uint16Field("SipAgentPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
127 2: Uint16Field("UserPartAor", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
128 3: MultiByteField("SipDisplayName", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
129 4: Uint16Field("UsernameAndPassword", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
130 5: Uint16Field("VoicemailServerSipUri", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
131 6: Uint32Field("VoicemailSubscriptionExpirationTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
132 7: Uint16Field("NetworkDialPlanPointer", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
133 8: Uint16Field("ApplicationServicesProfilePointer", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
134 9: Uint16Field("FeatureCodePointer", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
135 10: Uint16Field("PptpPointer", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
136 11: ByteField("ReleaseTimer", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
137 12: ByteField("ReceiverOffHookRohTimer", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
138 },
139 Access: CreatedByOlt,
140 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600141 Alarms: AlarmMap{
142 0: "SIP-UA register auth",
143 1: "SIP-UA register timeout",
144 2: "SIP-UA register fail",
145 },
Chip Boling6e27b352020-02-14 09:10:01 -0600146 }
147}
148
149// NewSipUserData (class ID 153) creates the basic
150// Managed Entity definition that is used to validate an ME of this type that
151// is received from or transmitted to the OMCC.
152func NewSipUserData(params ...ParamData) (*ManagedEntity, OmciErrors) {
153 return NewManagedEntity(*sipuserdataBME, params...)
154}