Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 8 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 10 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 | */ |
Girish Gowdra | 161d27a | 2021-05-05 12:01:44 -0700 | [diff] [blame] | 17 | /* |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 | */ |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 23 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 28 | // VoipVoiceCtpClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity VoIP voice CTP |
| 30 | const VoipVoiceCtpClassID ClassID = ClassID(139) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 31 | |
| 32 | var voipvoicectpBME *ManagedEntityDefinition |
| 33 | |
| 34 | // VoipVoiceCtp (class ID #139) |
| 35 | // The VoIP voice CTP defines the attributes necessary to associate a specified VoIP service (SIP, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 36 | // ITUT-H.248) with a POTS UNI. This entity is conditionally required for ONUs that offer VoIP |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 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 |
| 48 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 49 | // (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 50 | // |
| 51 | // User Protocol Pointer |
| 52 | // User protocol pointer: This attribute points to signalling protocol data. If the signalling |
| 53 | // protocol used attribute of the VoIP config data ME specifies that the ONU's signalling protocol |
| 54 | // is SIP, this attribute points to a SIP user data ME, which in turn points to a SIP agent config |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 55 | // data ME. If the signalling protocol is ITU-T-H.248, this attribute points directly to an MGC |
| 56 | // config data ME. (R,-W, setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 57 | // |
| 58 | // Pptp Pointer |
| 59 | // PPTP pointer: This attribute points to the PPTP POTS UNI ME that serves the analogue telephone |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 60 | // port. (R,-W, setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 61 | // |
| 62 | // V O Ip Media Profile Pointer |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 63 | // VoIP media profile pointer: This attribute points to an associated VoIP media profile. (R,-W, |
| 64 | // setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 65 | // |
| 66 | // Signalling Code |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 67 | // (R,-W, setbycreate) (mandatory) (1-byte) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 68 | // |
| 69 | type VoipVoiceCtp struct { |
| 70 | ManagedEntityDefinition |
| 71 | Attributes AttributeValueMap |
| 72 | } |
| 73 | |
| 74 | func init() { |
| 75 | voipvoicectpBME = &ManagedEntityDefinition{ |
| 76 | Name: "VoipVoiceCtp", |
| 77 | ClassID: 139, |
| 78 | MessageTypes: mapset.NewSetWith( |
| 79 | Create, |
| 80 | Delete, |
| 81 | Get, |
| 82 | Set, |
| 83 | ), |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 84 | AllowedAttributeMask: 0xf000, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 85 | AttributeDefinitions: AttributeDefinitionMap{ |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 86 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 87 | 1: Uint16Field("UserProtocolPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 88 | 2: Uint16Field("PptpPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 89 | 3: Uint16Field("VOIpMediaProfilePointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 90 | 4: ByteField("SignallingCode", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 91 | }, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 92 | Access: CreatedByOlt, |
| 93 | Support: UnknownSupport, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 94 | } |
| 95 | } |
| 96 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 97 | // NewVoipVoiceCtp (class ID 139) creates the basic |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 98 | // Managed Entity definition that is used to validate an ME of this type that |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 99 | // is received from or transmitted to the OMCC. |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 100 | func NewVoipVoiceCtp(params ...ParamData) (*ManagedEntity, OmciErrors) { |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 101 | return NewManagedEntity(*voipvoicectpBME, params...) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 102 | } |