blob: 59652da1e95cc0053d7b5a61a9c435b1fc83a3c0 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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 Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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 */
Chip Boling34ebcb62021-02-02 12:13:58 -060017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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// PhysicalPathTerminationPointMocaUniClassID is the 16-bit ID for the OMCI
29// Managed entity Physical path termination point MoCA UNI
30const PhysicalPathTerminationPointMocaUniClassID ClassID = ClassID(162)
31
32var physicalpathterminationpointmocauniBME *ManagedEntityDefinition
33
34// PhysicalPathTerminationPointMocaUni (class ID #162)
35// This ME represents an MoCA UNI, where physical paths terminate and physical path level functions
36// are performed.
37//
38// The ONU automatically creates an instance of this ME per port as follows.
39//
40// o When the ONU has MoCA ports built into its factory configuration.
41//
42// o When a cardholder is provisioned to expect a circuit pack of the MoCA type.
43//
44// o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the MoCA
45// type. Note that the installation of a plug-and-play card may indicate the presence of MoCA ports
46// via equipment ID as well as its type, and indeed may cause the ONU to instantiate a port-mapping
47// package that specifies MoCA ports.
48//
49// The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
50// expect an MoCA circuit pack, nor is it equipped with an MoCA circuit pack.
51//
52// Relationships
53// An instance of this ME is associated with each real or pre-provisioned MoCA port.
54//
55// Attributes
56// Managed Entity Id
57// Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
58// number is directly associated with the physical position of the UNI. The first byte is the slot
59// ID (defined in clause 9.1.5). The second byte is the port ID, with the range 1..255. (R)
60// (mandatory) (2-bytes)
61//
62// Loopback Configuration
63// Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (optional) (1-byte)
64//
65// Administrative State
66// Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
67// ME. Administrative state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
68//
69// Operational State
70// Operational state: This attribute indicates whether the ME is capable of performing its
71// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
72//
73// Max Frame Size
74// Max frame size: This attribute denotes the maximum frame size allowed across this interface.
75// Upon ME instantiation, the ONU sets this attribute to 1518. (R,-W) (mandatory) (2-bytes)
76//
77// Arc
78// ARC: See clause A.1.4.3. (R,-W) (optional) (1-byte)
79//
80// Arc Interval
81// ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
82//
83// Pppoe Filter
84// PPPoE filter: This attribute controls filtering of PPPoE packets on this MoCA port. When its
85// value is 1, all packets other than PPPoE packets are discarded. The default 0 accepts packets of
86// all types. (R,-W) (optional) (1-byte)
87//
88// Network Status
89// (R) (mandatory) (1-byte)
90//
91// Password
92// Password: This attribute specifies the MoCA encryption key. It is an ASCII string of 17 decimal
93// digits. Upon ME instantiation, the ONU sets this attribute to 17 null bytes. (R,-W) (mandatory)
94// (17-bytes)
95//
96// Privacy Enabled
97// Privacy enabled: This attribute activates (1) link-layer security. The default value 0
98// deactivates it. (R,-W) (mandatory) (1-byte)
99//
100// Minimum Bandwidth Alarm Threshold
101// Minimum bandwidth alarm threshold: This attribute specifies the minimum desired PHY link
102// bandwidth between two nodes. If the actual bandwidth is lower, an LL alarm is declared. Valid
103// values are 0 to 0x0410 (260-Mbit/s) in 0.25-Mbit/s increments. The default value is 0x02D0
104// (180-Mbit/s). The value 0 disables the threshold. (R,-W) (optional) (2-bytes)
105//
106// Frequency Mask
107// Frequency mask: This attribute is a bit map of the centre frequencies that the interface is
108// permitted to use, where each bit represents a centre frequency. The LSB (b[1]) corresponds to
109// centre frequency 800-MHz. The next significant bit (b[2]) corresponds to centre frequency
110// 825-MHz. The 28th bit (b[28]) corresponds to centre frequency 1500-MHz. The four MSBs are not
111// used. (R,-W) (optional) (4-bytes)
112//
113// Rf Channel
114// RF channel: This attribute reports the frequency to which the MoCA interface is currently tuned,
115// in megahertz. (R) (mandatory) (2-bytes)
116//
117// Last Operational Frequency
118// Last operational frequency: This attribute reports the frequency to which the MoCA interface was
119// tuned when last operational, in megahertz. (R) (mandatory) (2-bytes)
120//
121type PhysicalPathTerminationPointMocaUni struct {
122 ManagedEntityDefinition
123 Attributes AttributeValueMap
124}
125
126func init() {
127 physicalpathterminationpointmocauniBME = &ManagedEntityDefinition{
128 Name: "PhysicalPathTerminationPointMocaUni",
129 ClassID: 162,
130 MessageTypes: mapset.NewSetWith(
131 Get,
132 Set,
133 ),
134 AllowedAttributeMask: 0xfffc,
135 AttributeDefinitions: AttributeDefinitionMap{
136 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
137 1: ByteField("LoopbackConfiguration", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, true, false, 1),
138 2: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
139 3: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), true, true, false, 3),
140 4: Uint16Field("MaxFrameSize", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
141 5: ByteField("Arc", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), true, true, false, 5),
142 6: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
143 7: ByteField("PppoeFilter", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
144 8: ByteField("NetworkStatus", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
145 9: MultiByteField("Password", OctetsAttributeType, 0x0080, 17, toOctets("AAAAAAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read, Write), false, false, false, 9),
146 10: ByteField("PrivacyEnabled", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10),
147 11: Uint16Field("MinimumBandwidthAlarmThreshold", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
148 12: Uint32Field("FrequencyMask", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
149 13: Uint16Field("RfChannel", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
150 14: Uint16Field("LastOperationalFrequency", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
151 },
152 Access: CreatedByOnu,
153 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600154 Alarms: AlarmMap{
155 0: "MoCA LOL",
156 1: "MoCA limited link (LL)",
157 },
Chip Boling6e27b352020-02-14 09:10:01 -0600158 }
159}
160
161// NewPhysicalPathTerminationPointMocaUni (class ID 162) creates the basic
162// Managed Entity definition that is used to validate an ME of this type that
163// is received from or transmitted to the OMCC.
164func NewPhysicalPathTerminationPointMocaUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
165 return NewManagedEntity(*physicalpathterminationpointmocauniBME, params...)
166}