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