Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame] | 4 | * |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 5 | * 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 Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame] | 8 | * |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame] | 10 | * |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 11 | * 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 | */ |
| 17 | /* |
| 18 | * 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // SipUserDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity SIP user data |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 30 | const SipUserDataClassID = ClassID(153) // 0x0099 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 31 | |
| 32 | var sipuserdataBME *ManagedEntityDefinition |
| 33 | |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 34 | // SipUserData (Class ID: #153 / 0x0099) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 35 | // 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 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 48 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 49 | // (2-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 50 | // |
| 51 | // Sip Agent Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 52 | // This attribute points to the SIP agent config data ME to be used for signalling. (R,-W, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 53 | // setbycreate) (mandatory) (2-bytes) |
| 54 | // |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 55 | // 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 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 61 | // Sip Display Name |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 62 | // 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) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 64 | // |
| 65 | // Username And Password |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 66 | // 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) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 69 | // |
| 70 | // Voicemail Server Sip Uri |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 71 | // 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) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 74 | // |
| 75 | // Voicemail Subscription Expiration Time |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 76 | // 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) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 79 | // |
| 80 | // Network Dial Plan Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 81 | // 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) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 83 | // |
| 84 | // Application Services Profile Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 85 | // This attribute points to a VoIP application services profile. (R,-W, setbycreate) (mandatory) |
| 86 | // (2-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 87 | // |
| 88 | // Feature Code Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 89 | // 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) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 92 | // |
| 93 | // Pptp Pointer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 94 | // This attribute points to the PPTP POTS UNI ME that provides the analogue telephony adaptor (ATA) |
| 95 | // function. (R,-W, setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 96 | // |
| 97 | // Release Timer |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 98 | // 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) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 101 | // |
| 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 | // |
| 108 | type SipUserData struct { |
| 109 | ManagedEntityDefinition |
| 110 | Attributes AttributeValueMap |
| 111 | } |
| 112 | |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame] | 113 | // Attribute name constants |
| 114 | |
| 115 | const SipUserData_SipAgentPointer = "SipAgentPointer" |
| 116 | const SipUserData_UserPartAor = "UserPartAor" |
| 117 | const SipUserData_SipDisplayName = "SipDisplayName" |
| 118 | const SipUserData_UsernameAndPassword = "UsernameAndPassword" |
| 119 | const SipUserData_VoicemailServerSipUri = "VoicemailServerSipUri" |
| 120 | const SipUserData_VoicemailSubscriptionExpirationTime = "VoicemailSubscriptionExpirationTime" |
| 121 | const SipUserData_NetworkDialPlanPointer = "NetworkDialPlanPointer" |
| 122 | const SipUserData_ApplicationServicesProfilePointer = "ApplicationServicesProfilePointer" |
| 123 | const SipUserData_FeatureCodePointer = "FeatureCodePointer" |
| 124 | const SipUserData_PptpPointer = "PptpPointer" |
| 125 | const SipUserData_ReleaseTimer = "ReleaseTimer" |
| 126 | const SipUserData_ReceiverOffHookRohTimer = "ReceiverOffHookRohTimer" |
| 127 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 128 | func init() { |
| 129 | sipuserdataBME = &ManagedEntityDefinition{ |
| 130 | Name: "SipUserData", |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame] | 131 | ClassID: SipUserDataClassID, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 132 | MessageTypes: mapset.NewSetWith( |
| 133 | Create, |
| 134 | Delete, |
| 135 | Get, |
| 136 | Set, |
| 137 | ), |
| 138 | AllowedAttributeMask: 0xfff0, |
| 139 | AttributeDefinitions: AttributeDefinitionMap{ |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame] | 140 | 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), |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 153 | }, |
| 154 | Access: CreatedByOlt, |
| 155 | Support: UnknownSupport, |
| 156 | Alarms: AlarmMap{ |
| 157 | 0: "SIP-UA register auth", |
| 158 | 1: "SIP-UA register timeout", |
| 159 | 2: "SIP-UA register fail", |
| 160 | }, |
| 161 | } |
| 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. |
| 167 | func NewSipUserData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 168 | return NewManagedEntity(*sipuserdataBME, params...) |
| 169 | } |