Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | /* |
| 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 | package generated |
| 21 | |
| 22 | import "github.com/deckarep/golang-set" |
| 23 | |
| 24 | const VoipVoiceCtpClassId ClassID = ClassID(139) |
| 25 | |
| 26 | var voipvoicectpBME *ManagedEntityDefinition |
| 27 | |
| 28 | // VoipVoiceCtp (class ID #139) |
| 29 | // The VoIP voice CTP defines the attributes necessary to associate a specified VoIP service (SIP, |
| 30 | // ITUT H.248) with a POTS UNI. This entity is conditionally required for ONUs that offer VoIP |
| 31 | // services. If a non-OMCI interface is used to manage VoIP signalling, this ME is unnecessary. |
| 32 | // |
| 33 | // An instance of this ME is created and deleted by the OLT. A VoIP voice CTP ME is needed for each |
| 34 | // PPTP POTS UNI served by VoIP. |
| 35 | // |
| 36 | // Relationships |
| 37 | // An instance of this ME links a PPTP POTS UNI ME with a VoIP media profile and a SIP user data or |
| 38 | // media gateway controller (MGC) config data ME. |
| 39 | // |
| 40 | // Attributes |
| 41 | // Managed Entity Id |
| 42 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate) |
| 43 | // (mandatory) (2 bytes) |
| 44 | // |
| 45 | // User Protocol Pointer |
| 46 | // User protocol pointer: This attribute points to signalling protocol data. If the signalling |
| 47 | // protocol used attribute of the VoIP config data ME specifies that the ONU's signalling protocol |
| 48 | // is SIP, this attribute points to a SIP user data ME, which in turn points to a SIP agent config |
| 49 | // data ME. If the signalling protocol is ITU-T H.248, this attribute points directly to an MGC |
| 50 | // config data ME. (R, W, setbycreate) (mandatory) (2 bytes) |
| 51 | // |
| 52 | // Pptp Pointer |
| 53 | // PPTP pointer: This attribute points to the PPTP POTS UNI ME that serves the analogue telephone |
| 54 | // port. (R, W, setbycreate) (mandatory) (2 bytes) |
| 55 | // |
| 56 | // V O Ip Media Profile Pointer |
| 57 | // VoIP media profile pointer: This attribute points to an associated VoIP media profile. (R, W, |
| 58 | // setbycreate) (mandatory) (2 bytes) |
| 59 | // |
| 60 | // Signalling Code |
| 61 | // (R, W, setbycreate) (mandatory) (1 byte) |
| 62 | // |
| 63 | type VoipVoiceCtp struct { |
| 64 | ManagedEntityDefinition |
| 65 | Attributes AttributeValueMap |
| 66 | } |
| 67 | |
| 68 | func init() { |
| 69 | voipvoicectpBME = &ManagedEntityDefinition{ |
| 70 | Name: "VoipVoiceCtp", |
| 71 | ClassID: 139, |
| 72 | MessageTypes: mapset.NewSetWith( |
| 73 | Create, |
| 74 | Delete, |
| 75 | Get, |
| 76 | Set, |
| 77 | ), |
| 78 | AllowedAttributeMask: 0XF000, |
| 79 | AttributeDefinitions: AttributeDefinitionMap{ |
| 80 | 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, false, 0), |
| 81 | 1: Uint16Field("UserProtocolPointer", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 1), |
| 82 | 2: Uint16Field("PptpPointer", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 2), |
| 83 | 3: Uint16Field("VOIpMediaProfilePointer", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 3), |
| 84 | 4: ByteField("SignallingCode", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 4), |
| 85 | }, |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | // NewVoipVoiceCtp (class ID 139 creates the basic |
| 90 | // Managed Entity definition that is used to validate an ME of this type that |
| 91 | // is received from the wire, about to be sent on the wire. |
| 92 | func NewVoipVoiceCtp(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 93 | return NewManagedEntity(voipvoicectpBME, params...) |
| 94 | } |