(saveFormat "2.0")
(date "Tue 19/Dec/1995 09:23:51 MST")
(veerev "3.2")
(platform "HP9000s700")
(SaveCF no)
(filterNAN 0)
(component 0 ROOTCONTEXT
 (name "Compiled Function Example")
 (implementation
  (retainGlobals YES)
  (locked no)
  (trigMode deg)
  (nextID 9)
  (component 0 IMPORT
   (name "Import Library")
   (interface
	(input 1
	 (type control)
	 (name "File Name")
	 (tag "File Name")
	 (requires
	  (datatype Text)
	  (shape "Scalar")
	 )
	 (lock name constraints)
	 (optional yes)
	)
   )
   (implementation
	(libType "DLL")
	(libName "myLibrary")
	(fileName "~installDir/examples/manual/manual49.dll")
	(defnFileName "~installDir/examples/manual/manual49.h")
   )
  )
  (component 1 VFUNCTIONGENERATOR
   (interface
	(output 1
	 (name "Func")
	 (lock name constraints)
	)
   )
   (implementation
	(function Cosine)
	(frequency 100)
	(amplitude 1)
	(dcOffset 0)
	(phaseShift 0)
	(numPoints 256)
	(interval 0.02)
	(degRad Deg)
	(errorOnAlias 1)
   )
  )
  (component 2 FORMULA
   (name "totSize(x)")
   (interface
	(input 1
	 (name "X")
	 (optional yes)
	)
	(output 1
	 (name "Result")
	 (lock name constraints)
	)
   )
   (implementation
	(expr 1 "totSize(x)")
   )
  )
  (component 3 CALL
   (name "Call Function")
   (interface
	(input 1
	 (name "arraySize")
	 (requires
	  (datatype Int32)
	 )
	 (optional yes)
	)
	(input 2
	 (name "array")
	 (requires
	  (datatype Real)
	 )
	 (optional yes)
	)
	(output 1
	 (name "Ret Value")
	 (lock name constraints)
	 (optional yes)
	)
	(output 2
	 (name "array")
	 (lock name constraints)
	 (optional yes)
	)
   )
   (implementation
	(callFunc "myFunc")
	(parmMode "rev2x_22rules")
   )
  )
  (component 4 YPLOT
   (name "XY Trace")
   (interface
	(input 1
	 (name "Trace1")
	 (lock constraints)
	)
	(input 2
	 (name "Trace2")
	 (lock constraints)
	 (optional yes)
	)
	(input 3
	 (type control)
	 (name "Auto Scale")
	 (lock name constraints)
	 (optional yes)
	)
   )
   (implementation
	(tracePin 1)
	(tracePin 2)
	(graphMode rectangular)
   )
  )
  (component 5 FORMULA
   (interface
	(input 1
	 (name "A")
	 (optional yes)
	)
	(input 2
	 (name "B")
	 (optional yes)
	)
	(output 1
	 (name "Result")
	 (lock name constraints)
	)
   )
   (implementation
	(expr 1 "b[0:a-1]")
   )
  )
  (component 6 CONTEXT
   (name "Press For")
   (description2 10
	"This User Object is the outermost \"context\""
	"for the InfoAbout help device.  Within this"
	"device is the pop-up panel containing the info"
	"Notepad.  If all you can see is a device with"
	"\"Press For\", you should double-click the left"
	"mouse button on the Press For to restore the"
	"Panel View of the device.  To see how this device"
	"operates, click on the Info About button first,"
	"then press the Detail button in the \"Press For\""
	"title bar."
   )
   (implementation
	(locked no)
	(trigMode deg)
	(nextID 4)
	(component 0 TOGGLE25
	 (name "Info About")
	 (description2 24
	  "This is a toggle device with the name changed to"
	  "reflect it\'s function.  The output of the device"
	  "is \"0\" when the button is up, and \"1\" when the"
	  "button is down.  "
	  ""
	  "A Reset Control Input terminal has been added to"
	  "to always pop the button back out after showing"
	  "the pop-up help (Info About This Example) User"
	  "Object."
	  ""
	  "The Toggle has set the \"AutoExecute\" option to let"
	  "it operate even when the RUN button in the title"
	  "bar has not been pressed.  Note, however, that"
	  "AutoExecute only works when no other threads are"
	  "operating, either from their Start buttons or from"
	  "the RUN button."
	  ""
	  "To allow the Toggle to operate when other threads"
	  "are running, an Until Break device repeatedly lets"
	  "the Toggle device output it\'s current value (based"
	  "on the button state) to the If/Then.  Thus, when"
	  "RUN is pressed, the InfoAbout toggle output is"
	  "still monitored for \"1\"."
	  ""
	 )
	 (interface
	  (input 1
	   (type control)
	   (name "Reset")
	   (lock name constraints)
	   (optional yes)
	  )
	  (output 1
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (value Int32
	   (data  0)
	  )
	  (autoTrigger on)
	  (initValue Int32
	   (data  0)
	  )
	 )
	)
	(component 2 CONTEXT
	 (name "Info About This Example")
	 (description2 10
	  "This is a User Object that has both a detail view"
	  "and a Panel view.  If this device is visible as"
	  "an icon, you must double-click the left mouse"
	  "button to \"open up\" the non-iconic view."
	  ""
	  "Since the User Object has both a Panel and Detail"
	  "view, when you double-click on the icon, you will"
	  "first see the Panel view.  To see the components"
	  "of the User Object, press the Detail button in"
	  "the \"Info About This Example\" title bar."
	 )
	 (implementation
	  (locked no)
	  (trigMode deg)
	  (nextID 4)
	  (popupMoveable)
	  (component 0 NOTE
	   (name "NotePad")
	   (description2 11
		"This notepad is displayed as a Show on Execute"
		"panel to present the information to the reader."
		""
		"It has been \"Added to Panel\" of the \"Info About"
		"This Example\" user object, thus it is not "
		"necessary to keep it as an open device inside the"
		"Detail view; you can edit the notepad from the"
		"Panel view of this User Object.  You can also"
		"set/clear the \"Enable Edit\" flag in this Notepad\'s"
		"Object Menu to keep the pop-up notepad from being"
		"altered by the user."
	   )
	   (implementation
		(text2 17
		  "Overview:"
		  "  This program illustrates how to Import and Call a Compiled Function."
		  ""
		  "Details:"
		  "  This program calls a compiled function called myFunc.  MyFunc requires a long "
		  "  which specifies the size of an array and a pointer to an array of reals.  "
		  "  The definition file is manual49.h, and the source file is manual49.c.  "
		  "  MyFunc adds 1 to every element of the arrray."
		  ""
		  "  Before the first call to the compiled function the shared library must be "
		  "  loaded using the Import object.  The Function Generator object is used to "
		  "  create a waveform which is connected to the array input of myFunc, and "
		  "  totSize is used to get the size of the waveform.  Both the original and the "
		  "  new array are connected to the XY trace object to display both arrays."
		  ""
		  "  To run the program, press Run and notice the two traces in the display.  "
		  "  Trace 2 is 1 greater at every point than trace 1."
		)
	   )
	  )
	  (component 1 CONFIRM25
	   (name "DONE")
	   (description2 7
		"This tiny \"thread\" begins running when the "
		"enclosing UserObject is executed.  When the user"
		"acknowledges the OK/DONE button, there is nothing"
		"left to execute, so the thread ends.  Since there"
		"are not other threads running, the User Object"
		"is completed and will exit, removing the Show on"
		"Execute pop-up display."
	   )
	   (interface
		(output 1
		 (name "Go")
		 (lock name constraints)
		)
	   )
	   (implementation
		(component enterButton yes)
		(component escapeButton yes)
	   )
	  )
	  (configuration
	  )
	  (ShowOnExecPanel
	   (geometry 3 33 810 477)
	   (panel
		(geometry 77 172 806 456)
		(widget 0 detail
		 (title off)
		 (borderStyle flat)
		 (geometry 83 177 795 393)
		 (editing disabled)
		)
		(widget 1 detail
		 (title off)
		 (borderStyle flat)
		 (geometry 444 578 69 36)
		)
	   )
	  )
	 )
	)
	(component 3 IFTHENELSE
	 (name "!= 0")
	 (description2 10
	  "This device tests the value of the data input"
	  "and either executes the \"Info About This Device\""
	  "User object when the input is \"1\", or terminates"
	  "the current iteration of the Until Break device."
	  ""
	  "If no threads are running, the Toggle can generate"
	  "it\'s output data whenever the button is changed"
	  "(using the Toggle\'s AutoExecute mode).  In this"
	  "case, either the User Object is executed or the"
	  "Autoexecute sequence terminates."
	 )
	 (interface
	  (input 1
	   (name "A")
	   (optional yes)
	  )
	  (output 1
	   (name "Then")
	   (lock name constraints)
	  )
	  (output 2
	   (name "Else")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (expr "a!=0")
	 )
	)
	(configuration
	 (connect D2:0 D0:1)
	 (connect D2:1 D1:0)
	 (connect D0:1 D2:1)
	)
   )
  )
  (component 7 NOTE
   (implementation
   )
  )
  (component 8 CONTEXT
   (name "Shared Library Name")
   (interface
	(output 1
	 (type data)
	 (name "Name")
	 (lock constraints)
	 (optional yes)
	)
   )
   (implementation
	(locked no)
	(trigMode deg)
	(nextID 17)
	(component 0 FORMULA
	 (name "whichos()")
	 (interface
	  (output 1
	   (name "Result")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (expr 1 "whichos()")
	 )
	)
	(component 1 IFTHENELSE
	 (interface
	  (input 1
	   (name "A")
	   (optional yes)
	  )
	  (output 1
	   (name "Then")
	   (lock name constraints)
	  )
	  (output 2
	   (name "Else If")
	   (lock name constraints)
	  )
	  (output 3
	   (name "Else If")
	   (lock name constraints)
	  )
	  (output 4
	   (name "Else If")
	   (lock name constraints)
	  )
	  (output 5
	   (name "Else If")
	   (lock name constraints)
	  )
	  (output 6
	   (name "Else")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (expr "a==\"Windows\"")
	  (expr "a==\"HP-UX\"")
	  (expr "a==\"SunOS\"")
	  (expr "a==\"Windows_NT\"")
	  (expr "a==\"Windows_95\"")
	 )
	)
	(component 6 JUNCTION
	 (name "JCT")
	 (interface
	  (input 1
	   (name "A")
	   (lock name constraints)
	  )
	  (input 2
	   (name "B")
	   (lock name constraints)
	  )
	  (input 3
	   (name "C")
	   (optional yes)
	  )
	  (input 4
	   (name "D")
	   (optional yes)
	  )
	  (input 5
	   (name "E")
	   (optional yes)
	  )
	  (output 1
	   (name "Data")
	   (lock name constraints)
	  )
	 )
	)
	(component 7 FORMULA
	 (name "shared library")
	 (interface
	  (input 1
	   (name "ext")
	   (optional yes)
	  )
	  (output 1
	   (name "Result")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (expr 1 "\"~installDir/examples/manual/manual49.\"+ext")
	 )
	)
	(component 9 LITERALCONSTANT
	 (interface
	  (output 1
	   (name "Text")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (value Text
	   (data  "dll")
	  )
	  (initValue Text
	   (data  "")
	  )
	 )
	)
	(component 12 LITERALCONSTANT
	 (interface
	  (output 1
	   (name "Text")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (value Text
	   (data  "sl")
	  )
	  (initValue Text
	   (data  "")
	  )
	 )
	)
	(component 13 LITERALCONSTANT
	 (interface
	  (output 1
	   (name "Text")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (value Text
	   (data  "so")
	  )
	  (initValue Text
	   (data  "")
	  )
	 )
	)
	(component 14 LITERALCONSTANT
	 (interface
	  (output 1
	   (name "Text")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (value Text
	   (data  "dll")
	  )
	  (initValue Text
	   (data  "")
	  )
	 )
	)
	(component 16 LITERALCONSTANT
	 (interface
	  (output 1
	   (name "Text")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (value Text
	   (data  "dll")
	  )
	  (initValue Text
	   (data  "")
	  )
	 )
	)
	(configuration
	 (connect D0:1 D1:1)
	 (connect D4:1 D2:1)
	 (connect D5:1 D2:2)
	 (connect D6:1 D2:3)
	 (connect D7:1 D2:4)
	 (connect D8:1 D2:5)
	 (connect D2:1 D3:1)
	 (connect D1:1 D4:0)
	 (connect D1:2 D5:0)
	 (connect D1:3 D6:0)
	 (connect D1:4 D7:0)
	 (connect D1:5 D8:0)
	 (connect D3:1 O1:1)
	)
   )
  )
  (configuration
   (connect D8:0 D0:0)
   (connect D8:1 D0:1)
   (connect D0:0 D1:0)
   (connect D1:1 D2:1)
   (connect D2:1 D3:1)
   (connect D1:1 D3:2)
   (connect D1:1 D4:1)
   (connect D5:1 D4:2)
   (connect D4:0 D4:3)
   (connect D3:1 D5:1)
   (connect D3:2 D5:2)
  )
 )
 (viewFor -1
  (active detail)
  (detail
   (geometry 0 53 900 447)
   (configuration
	(viewFor 0
	 (active detail)
	 (icon
	 )
	 (detail
	  (geometry 29 257 443 107)
	 )
	)
	(viewFor 1
	 (active detail)
	 (icon
	  (geometry 94 388 172 64)
	  (iconImage "virtual.icn")
	 )
	 (detail
	  (geometry 145 451 201 198)
	 )
	 (terminals on)
	)
	(viewFor 2
	 (active icon)
	 (icon
	  (geometry 445 458 110 25)
	 )
	 (detail
	  (geometry 443 139 124 62)
	 )
	 (terminals on)
	)
	(viewFor 3
	 (active detail)
	 (icon
	 )
	 (detail
	  (geometry 519 555 202 91)
	 )
	 (terminals on)
	)
	(viewFor 4
	 (active detail)
	 (icon
	  (iconImage "display.icn")
	 )
	 (detail
	  (geometry 622 190 317 281)
	  (displayMode scrollGraph)
	  (graphType cartesian)
	  (gridType grid)
	  (scale 0
	   (name "Y name")
	   (domainName "X name")
	   (pen 9)
	   (show 1)
	   (range -1 2 4 linear)
	  )
	  (domain 0 0.02 4 linear)
	  (trace 0 onScale 0
	   (name "Trace1")
	   (pen 4)
	   (lineType 1)
	   (pointType 0)
	  )
	  (trace 1 onScale 0
	   (name "Trace2")
	   (pen 7)
	   (lineType 1)
	   (pointType 0)
	  )
	 )
	)
	(viewFor 5
	 (active icon)
	 (icon
	  (geometry 851 568 78 64)
	  (iconImage "formula.icn")
	 )
	 (detail
	  (geometry 412 478 106 104)
	 )
	 (terminals on)
	)
	(viewFor 6
	 (active panel)
	 (icon
	  (geometry 2315 3828 110 25)
	 )
	 (panel
	  (geometry 61 62 319 77)
	  (widget 0 detail
	   (title off)
	   (borderStyle flat)
	   (geometry 164 80 114 39)
	   (scaled on)
	   (format button)
	  )
	 )
	 (detail
	  (geometry 34 95 912 591)
	  (configuration
	   (viewFor 0
		(active detail)
		(icon
		 (geometry -40 -7 81 15)
		)
		(detail
		 (geometry 233 321 114 39)
		 (scaled on)
		 (format button)
		)
		(title off)
	   )
	   (viewFor 2
		(active icon)
		(icon
		 (geometry 372 388 217 25)
		)
		(detail
		 (geometry 17 70 866 520)
		 (configuration
		  (viewFor 0
		   (active detail)
		   (icon
			(geometry 440 416 78 25)
		   )
		   (detail
			(geometry 26 122 848 437)
			(editing disabled)
		   )
		  )
		  (viewFor 1
		   (active detail)
		   (icon
			(geometry -22 -7 45 15)
		   )
		   (detail
			(geometry 421 392 58 37)
		   )
		   (title off)
		  )
		 )
		 (stackingOrder 1 0)
		)
	   )
	   (viewFor 3
		(active icon)
		(icon
		 (geometry 407 328 46 25)
		)
		(detail
		 (geometry 349 328 73 64)
		)
		(terminals on)
	   )
	   (connect D2:0 D0:1
		(points 5 430 355 430 380 210 380 210 340 230 340)
	   )
	   (connect D2:1 D1:0
		(points 3 455 330 480 330 480 385)
	   )
	   (connect D0:1 D2:1
		(points 2 349 340 404 340)
	   )
	  )
	  (stackingOrder 0 2 1)
	 )
	)
	(viewFor 7
	 (active icon)
	 (icon
	  (geometry 441 56 338 48)
	  (iconImage "disclaim.icn")
	  (label off)
	 )
	 (detail
	  (geometry 830 250 200 100)
	  (editing enabled)
	 )
	)
	(viewFor 8
	 (active icon)
	 (icon
	  (geometry 162 167 176 27)
	 )
	 (detail
	  (geometry 5 79 1031 322)
	  (configuration
	   (viewFor 0
		(active icon)
		(icon
		 (geometry 11 206 88 28)
		)
		(detail
		 (geometry 195 639 101 62)
		)
		(terminals on)
	   )
	   (viewFor 1
		(active detail)
		(icon
		)
		(detail
		 (geometry 146 143 148 154)
		)
		(terminals on)
	   )
	   (viewFor 6
		(active icon)
		(icon
		 (geometry 537 193 46 54)
		)
		(detail
		 (geometry 890 688 10 204)
		)
		(terminals on)
	   )
	   (viewFor 7
		(active detail)
		(icon
		 (geometry 795 328 110 25)
		)
		(detail
		 (geometry 597 189 376 62)
		)
	   )
	   (viewFor 9
		(active detail)
		(icon
		)
		(detail
		 (geometry 387 113 77 34)
		)
		(title off)
	   )
	   (viewFor 12
		(active detail)
		(icon
		)
		(detail
		 (geometry 412 175 66 31)
		)
		(title off)
	   )
	   (viewFor 13
		(active detail)
		(icon
		)
		(detail
		 (geometry 423 235 54 30)
		)
		(title off)
	   )
	   (viewFor 14
		(active detail)
		(icon
		)
		(detail
		 (geometry 383 286 54 29)
		)
		(title off)
	   )
	   (viewFor 16
		(active detail)
		(icon
	  )
		(detail
		 (geometry 378 346 54 29)
		)
		(title off)
	   )
	   (connect D0:1 D1:1
		(points 2 101 220 113 220)
	   )
	   (connect D4:1 D2:1
		(points 4 466 130 510 130 510 200 534 200)
	   )
	   (connect D5:1 D2:2
		(points 4 480 190 500 190 500 210 534 210)
	   )
	   (connect D6:1 D2:3
		(points 4 479 250 510 250 510 220 534 220)
	   )
	   (connect D7:1 D2:4
		(points 4 439 300 490 300 490 230 534 230)
	   )
	   (connect D8:1 D2:5
		(points 4 434 360 500 360 500 240 534 240)
	   )
	   (connect D2:1 D3:1
		(points 2 585 220 594 220)
	   )
	   (connect D1:1 D4:0
		(points 5 346 170 360 170 360 90 425 90 425 110)
	   )
	   (connect D1:2 D5:0
		(points 5 346 190 390 190 390 160 445 160 445 172)
	   )
	   (connect D1:3 D6:0
		(points 5 346 210 370 210 370 220 450 220 450 232)
	   )
	   (connect D1:4 D7:0
		(points 5 346 230 370 230 370 260 410 260 410 283)
	   )
	   (connect D1:5 D8:0
		(points 5 346 250 360 250 360 330 405 330 405 343)
	   )
	   (connect D3:1 O1:1
		(points 4 975 220 993 220 993 240 1035 240)
	   )
	  )
	  (stackingOrder 4 5 3 0 8 7 6 2 1)
	 )
	 (terminals on)
	)
	(connect D8:0 D0:0
	 (points 2 250 196 250 236)
	)
	(connect D8:1 D0:1
	 (points 6 340 180 360 180 360 220 10 220 10 310 26 310)
	)
	(connect D0:0 D1:0
	 (points 2 250 366 250 430)
	)
	(connect D1:1 D2:1
	 (points 4 388 550 400 550 400 470 442 470)
	)
	(connect D2:1 D3:1
	 (points 6 557 470 580 470 580 510 430 510 430 580 446 580)
	)
	(connect D1:1 D3:2
	 (points 4 388 550 410 550 410 620 446 620)
	)
	(connect D1:1 D4:1
	 (points 6 388 550 400 550 400 440 490 440 490 240 619 240)
	)
	(connect D5:1 D4:2
	 (points 6 931 600 950 600 950 510 590 510 590 330 619 330)
	)
	(connect D4:0 D4:3
	 (points 5 780 473 780 490 600 490 600 420 619 420)
	)
	(connect D3:1 D5:1
	 (points 2 793 580 848 580)
	)
	(connect D3:2 D5:2
	 (points 2 793 620 848 620)
	)
   )
   (stackingOrder 7 0 4 1 2 3 5 6 8)
  )
  (titleBg "Gray")
  (titleFg "Black")
  (numberFormats
   (realFormat standard)
   (realSigDigits 8)
   (realRadixSpec 4)
   (integerBase decimal)
  )
 )
)
