blob: 623b83ea38c5fbac46a312224c9f2599c410eb25 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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 Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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 */
David K. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// VoipLineStatusClassID is the 16-bit ID for the OMCI
29// Managed entity VoIP line status
Chip Boling610117d2021-09-09 11:24:34 -050030const VoipLineStatusClassID = ClassID(141) // 0x008d
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var voiplinestatusBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// VoipLineStatus (Class ID: #141 / 0x008d)
Chip Boling6e27b352020-02-14 09:10:01 -060035// The VoIP line status ME contains line status information for POTS ports using VoIP services. An
36// ONU that supports VoIP automatically creates or deletes an instance of this ME upon creation or
37// deletion of a PPTP POTS UNI.
38//
39// Relationships
40// An instance of this ME is associated with a PPTP POTS UNI.
41//
42// Attributes
43// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050044// This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is
45// implicitly linked to an instance of the PPTP POTS UNI. (R) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060046//
47// Voip Codec Used
Chip Boling610117d2021-09-09 11:24:34 -050048// Reports the current codec used for a VoIP POTS port. Valid values are taken from [IETF RFC
49// 3551], and are the same as specified in the codec selection attribute of the VoIP media profile.
50// This attribute is meaningful only if the VoIP port session type attribute is not idle.
51//
52// 0 PCMU
53//
54// 1 reserved
55//
56// 2 reserved
57//
58// 3 GSM
59//
60// 4 ITU-T G.723
61//
62// 5 DVI4, 8 kHz
63//
64// 6 DVI4, 16 kHz
65//
66// 7 LPC
67//
68// 8 PCMA
69//
70// 9 ITU-T G.722
71//
72// 10 L16, 2 channels
73//
74// 11 L16, 1 channel
75//
76// 12 QCELP
77//
78// 13 CN
79//
80// 14 MPA
81//
82// 15 ITU-T G.728
83//
84// 16 DVI4, 11.025 kHz
85//
86// 17 DVI4, 22.050 kHz
87//
88// 18 ITU-T G.729
89//
Chip Boling6e27b352020-02-14 09:10:01 -060090// (R) (mandatory) (2-bytes)
91//
92// Voip Voice Server Status
Chip Boling610117d2021-09-09 11:24:34 -050093// 14 Config done
94//
95// 15 Disabled by switch
96//
Chip Boling6e27b352020-02-14 09:10:01 -060097// (R) (mandatory) (1-byte)
98//
Chip Boling610117d2021-09-09 11:24:34 -050099// Status of the VoIP session for this POTS port:
100//
101// 0 None/initial
102//
103// 1 Registered
104//
105// 2 In session
106//
107// 3 Failed registration - icmp error
108//
109// 4 Failed registration - failed tcp
110//
111// 5 Failed registration - failed authentication
112//
113// 6 Failed registration - timeout
114//
115// 7 Failed registration - server fail code
116//
117// 8 Failed invite - icmp error
118//
119// 9 Failed invite - failed tcp
120//
121// 10 Failed invite - failed authentication
122//
123// 11 Failed invite - timeout
124//
125// 12 Failed invite - server fail code
126//
127// 13 Port not configured
128//
Chip Boling6e27b352020-02-14 09:10:01 -0600129// Voip Port Session Type
Chip Boling610117d2021-09-09 11:24:34 -0500130// This attribute reports the current state of a VoIP POTS port session:
131//
132// 0 Idle/none
133//
134// 1 2way
135//
136// 2 3way
137//
138// 3 Fax/modem
139//
140// 4 Telemetry
141//
142// 5 Conference
143//
Chip Boling6e27b352020-02-14 09:10:01 -0600144// (R) (mandatory) (1-byte)
145//
146// Voip Call 1 Packet Period
Chip Boling610117d2021-09-09 11:24:34 -0500147// This attribute reports the packet period for the first call on the VoIP POTS port. The value is
148// defined in milliseconds. (R) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600149//
150// Voip Call 2 Packet Period
Chip Boling610117d2021-09-09 11:24:34 -0500151// This attribute reports the packet period for the second call on the VoIP POTS port. The value is
152// defined in milliseconds. (R) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600153//
154// Voip Call 1 Dest Addr
Chip Boling610117d2021-09-09 11:24:34 -0500155// This attribute reports the DA for the first call on the VoIP POTS port. The value is an ASCII
156// string. (R) (mandatory) (25-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600157//
158// Voip Call 2 Dest Addr
Chip Boling610117d2021-09-09 11:24:34 -0500159// This attribute reports the DA for the second call on the VoIP POTS port. The value is an ASCII
160// string. (R) (mandatory) (25-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600161//
162// Voip Line State
Chip Boling610117d2021-09-09 11:24:34 -0500163// This attribute reports the state of the POTS line. This attribute may not be meaningful if the
164// POTS port is administratively locked, is operationally disabled, or is being tested. Code points
165// are assigned as follows:
166//
167// 0 Idle, on-hook
168//
169// 1 Off-hook dial tone
170//
171// 2 Dialling
172//
173// 3 Ringing or FSK alerting/data
174//
175// 4 Audible ringback
176//
177// 5 Connecting
178//
179// 6 Connected
180//
181// 7 Disconnecting, audible indication
182//
183// 8 ROH, no tone
184//
185// 9 ROH with tone
186//
187// 10 Unknown or undefined
188//
Chip Boling6e27b352020-02-14 09:10:01 -0600189// (R) (optional) (1 byte)
190//
191// Emergency Call Status
192// (R) (Optional) (1-byte)
193//
Chip Boling610117d2021-09-09 11:24:34 -0500194// This attribute reports the current state of an emergency call session (when the ONU is the call
195// originator) on the VoIP POTS port. The ONU determines the presence of an originating emergency
196// call on the basis of the Emergency service number attribute of the VoIP feature access codes ME.
197//
198// 0--- No emergency call in progress
199//
200// 1--- Emergency call in progress
201//
202// NOTE - The ONU may also be able to determine the presence of an emergency call on the basis of
203// other, unspecified information.
204//
Chip Boling6e27b352020-02-14 09:10:01 -0600205type VoipLineStatus struct {
206 ManagedEntityDefinition
207 Attributes AttributeValueMap
208}
209
210func init() {
211 voiplinestatusBME = &ManagedEntityDefinition{
212 Name: "VoipLineStatus",
213 ClassID: 141,
214 MessageTypes: mapset.NewSetWith(
215 Get,
216 ),
217 AllowedAttributeMask: 0xff80,
218 AttributeDefinitions: AttributeDefinitionMap{
219 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
220 1: Uint16Field("VoipCodecUsed", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
221 2: ByteField("VoipVoiceServerStatus", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
222 3: ByteField("VoipPortSessionType", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
223 4: Uint16Field("VoipCall1PacketPeriod", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
224 5: Uint16Field("VoipCall2PacketPeriod", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
225 6: MultiByteField("VoipCall1DestAddr", OctetsAttributeType, 0x0400, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 6),
226 7: MultiByteField("VoipCall2DestAddr", OctetsAttributeType, 0x0200, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 7),
227 8: ByteField("VoipLineState", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
228 9: ByteField("EmergencyCallStatus", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, true, false, 9),
229 },
230 Access: CreatedByOnu,
231 Support: UnknownSupport,
232 }
233}
234
235// NewVoipLineStatus (class ID 141) creates the basic
236// Managed Entity definition that is used to validate an ME of this type that
237// is received from or transmitted to the OMCC.
238func NewVoipLineStatus(params ...ParamData) (*ManagedEntity, OmciErrors) {
239 return NewManagedEntity(*voiplinestatusBME, params...)
240}