blob: 59e917f07f0efb5e532e743718e6e21346111792 [file] [log] [blame]
Matteo Scandolof9d43412021-01-12 11:11:34 -08001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Matteo Scandolof9d43412021-01-12 11:11:34 -08005 * 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 Scandolof9d43412021-01-12 11:11:34 -08009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Matteo Scandolof9d43412021-01-12 11:11:34 -080011 * 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 */
Girish Gowdrae2683102021-03-05 08:24:26 -080017/*
Matteo Scandolof9d43412021-01-12 11:11:34 -080018 * 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// NetworkDialPlanTableClassID is the 16-bit ID for the OMCI
29// Managed entity Network dial plan table
Andrea Campanella10426e22021-10-15 17:58:04 +020030const NetworkDialPlanTableClassID = ClassID(145) // 0x0091
Matteo Scandolof9d43412021-01-12 11:11:34 -080031
32var networkdialplantableBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// NetworkDialPlanTable (Class ID: #145 / 0x0091)
Matteo Scandolof9d43412021-01-12 11:11:34 -080035// The network dial plan table ME is optional for ONUs providing VoIP services. This ME is used to
36// provision dial plans from the OLT. Instances of this ME are created and deleted by the OLT. If a
37// non-OMCI interface is used to manage SIP for VoIP, this ME is unnecessary.
38//
39// Relationships
40// An instance of this ME may be associated with one or more instances of the SIP user data ME.
41//
42// Attributes
43// Managed Entity Id
Andrea Campanella10426e22021-10-15 17:58:04 +020044// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
Matteo Scandolof9d43412021-01-12 11:11:34 -080045// (2-bytes)
46//
Andrea Campanella10426e22021-10-15 17:58:04 +020047// Dial Plan Number
48// This attribute indicates the current number of dial plans in the dial plan table. (R)
49// (mandatory) (2-bytes)
50//
51// Dial Plan Table Max Size
52// This attribute defines the maximum number of dial plans that can be stored in the dial plan
53// table. (R, setbycreate) (mandatory) (2-bytes)
54//
55// Critical Dial Timeout
56// This attribute defines the critical dial timeout for digit map processing, in milliseconds. The
57// recommended default value is 4000-ms. (R,-W, setbycreate) (mandatory) (2-bytes)
58//
59// Partial Dial Timeout
60// This attribute defines the partial dial timeout for digit map processing, in milliseconds. The
61// recommended default value is 16000-ms. (R,-W, setbycreate) (mandatory) (2-bytes)
62//
Matteo Scandolof9d43412021-01-12 11:11:34 -080063// Dial Plan Format
Andrea Campanella10426e22021-10-15 17:58:04 +020064// This attribute defines the dial plan format standard that is supported in the ONU for VoIP.
65// Valid values include the following.
66//
67// 0 Not defined
68//
69// 1 ITU-T H.248 format with a specific plan (table entries define the dialling plan)
70//
71// 2 NCS format [b-PKT-SP-NCS ]
72//
73// 3 Vendor-specific format
74//
Matteo Scandolof9d43412021-01-12 11:11:34 -080075// (R,-W, setbycreate) (mandatory) (1-byte)
76//
77// Dial Plan Table
Andrea Campanella10426e22021-10-15 17:58:04 +020078// The table is the digit map that describes the dial plans used by the VoIP service, along with
79// fields to manage the table. An example digit map is the string,
80//
81// (0T|00T|[1-7]xxx|8xxxxxxx|#xxxxxxx|*xx|91xxxxxxxxxx|9011x.T)
82//
83// Each row of the table comprises the following fields:
84//
85// Dial plan ID: The row number, a unique identifier of a dial plan within the dial plan table
86// (1-byte).
87//
88// Action: Remove (0) or add (1) this plan (set action). When a dial plan is being removed, the
89// dial plan token field is not used. (1-byte).
90//
91// Dial plan token: The definition of the dial plan itself. In the previous example, tokens include
92// the strings "0T" and "*xx". Unused trailing bytes may be padded with nulls or ASCII spaces.
93// (28-bytes)
94//
95// NOTE - Due to previously ambiguous documentation, implementations may vary. For
96// interoperability, the OLT should write table entries as documented above, while it is encouraged
97// for the ONU to accept any characters outside the formal grammar as delimiters and to accept the
98// concatenation of rows as a single string that defines a digit map.
99//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800100// (R,-W) (mandatory) (30 * N bytes, where N is the number of dial plans)
101//
102type NetworkDialPlanTable struct {
103 ManagedEntityDefinition
104 Attributes AttributeValueMap
105}
106
Elia Battiston9bfe1102022-02-03 10:38:03 +0100107// Attribute name constants
108
109const NetworkDialPlanTable_DialPlanNumber = "DialPlanNumber"
110const NetworkDialPlanTable_DialPlanTableMaxSize = "DialPlanTableMaxSize"
111const NetworkDialPlanTable_CriticalDialTimeout = "CriticalDialTimeout"
112const NetworkDialPlanTable_PartialDialTimeout = "PartialDialTimeout"
113const NetworkDialPlanTable_DialPlanFormat = "DialPlanFormat"
114const NetworkDialPlanTable_DialPlanTable = "DialPlanTable"
115
Matteo Scandolof9d43412021-01-12 11:11:34 -0800116func init() {
117 networkdialplantableBME = &ManagedEntityDefinition{
118 Name: "NetworkDialPlanTable",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100119 ClassID: NetworkDialPlanTableClassID,
Matteo Scandolof9d43412021-01-12 11:11:34 -0800120 MessageTypes: mapset.NewSetWith(
121 Create,
122 Delete,
123 Get,
124 GetNext,
125 Set,
Girish Gowdrae2683102021-03-05 08:24:26 -0800126 SetTable,
Matteo Scandolof9d43412021-01-12 11:11:34 -0800127 ),
128 AllowedAttributeMask: 0xfc00,
129 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100130 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
131 1: Uint16Field(NetworkDialPlanTable_DialPlanNumber, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
132 2: Uint16Field(NetworkDialPlanTable_DialPlanTableMaxSize, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 2),
133 3: Uint16Field(NetworkDialPlanTable_CriticalDialTimeout, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
134 4: Uint16Field(NetworkDialPlanTable_PartialDialTimeout, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
135 5: ByteField(NetworkDialPlanTable_DialPlanFormat, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
136 6: TableField(NetworkDialPlanTable_DialPlanTable, TableAttributeType, 0x0400, TableInfo{nil, 30}, mapset.NewSetWith(Read, Write), false, false, false, 6),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800137 },
138 Access: CreatedByOlt,
139 Support: UnknownSupport,
140 }
141}
142
143// NewNetworkDialPlanTable (class ID 145) creates the basic
144// Managed Entity definition that is used to validate an ME of this type that
145// is received from or transmitted to the OMCC.
146func NewNetworkDialPlanTable(params ...ParamData) (*ManagedEntity, OmciErrors) {
147 return NewManagedEntity(*networkdialplantableBME, params...)
148}