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 | // SipAgentConfigDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity SIP agent config data |
| 30 | const SipAgentConfigDataClassID ClassID = ClassID(150) |
| 31 | |
| 32 | var sipagentconfigdataBME *ManagedEntityDefinition |
| 33 | |
| 34 | // SipAgentConfigData (class ID #150) |
| 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 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate) |
| 53 | // (mandatory) (2-bytes) |
| 54 | // |
| 55 | // Proxy Server Address Pointer |
| 56 | // Proxy server address pointer: This attribute points to a large string ME that contains the name |
| 57 | // (IP address or URI) of the SIP proxy server for SIP signalling messages. (R,-W, setbycreate) |
| 58 | // (mandatory) (2-bytes) |
| 59 | // |
| 60 | // Outbound Proxy Address Pointer |
| 61 | // Outbound proxy address pointer: An outbound SIP proxy may or may not be required within a given |
| 62 | // network. If an outbound SIP proxy is used, the outbound proxy address pointer attribute must be |
| 63 | // set to point to a valid large string ME that contains the name (IP address or URI) of the |
| 64 | // outbound proxy server for SIP signalling messages. If an outbound SIP proxy is not used, the |
| 65 | // outbound proxy address pointer attribute must be set to a null pointer. (R,-W, setbycreate) |
| 66 | // (mandatory) (2-bytes) |
| 67 | // |
| 68 | // Primary Sip Dns |
| 69 | // Primary SIP DNS: This attribute specifies the primary SIP DNS IP address. If the value of this |
| 70 | // attribute is 0, the primary DNS server is defined in the corresponding IP host config data or |
| 71 | // IPv6 host config data ME. If the value is non-zero, it takes precedence over the primary DNS |
| 72 | // server defined in the IP host config data or IPv6 host config data ME. (R,-W, set-by-create) |
| 73 | // (mandatory) (4-bytes) |
| 74 | // |
| 75 | // Secondary Sip Dns |
| 76 | // Secondary SIP DNS: This attribute specifies the secondary SIP DNS IP address. If the value of |
| 77 | // this attribute is 0, the secondary DNS server is defined in the corresponding IP host config |
| 78 | // data or IPv6 host config data ME. If the value is non-zero, it takes precedence over the |
| 79 | // secondary DNS server defined in the IP host config data or IPv6 host config data ME. (R,-W, set- |
| 80 | // by-create) (mandatory) (4-bytes) |
| 81 | // |
| 82 | // Tcp_Udp Pointer |
| 83 | // TCP/UDP pointer: This pointer associates the SIP agent with the TCP/UDP config data ME to be |
| 84 | // used for communication with the SIP server. The default value is 0xFFFF, a null pointer. (R,-W) |
| 85 | // (mandatory) (2-bytes) |
| 86 | // |
| 87 | // Sip Reg Exp Time |
| 88 | // SIP reg exp time: This attribute specifies the SIP registration expiration time in seconds. If |
| 89 | // its value is 0, the SIP agent does not add an expiration time to the registration requests and |
| 90 | // does not perform reregistration. The default value is 3600-s. (R,-W) (mandatory) (4-bytes) |
| 91 | // |
| 92 | // Sip Rereg Head Start Time |
| 93 | // SIP rereg head start time: This attribute specifies the time in seconds prior to timeout that |
| 94 | // causes the SIP agent to start the re-registration process. The default value is 360-s. (R,-W) |
| 95 | // (mandatory) (4-bytes) |
| 96 | // |
| 97 | // Host Part Uri |
| 98 | // Host part URI: This attribute points to a large string ME that contains the host or domain part |
| 99 | // of the SIP address of record for users connected to this ONU. A null pointer indicates that the |
| 100 | // current address in the IP host config ME is to be used. (R,-W, setbycreate) (mandatory) |
| 101 | // (2-bytes) |
| 102 | // |
| 103 | // Sip Status |
| 104 | // (R) (mandatory) (1-byte) |
| 105 | // |
| 106 | // Sip Registrar |
| 107 | // SIP registrar: This attribute points to a network address ME that contains the name (IP address |
| 108 | // or resolved name) of the registrar server for SIP signalling messages. Examples: "10.10.10.10" |
| 109 | // and "proxy.voip.net". (R,-W, set-by-create) (mandatory) (2-bytes) |
| 110 | // |
| 111 | // Softswitch |
| 112 | // Softswitch: This attribute identifies the SIP gateway softswitch vendor. The format is four |
| 113 | // ASCII coded alphabetic characters [A..Z] as defined in [ATIS0300220]. A value of four null bytes |
| 114 | // indicates an unknown or unspecified vendor. (R,-W, setbycreate) (mandatory) (4-bytes) |
| 115 | // |
| 116 | // Sip Response Table |
| 117 | // NOTE 2 - This model assumes that SIP response tones and text are common to all POTS lines that |
| 118 | // share a given SIP agent. |
| 119 | // |
| 120 | // Sip Option Transmit Control |
| 121 | // SIP option transmit control: This Boolean attribute specifies that the ONU is (true) or is not |
| 122 | // (false) enabled to transmit SIP options. The default value is recommended to be false. (R, W, |
| 123 | // setbycreate) (optional) (1 byte) |
| 124 | // |
| 125 | // Sip Uri Format |
| 126 | // SIP URI format: This attribute specifies the format of the URI in outgoing SIP messages. The |
| 127 | // recommended default value 0 specifies TEL URIs; the value 1 specifies SIP URIs. Other values are |
| 128 | // reserved. (R, W, setbycreate) (optional) (1 byte) |
| 129 | // |
| 130 | // Redundant Sip Agent Pointer |
| 131 | // Redundant SIP agent pointer: This attribute points to another SIP agent config data ME, which is |
| 132 | // understood to provide redundancy. The initial SIP agent is determined by the pointer from the |
| 133 | // SIP user data ME. It is the manager's responsibility to provision a group of redundant SIP |
| 134 | // agents with mutually consistent attributes. (R, W, setbycreate) (optional) (2 bytes) |
| 135 | // |
| 136 | type SipAgentConfigData struct { |
| 137 | ManagedEntityDefinition |
| 138 | Attributes AttributeValueMap |
| 139 | } |
| 140 | |
| 141 | func init() { |
| 142 | sipagentconfigdataBME = &ManagedEntityDefinition{ |
| 143 | Name: "SipAgentConfigData", |
| 144 | ClassID: 150, |
| 145 | MessageTypes: mapset.NewSetWith( |
| 146 | Create, |
| 147 | Delete, |
| 148 | Get, |
| 149 | Set, |
Chip Boling | 2d51f05 | 2021-02-09 09:04:15 -0600 | [diff] [blame] | 150 | SetTable, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 151 | ), |
| 152 | AllowedAttributeMask: 0xfffe, |
| 153 | AttributeDefinitions: AttributeDefinitionMap{ |
| 154 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 155 | 1: Uint16Field("ProxyServerAddressPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 156 | 2: Uint16Field("OutboundProxyAddressPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 157 | 3: Uint32Field("PrimarySipDns", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 158 | 4: Uint32Field("SecondarySipDns", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 159 | 5: Uint16Field("TcpUdpPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5), |
| 160 | 6: Uint32Field("SipRegExpTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6), |
| 161 | 7: Uint32Field("SipReregHeadStartTime", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7), |
| 162 | 8: Uint16Field("HostPartUri", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8), |
| 163 | 9: ByteField("SipStatus", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, false, false, 9), |
| 164 | 10: Uint16Field("SipRegistrar", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10), |
| 165 | 11: Uint32Field("Softswitch", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11), |
| 166 | 12: MultiByteField("SipResponseTable", OctetsAttributeType, 0x0010, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 12), |
| 167 | 13: ByteField("SipOptionTransmitControl", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13), |
| 168 | 14: ByteField("SipUriFormat", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14), |
| 169 | 15: Uint16Field("RedundantSipAgentPointer", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 15), |
| 170 | }, |
| 171 | Access: CreatedByOlt, |
| 172 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 173 | Alarms: AlarmMap{ |
| 174 | 0: "SIP-UA register name", |
| 175 | 1: "SIP-UA register reach", |
| 176 | 2: "SIP-UA register connect", |
| 177 | 3: "SIP-UA register validate", |
| 178 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 179 | } |
| 180 | } |
| 181 | |
| 182 | // NewSipAgentConfigData (class ID 150) creates the basic |
| 183 | // Managed Entity definition that is used to validate an ME of this type that |
| 184 | // is received from or transmitted to the OMCC. |
| 185 | func NewSipAgentConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 186 | return NewManagedEntity(*sipagentconfigdataBME, params...) |
| 187 | } |