blob: dcacc6baeaf4c1fbb7c7bb583265a111ceff20b6 [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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 */
Himani Chawlaac1f5ad2021-02-04 21:21:54 +053017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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
mpagenko836a1fd2021-11-01 16:12:42 +000030const MgcConfigDataClassID = ClassID(155) // 0x009b
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var mgcconfigdataBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// MgcConfigData (Class ID: #155 / 0x009b)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// 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
mpagenko836a1fd2021-11-01 16:12:42 +000046// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
47// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000048//
49// Primary Mgc
mpagenko836a1fd2021-11-01 16:12:42 +000050// This attribute points to a network address ME that contains the name (IP-address or resolved
51// name) of the primary MGC that controls the signalling messages. The port is optional and
52// defaults to 2944 for text message formats and 2955 for binary message formats. (R,-W,
Holger Hildebrandtfa074992020-03-27 15:42:06 +000053// setbycreate) (mandatory) (2-bytes)
54//
55// Secondary Mgc
mpagenko836a1fd2021-11-01 16:12:42 +000056// This attribute points to a network address ME that contains the name (IP-address or resolved
57// name) of the secondary or backup MGC that controls the signalling messages. The port is optional
58// and defaults to 2944 for text message formats and 2955 for binary message formats. (R,-W,
59// setbycreate) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000060//
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
mpagenko836a1fd2021-11-01 16:12:42 +000066// This integer attribute reports the version of the Megaco protocol in use. The ONU should deny an
67// attempt by the OLT to set or create a value that it does not support. The value 0 indicates that
68// no particular version is specified. (R,-W, setbycreate) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000069//
70// Message Format
mpagenko836a1fd2021-11-01 16:12:42 +000071// This attribute defines the message format. Valid values are as follows.
72//
73// 0 Text long
74//
75// 1 Text short
76//
77// 2 Binary
78//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000079// The default value is recommended to be 0. (R,-W, setbycreate) (mandatory) (1-byte)
80//
81// Maximum Retry Time
mpagenko836a1fd2021-11-01 16:12:42 +000082// This attribute specifies the maximum retry time for MGC transactions, in seconds. The default
83// value 0 specifies vendor-specific implementation. (R,-W) (optional) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000084//
85// Maximum Retry Attempts
mpagenko836a1fd2021-11-01 16:12:42 +000086// This attribute specifies the maximum number of times a message is retransmitted to the MGC. The
87// recommended default value 0 specifies vendor-specific implementation. (R,-W, setbycreate)
88// (optional) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000089//
90// Service Change Delay
mpagenko836a1fd2021-11-01 16:12:42 +000091// This attribute specifies the service status delay time for changes in line service status. This
92// attribute is specified in seconds. The default value 0 specifies no delay. (R,-W) (optional)
93// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000094//
95// Termination Id Base
mpagenko836a1fd2021-11-01 16:12:42 +000096// This attribute specifies the base string for the ITU-T H.248 physical termination ID(s) for this
97// ONU. This string is intended to uniquely identify an ONU. Vendor-specific termination
98// identifiers (port IDs) are optionally added to this string to uniquely identify a termination on
99// a specific ONU. (R,-W) (optional) (25-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000100//
101// Softswitch
mpagenko836a1fd2021-11-01 16:12:42 +0000102// This attribute identifies the gateway softswitch vendor. The format is four ASCII coded
103// alphabetic characters [A..Z] as defined in [ATIS0300220]. A value of four null bytes indicates
104// an unknown or unspecified vendor. (R,-W, setbycreate) (mandatory) (4-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000105//
106// Message Id Pointer
mpagenko836a1fd2021-11-01 16:12:42 +0000107// This attribute points to a large string whose value specifies the message identifier string for
108// ITU-T H.248 messages originated by the ONU. (R, W, setbycreate) (optional) (2 bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000109//
110type MgcConfigData struct {
111 ManagedEntityDefinition
112 Attributes AttributeValueMap
113}
114
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000115// Attribute name constants
116
117const MgcConfigData_PrimaryMgc = "PrimaryMgc"
118const MgcConfigData_SecondaryMgc = "SecondaryMgc"
119const MgcConfigData_TcpUdpPointer = "TcpUdpPointer"
120const MgcConfigData_Version = "Version"
121const MgcConfigData_MessageFormat = "MessageFormat"
122const MgcConfigData_MaximumRetryTime = "MaximumRetryTime"
123const MgcConfigData_MaximumRetryAttempts = "MaximumRetryAttempts"
124const MgcConfigData_ServiceChangeDelay = "ServiceChangeDelay"
125const MgcConfigData_TerminationIdBase = "TerminationIdBase"
126const MgcConfigData_Softswitch = "Softswitch"
127const MgcConfigData_MessageIdPointer = "MessageIdPointer"
128
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000129func init() {
130 mgcconfigdataBME = &ManagedEntityDefinition{
131 Name: "MgcConfigData",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000132 ClassID: MgcConfigDataClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000133 MessageTypes: mapset.NewSetWith(
134 Create,
135 Delete,
136 Get,
137 Set,
138 ),
139 AllowedAttributeMask: 0xffe0,
140 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000141 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
142 1: Uint16Field(MgcConfigData_PrimaryMgc, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
143 2: Uint16Field(MgcConfigData_SecondaryMgc, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
144 3: Uint16Field(MgcConfigData_TcpUdpPointer, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
145 4: ByteField(MgcConfigData_Version, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
146 5: ByteField(MgcConfigData_MessageFormat, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
147 6: Uint16Field(MgcConfigData_MaximumRetryTime, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
148 7: Uint16Field(MgcConfigData_MaximumRetryAttempts, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
149 8: Uint16Field(MgcConfigData_ServiceChangeDelay, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
150 9: MultiByteField(MgcConfigData_TerminationIdBase, OctetsAttributeType, 0x0080, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 9),
151 10: Uint32Field(MgcConfigData_Softswitch, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
152 11: Uint16Field(MgcConfigData_MessageIdPointer, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 11),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000153 },
154 Access: CreatedByOlt,
155 Support: UnknownSupport,
Himani Chawlaac1f5ad2021-02-04 21:21:54 +0530156 Alarms: AlarmMap{
157 0: "Timeout",
158 },
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000159 }
160}
161
162// NewMgcConfigData (class ID 155) creates the basic
163// Managed Entity definition that is used to validate an ME of this type that
164// is received from or transmitted to the OMCC.
165func NewMgcConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
166 return NewManagedEntity(*mgcconfigdataBME, params...)
167}