Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 5 | * 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 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 11 | * 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 | */ |
David K. Bainbridge | adf422d | 2021-04-09 16:06:41 +0000 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 18 | * 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 | */ |
| 23 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // NetworkAddressClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Network address |
| 30 | const NetworkAddressClassID ClassID = ClassID(137) |
| 31 | |
| 32 | var networkaddressBME *ManagedEntityDefinition |
| 33 | |
| 34 | // NetworkAddress (class ID #137) |
| 35 | // The network address ME associates a network address with security methods required to access a |
| 36 | // server. It is conditionally required for ONUs that support VoIP services. The address may take |
| 37 | // the form of a URL, a fully qualified path or IP address represented as an ACII string. |
| 38 | // |
| 39 | // If a non-OMCI interface is used to manage VoIP signalling, this ME is unnecessary. |
| 40 | // |
| 41 | // Instances of this ME are created and deleted by the OLT or the ONU, depending on the method used |
| 42 | // and case. |
| 43 | // |
| 44 | // Relationships |
| 45 | // Any ME that requires a network address may link to an instance of this ME. |
| 46 | // |
| 47 | // Attributes |
| 48 | // Managed Entity Id |
| 49 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. Instances of |
| 50 | // this ME created autonomously by the ONU have IDs in the range 0..0x7FFF. Instances created by |
| 51 | // the OLT have IDs in the range 0x8000..0xFFFE. The value 0xFFFF is reserved. (R, setbycreate) |
| 52 | // (mandatory) (2-bytes) |
| 53 | // |
| 54 | // Security Pointer |
| 55 | // Security pointer: This attribute points to an authentication security method ME. The |
| 56 | // authentication security method indicates the username and password to be used when retrieving |
| 57 | // the network address indicated by this ME. A null pointer indicates that security attributes are |
| 58 | // not defined for this network address. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 59 | // |
| 60 | // Address Pointer |
| 61 | // Address pointer: This attribute points to the large string ME that contains the network address. |
| 62 | // It may contain a fully qualified domain name, URI or IP address. The URI may also contain a port |
| 63 | // identifier (e.g., "x.y.z.com:5060"). A null pointer indicates that no network address is |
| 64 | // defined. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 65 | // |
| 66 | type NetworkAddress struct { |
| 67 | ManagedEntityDefinition |
| 68 | Attributes AttributeValueMap |
| 69 | } |
| 70 | |
| 71 | func init() { |
| 72 | networkaddressBME = &ManagedEntityDefinition{ |
| 73 | Name: "NetworkAddress", |
| 74 | ClassID: 137, |
| 75 | MessageTypes: mapset.NewSetWith( |
| 76 | Create, |
| 77 | Delete, |
| 78 | Get, |
| 79 | Set, |
| 80 | ), |
| 81 | AllowedAttributeMask: 0xc000, |
| 82 | AttributeDefinitions: AttributeDefinitionMap{ |
| 83 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 84 | 1: Uint16Field("SecurityPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 85 | 2: Uint16Field("AddressPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 86 | }, |
| 87 | Access: CreatedByOlt, |
| 88 | Support: UnknownSupport, |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | // NewNetworkAddress (class ID 137) creates the basic |
| 93 | // Managed Entity definition that is used to validate an ME of this type that |
| 94 | // is received from or transmitted to the OMCC. |
| 95 | func NewNetworkAddress(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 96 | return NewManagedEntity(*networkaddressBME, params...) |
| 97 | } |