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