Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
| 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 |
| 8 | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 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 | // SipAgentConfigDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity SIP agent config data |
| 30 | const SipAgentConfigDataClassID = ClassID(150) // 0x0096 |
| 31 | |
| 32 | var sipagentconfigdataBME *ManagedEntityDefinition |
| 33 | |
| 34 | // SipAgentConfigData (Class ID: #150 / 0x0096) |
| 35 | // The SIP agent config data ME models a SIP signalling agent. It defines the configuration |
| 36 | // necessary to establish communication for signalling between the SIP user agent (UA) and a SIP |
| 37 | // server. |
| 38 | // |
| 39 | // NOTE 1 - If a non-OMCI interface is used to manage SIP for VoIP, this ME is unnecessary. The |
| 40 | // non-OMCI interface supplies the necessary data, which may be read back to the OLT via the SIP |
| 41 | // config portal ME. |
| 42 | // |
| 43 | // Instances of this ME are created and deleted by the OLT. |
| 44 | // |
| 45 | // Relationships |
| 46 | // An instance of this ME serves one or more SIP user data MEs and points to a TCP/UDP config data |
| 47 | // that carries signalling messages. Other pointers establish additional agent parameters such as |
| 48 | // proxy servers. |
| 49 | // |
| 50 | // Attributes |
| 51 | // Managed Entity Id |
| 52 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 53 | // (2-bytes) |
| 54 | // |
| 55 | // Proxy Server Address Pointer |
| 56 | // This attribute points to a large string ME that contains the name (IP address or URI) of the SIP |
| 57 | // proxy server for SIP signalling messages. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 58 | // |
| 59 | // Outbound Proxy Address Pointer |
| 60 | // An outbound SIP proxy may or may not be required within a given network. If an outbound SIP |
| 61 | // proxy is used, the outbound proxy address pointer attribute must be set to point to a valid |
| 62 | // large string ME that contains the name (IP address or URI) of the outbound proxy server for SIP |
| 63 | // signalling messages. If an outbound SIP proxy is not used, the outbound proxy address pointer |
| 64 | // attribute must be set to a null pointer. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 65 | // |
| 66 | // Primary Sip Dns |
| 67 | // This attribute specifies the primary SIP DNS IP address. If the value of this attribute is 0, |
| 68 | // the primary DNS server is defined in the corresponding IP host config data or IPv6 host config |
| 69 | // data ME. If the value is non-zero, it takes precedence over the primary DNS server defined in |
| 70 | // the IP host config data or IPv6 host config data ME. (R,-W, set-by-create) (mandatory) (4-bytes) |
| 71 | // |
| 72 | // Secondary Sip Dns |
| 73 | // This attribute specifies the secondary SIP DNS IP address. If the value of this attribute is 0, |
| 74 | // the secondary DNS server is defined in the corresponding IP host config data or IPv6 host config |
| 75 | // data ME. If the value is non-zero, it takes precedence over the secondary DNS server defined in |
| 76 | // the IP host config data or IPv6 host config data ME. (R,-W, set-by-create) (mandatory) (4-bytes) |
| 77 | // |
| 78 | // Tcp_Udp Pointer |
| 79 | // TCP/UDP pointer: This pointer associates the SIP agent with the TCP/UDP config data ME to be |
| 80 | // used for communication with the SIP server. The default value is 0xFFFF, a null pointer. (R,-W) |
| 81 | // (mandatory) (2-bytes) |
| 82 | // |
| 83 | // Sip Reg Exp Time |
| 84 | // This attribute specifies the SIP registration expiration time in seconds. If its value is 0, the |
| 85 | // SIP agent does not add an expiration time to the registration requests and does not perform |
| 86 | // reregistration. The default value is 3600-s. (R,-W) (mandatory) (4-bytes) |
| 87 | // |
| 88 | // Sip Rereg Head Start Time |
| 89 | // This attribute specifies the time in seconds prior to timeout that causes the SIP agent to start |
| 90 | // the re-registration process. The default value is 360-s. (R,-W) (mandatory) (4-bytes) |
| 91 | // |
| 92 | // Host Part Uri |
| 93 | // This attribute points to a large string ME that contains the host or domain part of the SIP |
| 94 | // address of record for users connected to this ONU. A null pointer indicates that the current |
| 95 | // address in the IP host config ME is to be used. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 96 | // |
| 97 | // Sip Status |
| 98 | // 5 Failed - Timeout |
| 99 | // |
| 100 | // 6 Redundant, offline: this instance of the SIP agent config data occupies the role of a |
| 101 | // redundant server, and is not presently in use. |
| 102 | // |
| 103 | // (R) (mandatory) (1-byte) |
| 104 | // |
| 105 | // This attribute shows the current status of the SIP agent. Values are as follows. |
| 106 | // |
| 107 | // 0 Ok/initial |
| 108 | // |
| 109 | // 1 Connected |
| 110 | // |
| 111 | // 2 Failed - ICMP error |
| 112 | // |
| 113 | // 3 Failed - Malformed response |
| 114 | // |
| 115 | // 4 Failed - Inadequate info response |
| 116 | // |
| 117 | // Sip Registrar |
| 118 | // This attribute points to a network address ME that contains the name (IP address or resolved |
| 119 | // name) of the registrar server for SIP signalling messages. Examples: "10.10.10.10" and |
| 120 | // "proxy.voip.net". (R,-W, set-by-create) (mandatory) (2-bytes) |
| 121 | // |
| 122 | // Softswitch |
| 123 | // This attribute identifies the SIP gateway softswitch vendor. The format is four ASCII coded |
| 124 | // alphabetic characters [A..Z] as defined in [ATIS0300220]. A value of four null bytes indicates |
| 125 | // an unknown or unspecified vendor. (R,-W, setbycreate) (mandatory) (4-bytes) |
| 126 | // |
| 127 | // Sip Response Table |
| 128 | // This attribute specifies the tone and text to be presented to the subscriber upon receipt of |
| 129 | // various SIP messages (normally 4xx, 5xx, 6xx message codes). The table is a sequence of entries, |
| 130 | // each of which is defined as follows. |
| 131 | // |
| 132 | // SIP response code (2 bytes): This field is the value of the SIP message code. It also serves as |
| 133 | // the index into the SIP response table. When a set operation is performed with the value 0 in |
| 134 | // this field, the table is cleared. |
| 135 | // |
| 136 | // Tone (1 byte): This field specifies one of the tones in the tone pattern table of the associated |
| 137 | // voice service profile. The specified tone is played to the subscriber. |
| 138 | // |
| 139 | // Text message (2 bytes): This field is a pointer to a large string that contains a message to be |
| 140 | // displayed to the subscriber. If the value of this field is a null pointer, text pre-associated |
| 141 | // with the tone may be displayed, or no text at all. |
| 142 | // |
| 143 | // (R, W) (optional) (N * 5 bytes) |
| 144 | // |
| 145 | // NOTE 2 - This model assumes that SIP response tones and text are common to all POTS lines that |
| 146 | // share a given SIP agent. |
| 147 | // |
| 148 | // Sip Option Transmit Control |
| 149 | // This Boolean attribute specifies that the ONU is (true) or is not (false) enabled to transmit |
| 150 | // SIP options. The default value is recommended to be false. (R, W, setbycreate) (optional) (1 |
| 151 | // byte) |
| 152 | // |
| 153 | // Sip Uri Format |
| 154 | // This attribute specifies the format of the URI in outgoing SIP messages. The recommended default |
| 155 | // value 0 specifies TEL URIs; the value 1 specifies SIP URIs. Other values are reserved. (R, W, |
| 156 | // setbycreate) (optional) (1 byte) |
| 157 | // |
| 158 | // Redundant Sip Agent Pointer |
| 159 | // This attribute points to another SIP agent config data ME, which is understood to provide |
| 160 | // redundancy. The initial SIP agent is determined by the pointer from the SIP user data ME. It is |
| 161 | // the manager's responsibility to provision a group of redundant SIP agents with mutually |
| 162 | // consistent attributes. (R, W, setbycreate) (optional) (2 bytes) |
| 163 | // |
| 164 | type SipAgentConfigData struct { |
| 165 | ManagedEntityDefinition |
| 166 | Attributes AttributeValueMap |
| 167 | } |
| 168 | |
| 169 | func init() { |
| 170 | sipagentconfigdataBME = &ManagedEntityDefinition{ |
| 171 | Name: "SipAgentConfigData", |
| 172 | ClassID: 150, |
| 173 | MessageTypes: mapset.NewSetWith( |
| 174 | Create, |
| 175 | Delete, |
| 176 | Get, |
| 177 | GetNext, |
| 178 | Set, |
| 179 | SetTable, |
| 180 | ), |
| 181 | AllowedAttributeMask: 0xfffe, |
| 182 | AttributeDefinitions: AttributeDefinitionMap{ |
| 183 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 184 | 1: Uint16Field("ProxyServerAddressPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 185 | 2: Uint16Field("OutboundProxyAddressPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 186 | 3: Uint32Field("PrimarySipDns", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 187 | 4: Uint32Field("SecondarySipDns", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 188 | 5: Uint16Field("TcpUdpPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5), |
| 189 | 6: Uint32Field("SipRegExpTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6), |
| 190 | 7: Uint32Field("SipReregHeadStartTime", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7), |
| 191 | 8: Uint16Field("HostPartUri", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8), |
| 192 | 9: ByteField("SipStatus", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, false, false, 9), |
| 193 | 10: Uint16Field("SipRegistrar", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10), |
| 194 | 11: Uint32Field("Softswitch", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11), |
| 195 | 12: TableField("SipResponseTable", TableAttributeType, 0x0010, TableInfo{nil, 5}, mapset.NewSetWith(Read, Write), false, true, false, 12), |
| 196 | 13: ByteField("SipOptionTransmitControl", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13), |
| 197 | 14: ByteField("SipUriFormat", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14), |
| 198 | 15: Uint16Field("RedundantSipAgentPointer", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 15), |
| 199 | }, |
| 200 | Access: CreatedByOlt, |
| 201 | Support: UnknownSupport, |
| 202 | Alarms: AlarmMap{ |
| 203 | 0: "SIP-UA register name", |
| 204 | 1: "SIP-UA register reach", |
| 205 | 2: "SIP-UA register connect", |
| 206 | 3: "SIP-UA register validate", |
| 207 | 4: "SIP-UA register auth", |
| 208 | 5: "SIP-UA register timeout", |
| 209 | 6: "SIP-UA register fail", |
| 210 | }, |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | // NewSipAgentConfigData (class ID 150) creates the basic |
| 215 | // Managed Entity definition that is used to validate an ME of this type that |
| 216 | // is received from or transmitted to the OMCC. |
| 217 | func NewSipAgentConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 218 | return NewManagedEntity(*sipagentconfigdataBME, params...) |
| 219 | } |