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