Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 5 | * 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 Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 11 | * 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 Boling | 2d51f05 | 2021-02-09 09:04:15 -0600 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 18 | * 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // NetworkDialPlanTableClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Network dial plan table |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const NetworkDialPlanTableClassID = ClassID(145) // 0x0091 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var networkdialplantableBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // NetworkDialPlanTable (Class ID: #145 / 0x0091) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // 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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 44 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 45 | // (2-bytes) |
| 46 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 47 | // 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 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 63 | // Dial Plan Format |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 64 | // 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 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 75 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 76 | // |
| 77 | // Dial Plan Table |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 78 | // 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 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 100 | // (R,-W) (mandatory) (30 * N bytes, where N is the number of dial plans) |
| 101 | // |
| 102 | type NetworkDialPlanTable struct { |
| 103 | ManagedEntityDefinition |
| 104 | Attributes AttributeValueMap |
| 105 | } |
| 106 | |
| 107 | func init() { |
| 108 | networkdialplantableBME = &ManagedEntityDefinition{ |
| 109 | Name: "NetworkDialPlanTable", |
| 110 | ClassID: 145, |
| 111 | MessageTypes: mapset.NewSetWith( |
| 112 | Create, |
| 113 | Delete, |
| 114 | Get, |
| 115 | GetNext, |
| 116 | Set, |
Chip Boling | 2d51f05 | 2021-02-09 09:04:15 -0600 | [diff] [blame] | 117 | SetTable, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 118 | ), |
| 119 | AllowedAttributeMask: 0xfc00, |
| 120 | AttributeDefinitions: AttributeDefinitionMap{ |
| 121 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 122 | 1: Uint16Field("DialPlanNumber", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 123 | 2: Uint16Field("DialPlanTableMaxSize", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 2), |
| 124 | 3: Uint16Field("CriticalDialTimeout", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 125 | 4: Uint16Field("PartialDialTimeout", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 126 | 5: ByteField("DialPlanFormat", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5), |
| 127 | 6: TableField("DialPlanTable", TableAttributeType, 0x0400, TableInfo{nil, 30}, mapset.NewSetWith(Read, Write), false, false, false, 6), |
| 128 | }, |
| 129 | Access: CreatedByOlt, |
| 130 | Support: UnknownSupport, |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | // NewNetworkDialPlanTable (class ID 145) creates the basic |
| 135 | // Managed Entity definition that is used to validate an ME of this type that |
| 136 | // is received from or transmitted to the OMCC. |
| 137 | func NewNetworkDialPlanTable(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 138 | return NewManagedEntity(*networkdialplantableBME, params...) |
| 139 | } |