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