blob: 050f916698b742e942fda59965c6111084126080 [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// SipUserDataClassID is the 16-bit ID for the OMCI
26// Managed entity SIP user data
27const SipUserDataClassID ClassID = ClassID(153)
28
29var sipuserdataBME *ManagedEntityDefinition
30
31// SipUserData (class ID #153)
32// The SIP user data defines the user specific configuration attributes associated with a specific
33// VoIP CTP. This entity is conditionally required for ONUs that offer VoIP SIP services. If a non-
34// OMCI interface is used to manage SIP for VoIP, this ME is unnecessary. The non-OMCI interface
35// supplies the necessary data, which may be read back to the OLT via the SIP config portal ME.
36//
37// An instance of this ME is created and deleted by the OLT. A SIP user data instance is required
38// for each POTS UNI port using SIP protocol and configured by the OMCI.
39//
40// Relationships
41// An instance of this ME is associated with one VoIP voice CTP ME and a PPTP POTS UNI.
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// Sip Agent Pointer
49// SIP agent pointer: This attribute points to the SIP agent config data ME to be used for
50// signalling. (R,-W, setbycreate) (mandatory) (2-bytes)
51//
52// User Part Aor
53// User part AOR: This attribute points to a large string that contains the user identification
54// part of the address of record. This can take the form of an alphanumeric string or the
55// subscriber's directory number. A null pointer indicates the absence of an AOR. (R,-W,
56// setbycreate) (mandatory) (2-bytes)
57//
58// Sip Display Name
59// SIP display name: This ASCII string attribute defines the customer ID used for the display
60// attribute in outgoing SIP messages. The default value is null (all zero bytes) (R,-W)
61// (mandatory) (25-bytes)
62//
63// Username And Password
64// Username and password: This attribute points to an authentication security method ME that
65// contains the SIP user name and password used for authentication. A null pointer indicates no
66// username and password. (R,-W, setbycreate) (mandatory) (2)
67//
68// Voicemail Server Sip Uri
69// Voicemail server SIP URI: This attribute points to a network address ME that contains the name
70// (IP address or URI) of the SIP voicemail server for SIP signalling messages. A null pointer
71// indicates the absence of a SIP voicemail server. (R,-W, setbycreate) (mandatory) (2-bytes)
72//
73// Voicemail Subscription Expiration Time
74// Voicemail subscription expiration time: This attribute defines the voicemail subscription
75// expiration time in seconds. If this value is 0, the SIP agent uses an implementation-specific
76// value. This attribute is recommended to be set to 3600-s by default. (R,-W, setbycreate)
77// (mandatory) (4-bytes)
78//
79// Network Dial Plan Pointer
80// Network dial plan pointer: This attribute points to a network dial plan table. A null pointer
81// indicates the absence of a network dial plan. (R,-W, setbycreate) (mandatory) (2-bytes)
82//
83// Application Services Profile Pointer
84// Application services profile pointer: This attribute points to a VoIP application services
85// profile. (R,-W, setbycreate) (mandatory) (2-bytes)
86//
87// Feature Code Pointer
88// Feature code pointer: This attribute points to the VoIP feature access codes ME for this
89// subscriber. A null pointer indicates the absence of a VoIP feature access codes ME. (R,-W, set-
90// by-create) (mandatory) (2-bytes)
91//
92// Pptp Pointer
93// PPTP pointer: This attribute points to the PPTP POTS UNI ME that provides the analogue telephony
94// adaptor (ATA) function. (R,-W, setbycreate) (mandatory) (2-bytes)
95//
96// Release Timer
97// Release timer: This attribute contains a release timer defined in seconds. The value 0 specifies
98// that the ONU is to use its internal default. The default value of this attribute is 10-s. (R,-W)
99// (optional) (1-byte)
100//
101// Receiver Off Hook Roh Timer
102// Receiver off hook (ROH) timer: This attribute defines the time in seconds for the ROH condition
103// before ROH tone is applied. The value 0 disables ROH timing. The value 0xFF specifies that the
104// ONU is to use its internal default, which may or may not be the same as the 15-s OMCI default
105// value. (R,-W) (optional) (1-byte)
106//
107type SipUserData struct {
108 ManagedEntityDefinition
109 Attributes AttributeValueMap
110}
111
112func init() {
113 sipuserdataBME = &ManagedEntityDefinition{
114 Name: "SipUserData",
115 ClassID: 153,
116 MessageTypes: mapset.NewSetWith(
117 Create,
118 Delete,
119 Get,
120 Set,
121 ),
122 AllowedAttributeMask: 0xfff0,
123 AttributeDefinitions: AttributeDefinitionMap{
124 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
125 1: Uint16Field("SipAgentPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
126 2: Uint16Field("UserPartAor", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
127 3: MultiByteField("SipDisplayName", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
128 4: Uint16Field("UsernameAndPassword", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
129 5: Uint16Field("VoicemailServerSipUri", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
130 6: Uint32Field("VoicemailSubscriptionExpirationTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
131 7: Uint16Field("NetworkDialPlanPointer", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
132 8: Uint16Field("ApplicationServicesProfilePointer", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
133 9: Uint16Field("FeatureCodePointer", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
134 10: Uint16Field("PptpPointer", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
135 11: ByteField("ReleaseTimer", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
136 12: ByteField("ReceiverOffHookRohTimer", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
137 },
138 Access: CreatedByOlt,
139 Support: UnknownSupport,
140 }
141}
142
143// NewSipUserData (class ID 153) creates the basic
144// Managed Entity definition that is used to validate an ME of this type that
145// is received from or transmitted to the OMCC.
146func NewSipUserData(params ...ParamData) (*ManagedEntity, OmciErrors) {
147 return NewManagedEntity(*sipuserdataBME, params...)
148}