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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 8 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [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 | // TcpUdpConfigDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity TCP/UDP config data |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const TcpUdpConfigDataClassID = ClassID(136) // 0x0088 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var tcpudpconfigdataBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // TcpUdpConfigData (Class ID: #136 / 0x0088) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // The TCP/UDP config data ME configures services based on the transmission control protocol (TCP) |
| 36 | // and user datagram protocol (UDP) that are offered from an IP host. If a non-OMCI interface is |
| 37 | // used to manage an IP service, this ME is unnecessary; the non-OMCI interface supplies the |
| 38 | // necessary data. |
| 39 | // |
| 40 | // An instance of this ME is created and deleted on request of the OLT. |
| 41 | // |
| 42 | // Relationships |
| 43 | // One or more instances of this ME may be associated with an instance of an IP host config data or |
| 44 | // IPv6 host config data ME. |
| 45 | // |
| 46 | // Attributes |
| 47 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 48 | // This attribute uniquely identifies each instance of this ME. It is recommended that the ME ID be |
| 49 | // the same as the port number. (R, setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 50 | // |
| 51 | // Port Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 52 | // This attribute specifies the port number that offers the TCP/UDP service. (R,-W, setbycreate) |
| 53 | // (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 54 | // |
| 55 | // Protocol |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 56 | // This attribute specifies the protocol type as defined by [b-IANA] (protocol numbers), for |
| 57 | // example UDP (0x11). (R,-W, setbycreate) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 58 | // |
| 59 | // Tos_Diffserv Field |
| 60 | // TOS/diffserv field: This attribute specifies the value of the TOS/diffserv field of the IPv4 |
| 61 | // header. The contents of this attribute may contain the type of service per [IETF RFC 2474] or a |
| 62 | // DSCP. Valid values for DSCP are as defined by [b-IANA] (differentiated services field code |
| 63 | // points). (R,-W, set-by-create) (mandatory) (1-byte) |
| 64 | // |
| 65 | // Ip Host Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 66 | // This attribute points to the IP host config data or IPv6 host config data ME associated with |
| 67 | // this TCP/UDP data. Any number of ports and protocols may be associated with an IP host. (R, W, |
| 68 | // set-by-create) (mandatory) (2 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 69 | // |
| 70 | type TcpUdpConfigData struct { |
| 71 | ManagedEntityDefinition |
| 72 | Attributes AttributeValueMap |
| 73 | } |
| 74 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 75 | // Attribute name constants |
| 76 | |
| 77 | const TcpUdpConfigData_PortId = "PortId" |
| 78 | const TcpUdpConfigData_Protocol = "Protocol" |
| 79 | const TcpUdpConfigData_TosDiffservField = "TosDiffservField" |
| 80 | const TcpUdpConfigData_IpHostPointer = "IpHostPointer" |
| 81 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 82 | func init() { |
| 83 | tcpudpconfigdataBME = &ManagedEntityDefinition{ |
| 84 | Name: "TcpUdpConfigData", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 85 | ClassID: TcpUdpConfigDataClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 86 | MessageTypes: mapset.NewSetWith( |
| 87 | Create, |
| 88 | Delete, |
| 89 | Get, |
| 90 | Set, |
| 91 | ), |
| 92 | AllowedAttributeMask: 0xf000, |
| 93 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 94 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 95 | 1: Uint16Field(TcpUdpConfigData_PortId, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 96 | 2: ByteField(TcpUdpConfigData_Protocol, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 97 | 3: ByteField(TcpUdpConfigData_TosDiffservField, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 98 | 4: Uint16Field(TcpUdpConfigData_IpHostPointer, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 99 | }, |
| 100 | Access: CreatedByOlt, |
| 101 | Support: UnknownSupport, |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | // NewTcpUdpConfigData (class ID 136) creates the basic |
| 106 | // Managed Entity definition that is used to validate an ME of this type that |
| 107 | // is received from or transmitted to the OMCC. |
| 108 | func NewTcpUdpConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 109 | return NewManagedEntity(*tcpudpconfigdataBME, params...) |
| 110 | } |