You have learnt the purpose of "CPUCard" screen in the Designing Shelf Screen topic. This card will be held by the Slot Holder panels present in the Shelf Screen at run time if the Web NMS Database has the card MO of the type property "CPUCard". In this topic, you will learn to design the "CPUCard" screen with port components and a Status Icon bean components. Follow the steps given below to design the "CPUCard" screen.
Providing Port and Card Parameters
Provide the "Number of Distinct Port Types"=1 and "Number. of Ports"=2 in the Card Screen Parameter Panel of the "CPUCard" screen . For explanation on usage, follow the topic Using Card Screen Parameter Panel in Chassis Wizard Documentation.
Configure the screen size with the value "Width"=75 and "Height"=400 (in pixels).
Provide the background image by double-clicking 'CPUCard' screen draw area to invoke the Property Form. In the "backgroundImage" property, select the " eboncpucard.png" in the images folder under the <Client Builder Home>.
Providing Protocol Intelligence for Port Type
Expand the "CPUCard" node to find a port node named "Port_0".
Right-click the Port_0 node to get the Port Pop-up menu. Select the Modify menu item from the Pop-up to invoke Port Configuration dialog.
Browse and select the "eboncpuport.png" for the property "Image File" in the "Component Properties". The image file can be found in images directory under <Client Builder Home> directory.
Switch to "Protocol Properties" tab and change the "Polling Type" to Periodic.
Load the com.adventnet.ebon.chassis.Port .xml device information file available in the <Client Builder Home>/mibs directory with following steps.
Click the load XML/MIB button to invoke the Load XML/MIB dialog.
Select the file type 'Managed Object (*.class)' from the 'File Type' combo box.
Select the com.adventnet.ebon.chassis.Port .xml from the <Client Builder Home>/mibs directory using the Browse button.
Click OK button to close the dialog.
6. Select "status" node of the com.adventnet.ebon.chassis.Port .xml under the "properties" node.
7. Click the show button to select the result method. From 'Result Method' list, select 'setIconResult' with the 'Prototype' 'public void setIconResult( String)'
8. Click OK to close the Port Configuration dialog. In the Card Screen's Draw Area, you can find the Port components 'Port1' and 'Port2'.
9. Right-click the "Port1" port component to get the Bean Pop-up menu. Select the Protocol Property Form-->Client_Port11 (the client property instance) from the Pop-up to invoke Client Property dialog. In the Client Property dialog all the field are inaccessible except the Index/Key field.
10. Provide the value "currentManagedObjectName + "_Port1" in the Index/Key field, because the Port's MO name is suffixed with the Card name. Click OK to close the Client Property dialog.
11. Repeat the above steps 9 and 10 for the “Port2” to provide the index value "currentManagedObjectName + "_Port2".
Dropping Status Icon Bean and Configuring Protocol Intelligence
Click and drop a StatusIcon bean from AdventNetUI.jar tab of Beans Palette in the Draw Area.
Right-click the StatusIcon bean to get the Bean Pop-up menu. Select the Protocol Property Form --> New Client Property from the Pop-up to invoke Client Property dialog.
Load the com.adventnet.ebon.chassis.CPUCard.xml using the load XML/MIB button .
Expand the tree and move the "status" node of the com.adventnet.ebon.chassis.CPUCard.xml under the "properties" node to Selected nodes list. This is to display the status of the Card.
Select the "User Code" radio button and insert the following code in the Code Area.
Click OK to close the Client Property dialog.
Double-click the StatusIcon bean to invoke the Property Form.
Select the Image Icon property and select the 'ebonstatus.png' from the images directory under <Client Builder Home> directory using the browse button . Close the Property Form using Close.
Arrange the components in 'CPUCard' screen by providing the bounds property in the Property Form of each bean component as given in the table below
The design of "CPUCard" screen is complete.