DXScm

Catagory

DXScheme

Function

Scheme interpreter for OpenDX

Syntax

output = scm ( parameters )
 

Inputs

Name Type Defaults Description
init string  (no default) path to the init scheme program file (Init5d.scm)
prog  string  (no default) path to the scheme program file
run string (no default) scheme command to be run
input value, field or string list (no default) input value
repeat 1

Outputs

Name Type Description
output1  value, field or string list  output values
repeat 1

Functional Details

Scheme is a Lisp dialect. DXScm uses Aubrey Jaffer's implementation of Scheme. You first need to install Jaffer's SCM and SLIB before you can install DXScm. The aim of DXScm is to allow programmers to run scheme programs and display results with OpenDX. Currently, only one DXScm module can be used at a time in an OpenDX program. 

Inputs from OpenDX are converted into list. In opposite way, Scheme list are converted into OpenDX data.
During the first run of the module, DXScm is initialized with the file pointed by the first parameter. Then the scheme program pointed by the second parameter is loaded.

Each time the module is executed, the scheme command in the third parameter is evaluated. 
 

input1
The init scheme program. Should be "/path-to-the-file/Init5d.scm"
 
input2
The file of the scheme program. You should define in this file all functions and variables needed by your application. 
 
input3
The scheme command to run each turn the module is executed. 
input4
the first parameter.
A few funtion has been implemented in scheme:
get-dx-input
This function scan all parameters input, convert them into lists and store them in the *in* variable. Single variables are converted into scheme single variables. Lists are converted into lists. Fields are converted into lists of list for which each first element is the name of the component in the field. Groups are not connected yes.
set-dx-input
This function convert the variable *out* into OpenDX objects stored in the outputs of the module.
dxdisplay
Same as display, but output the string in OpenDX's Message window.
call-again
Tell OpenDX that the module need to be call again in "Execute on change" mode.
 Note: Any added notes. 

Components

Describe components affected. 
 
 

See Also

other references. 
 
 

Example Visual Programs

particules.scm
particules.net