blob: e041031ebbd501596a3a6793dc4649a4ed1fd8cf [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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 Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080017 /*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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 Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// TcpUdpConfigDataClassID is the 16-bit ID for the OMCI
29// Managed entity TCP/UDP config data
30const TcpUdpConfigDataClassID ClassID = ClassID(136)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var tcpudpconfigdataBME *ManagedEntityDefinition
33
34// TcpUdpConfigData (class ID #136)
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
48// Managed entity ID: This attribute uniquely identifies each instance of this ME. It is
49// recommended that the ME ID be the same as the port number. (R, setbycreate) (mandatory)
Matteo Scandolof9d43412021-01-12 11:11:34 -080050// (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070051//
52// Port Id
Matteo Scandolof9d43412021-01-12 11:11:34 -080053// Port ID: This attribute specifies the port number that offers the TCP/UDP service. (R,-W,
54// setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070055//
56// Protocol
57// Protocol: This attribute specifies the protocol type as defined by [b-IANA] (protocol numbers),
Matteo Scandolof9d43412021-01-12 11:11:34 -080058// for example UDP (0x11). (R,-W, setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070059//
60// Tos_Diffserv Field
61// TOS/diffserv field: This attribute specifies the value of the TOS/diffserv field of the IPv4
62// header. The contents of this attribute may contain the type of service per [IETF RFC 2474] or a
63// DSCP. Valid values for DSCP are as defined by [b-IANA] (differentiated services field code
Matteo Scandolof9d43412021-01-12 11:11:34 -080064// points). (R,-W, set-by-create) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070065//
66// Ip Host Pointer
67// IP host pointer: This attribute points to the IP host config data or IPv6 host config data ME
68// associated with this TCP/UDP data. Any number of ports and protocols may be associated with an
69// IP host. (R, W, set-by-create) (mandatory) (2 bytes)
70//
71type TcpUdpConfigData struct {
72 ManagedEntityDefinition
73 Attributes AttributeValueMap
74}
75
76func init() {
77 tcpudpconfigdataBME = &ManagedEntityDefinition{
78 Name: "TcpUdpConfigData",
79 ClassID: 136,
80 MessageTypes: mapset.NewSetWith(
81 Create,
82 Delete,
83 Get,
84 Set,
85 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080086 AllowedAttributeMask: 0xf000,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070087 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080088 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
89 1: Uint16Field("PortId", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
90 2: ByteField("Protocol", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
91 3: ByteField("TosDiffservField", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
92 4: Uint16Field("IpHostPointer", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070093 },
Matteo Scandolof9d43412021-01-12 11:11:34 -080094 Access: CreatedByOlt,
95 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070096 }
97}
98
Matteo Scandolof9d43412021-01-12 11:11:34 -080099// NewTcpUdpConfigData (class ID 136) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700100// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800101// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700102func NewTcpUdpConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800103 return NewManagedEntity(*tcpudpconfigdataBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700104}