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