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 | // RtpPseudowireParametersClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity RTP pseudowire parameters |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 30 | const RtpPseudowireParametersClassID = ClassID(283) // 0x011b |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 31 | |
| 32 | var rtppseudowireparametersBME *ManagedEntityDefinition |
| 33 | |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 34 | // RtpPseudowireParameters (Class ID: #283 / 0x011b) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [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) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 48 | // |
| 49 | // Clock Reference |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [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) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 52 | // |
| 53 | // Rtp Timestamp Mode |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [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 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 64 | // (R,-W, setbycreate) (mandatory) (1-byte) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 65 | // |
| 66 | // Ptype |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [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) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 71 | // (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 72 | // |
| 73 | // Ssrc |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [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) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 78 | // |
| 79 | // Expected Ptype |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [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) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 85 | // |
| 86 | // Expected Ssrc |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [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) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 | ), |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 108 | AllowedAttributeMask: 0xfc00, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 109 | AttributeDefinitions: AttributeDefinitionMap{ |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 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), |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 117 | }, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 118 | Access: CreatedByOlt, |
| 119 | Support: UnknownSupport, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 120 | } |
| 121 | } |
| 122 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 123 | // NewRtpPseudowireParameters (class ID 283) creates the basic |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 124 | // 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] | 125 | // is received from or transmitted to the OMCC. |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 126 | func NewRtpPseudowireParameters(params ...ParamData) (*ManagedEntity, OmciErrors) { |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 127 | return NewManagedEntity(*rtppseudowireparametersBME, params...) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 128 | } |