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