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