Using Templates

 

Parameter Block

 

Parameter Block element is the basic grouping unit to construct a TL1 message. A set of parameter blocks forms a parameter group and each parameter block in a parameter group is separated by a colon (:). Each parameter block can have a set of parameters associated with it.

 

Following properties can be defined at the Parameter Block level:

 

Property Description
name Represents a unique name of the parameter block.
type Represents the block type. It can be either list, range, listrange, or compound.
depth Represents the degree of option (including the separator before the parameter block).
description Description text about the parameter block.

 

The Command Set API provides support for creating templates for parameter blocks. By creating templates for parameter blocks, the user can reuse the same parameter block properties at multiple message instances.

 

How to Create a Parameter Block Template

  1. Load a Command Set file and select Templates -> ParameterBlock node from the TL1 Message Tree.

  2. Right-click on the ParameterBlock node and select Add ParameterBlockTemplate item from the drop-down menu.

  3. A New Parameter Block Template dialog opens up. Provide a name for the template and click the OK button. The template gets added to the Message Tree.

  4. Select the template. The right panel displays the parameter block table and parameter table.

  5. Add parameter blocks and their associated parameter properties to the table.

  6. Click the Update button to update the changes.

  7. Click the Save button to save the changes to the file.

Now the parameter block template is created. You can use this template in any of the message definitions by simply selecting the Template Name under parameter block and the appropriate parameter block defined in this template.

 

Parameter

 

Parameter element is a single TL1 Param representing a particular entity in the TL1 device. The parameter can be either name-defined or position-defined. If the parameter is name defined, it will be of the form Name = Value. If the parameter is position-defined, it will be of the form Value. Each parameter in a parameter block is separated by a comma (,).

 

Following properties can be defined at the Parameter level:

 

Property Description
name Represents a unique name of the parameter block.
type Determines the parameter type. It can be position-defined or name-defined.
mode Determines whether the parameter is mandatory or optional in that Parameter Block.
depth Represents the degree of option (including the separator before the parameter).
alias Alternative name for that parameter.
description Description text about that parameter.
datatype Identify whether the parameter is a string, character, integer, or float type.
patternsetname The Pattern Set can contain number of patterns. A pattern defines a way in which a parameter can be represented. This field is optional and if specified, will be used to validate that parameter with corresponding pattern set defined.
wordlist The word list in this glossary contains description about this parameter, or their allowed values. This field is also optional.
range Specifies the minimum and maximum values that a parameter can hold. See Range.
enum Array of values that a parameter can hold. See Enum.

 

The Command Set API also provides support for creating templates for parameters. By creating templates for the parameters, the user can reuse the same parameter properties at multiple parameter block instances.

 

How to Create a Parameter Template

  1. Load a Command Set file and select Templates -> Parameter node from the TL1 Message Tree.

  2. Right-click on the Parameter node and select Add ParameterTemplate item from the drop-down menu.

  3. A New Parameter Template dialog opens up. Provide a name for the template and click the OK button. The template gets added to the Message Tree.

  4. Select the template. The right panel displays the parameter table.

  5. Add parameters and their properties to the table.

  6. Click the Update button to update the changes.

  7. Click the Save button to save the changes to the file.

You can now use this template in any of the parameter block definitions by simply selecting the Template Name under parameter and the appropriate parameter defined in this template.



Copyright © 2012, ZOHO Corp. All Rights Reserved.