Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 4 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 5 | * 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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 8 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 10 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 11 | * 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 Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 18 | * 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const PhysicalPathTerminationPointMocaUniClassID = ClassID(162) // 0x00a2 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var physicalpathterminationpointmocauniBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // PhysicalPathTerminationPointMocaUni (Class ID: #162 / 0x00a2) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 57 | // This attribute uniquely identifies each instance of this ME. This 2-byte number is directly |
| 58 | // associated with the physical position of the UNI. The first byte is the slot ID (defined in |
| 59 | // clause 9.1.5). The second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 60 | // |
| 61 | // Loopback Configuration |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 62 | // 0 No loopback |
| 63 | // |
| 64 | // 3 Loopback3, loopback of downstream traffic after PHY transceiver, depicted in Figure 9.10.1-1. |
| 65 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 66 | // Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (optional) (1-byte) |
| 67 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 68 | // This attribute sets the MoCA loopback configuration. Note that normal bridge behaviour may |
| 69 | // defeat the loopback signal unless broadcast MAC addresses are used. |
| 70 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 71 | // Administrative State |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 72 | // This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative |
| 73 | // state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 74 | // |
| 75 | // Operational State |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 76 | // This attribute indicates whether the ME is capable of performing its function. Valid values are |
| 77 | // enabled (0) and disabled (1). (R) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 78 | // |
| 79 | // Max Frame Size |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 80 | // This attribute denotes the maximum frame size allowed across this interface. Upon ME |
| 81 | // instantiation, the ONU sets this attribute to 1518. (R,-W) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 82 | // |
| 83 | // Arc |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 84 | // See clause A.1.4.3. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 85 | // |
| 86 | // Arc Interval |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 87 | // See clause A.1.4.3. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 88 | // |
| 89 | // Pppoe Filter |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 90 | // This attribute controls filtering of PPPoE packets on this MoCA port. When its value is 1, all |
| 91 | // packets other than PPPoE packets are discarded. The default 0 accepts packets of all types. |
| 92 | // (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 93 | // |
| 94 | // Network Status |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 95 | // This attribute indicates the networking state of the MoCA interface as follows. |
| 96 | // |
| 97 | // 0 The interface has not joined an MoCA network. |
| 98 | // |
| 99 | // 1 The interface has joined an MoCA network. |
| 100 | // |
| 101 | // 2 The interface has joined an MoCA network and is currently the network coordinator. |
| 102 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 103 | // (R) (mandatory) (1-byte) |
| 104 | // |
| 105 | // Password |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 106 | // This attribute specifies the MoCA encryption key. It is an ASCII string of 17 decimal digits. |
| 107 | // Upon ME instantiation, the ONU sets this attribute to 17 null bytes. (R,-W) (mandatory) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 108 | // (17-bytes) |
| 109 | // |
| 110 | // Privacy Enabled |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 111 | // This attribute activates (1) link-layer security. The default value 0 deactivates it. (R,-W) |
| 112 | // (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 113 | // |
| 114 | // Minimum Bandwidth Alarm Threshold |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 115 | // This attribute specifies the minimum desired PHY link bandwidth between two nodes. If the actual |
| 116 | // bandwidth is lower, an LL alarm is declared. Valid values are 0 to 0x0410 (260-Mbit/s) in |
| 117 | // 0.25-Mbit/s increments. The default value is 0x02D0 (180-Mbit/s). The value 0 disables the |
| 118 | // threshold. (R,-W) (optional) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 119 | // |
| 120 | // Frequency Mask |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 121 | // This attribute is a bit map of the centre frequencies that the interface is permitted to use, |
| 122 | // where each bit represents a centre frequency. The LSB (b[1]) corresponds to centre frequency |
| 123 | // 800-MHz. The next significant bit (b[2]) corresponds to centre frequency 825-MHz. The 28th bit |
| 124 | // (b[28]) corresponds to centre frequency 1500-MHz. The four MSBs are not used. (R,-W) (optional) |
| 125 | // (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 126 | // |
| 127 | // Rf Channel |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 128 | // This attribute reports the frequency to which the MoCA interface is currently tuned, in |
| 129 | // megahertz. (R) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 130 | // |
| 131 | // Last Operational Frequency |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 132 | // This attribute reports the frequency to which the MoCA interface was tuned when last |
| 133 | // operational, in megahertz. (R) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 134 | // |
| 135 | type PhysicalPathTerminationPointMocaUni struct { |
| 136 | ManagedEntityDefinition |
| 137 | Attributes AttributeValueMap |
| 138 | } |
| 139 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 140 | // Attribute name constants |
| 141 | |
| 142 | const PhysicalPathTerminationPointMocaUni_LoopbackConfiguration = "LoopbackConfiguration" |
| 143 | const PhysicalPathTerminationPointMocaUni_AdministrativeState = "AdministrativeState" |
| 144 | const PhysicalPathTerminationPointMocaUni_OperationalState = "OperationalState" |
| 145 | const PhysicalPathTerminationPointMocaUni_MaxFrameSize = "MaxFrameSize" |
| 146 | const PhysicalPathTerminationPointMocaUni_Arc = "Arc" |
| 147 | const PhysicalPathTerminationPointMocaUni_ArcInterval = "ArcInterval" |
| 148 | const PhysicalPathTerminationPointMocaUni_PppoeFilter = "PppoeFilter" |
| 149 | const PhysicalPathTerminationPointMocaUni_NetworkStatus = "NetworkStatus" |
| 150 | const PhysicalPathTerminationPointMocaUni_Password = "Password" |
| 151 | const PhysicalPathTerminationPointMocaUni_PrivacyEnabled = "PrivacyEnabled" |
| 152 | const PhysicalPathTerminationPointMocaUni_MinimumBandwidthAlarmThreshold = "MinimumBandwidthAlarmThreshold" |
| 153 | const PhysicalPathTerminationPointMocaUni_FrequencyMask = "FrequencyMask" |
| 154 | const PhysicalPathTerminationPointMocaUni_RfChannel = "RfChannel" |
| 155 | const PhysicalPathTerminationPointMocaUni_LastOperationalFrequency = "LastOperationalFrequency" |
| 156 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 157 | func init() { |
| 158 | physicalpathterminationpointmocauniBME = &ManagedEntityDefinition{ |
| 159 | Name: "PhysicalPathTerminationPointMocaUni", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 160 | ClassID: PhysicalPathTerminationPointMocaUniClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 161 | MessageTypes: mapset.NewSetWith( |
| 162 | Get, |
| 163 | Set, |
| 164 | ), |
| 165 | AllowedAttributeMask: 0xfffc, |
| 166 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 167 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 168 | 1: ByteField(PhysicalPathTerminationPointMocaUni_LoopbackConfiguration, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, true, false, 1), |
| 169 | 2: ByteField(PhysicalPathTerminationPointMocaUni_AdministrativeState, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 170 | 3: ByteField(PhysicalPathTerminationPointMocaUni_OperationalState, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), true, true, false, 3), |
| 171 | 4: Uint16Field(PhysicalPathTerminationPointMocaUni_MaxFrameSize, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 172 | 5: ByteField(PhysicalPathTerminationPointMocaUni_Arc, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), true, true, false, 5), |
| 173 | 6: ByteField(PhysicalPathTerminationPointMocaUni_ArcInterval, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6), |
| 174 | 7: ByteField(PhysicalPathTerminationPointMocaUni_PppoeFilter, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7), |
| 175 | 8: ByteField(PhysicalPathTerminationPointMocaUni_NetworkStatus, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 176 | 9: MultiByteField(PhysicalPathTerminationPointMocaUni_Password, OctetsAttributeType, 0x0080, 17, toOctets("AAAAAAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read, Write), false, false, false, 9), |
| 177 | 10: ByteField(PhysicalPathTerminationPointMocaUni_PrivacyEnabled, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10), |
| 178 | 11: Uint16Field(PhysicalPathTerminationPointMocaUni_MinimumBandwidthAlarmThreshold, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11), |
| 179 | 12: Uint32Field(PhysicalPathTerminationPointMocaUni_FrequencyMask, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12), |
| 180 | 13: Uint16Field(PhysicalPathTerminationPointMocaUni_RfChannel, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13), |
| 181 | 14: Uint16Field(PhysicalPathTerminationPointMocaUni_LastOperationalFrequency, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 182 | }, |
| 183 | Access: CreatedByOnu, |
| 184 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 185 | Alarms: AlarmMap{ |
| 186 | 0: "MoCA LOL", |
| 187 | 1: "MoCA limited link (LL)", |
| 188 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 189 | } |
| 190 | } |
| 191 | |
| 192 | // NewPhysicalPathTerminationPointMocaUni (class ID 162) creates the basic |
| 193 | // Managed Entity definition that is used to validate an ME of this type that |
| 194 | // is received from or transmitted to the OMCC. |
| 195 | func NewPhysicalPathTerminationPointMocaUni(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 196 | return NewManagedEntity(*physicalpathterminationpointmocauniBME, params...) |
| 197 | } |