blob: 9ed609ef35df9a21b89d76455bee56e3fb8d48f8 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
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 */
20package generated
21
22import "github.com/deckarep/golang-set"
23
24const VoipLineStatusClassId ClassID = ClassID(141)
25
26var voiplinestatusBME *ManagedEntityDefinition
27
28// VoipLineStatus (class ID #141)
29// The VoIP line status ME contains line status information for POTS ports using VoIP services. An
30// ONU that supports VoIP automatically creates or deletes an instance of this ME upon creation or
31// deletion of a PPTP POTS UNI.
32//
33// Relationships
34// An instance of this ME is associated with a PPTP POTS UNI.
35//
36// Attributes
37// Managed Entity Id
38// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
39// identical ID, this ME is implicitly linked to an instance of the PPTP POTS UNI. (R) (mandatory)
40// (2 bytes)
41//
42// Voip Codec Used
43// (R) (mandatory) (2 bytes)
44//
45// Voip Voice Server Status
46// (R) (mandatory) (1 byte)
47//
48// Voip Port Session Type
49// (R) (mandatory) (1 byte)
50//
51// Voip Call 1 Packet Period
52// Voip call 1 packet period: This attribute reports the packet period for the first call on the
53// VoIP POTS port. The value is defined in milliseconds. (R) (mandatory) (2 bytes)
54//
55// Voip Call 2 Packet Period
56// Voip call 2 packet period: This attribute reports the packet period for the second call on the
57// VoIP POTS port. The value is defined in milliseconds. (R) (mandatory) (2 bytes)
58//
59// Voip Call 1 Dest Addr
60// Voip call 1 dest addr: This attribute reports the DA for the first call on the VoIP POTS port.
61// The value is an ASCII string. (R) (mandatory) (25 bytes)
62//
63// Voip Call 2 Dest Addr
64// Voip call 2 dest addr: This attribute reports the DA for the second call on the VoIP POTS port.
65// The value is an ASCII string. (R) (mandatory) (25 bytes)
66//
67// Voip Line State
68// (R) (optional) (1 byte)
69//
70// Emergency Call Status
71// (R) (Optional) (1 byte)
72//
73type VoipLineStatus struct {
74 ManagedEntityDefinition
75 Attributes AttributeValueMap
76}
77
78func init() {
79 voiplinestatusBME = &ManagedEntityDefinition{
80 Name: "VoipLineStatus",
81 ClassID: 141,
82 MessageTypes: mapset.NewSetWith(
83 Get,
84 ),
85 AllowedAttributeMask: 0XFF80,
86 AttributeDefinitions: AttributeDefinitionMap{
87 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read), false, false, false, false, 0),
88 1: Uint16Field("VoipCodecUsed", 0, mapset.NewSetWith(Read), false, false, false, false, 1),
89 2: ByteField("VoipVoiceServerStatus", 0, mapset.NewSetWith(Read), false, false, false, false, 2),
90 3: ByteField("VoipPortSessionType", 0, mapset.NewSetWith(Read), false, false, false, false, 3),
91 4: Uint16Field("VoipCall1PacketPeriod", 0, mapset.NewSetWith(Read), false, false, false, false, 4),
92 5: Uint16Field("VoipCall2PacketPeriod", 0, mapset.NewSetWith(Read), false, false, false, false, 5),
93 6: MultiByteField("VoipCall1DestAddr", 25, nil, mapset.NewSetWith(Read), false, false, false, false, 6),
94 7: MultiByteField("VoipCall2DestAddr", 25, nil, mapset.NewSetWith(Read), false, false, false, false, 7),
95 8: ByteField("VoipLineState", 0, mapset.NewSetWith(Read), false, false, true, false, 8),
96 9: ByteField("EmergencyCallStatus", 0, mapset.NewSetWith(Read), true, false, true, false, 9),
97 },
98 }
99}
100
101// NewVoipLineStatus (class ID 141 creates the basic
102// Managed Entity definition that is used to validate an ME of this type that
103// is received from the wire, about to be sent on the wire.
104func NewVoipLineStatus(params ...ParamData) (*ManagedEntity, OmciErrors) {
105 return NewManagedEntity(voiplinestatusBME, params...)
106}