|
4.2 Creating a New TCS file in TL1 Message Builder
4.3.4 Adding Staging Parameter Block
4.3.5 Adding Message Payload Block
4.4 Creating an Autonomous Message
4.5 Saving the created TCS file
TL1 Command Set file contains input message ,output message, and autonomous message definitions, which are to be implemented in the agent for managing an NE. The input message and the autonomous message definitions are stored in XML format in TCS file.
Defining a TL1 Command Set (TCS) file is the first step toward building a TL1 Agent. The TCS is the source for TL1Compiler for generating code for the TL1 Agent for instrumentation, and also the TCS file will be used in TL1Browser to query the agent. TCS file can be created using the TL1 MessageBuilder provided with the toolkit. TL1 Message builder helps to define input message, output message, and autonomous message as per GR831 specification.
In this chapter, you learn how to create a new TCS file with two TL1 Messages - one an input message and the other an autonomous message.
4.2 Creating a New TCS File in TL1 Message Builder
Follow the steps given below to create a new file in the TL1 MessageBuilder.
Open the TL1 MessageBuilder from the <Agent Toolkit Home>/bin directory using the TL1MessageBuilder.bat/sh file. You can also open it from the Launcher.
Choose New option from the File Menu.
Choose Command Set Editor from the dialog box.
Enter the filename and the name of the directory where you would like to save the TCS file and select OK.
Now, you will see the Parent Node (your TCS file name) added under the TL1 Tree in the left frame.
Now, you can start adding the commands for the TCS file as explained in the following sections.
|
|
Note: You can also load any existing TCS file and modify it from the TL1 MessageBuilder. Choose Load option from the File Menu to load an already existing TCS file. |
This section explains you how to add a new input message to the TCS file. Let us consider an example where the data in the memory between two given addresses is to be read. The syntax of the command is as follows:
Syntax: RD-MEM-DATA:<TID>:MemDevType:<CTag>:<General Block>:StartAddr, EndAddr;
Refer to TL1 basics for details about the input message syntax.
Here RD-MEM-DATA is the command code and MemDevType is the Access Identifier (AID) of the device, which is to be accessed for reading the memory details. MemDevType can either be ROM or RAM. RD is the Verb, MEM is the Modifier1, and DATA is the Modifier2 in the command code. The following sections will teach you to add the above command and its parameters in the TCS file using the TL1 MessageBuilder.
Verb identifies the action to be taken at the NE on receiving a TL-1 message from an OS. To add the Verb "RD" for the input message, follow the steps given below.
Select the Parent Node (Your TCS file name) under the TL1 Tree in the left frame of the tool.
Right-click and choose the Add Verb Option. It can also be added by selecting Edit->Add Verb option in the menu bar.
The wizard interface for verb will be opened on the right frame. Enter the following details
Message Type : Input Message
Verb : In this example, the action to be taken by the input command is reading the data from the specified memory device. Hence, we can give the verb name as "RD".
Command Code: Select NO in the Command Code option. In this command, RD-MEM-DATA is the command code; hence, Command Code for the verb RD alone is selected as NO.
After entering the above details, click the OK button. Now the Verb will be added successfully to the TCS file tree.
|
|
Note: For this Command, we shall define AID, MPB, Response Block, and Description in Modifier2. They need to be defined only when Command Code option is selected as Yes. |
The first Modifier identifies where the action is to be applied in the NE. To add the Modifier1 "MEM" for the input message, follow the steps given below. MEM is the memory from which the data is to be read and sent to the TL1 Manager.
Right-click on the VERB "RD" in the TCS file tree for which Modifier1 has to be added.
Choose "Add Modifier1" from the pop-up menu. The wizard interface for Modifier1 opens in the right frame.
Enter the following details:
Modifier : Because we will be getting the memory details ofom the device let us name the Modifier1 as "MEM".
Command Code: Select NO in the Command Code option.
Inherit Option: Select NO as the Inherit option, because there are no details from the Verb that is needed to be inherited by the modifier 1.
|
|
Note: For this Command, we shall define AID, MPB, Response Block, and description in Modifier2. AID, MPB, Response Block, and Description need to be defined only when Command Code option is selected as Yes. |
The second modifier may be used to further define the identity of the object upon which the action is to be taken. Modifier Data is the actual data that is to be read from the memory device. To add the Modifier2 "DATA" for the input message, follow the steps given below.
Right-click on the Modifier1 "MEM" in the TCS file tree for which Modifier2 has to be added.
Choose "Add Modifier2" from the pop-up menu. The wizard interface for Modifier2 opens in the right frame.
Enter the following details:
Modifier : Because we will be reading the data from the memory specified, let us name the Modifier2 as "DATA"
Command Code: Select YES in the Command Code option.
Inherit Option: Select NO as the Inherit option, because there are no details from the Modifier1 that is needed to be inherited by the Modifier2.
Description: Add the required description in this block. For example, add the below text in the block "This command reads the data between the two given memory addresses from the specified memory device" .
Adding AID, MPB, Resp Block, and description for the input message are dealt with in the next three sections.
4.3.4 Adding Staging Parameter Block
Access Identifier Block(AID): AID is used to uniquely identify the entity, within the target NE, to be acted upon by the input message to the NE. In this example, The data can be read from either of the two memory devices ROM or RAM. Hence, we can name the AID as "MemDevType".
|
|
Note: AID will be added in the Modifer2 in this example as mentioned earlier. |
Follow the steps given below to add the parameter MemDevType in the AID Block.
Click the "..." button next to the AID Block.
Enter the first parameter Name of the Response Block as "MemDevType".
Choose parameter Type as "String".
Choose Seperator as " "(An empty space).
After entering the above details, click the "Add" button.You will find the new parameter added to the AID Block.
Click the OK button to finish adding the AID block.
4.3.5 Adding Message Payload Block
Message Payload Block indicates the subject matter of the message. In this example, we will be entering the starting address and the ending address of the memory, between which we will be requiring the data to read from, in the Message Payload Block. Hence, the Message Payload Block Parameters are "StartAddr" and "EndAddr". Follow the steps given below to add the parameters to the Message Payload Block.
Click the "..." button next to the Message Payload Block.
Click Add Block button.
Enter the first parameter Name of the Response Block as "StartAddr".
Choose parameter Type as "Integer".
Select EQ_VAL as "false". If true is selected , the parameter should be given as name=value in input message.
Click the "Add" button.
You will find the new parameter added to the Message Payload Block. The other parameter
"EndAddr" can be added to the Message Payload Block in a similar manner.
When RD-MEM-DATA command is sent to the TL1 Agent, the Agent must respond with the data between the given memory address for the device given in the AID block. Hence, the response block has to be defined. The response block has the following information.
addr
memdata
The syntax of the response is as follows:
|
<cr><lf><lf> ^^^<rsphdr><cr><lf> M^^<ctag>^COMPLD<cr><lf> ^^^"<addr>,<memdata>"<cr><lf> ; |
|
|
Note: ^ represents Blank Space |
Following are the steps involved in adding the Response Block.
Click the "..." button next to the Response block.
Choose response type as Quote and click on Add Block.
Enter the first parameter Name of the Response Block as "addr".
Choose parameter Type as "String".
Select EQ_VAL as "True". If true is selected, the response will be displayed in Name=Value format.
Choose Delimiter as ",". This will enable more parameters to be added to the Response Block.
Click the "Add" button.
You will find the new parameter added to the Response Block. The other parameter "memdata" can be added to the Response Block in a similar manner.
After entering all the above explained details for Verb, Modifier1, and Modifier2, click the OK button. The new command code will be created successfully in the TCS file.
4.4 Creating an Autonomous Message
This section explains how to add an Autonomous Message to the TCS file. Let us consider an example where an alarm message will be sent by the NE/NS to the Agent, indicating the administrator the occurrence of a particular event.
The syntax of the autonomous message is as follows:
|
<cr><lf><lf> ^^^<rsphdr><cr><lf> <almcode>^<atag>^REPT^ALM^SECU<cr><lf> ^^^"<AID>,<NOTICODE>,<SECUALMTYPE>"<cr><lf> ; |
Here, REPT-ALM-SECU is the autonomous message code. REPT is the Verb that reports the event, ALM is the Modifier1 indicating that an Alarm is being sent, and SECU is the Modifier2 in the command code that stands for security. The following sections will teach you to add the above command and its parameters in the TCS file using the TL1 MessageBuilder.
To add the Verb "REPT" for the Autonomous Message, follow the steps given below.
Select the Parent Node (Your TCS filename) under the TL1 Tree in the left frame of the tool.
Right-click and choose the Add Verb Option.
The wizard interface for verb will be opened on the right frame.
Enter the following details:
Message Type : "Autonomous Message"
Verb : Give the verb name as "REPT" that stands for REPORT.
Command Code: Select NO in the Command Code option. In this autonomous message, REPT^MEM^DATA is the message code; hence, Command Code for the verb REPT alone is selected as NO
After entering the above details, click the OK button. Now, the Verb will be added successfully to the TCS file tree.
|
|
Note: For this Command, we shall define the Response Block and description in Modifier1. Response Block is to be defined only when Command Code option is selected as Yes. |
To add the Modifier1 "ALM" for the autonomous message, follow the steps given below.
Right-click on the Verb "REPT" in the TCS file tree for which Modifier1 has to be added.
Choose "Add Modifier1" from the pop-up menu. The wizard interface for Modifier1 opens in the right frame.
Enter the following details:
Modifier : Because we will be reporting an alarm message, enter the Modifier1 as "ALM".
Command Code: Select YES in the Command Code option.
Inherit Option: Select NO as the Inherit option, because there are no details from the Verb that is needed to be inherited by the Modifier1.
|
|
Note: For this Command, we have to define the Response Block and description in Modifier1 since Command Code option is YES. Adding Response Block for this example Autonomous message is explained in chapter 4.4.4. |
To add the Modifier2 "SECU" for the Autonomous Message, follow the steps given below.
Right-click on the Modifier1 "ALM" in the TCS file tree for which Modifier2 has to be added.
Choose "Add Modifier2" from the pop-up menu. The wizard interface for Modifier1 opens in the right frame.
Enter the following details:
Modifier : Enter the name of the Modifier2 as "SECU".
Command Code: Select NO in the Command Code option.
Inherit Option: Select YES as the Inherit option. This will inherit the Response Block details from the Modifier1.
Adding Response Block for the autonomous message is dealt with in the following section.
The response block has the following information.
AID: It is the AID of the NE from where the Autonomous message originated.
NOTICODE: This is the actual information of the Autonomous Message
SECUALMTYPE: This is the type of the security-related alarm. It can be minor, major, or critical.
Following are the steps involved in adding the Response Block
Click the "..." button next to the Response block
Choose response type as Quote and click Add Block. >
Enter the first parameter Name of the Response Block as "SECUALMTYPE".
Choose parameter Type as "String".
Select EQ_VAL as "True". If true is selected the response will be displayed in Name=Value format.
Choose <span style="font-weight: bold;">Delimiter as ",". This will enable more parameters to be added to the Response Block.
After entering the above details, click the "Add" button.
You will find the new parameter added to the Response Block. The other parameters AID and NOTICODE can be added to the Response Block in a similar manner.
After entering all the above explained details for Verb, Modifier1, and Modifier2, click the OK button. The new autonomous message will be created successfully in the TCS file.
4.5 Saving the Created TCS File
After adding the two command codes: one Input message and one Autonomous message, save the file using the File>>Save option in the Menu Bar or press CNTRL+S. The New TCS file is created and can be used in the TL1 Compiler for code generation and compilation as explained in the next topics.
|