# Defines lists of parameters for SICS device objects which are useful for a # GUI client operating on a get/set paradigm. # Using namespaces to create complex heirarchical data structures # deviceType::{deviceType, primaryProperty, parList} namespace eval deviceType { namespace eval Motor { set deviceType Motor; set primaryProperty {position USER Float {} }; set parList [list \ accesscode MANAGER Float {}\ failafter MANAGER Float {}\ fixed USER Float {}\ hardlowerlim MANAGER Float {}\ hardupperlim MANAGER Float {}\ ignorefault MANAGER Float {}\ interruptmode MANAGER Float {}\ maxretry MANAGER Float {}\ movecount MANAGER Float {}\ precision MANAGER Float {}\ sign MANAGER Float {}\ softlowerlim USER Float {}\ softupperlim USER Float {}\ softzero USER Float {}\ accel USER Float {}\ decel USER Float {}\ home MANAGER Float {}\ maxaccel READ_ONLY Float {}\ maxdecel READ_ONLY Float {}\ maxspeed READ_ONLY Float {}\ speed USER Float {}\ ] } namespace eval ConfigurableVirtualMotor { set deviceType ConfigurableVirtualMotor; set primaryProperty {position USER Float {} }; set parList [list \ ] } namespace eval SingleCounter { set deviceType SingleCounter; set primaryProperty {counts READ_ONLY Float {}}; proc counting {counterName args} { variable Start Stop switch $args { start { set preset [$counterName getpreset]; set preset [string trim [lindex [split $preset =] 1]]; $counterName count $preset; } stop { $counterName stop; } } } publish ::deviceType::SingleCounter::counting user; set parList [list \ counting USER Text {start stop}\ preset USER Float {}\ setexponent USER Float {}\ getexponent READ_ONLY Float {}\ mode USER Text {monitor timer}\ setexponent USER Float {}\ getmonitor READ_ONLY Float {}\ status READ_ONLY Text {}\ gettime READ_ONLY Float {}\ getthreshold READ_ONLY Float {}\ setthreshold USER Float {} ] } namespace eval HistMem { set deviceType HistMem; set primaryProperty {enable USER Text {} }; set parList [list \ ] } } set countParList $::deviceType::SingleCounter::parList set motParList $::deviceType::Motor::parList set virtmotParList $::deviceType::ConfigurableVirtualMotor::parList set scanParList [list \ ] set hmParList [list \ ]