blob: 4f1320cf308b7546474ca680f65c043d46cf8caa [file] [log] [blame]
mpagenko836a1fd2021-11-01 16:12:42 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
mpagenko836a1fd2021-11-01 16:12:42 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
mpagenko836a1fd2021-11-01 16:12:42 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
mpagenko836a1fd2021-11-01 16:12:42 +000011 * 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
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
30const VoipLineStatusClassID = ClassID(141) // 0x008d
31
32var voiplinestatusBME *ManagedEntityDefinition
33
34// VoipLineStatus (Class ID: #141 / 0x008d)
35// 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
44// 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)
46//
47// Voip Codec Used
48// 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//
90// (R) (mandatory) (2-bytes)
91//
92// Voip Voice Server Status
93// 14 Config done
94//
95// 15 Disabled by switch
96//
97// (R) (mandatory) (1-byte)
98//
99// 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//
129// Voip Port Session Type
130// 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//
144// (R) (mandatory) (1-byte)
145//
146// Voip Call 1 Packet Period
147// 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)
149//
150// Voip Call 2 Packet Period
151// 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)
153//
154// Voip Call 1 Dest Addr
155// 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)
157//
158// Voip Call 2 Dest Addr
159// 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)
161//
162// Voip Line State
163// 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//
189// (R) (optional) (1 byte)
190//
191// Emergency Call Status
192// (R) (Optional) (1-byte)
193//
194// 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//
205type VoipLineStatus struct {
206 ManagedEntityDefinition
207 Attributes AttributeValueMap
208}
209
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000210// Attribute name constants
211
212const VoipLineStatus_VoipCodecUsed = "VoipCodecUsed"
213const VoipLineStatus_VoipVoiceServerStatus = "VoipVoiceServerStatus"
214const VoipLineStatus_VoipPortSessionType = "VoipPortSessionType"
215const VoipLineStatus_VoipCall1PacketPeriod = "VoipCall1PacketPeriod"
216const VoipLineStatus_VoipCall2PacketPeriod = "VoipCall2PacketPeriod"
217const VoipLineStatus_VoipCall1DestAddr = "VoipCall1DestAddr"
218const VoipLineStatus_VoipCall2DestAddr = "VoipCall2DestAddr"
219const VoipLineStatus_VoipLineState = "VoipLineState"
220const VoipLineStatus_EmergencyCallStatus = "EmergencyCallStatus"
221
mpagenko836a1fd2021-11-01 16:12:42 +0000222func init() {
223 voiplinestatusBME = &ManagedEntityDefinition{
224 Name: "VoipLineStatus",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000225 ClassID: VoipLineStatusClassID,
mpagenko836a1fd2021-11-01 16:12:42 +0000226 MessageTypes: mapset.NewSetWith(
227 Get,
228 ),
229 AllowedAttributeMask: 0xff80,
230 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000231 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
232 1: Uint16Field(VoipLineStatus_VoipCodecUsed, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
233 2: ByteField(VoipLineStatus_VoipVoiceServerStatus, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
234 3: ByteField(VoipLineStatus_VoipPortSessionType, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
235 4: Uint16Field(VoipLineStatus_VoipCall1PacketPeriod, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
236 5: Uint16Field(VoipLineStatus_VoipCall2PacketPeriod, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
237 6: MultiByteField(VoipLineStatus_VoipCall1DestAddr, OctetsAttributeType, 0x0400, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 6),
238 7: MultiByteField(VoipLineStatus_VoipCall2DestAddr, OctetsAttributeType, 0x0200, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 7),
239 8: ByteField(VoipLineStatus_VoipLineState, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
240 9: ByteField(VoipLineStatus_EmergencyCallStatus, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, true, false, 9),
mpagenko836a1fd2021-11-01 16:12:42 +0000241 },
242 Access: CreatedByOnu,
243 Support: UnknownSupport,
244 }
245}
246
247// NewVoipLineStatus (class ID 141) creates the basic
248// Managed Entity definition that is used to validate an ME of this type that
249// is received from or transmitted to the OMCC.
250func NewVoipLineStatus(params ...ParamData) (*ManagedEntity, OmciErrors) {
251 return NewManagedEntity(*voiplinestatusBME, params...)
252}