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