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 TcpUdpConfigDataClassId ClassID = ClassID(136) |
| 25 | |
| 26 | var tcpudpconfigdataBME *ManagedEntityDefinition |
| 27 | |
| 28 | // TcpUdpConfigData (class ID #136) |
| 29 | // The TCP/UDP config data ME configures services based on the transmission control protocol (TCP) |
| 30 | // and user datagram protocol (UDP) that are offered from an IP host. If a non-OMCI interface is |
| 31 | // used to manage an IP service, this ME is unnecessary; the non-OMCI interface supplies the |
| 32 | // necessary data. |
| 33 | // |
| 34 | // An instance of this ME is created and deleted on request of the OLT. |
| 35 | // |
| 36 | // Relationships |
| 37 | // One or more instances of this ME may be associated with an instance of an IP host config data or |
| 38 | // IPv6 host config data ME. |
| 39 | // |
| 40 | // Attributes |
| 41 | // Managed Entity Id |
| 42 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. It is |
| 43 | // recommended that the ME ID be the same as the port number. (R, setbycreate) (mandatory) |
| 44 | // (2 bytes) |
| 45 | // |
| 46 | // Port Id |
| 47 | // Port ID: This attribute specifies the port number that offers the TCP/UDP service. (R, W, |
| 48 | // setbycreate) (mandatory) (2 bytes) |
| 49 | // |
| 50 | // Protocol |
| 51 | // Protocol: This attribute specifies the protocol type as defined by [b-IANA] (protocol numbers), |
| 52 | // for example UDP (0x11). (R, W, setbycreate) (mandatory) (1 byte) |
| 53 | // |
| 54 | // Tos_Diffserv Field |
| 55 | // TOS/diffserv field: This attribute specifies the value of the TOS/diffserv field of the IPv4 |
| 56 | // header. The contents of this attribute may contain the type of service per [IETF RFC 2474] or a |
| 57 | // DSCP. Valid values for DSCP are as defined by [b-IANA] (differentiated services field code |
| 58 | // points). (R, W, set-by-create) (mandatory) (1 byte) |
| 59 | // |
| 60 | // Ip Host Pointer |
| 61 | // IP host pointer: This attribute points to the IP host config data or IPv6 host config data ME |
| 62 | // associated with this TCP/UDP data. Any number of ports and protocols may be associated with an |
| 63 | // IP host. (R, W, set-by-create) (mandatory) (2 bytes) |
| 64 | // |
| 65 | type TcpUdpConfigData struct { |
| 66 | ManagedEntityDefinition |
| 67 | Attributes AttributeValueMap |
| 68 | } |
| 69 | |
| 70 | func init() { |
| 71 | tcpudpconfigdataBME = &ManagedEntityDefinition{ |
| 72 | Name: "TcpUdpConfigData", |
| 73 | ClassID: 136, |
| 74 | MessageTypes: mapset.NewSetWith( |
| 75 | Create, |
| 76 | Delete, |
| 77 | Get, |
| 78 | Set, |
| 79 | ), |
| 80 | AllowedAttributeMask: 0XF000, |
| 81 | AttributeDefinitions: AttributeDefinitionMap{ |
| 82 | 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, false, 0), |
| 83 | 1: Uint16Field("PortId", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 1), |
| 84 | 2: ByteField("Protocol", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 2), |
| 85 | 3: ByteField("TosDiffservField", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 3), |
| 86 | 4: Uint16Field("IpHostPointer", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 4), |
| 87 | }, |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | // NewTcpUdpConfigData (class ID 136 creates the basic |
| 92 | // Managed Entity definition that is used to validate an ME of this type that |
| 93 | // is received from the wire, about to be sent on the wire. |
| 94 | func NewTcpUdpConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 95 | return NewManagedEntity(tcpudpconfigdataBME, params...) |
| 96 | } |