blob: 89d8cab29367596e9859dfd77768573dd7c488cb [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
17/*
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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// PhysicalPathTerminationPointVideoUniClassID is the 16-bit ID for the OMCI
29// Managed entity Physical path termination point video UNI
Andrea Campanella10426e22021-10-15 17:58:04 +020030const PhysicalPathTerminationPointVideoUniClassID = ClassID(82) // 0x0052
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var physicalpathterminationpointvideouniBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// PhysicalPathTerminationPointVideoUni (Class ID: #82 / 0x0052)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035// This ME represents an RF video UNI in the ONU, where physical paths terminate and physical path
36// level functions are performed.
37//
38// The ONU automatically creates an instance of this ME per port:
39//
Matteo Scandolof9d43412021-01-12 11:11:34 -080040// o when the ONU has RF video UNI ports built into its factory configuration;
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070041//
Matteo Scandolof9d43412021-01-12 11:11:34 -080042// o when a cardholder is provisioned to expect a circuit pack of the video UNI type;
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070043//
Matteo Scandolof9d43412021-01-12 11:11:34 -080044// o when a cardholder provisioned for plug-and-play is equipped with a circuit pack of the video
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070045// UNI type. Note that the installation of a plug-and-play card may indicate the presence of video
46// ports via equipment ID as well as its type, and indeed may cause the ONU to instantiate a port-
47// mapping package that specifies video ports.
48//
49// The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
50// expect a video circuit pack, nor is it equipped with a video circuit pack.
51//
52// Relationships
53// One or more instances of this ME are associated with an instance of a real or virtual circuit
54// pack classified as video type.
55//
56// Attributes
57// Managed Entity Id
Andrea Campanella10426e22021-10-15 17:58:04 +020058// This attribute uniquely identifies each instance of this ME. This 2-byte number indicates the
59// physical position of the UNI. The first byte is the slot ID (defined in clause 9.1.5). The
60// second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070061//
62// Administrative State
Andrea Campanella10426e22021-10-15 17:58:04 +020063// This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative
64// state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070065//
66// Operational State
Andrea Campanella10426e22021-10-15 17:58:04 +020067// This attribute indicates whether the ME is capable of performing its function. Valid values are
68// enabled (0) and disabled (1). (R) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070069//
70// Arc
Andrea Campanella10426e22021-10-15 17:58:04 +020071// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070072//
73// Arc Interval
Andrea Campanella10426e22021-10-15 17:58:04 +020074// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070075//
76// Power Control
Andrea Campanella10426e22021-10-15 17:58:04 +020077// This attribute controls whether power is provided from the ONU to an external equipment over the
78// video PPTP. Value 1 enables power over coaxial cable. The default value 0 disables power feed.
79// (R,-W) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070080//
81type PhysicalPathTerminationPointVideoUni struct {
82 ManagedEntityDefinition
83 Attributes AttributeValueMap
84}
85
Elia Battiston9bfe1102022-02-03 10:38:03 +010086// Attribute name constants
87
88const PhysicalPathTerminationPointVideoUni_AdministrativeState = "AdministrativeState"
89const PhysicalPathTerminationPointVideoUni_OperationalState = "OperationalState"
90const PhysicalPathTerminationPointVideoUni_Arc = "Arc"
91const PhysicalPathTerminationPointVideoUni_ArcInterval = "ArcInterval"
92const PhysicalPathTerminationPointVideoUni_PowerControl = "PowerControl"
93
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070094func init() {
95 physicalpathterminationpointvideouniBME = &ManagedEntityDefinition{
96 Name: "PhysicalPathTerminationPointVideoUni",
Elia Battiston9bfe1102022-02-03 10:38:03 +010097 ClassID: PhysicalPathTerminationPointVideoUniClassID,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070098 MessageTypes: mapset.NewSetWith(
99 Get,
100 Set,
101 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800102 AllowedAttributeMask: 0xf800,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700103 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100104 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
105 1: ByteField(PhysicalPathTerminationPointVideoUni_AdministrativeState, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
106 2: ByteField(PhysicalPathTerminationPointVideoUni_OperationalState, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
107 3: ByteField(PhysicalPathTerminationPointVideoUni_Arc, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
108 4: ByteField(PhysicalPathTerminationPointVideoUni_ArcInterval, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
109 5: ByteField(PhysicalPathTerminationPointVideoUni_PowerControl, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800110 },
111 Access: CreatedByOnu,
112 Support: UnknownSupport,
113 Alarms: AlarmMap{
114 0: "Video-LOS",
115 1: "Video-OOR-low",
116 2: "Video-OOR-high",
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700117 },
118 }
119}
120
Matteo Scandolof9d43412021-01-12 11:11:34 -0800121// NewPhysicalPathTerminationPointVideoUni (class ID 82) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700122// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800123// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700124func NewPhysicalPathTerminationPointVideoUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800125 return NewManagedEntity(*physicalpathterminationpointvideouniBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700126}