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