blob: 1dfb11c125ab966ac9838df84a9d8c0674e7825f [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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. Bainbridged80007b2021-04-12 12:22:29 +000017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// NetworkAddressClassID is the 16-bit ID for the OMCI
29// Managed entity Network address
mpagenko836a1fd2021-11-01 16:12:42 +000030const NetworkAddressClassID = ClassID(137) // 0x0089
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var networkaddressBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// NetworkAddress (Class ID: #137 / 0x0089)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// 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
mpagenko836a1fd2021-11-01 16:12:42 +000049// This attribute uniquely identifies each instance of this ME. Instances of this ME created
50// autonomously by the ONU have IDs in the range 0..0x7FFF. Instances created by the OLT have IDs
51// in the range 0x8000..0xFFFE. The value 0xFFFF is reserved. (R, setbycreate) (mandatory)
52// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000053//
54// Security Pointer
mpagenko836a1fd2021-11-01 16:12:42 +000055// This attribute points to an authentication security method ME. The authentication security
56// method indicates the username and password to be used when retrieving the network address
57// indicated by this ME. A null pointer indicates that security attributes are not defined for this
58// network address. (R,-W, setbycreate) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000059//
60// Address Pointer
mpagenko836a1fd2021-11-01 16:12:42 +000061// This attribute points to the large string ME that contains the network address. It may contain a
62// fully qualified domain name, URI or IP address. The URI may also contain a port identifier
63// (e.g., "x.y.z.com:5060"). A null pointer indicates that no network address is defined. (R,-W,
64// setbycreate) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000065//
66type NetworkAddress struct {
67 ManagedEntityDefinition
68 Attributes AttributeValueMap
69}
70
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000071// Attribute name constants
72
73const NetworkAddress_SecurityPointer = "SecurityPointer"
74const NetworkAddress_AddressPointer = "AddressPointer"
75
Holger Hildebrandtfa074992020-03-27 15:42:06 +000076func init() {
77 networkaddressBME = &ManagedEntityDefinition{
78 Name: "NetworkAddress",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000079 ClassID: NetworkAddressClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +000080 MessageTypes: mapset.NewSetWith(
81 Create,
82 Delete,
83 Get,
84 Set,
85 ),
86 AllowedAttributeMask: 0xc000,
87 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000088 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
89 1: Uint16Field(NetworkAddress_SecurityPointer, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
90 2: Uint16Field(NetworkAddress_AddressPointer, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
Holger Hildebrandtfa074992020-03-27 15:42:06 +000091 },
92 Access: CreatedByOlt,
93 Support: UnknownSupport,
94 }
95}
96
97// NewNetworkAddress (class ID 137) creates the basic
98// Managed Entity definition that is used to validate an ME of this type that
99// is received from or transmitted to the OMCC.
100func NewNetworkAddress(params ...ParamData) (*ManagedEntity, OmciErrors) {
101 return NewManagedEntity(*networkaddressBME, params...)
102}