# --------------------------------------------------------------------------
# Initialization script for a simulated TOPSI instrument
#
#
# Dr. Mark Koennecke February, 1996
#---------------------------------------------------------------------------
#                        O P T I O N S

# --------------- Initialize Tcl internals --------------------------------
set auto_path "/data/koenneck/src/sics/tcl"
source $auto_path/topsicom.tcl

# first all the server options are set

ServerOption ReadTimeOut  100 
# timeout when checking for commands. In the main loop SICS checks for
# pending commands on each connection with the above timeout, has 
# PERFORMANCE impact!

ServerOption AcceptTimeOut  100 
# timeout when checking for connection req.
# Similar to above, but for connections

ServerOption ReadUserPasswdTimeout  500000 
# time to wiat for a user/passwd to be sent from a client. Increase this
# if there is a problem connecting to a server due to network overload\

ServerOption ServerLogBaseName  /data/koenneck/src/sics/server
# the path and base name of the internal server logfile to which all
# activity will be logged.

ServerOption ServerPort 2910 
# the port number the server is going to listen at. The client MUST know
# this number in order to connect. It is in client.ini

ServerOption InterruptPort 2913
# The UDP port where the server will wait for Interrupts from clients.
# Obviously, clients wishing to interrupt need to know this number.

ServerOption DefaultTclDirectory /data/koenneck/src/sics/tcl
ServerOption DefaultCommandFile  topsicom.tcl

#---------------------------------------------------------------------------
#                        U S E R S

# than the SICS users are specified
# Syntax: SicsUser name password userRightsCode
SicsUser Mugger Diethelm  1
SicsUser User   Rosy      2
SicsUser Spy    007       3

#--------------------------------------------------------------------------
#               S I M P L E     V A R I A B L E S

# now a few general variables are created
# Syntax: VarMake name type access
# type can be one of: Text, Int, Float
#access can be one of: Internal, Mugger, user, Spy

VarMake Instrument Text Internal 
Instrument  "TOPSI" #initialisation

VarMake Title Text User
Title "TopsiTupsiTapsi"
VarMake User  Text User
User  "Daniel_the_Clementine"

#--------------------------------------------------------------------------
#                D E V I C E S :  M O T O R S

# Motor a4 EL734 LNSP22 4000 5 6
# EL734 motor with parameters: hostname PortNumber Channel MotorID
Motor A2 EL734 lnsp22.psi.ch 4000 5 2   # Monochromator 2Theta
Motor A3 EL734 lnsp22.psi.ch 4000 5 3   # Sample Omega

#                      C O U N T E R S
MakeCounter counter EL737 lnsp22.psi.ch 4000 4


MakeDrive
Publish scan User
Publish otUnknown User
MakeRuenBuffer
