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