Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 | */ |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const SipUserDataClassID = ClassID(153) // 0x0099 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var sipuserdataBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // SipUserData (Class ID: #153 / 0x0099) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 48 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 49 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 50 | // |
| 51 | // Sip Agent Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 52 | // This attribute points to the SIP agent config data ME to be used for signalling. (R,-W, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 53 | // setbycreate) (mandatory) (2-bytes) |
| 54 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 61 | // Sip Display Name |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 64 | // |
| 65 | // Username And Password |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 69 | // |
| 70 | // Voicemail Server Sip Uri |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 74 | // |
| 75 | // Voicemail Subscription Expiration Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 79 | // |
| 80 | // Network Dial Plan Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 83 | // |
| 84 | // Application Services Profile Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 85 | // This attribute points to a VoIP application services profile. (R,-W, setbycreate) (mandatory) |
| 86 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 87 | // |
| 88 | // Feature Code Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 92 | // |
| 93 | // Pptp Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 96 | // |
| 97 | // Release Timer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 | |
| 113 | func 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 Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 141 | Alarms: AlarmMap{ |
| 142 | 0: "SIP-UA register auth", |
| 143 | 1: "SIP-UA register timeout", |
| 144 | 2: "SIP-UA register fail", |
| 145 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 146 | } |
| 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. |
| 152 | func NewSipUserData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 153 | return NewManagedEntity(*sipuserdataBME, params...) |
| 154 | } |