blob: 9c4b339462bc84fab27b587748bbfb78da56cf51 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
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 */
20package generated
21
22import "github.com/deckarep/golang-set"
23
24const SnmpConfigurationDataClassId ClassID = ClassID(335)
25
26var snmpconfigurationdataBME *ManagedEntityDefinition
27
28// SnmpConfigurationData (class ID #335)
29// The SNMP configuration data ME provides a way for the OLT to provision an IP path for an SNMP
30// management agent.
31//
32// The SNMP configuration data ME is created and deleted by the OLT.
33//
34// Relationships
35// One instance of this ME is created by the OLT for each SNMP management path termination.
36//
37// Attributes
38// Managed Entity Id
39// Managed entity ID: This attribute uniquely identifies each instance of this ME. The ME IDs 0 and
40// 0xFFFF are reserved. (R, setbycreate) (mandatory) (2 bytes)
41//
42// Snmp Version
43// SNMP version: This integer attribute is the SNMP protocol version to be supported. (R, W,
44// setbycreate) (mandatory) (2 bytes)
45//
46// Snmp Agent Address
47// SNMP agent address: This attribute is a pointer to a TCP/UDP config data ME, which provides the
48// SNMP agent. (R, W, setbycreate) (mandatory) (2 bytes)
49//
50// Snmp Server Address
51// SNMP server address: This attribute is the IP address of the SNMP server. (R, W, setbycreate)
52// (mandatory) (4 bytes)
53//
54// Snmp Server Port
55// SNMP server port: This attribute is the UDP port number of the SNMP server. (R, W, setbycreate)
56// (mandatory) (2 bytes)
57//
58// Security Name Pointer
59// Security name pointer: This attribute points to a large string whose content represents the SNMP
60// security name in a human-readable format that is independent of the security model. SecurityName
61// is defined in [b-IETF RFC 2571]. (R, W, setbycreate) (mandatory) (2 bytes)
62//
63// Community For Read
64// Community for read: This attribute is a pointer to a large string that contains the name of the
65// read community. (R, W, setbycreate) (mandatory) (2 bytes)
66//
67// Community For Write
68// Community for write: This attribute is a pointer to a large string that contains the name of the
69// write community. (R, W, setbycreate) (mandatory) (2 bytes)
70//
71// Sys Name Pointer
72// Sys name pointer: This attribute points to a large string whose content identifies the SNMP
73// system name. SysName is defined in [b-IETF RFC 3418]. (R, W, setbycreate) (mandatory) (2 bytes)
74//
75type SnmpConfigurationData struct {
76 ManagedEntityDefinition
77 Attributes AttributeValueMap
78}
79
80func init() {
81 snmpconfigurationdataBME = &ManagedEntityDefinition{
82 Name: "SnmpConfigurationData",
83 ClassID: 335,
84 MessageTypes: mapset.NewSetWith(
85 Create,
86 Delete,
87 Get,
88 Set,
89 ),
90 AllowedAttributeMask: 0XFF00,
91 AttributeDefinitions: AttributeDefinitionMap{
92 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, false, 0),
93 1: Uint16Field("SnmpVersion", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 1),
94 2: Uint16Field("SnmpAgentAddress", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 2),
95 3: Uint32Field("SnmpServerAddress", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 3),
96 4: Uint16Field("SnmpServerPort", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 4),
97 5: Uint16Field("SecurityNamePointer", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 5),
98 6: Uint16Field("CommunityForRead", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 6),
99 7: Uint16Field("CommunityForWrite", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 7),
100 8: Uint16Field("SysNamePointer", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 8),
101 },
102 }
103}
104
105// NewSnmpConfigurationData (class ID 335 creates the basic
106// Managed Entity definition that is used to validate an ME of this type that
107// is received from the wire, about to be sent on the wire.
108func NewSnmpConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
109 return NewManagedEntity(snmpconfigurationdataBME, params...)
110}