V 10
1
LANG:1 3 TOP
PANEL,394 206 700 400 N "_3DFace" 4
"$logobj"
"$node"
"$obj"
"$parent"
"//string id;

main()
{
dyn_string symb_ref1_list;
dyn_string children, files;
int i, count, visible;
int row, type, size;
string panel, panel_path, par, domain, obj, top, child, tnode, sys;
int MAX_OBJS = 200;
int x, y;

	addSymbol(myModuleName(),myPanelName(),\"fwFSMuser/logo.pnl\",
		$node+\"_logo\",
		makeDynString($node, $obj),
			5,5,0,1,1);
	addSymbol(myModuleName(),myPanelName(),\"fwFSM/ui/fwAlarmButton.pnl\",
		$node+\"_AlButton\",
		makeDynString(\"$node:\"+$node),
			460,30,0,1,1);
	panelSize(\"\",x, y);
	addSymbol(myModuleName(),myPanelName(),\"fwFSM/ui/fwUiClock.pnl\",
		$node+\"_clock\",
		makeDynString(\"$node:\"+$node),
			x-150,0,0,1,1);
	addSymbol(myModuleName(),myPanelName(),\"fwFSM/ui/fwUiMessage.pnl\",
		$node+\"_message\",
		makeDynString(\"$node:\"+$node),
			0,y-95,0,1,1);
	addSymbol(myModuleName(),myPanelName(),\"fwFSM/ui/fwUiClose.pnl\",
		$node+\"_close\",
		makeDynString(\"$node:\"+$node,\"$obj:\"+$obj,\"$logobj:\"+$logobj),
			x-90,y-45,0,1,1);
	count = 0;
	if($node == $logobj)
	{
//		par = $node;
		setValue(\"topLabel1\",\"text\",\"System\");
	}
	else
	{
//		par = \"\";
		setValue(\"topLabel1\",\"text\",\"Device\");
	}
	top = $parent;
	if(fwFsm_isAssociated($obj))
	{
		domain = fwFsm_getAssociatedDomain($obj);
		obj = fwFsm_getAssociatedObj($obj);
	}
	else
	{
		domain = $node;
		obj = $obj;
	}
	/*
	if(!fwFsm_isDomain(domain))
	{
		PanelOff();
		return;
	}
	*/
	addSymbol(myModuleName(),myPanelName(),
		\"/fwFSM/ui/fwObj.pnl\",
		\"top\",
//		makeDynString(\"$1:\"+domain,\"$2:\"+obj,
//			\"$3:\"+par,\"$4:\"+top),
		makeDynString(\"$domain:\"+domain,\"$obj:\"+obj,\"$logobj:\"+$logobj,
			\"$mode:\"+domain,\"$parent:\"+top),
		130,30,0,1,1);

	if($node == $logobj)
	{
		count = 0;
		for(i=1; i<=dynlen(symb_ref1_list); i++)
		{
			removeSymbol(myModuleName(),myPanelName(),symb_ref1_list[i]);	
		}
		dynClear(symb_ref1_list);
		row=0;
		fwUi_getChildren($node, children);
		type = 0;
		for(i=1; i<=dynlen(children); i++)
		{
			fwFsm_getObjectTreeNode($node,children[i]+\"::\"+children[i], tnode);
			fwFsm_getObjectReferenceSystem(tnode, sys);
			child = fwFsm_getPhysicalDeviceName(sys+\":\"+children[i]);
			symb_ref1_list[i]=\"child\"+i;
			addSymbol(myModuleName(),myPanelName(),
			\"/fwFSM/ui/fwObj.pnl\",
			symb_ref1_list[i],
//			makeDynString(\"$1:\"+$node,\"$2:\"+children[i]+\"::\"+children[i],
//				\"$3:\"+children[i],\"$4:\"+top),
			makeDynString(\"$domain:\"+$node,\"$obj:\"+children[i]+\"::\"+child,
				\"$logobj:\"+children[i]+\"::\"+children[i],
				\"$mode:\"+children[i],\"$parent:\"+top),
			0,100+row,0,1,1);
			row=row+28;
			count++;
			type = 1;
			if(count == MAX_OBJS)
				break;
		}
		children = fwFsm_getDomainLogicalObjects($node);
		for(i=1; i<=dynlen(children); i++)
		{
			if(children[i] != $node)
			{
				fwUi_getVisibility($node,children[i],visible);
				if(visible)
				{
					symb_ref1_list[i]=\"child\"+i;
					addSymbol(myModuleName(),myPanelName(),
						\"/fwFSM/ui/fwObj.pnl\",
						symb_ref1_list[i],
//						makeDynString(\"$1:\"+$node,\"$2:\"+children[i],
//						\"$3:\",\"$4:\"+top),
					makeDynString(\"$domain:\"+$node,\"$obj:\"+children[i],
						\"$logobj:\"+children[i],
						\"$mode:\"+domain,\"$parent:\"+top),
						0,100+row,0,1,1);
					row=row+28;
					count++;
					if(count == MAX_OBJS)
						break;
				}
			}
		}
		children = fwFsm_getDomainDevices($node);
		for(i=1; i<=dynlen(children); i++)
		{
			fwFsm_getObjectTreeNode($node,children[i], tnode);
			fwFsm_getObjectReferenceSystem(tnode, sys);
			child = fwFsm_getLogicalDeviceName(sys+\":\"+children[i]);
			if(child != $node)
			{
				fwUi_getVisibility($node,children[i],visible);
				if(visible)
				{
					symb_ref1_list[i]=\"child\"+i;
					addSymbol(myModuleName(),myPanelName(),
						\"/fwFSM/ui/fwObj.pnl\",
						symb_ref1_list[i],
//						makeDynString(\"$1:\"+$node,\"$2:\"+children[i],
//						\"$3:\",\"$4:\"+top),
						makeDynString(\"$domain:\"+$node,\"$obj:\"+children[i],
							\"$logobj:\"+child,
							\"$mode:\"+domain,\"$parent:\"+top),
							0,100+row,0,1,1);
					row=row+28;
					count++;
					if(count == MAX_OBJS)
						break;
				}
			}
		}
		if(count)
		{
			setValue(\"label1\",\"visible\",1);
			setValue(\"label2\",\"visible\",1);
		}	
	}

	fwUi_getUserPanel($node, $obj, panel);
	if(panel != \"\")
	{
		panel_path = \"\";
		size = getFileSize(PROJ_PATH+\"panels/fwFSMuser/\"+panel);
		if(size != -1)
			panel_path = \"fwFSMuser/\"+panel;
		else
		{
			size = getFileSize(PROJ_PATH+\"panels/\"+panel);
			if(size != -1)
				panel_path = panel;
		}
		if(panel_path != \"\")
		{
			if(count)
			{
				addSymbol(myModuleName(),myPanelName(),panel_path,
					$node+\"_specific\",
					makeDynString($node, $obj),
					360,80,0,1,1);
			}
			else
			{
				addSymbol(myModuleName(),myPanelName(),panel_path,
					$node+\"_specific\",
					makeDynString($node, $obj),
					10,80,0,1,1);
			}
		}
	}
}

" 0
E"main()
{
		PanelOffPanel(\"Modes\");
		PanelOffPanel(\"Description\");
}" 0
 E E 1 -1 -1 0  0 0
"" 0 1
EE 2
"CBRef""0"
"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 1
"topLabel1"
""
1 142 22 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
1 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 142 22 194 38
0 2 2 "s" 0 0 0 192 0 0  142 22
 1
1
LANG:1 73 -adobe-new century schoolbook-bold-r-normal-*-*-140-100-100-*-*-iso8859-1
0 ""
1
LANG:1 6 System
2 3
"topLabel2"
""
1 322 22 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
3 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 322 22 359 38
0 2 2 "s" 0 0 0 192 0 0  322 22
 1
1
LANG:1 73 -adobe-new century schoolbook-bold-r-normal-*-*-140-100-100-*-*-iso8859-1
0 ""
1
LANG:1 5 State
2 4
"label1"
""
1 12 92 E E E 1 E 0 E N "_3DText" E N "_3DFace" E E
 E E
4 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 12 92 96 108
0 2 2 "s" 0 0 0 192 0 0  12 92
 1
1
LANG:1 73 -adobe-new century schoolbook-bold-r-normal-*-*-140-100-100-*-*-iso8859-1
0 ""
1
LANG:1 10 Sub-System
2 6
"label2"
""
1 192 92 E E E 1 E 0 E N "_3DText" E N "_3DFace" E E
 E E
6 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 192 92 229 108
0 2 2 "s" 0 0 0 192 0 0  192 92
 1
1
LANG:1 73 -adobe-new century schoolbook-bold-r-normal-*-*-140-100-100-*-*-iso8859-1
0 ""
1
LANG:1 5 State
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