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 | */ |
David K. Bainbridge | adf422d | 2021-04-09 16:06:41 +0000 | [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 | // VoipVoiceCtpClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity VoIP voice CTP |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const VoipVoiceCtpClassID = ClassID(139) // 0x008b |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var voipvoicectpBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // VoipVoiceCtp (Class ID: #139 / 0x008b) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // The VoIP voice CTP defines the attributes necessary to associate a specified VoIP service (SIP, |
| 36 | // ITUT-H.248) with a POTS UNI. This entity is conditionally required for ONUs that offer VoIP |
| 37 | // services. If a non-OMCI interface is used to manage VoIP signalling, this ME is unnecessary. |
| 38 | // |
| 39 | // An instance of this ME is created and deleted by the OLT. A VoIP voice CTP ME is needed for each |
| 40 | // PPTP POTS UNI served by VoIP. |
| 41 | // |
| 42 | // Relationships |
| 43 | // An instance of this ME links a PPTP POTS UNI ME with a VoIP media profile and a SIP user data or |
| 44 | // media gateway controller (MGC) config data ME. |
| 45 | // |
| 46 | // Attributes |
| 47 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 48 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 49 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 50 | // |
| 51 | // User Protocol Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 52 | // This attribute points to signalling protocol data. If the signalling protocol used attribute of |
| 53 | // the VoIP config data ME specifies that the ONU's signalling protocol is SIP, this attribute |
| 54 | // points to a SIP user data ME, which in turn points to a SIP agent config data ME. If the |
| 55 | // signalling protocol is ITU-T-H.248, this attribute points directly to an MGC config data ME. |
| 56 | // (R,-W, setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 57 | // |
| 58 | // Pptp Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 59 | // This attribute points to the PPTP POTS UNI ME that serves the analogue telephone port. (R,-W, |
| 60 | // setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 61 | // |
| 62 | // V O Ip Media Profile Pointer |
| 63 | // VoIP media profile pointer: This attribute points to an associated VoIP media profile. (R,-W, |
| 64 | // setbycreate) (mandatory) (2-bytes) |
| 65 | // |
| 66 | // Signalling Code |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 67 | // 3 Loop reverse battery |
| 68 | // |
| 69 | // 4 Coin first |
| 70 | // |
| 71 | // 5 Dial tone first |
| 72 | // |
| 73 | // 6 Multi-party |
| 74 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 75 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 76 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 77 | // This attribute specifies the POTS-side signalling as follows. |
| 78 | // |
| 79 | // 1 Loop start |
| 80 | // |
| 81 | // 2 Ground start |
| 82 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 83 | type VoipVoiceCtp struct { |
| 84 | ManagedEntityDefinition |
| 85 | Attributes AttributeValueMap |
| 86 | } |
| 87 | |
| 88 | func init() { |
| 89 | voipvoicectpBME = &ManagedEntityDefinition{ |
| 90 | Name: "VoipVoiceCtp", |
| 91 | ClassID: 139, |
| 92 | MessageTypes: mapset.NewSetWith( |
| 93 | Create, |
| 94 | Delete, |
| 95 | Get, |
| 96 | Set, |
| 97 | ), |
| 98 | AllowedAttributeMask: 0xf000, |
| 99 | AttributeDefinitions: AttributeDefinitionMap{ |
| 100 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 101 | 1: Uint16Field("UserProtocolPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 102 | 2: Uint16Field("PptpPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 103 | 3: Uint16Field("VOIpMediaProfilePointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 104 | 4: ByteField("SignallingCode", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 105 | }, |
| 106 | Access: CreatedByOlt, |
| 107 | Support: UnknownSupport, |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | // NewVoipVoiceCtp (class ID 139) creates the basic |
| 112 | // Managed Entity definition that is used to validate an ME of this type that |
| 113 | // is received from or transmitted to the OMCC. |
| 114 | func NewVoipVoiceCtp(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 115 | return NewManagedEntity(*voipvoicectpBME, params...) |
| 116 | } |