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