From b8193050882fad51eaed0235c0e14b0599336410 Mon Sep 17 00:00:00 2001 From: l_samenv Date: Fri, 31 Mar 2023 14:25:50 +0200 Subject: [PATCH] frappy.config automatically connects to running frappy servers --- tcl/frappy.config | 16 ++++++++-------- tcl/mb11.config | 9 +++++++-- tcl/seainit.tcl | 1 + 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/tcl/frappy.config b/tcl/frappy.config index 6eb4fe7..11749f0 100644 --- a/tcl/frappy.config +++ b/tcl/frappy.config @@ -1,11 +1,11 @@ -deviceDesc = SECoP test (version v1.0) +deviceDesc = FRAPPY history recorder, with He pump set ::secop_version 4 -makenv frappy_main -driver secop -#makenv frappy_stick -driver secop -port localhost:15201 -#makenv frappy_addons -driver secop -#debug _secop - -#dolater 0 _secop poll /secop 1 read test - +foreach {service port} [exec frappy getports [result instrument]] { + makenv frappy_$service -driver secop -port localhost:$port +} +set hepump [silent undefined hval /cfg_env/_hepump] +if {$hepump ne "undefined"} { + makeHePump +} diff --git a/tcl/mb11.config b/tcl/mb11.config index be7313c..d203126 100644 --- a/tcl/mb11.config +++ b/tcl/mb11.config @@ -2,6 +2,11 @@ deviceDesc = FRAPPY history recorder, with stick set ::secop_version 4 -makenv frappy_main -driver secop -port localhost:15101 -makenv frappy_stick -driver secop -port localhost:15201 +set ins [result instrument] +if {[string match "prep*" $ins]} { + set nr [string range $ins end end] +} else { + error "runs on prep0-9 only" +} +makenv frappy_main -driver secop -port localhost:1511$nr makeHePump diff --git a/tcl/seainit.tcl b/tcl/seainit.tcl index 273d7bd..e531018 100644 --- a/tcl/seainit.tcl +++ b/tcl/seainit.tcl @@ -57,6 +57,7 @@ ServerOption TelWord sealogin allowexec [pwd]/plugin/safeplugin allowexec ping allowexec dig +allowexec frappy definealias tem temperature