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