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 | // RtpPseudowireParametersClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity RTP pseudowire parameters |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const RtpPseudowireParametersClassID = ClassID(283) // 0x011b |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var rtppseudowireparametersBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // RtpPseudowireParameters (Class ID: #283 / 0x011b) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // If a pseudowire service uses RTP, the RTP pseudowire parameters ME provides configuration |
| 36 | // information for the RTP layer. Instances of this ME are created and deleted by the OLT. The use |
| 37 | // of RTP on a pseudowire is optional, and is determined by the existence of the RTP pseudowire |
| 38 | // parameters ME. |
| 39 | // |
| 40 | // Relationships |
| 41 | // An instance of the RTP pseudowire parameters ME may exist for each pseudowire TP ME, to which it |
| 42 | // is implicitly bound by a common ME ID. |
| 43 | // |
| 44 | // Attributes |
| 45 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 46 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 47 | // implicitly linked to an instance of the pseudowire TP ME. (R, setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 48 | // |
| 49 | // Clock Reference |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 50 | // This attribute specifies the frequency of the common timing reference, in multiples of 8 kHz. |
| 51 | // (R,-W, setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 52 | // |
| 53 | // Rtp Timestamp Mode |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 54 | // This attribute determines the mode in which RTP timestamps are generated in the TDM to the PSN |
| 55 | // direction. |
| 56 | // |
| 57 | // 0 Unknown or not applicable. |
| 58 | // |
| 59 | // 1 Absolute. Timestamps are based on the timing of the incoming TDM signal. |
| 60 | // |
| 61 | // 2 Differential. Timestamps are based on the ONU's reference clock, which is understood to be |
| 62 | // stratum-traceable along with the reference clock at the far end. |
| 63 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 64 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 65 | // |
| 66 | // Ptype |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 67 | // This attribute specifies the RTP payload type in the TDM to the PSN direction. It comprises two |
| 68 | // 1-byte values. The first is for the payload channel, the second, for the optional separate |
| 69 | // signalling channel. Assignable PTYPEs lie in the dynamic range 96..127. If signalling is not |
| 70 | // transported in its own channel, the second value should be set to 0. (R,-W, setbycreate) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 71 | // (mandatory) (2-bytes) |
| 72 | // |
| 73 | // Ssrc |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 74 | // This attribute specifies the RTP synchronization source in the TDM to the PSN direction. It |
| 75 | // comprises two 4-byte values. The first is for the payload channel, the second, for the optional |
| 76 | // separate signalling channel. If signalling is not transported in its own channel, the second |
| 77 | // value should be set to 0. (R,-W, setbycreate) (mandatory) (8-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 78 | // |
| 79 | // Expected Ptype |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 80 | // This attribute specifies the RTP payload type in the PSN to the TDM direction. The received |
| 81 | // payload type may be used to detect malformed packets. It comprises two 1-byte values. The first |
| 82 | // is for the payload channel, the second, for the optional separate signalling channel. To disable |
| 83 | // either or both of the check functions, set the corresponding value to its default value 0. |
| 84 | // (R,-W, setbycreate) (optional) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 85 | // |
| 86 | // Expected Ssrc |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 87 | // This attribute specifies the RTP synchronization source in the PSN to the TDM direction. The |
| 88 | // received SSRC may be used to detect misconnection (stray packets). It comprises two 4-byte |
| 89 | // values. The first is for the payload channel, the second, for the optional separate signalling |
| 90 | // channel. To disable either or both of the check functions, set the corresponding value to its |
| 91 | // default value 0. (R,-W, setbycreate) (optional) (8-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 92 | // |
| 93 | type RtpPseudowireParameters struct { |
| 94 | ManagedEntityDefinition |
| 95 | Attributes AttributeValueMap |
| 96 | } |
| 97 | |
| 98 | func init() { |
| 99 | rtppseudowireparametersBME = &ManagedEntityDefinition{ |
| 100 | Name: "RtpPseudowireParameters", |
| 101 | ClassID: 283, |
| 102 | MessageTypes: mapset.NewSetWith( |
| 103 | Create, |
| 104 | Delete, |
| 105 | Get, |
| 106 | Set, |
| 107 | ), |
| 108 | AllowedAttributeMask: 0xfc00, |
| 109 | AttributeDefinitions: AttributeDefinitionMap{ |
| 110 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 111 | 1: Uint16Field("ClockReference", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 112 | 2: ByteField("RtpTimestampMode", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 113 | 3: Uint16Field("Ptype", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 114 | 4: Uint64Field("Ssrc", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 115 | 5: Uint16Field("ExpectedPtype", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5), |
| 116 | 6: Uint64Field("ExpectedSsrc", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6), |
| 117 | }, |
| 118 | Access: CreatedByOlt, |
| 119 | Support: UnknownSupport, |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | // NewRtpPseudowireParameters (class ID 283) creates the basic |
| 124 | // Managed Entity definition that is used to validate an ME of this type that |
| 125 | // is received from or transmitted to the OMCC. |
| 126 | func NewRtpPseudowireParameters(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 127 | return NewManagedEntity(*rtppseudowireparametersBME, params...) |
| 128 | } |