V 10
1
LANG:1 8 (NoName)
PANEL,258 100 693 491 N "_3DFace" 0
EEE E E 1 -1 -1 0  15 32
"" 0 1
E"/** This function retrieves the installed components from the PVSS database and 
fills the graphic table - \"tblInstalledComponents\"

@author M.Sliwinski
*/

fwInstallation_getInstalledComponents()
{
	dyn_string dynComponentNames;
	dyn_string systemName_Component;
	dyn_string dataPointTypes;
	
	string componentName;
	string componentVersion;
	bool requiredInstalled; 
	string descFile;
	string installationDirectory;
	shape shape_destinationTable;
	bool isItSubComponent;
	
	int row, column;
	int i;	

	// get shape of the graphic table	
	shape_destinationTable = getShape(\"tblInstalledComponents\");
	
	// clear the table
	shape_destinationTable.deleteAllLines();
	
	// get existing data point types
	dataPointTypes = dpTypes();
	
	// check whether the \"_FwInstallationComponents\" dpt exists
	if(dynContains(dataPointTypes, \"_FwInstallationComponents\") > 0)
	{
		// get the names of all installed components
		dynComponentNames = dpNames(\"*\", \"_FwInstallationComponents\");
		
		for ( i = 1; i <= dynlen(dynComponentNames); i++)
		{
			
			// remove the system name from the component name
			dynComponentNames[i] = dpSubStr( dynComponentNames[i], DPSUB_DP );
			
			// delete the fwInstallation_ prefix from the component name
			strreplace(dynComponentNames[i], \"fwInstallation_\" , \"\");
			
			// get the component name			
			componentName = dynComponentNames[i];
			
			// get the component version
			if(dynlen(dpNames(\"*.componentVersionString\",\"_FwInstallationComponents\")) == 0)		
			{
				dpGet(\"fwInstallation_\" + componentName + \".componentVersion:_original.._value\", componentVersion);
			} else {
				dpGet(\"fwInstallation_\" + componentName + \".componentVersionString:_original.._value\", componentVersion);
			}			
			// get the information - are the required components installed
			dpGet(\"fwInstallation_\" + componentName + \".requiredInstalled:_original.._value\", requiredInstalled);
			
			// check if it is the sub component
			dpGet(\"fwInstallation_\" + componentName + \".isItSubComponent:_original.._value\", isItSubComponent);
			
			// if it is the subcomponent
			if(isItSubComponent)
			{
				// this is the sub component - do not display it in the installed components table
			}
			else
			{
				// this is not the sub-component - display it in a graphic table
				shape_destinationTable.appendLine(\"componentName\", componentName, \"componentVersion\", componentVersion);
			}		
			
			// check if the components required by this component are installed
			if(requiredInstalled)
			{
				// do nothing
			}
			else
			{
				// set the colour of the cell into fwAlarmWarnUack colour
				
				getValue(shape_destinationTable, \"currentCell\", row, column);
				shape_destinationTable.currentCell(row, 0); // we set the current cell for the first column
				shape_destinationTable.cellBackCol(\"{255, 255, 51}\");  // the values of Framework colour  fwAlarmWarnUack 

			}
		}
	}	
		
	
}
" 0
 2
"CBRef""1"
"EClose"E
""
DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
LAYER, 0 
1
LANG:1 6 Layer1
2 0
"Text1"
""
1 15 32 E E E 1 E 1 E N "schwarz" E N "_Transparent" E E
 E E
1 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"
main()
{

}" 0
 E 0 1 1 0 1 E U  0 E 17 16 202 38
0 2 0 "s" 0 0 0 192 0 0  17 16
 1
2
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-160-100-100-*-*-iso8859-1|-19,0,0,0,400,0,0,0,0,3,2,1,34,Arial
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-160-100-100-*-*-iso8859-1
0 ""
2
LANG:1 20 Installed Components
LANG:0 11 DP-Funktion
25 2
"tblInstalledComponents"
""
1 -220 -305 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E "/**	if the user double clicks on the componentName column 
the panel with the component details is shown
*/
main()
{	

	int xpos;
	string columnName;
	int columnNr;
	string componentName;
	string descFile = \"\";
	string typeOfDescription = \"PVSSDB\";

	// get shape of the table	
	shape tab = getShape(\"tblInstalledComponents\");
	
	// get the coordinates of current cell	
	getValue(tab, \"currentCell\", xpos, columnNr);
	
	// get the column name
	columnName = tab.currentColumn();

	 if(columnName == \"componentName\")
	 {
		// get the name of a component  
		componentName += tab.cellValueRC(xpos, \"componentName\");
			 
			// display the panel with component details 
	 		ChildPanelOnCentral(\"fwInstallation/fwInstallationComponentDetails.pnl\", \"fwInstallation_ComponentDetails:PVSS\",
			 makeDynString(\"$componentName:\" + componentName, \"$descFile:\" + descFile , \"$typeOfDescription:\" + typeOfDescription, \"$sourceDir:\" + \" \"));
		 }

}" 0

3 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 106 -microsoft windows-Arial-normal-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,400,0,0,0,0,0,0,0,0,Arial
0 ""
28 48 672 472
"/** The table with installed components is filled with the installed components

*/
main()
{
	// get all installed components and display it in a table
	fwInstallation_getInstalledComponents();
}" 0
 "/**	if the user  clicks on the Status column 
the column value is changed ( Delete -> \"\" , or \"\" -> Delete
*/
main(int row, string column, string value)
{
/*		// check the name of column where the user clicked
		if (column == \"colStatus\") 
		{
		
			// check the value of the cell
			if (value == \"Delete\") 
			{
				// set the empty value
				setValue(\"\",\"cellValueRC\",row,\"colStatus\",\" \");
			}
			else 
			{
				// set the Delete value
				setValue(\"\",\"cellValueRC\",row,\"colStatus\",\"Delete\");
			}
		}
*/					
}" 0
 1 0 1 3 1 "componentName" 0 1 0 "s" 1
LANG:1 14 Component Name
E1
LANG:1 0 
 557 "componentVersion" 0 -1 0 "s" 1
LANG:1 7 version
E1
LANG:1 0 
 80 "colStatus" 0 0 0 "s" 1
LANG:1 8 Delete ?
E1
LANG:1 0 
 70 26 26 "" 1 1
LANG:1 2 #1
8 30 1
LANG:1 106 -microsoft windows-Arial-normal-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,400,0,0,0,0,0,0,0,0,Arial
0 ""
0 1 1 3 0
1 0
0
LAYER, 1 
1
LANG:1 6 Layer2
0
LAYER, 2 
1
LANG:1 6 Layer3
0
LAYER, 3 
1
LANG:1 6 Layer4
0
LAYER, 4 
1
LANG:1 6 Layer5
0
LAYER, 5 
1
LANG:1 6 Layer6
0
LAYER, 6 
1
LANG:1 6 Layer7
0
LAYER, 7 
1
LANG:1 6 Layer8
0
0