blob: ddd39fbaaad004d3e0c58b4841f3f30b0e498133 [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// MgcConfigDataClassID is the 16-bit ID for the OMCI
29// Managed entity MGC config data
30const MgcConfigDataClassID ClassID = ClassID(155)
31
32var mgcconfigdataBME *ManagedEntityDefinition
33
34// MgcConfigData (class ID #155)
35// The MGC config data ME defines the MGC configuration associated with an MG subscriber. It is
36// conditionally required for ONUs that support ITU-T H.248 VoIP services. If a non-OMCI interface
37// is used to manage VoIP signalling, this ME is unnecessary.
38//
39// Instances of this ME are created and deleted by the OLT.
40//
41// Relationships
42// An instance of this ME may be associated with one or more VoIP voice CTP MEs.
43//
44// Attributes
45// Managed Entity Id
46// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
47// (mandatory) (2-bytes)
48//
49// Primary Mgc
50// Primary MGC: This attribute points to a network address ME that contains the name (IP-address or
51// resolved name) of the primary MGC that controls the signalling messages. The port is optional
52// and defaults to 2944 for text message formats and 2955 for binary message formats. (R,-W,
53// setbycreate) (mandatory) (2-bytes)
54//
55// Secondary Mgc
56// Secondary MGC: This attribute points to a network address ME that contains the name (IP-address
57// or resolved name) of the secondary or backup MGC that controls the signalling messages. The port
58// is optional and defaults to 2944 for text message formats and 2955 for binary message formats.
59// (R,-W, setbycreate) (mandatory) (2-bytes)
60//
61// Tcp_Udp Pointer
62// TCP/UDP pointer: This attribute points to the TCP/UDP config data ME to be used for
63// communication with the MGC. (R,-W, setbycreate) (mandatory) (2-bytes)
64//
65// Version
66// Version: This integer attribute reports the version of the Megaco protocol in use. The ONU
67// should deny an attempt by the OLT to set or create a value that it does not support. The value 0
68// indicates that no particular version is specified. (R,-W, setbycreate) (mandatory) (1-byte)
69//
70// Message Format
71// The default value is recommended to be 0. (R,-W, setbycreate) (mandatory) (1-byte)
72//
73// Maximum Retry Time
74// Maximum retry time: This attribute specifies the maximum retry time for MGC transactions, in
75// seconds. The default value 0 specifies vendor-specific implementation. (R,-W) (optional)
76// (2-bytes)
77//
78// Maximum Retry Attempts
79// Maximum retry attempts: This attribute specifies the maximum number of times a message is
80// retransmitted to the MGC. The recommended default value 0 specifies vendor-specific
81// implementation. (R,-W, setbycreate) (optional) (2-bytes)
82//
83// Service Change Delay
84// Service change delay: This attribute specifies the service status delay time for changes in line
85// service status. This attribute is specified in seconds. The default value 0 specifies no delay.
86// (R,-W) (optional) (2-bytes)
87//
88// Termination Id Base
89// Termination ID base: This attribute specifies the base string for the ITU-T H.248 physical
90// termination ID(s) for this ONU. This string is intended to uniquely identify an ONU. Vendor-
91// specific termination identifiers (port IDs) are optionally added to this string to uniquely
92// identify a termination on a specific ONU. (R,-W) (optional) (25-bytes)
93//
94// Softswitch
95// Softswitch: This attribute identifies the gateway softswitch vendor. The format is four ASCII
96// coded alphabetic characters [A..Z] as defined in [ATIS0300220]. A value of four null bytes
97// indicates an unknown or unspecified vendor. (R,-W, setbycreate) (mandatory) (4-bytes)
98//
99// Message Id Pointer
100// Message ID pointer: This attribute points to a large string whose value specifies the message
101// identifier string for ITU-T H.248 messages originated by the ONU. (R, W, setbycreate) (optional)
102// (2 bytes)
103//
104type MgcConfigData struct {
105 ManagedEntityDefinition
106 Attributes AttributeValueMap
107}
108
109func init() {
110 mgcconfigdataBME = &ManagedEntityDefinition{
111 Name: "MgcConfigData",
112 ClassID: 155,
113 MessageTypes: mapset.NewSetWith(
114 Create,
115 Delete,
116 Get,
117 Set,
118 ),
119 AllowedAttributeMask: 0xffe0,
120 AttributeDefinitions: AttributeDefinitionMap{
121 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
122 1: Uint16Field("PrimaryMgc", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
123 2: Uint16Field("SecondaryMgc", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
124 3: Uint16Field("TcpUdpPointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
125 4: ByteField("Version", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
126 5: ByteField("MessageFormat", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
127 6: Uint16Field("MaximumRetryTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
128 7: Uint16Field("MaximumRetryAttempts", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
129 8: Uint16Field("ServiceChangeDelay", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
130 9: MultiByteField("TerminationIdBase", OctetsAttributeType, 0x0080, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 9),
131 10: Uint32Field("Softswitch", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
132 11: Uint16Field("MessageIdPointer", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 11),
133 },
134 Access: CreatedByOlt,
135 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600136 Alarms: AlarmMap{
137 0: "Timeout",
138 },
Chip Boling6e27b352020-02-14 09:10:01 -0600139 }
140}
141
142// NewMgcConfigData (class ID 155) creates the basic
143// Managed Entity definition that is used to validate an ME of this type that
144// is received from or transmitted to the OMCC.
145func NewMgcConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
146 return NewManagedEntity(*mgcconfigdataBME, params...)
147}