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 RtpPseudowireParametersClassId ClassID = ClassID(283) |
| 25 | |
| 26 | var rtppseudowireparametersBME *ManagedEntityDefinition |
| 27 | |
| 28 | // RtpPseudowireParameters (class ID #283) |
| 29 | // If a pseudowire service uses RTP, the RTP pseudowire parameters ME provides configuration |
| 30 | // information for the RTP layer. Instances of this ME are created and deleted by the OLT. The use |
| 31 | // of RTP on a pseudowire is optional, and is determined by the existence of the RTP pseudowire |
| 32 | // parameters ME. |
| 33 | // |
| 34 | // Relationships |
| 35 | // An instance of the RTP pseudowire parameters ME may exist for each pseudowire TP ME, to which it |
| 36 | // is implicitly bound by a common ME ID. |
| 37 | // |
| 38 | // Attributes |
| 39 | // Managed Entity Id |
| 40 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an |
| 41 | // identical ID, this ME is implicitly linked to an instance of the pseudowire TP ME. (R, |
| 42 | // setbycreate) (mandatory) (2 bytes) |
| 43 | // |
| 44 | // Clock Reference |
| 45 | // Clock reference: This attribute specifies the frequency of the common timing reference, in |
| 46 | // multiples of 8 kHz. (R, W, setbycreate) (mandatory) (2 bytes) |
| 47 | // |
| 48 | // Rtp Timestamp Mode |
| 49 | // (R, W, setbycreate) (mandatory) (1 byte) |
| 50 | // |
| 51 | // Ptype |
| 52 | // PTYPE: This attribute specifies the RTP payload type in the TDM to the PSN direction. It |
| 53 | // comprises two 1 byte values. The first is for the payload channel, the second, for the optional |
| 54 | // separate signalling channel. Assignable PTYPEs lie in the dynamic range 96..127. If signalling |
| 55 | // is not transported in its own channel, the second value should be set to 0. (R, W, setbycreate) |
| 56 | // (mandatory) (2 bytes) |
| 57 | // |
| 58 | // Ssrc |
| 59 | // SSRC: This attribute specifies the RTP synchronization source in the TDM to the PSN direction. |
| 60 | // It comprises two 4 byte values. The first is for the payload channel, the second, for the |
| 61 | // optional separate signalling channel. If signalling is not transported in its own channel, the |
| 62 | // second value should be set to 0. (R, W, setbycreate) (mandatory) (8 bytes) |
| 63 | // |
| 64 | // Expected Ptype |
| 65 | // Expected PTYPE: This attribute specifies the RTP payload type in the PSN to the TDM direction. |
| 66 | // The received payload type may be used to detect malformed packets. It comprises two 1 byte |
| 67 | // values. The first is for the payload channel, the second, for the optional separate signalling |
| 68 | // channel. To disable either or both of the check functions, set the corresponding value to its |
| 69 | // default value 0. (R, W, setbycreate) (optional) (2 bytes) |
| 70 | // |
| 71 | // Expected Ssrc |
| 72 | // Expected SSRC: This attribute specifies the RTP synchronization source in the PSN to the TDM |
| 73 | // direction. The received SSRC may be used to detect misconnection (stray packets). It comprises |
| 74 | // two 4 byte values. The first is for the payload channel, the second, for the optional separate |
| 75 | // signalling channel. To disable either or both of the check functions, set the corresponding |
| 76 | // value to its default value 0. (R, W, setbycreate) (optional) (8 bytes) |
| 77 | // |
| 78 | type RtpPseudowireParameters struct { |
| 79 | ManagedEntityDefinition |
| 80 | Attributes AttributeValueMap |
| 81 | } |
| 82 | |
| 83 | func init() { |
| 84 | rtppseudowireparametersBME = &ManagedEntityDefinition{ |
| 85 | Name: "RtpPseudowireParameters", |
| 86 | ClassID: 283, |
| 87 | MessageTypes: mapset.NewSetWith( |
| 88 | Create, |
| 89 | Delete, |
| 90 | Get, |
| 91 | Set, |
| 92 | ), |
| 93 | AllowedAttributeMask: 0XFC00, |
| 94 | AttributeDefinitions: AttributeDefinitionMap{ |
| 95 | 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, false, 0), |
| 96 | 1: Uint16Field("ClockReference", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 1), |
| 97 | 2: ByteField("RtpTimestampMode", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 2), |
| 98 | 3: Uint16Field("Ptype", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 3), |
| 99 | 4: Uint64Field("Ssrc", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 4), |
| 100 | 5: Uint16Field("ExpectedPtype", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, false, 5), |
| 101 | 6: Uint64Field("ExpectedSsrc", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, false, 6), |
| 102 | }, |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | // NewRtpPseudowireParameters (class ID 283 creates the basic |
| 107 | // Managed Entity definition that is used to validate an ME of this type that |
| 108 | // is received from the wire, about to be sent on the wire. |
| 109 | func NewRtpPseudowireParameters(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 110 | return NewManagedEntity(rtppseudowireparametersBME, params...) |
| 111 | } |