Realign SCT drivers with R3.2
This commit is contained in:
@ -2,7 +2,7 @@ driver astrium_chopper = {
|
|||||||
vendor = astrium; device = chopper; protocol = std;
|
vendor = astrium; device = chopper; protocol = std;
|
||||||
class = NXdisk_chopper; simulation_group = chopper_simulation;
|
class = NXdisk_chopper; simulation_group = chopper_simulation;
|
||||||
|
|
||||||
group blade_1 = {
|
group disk_1 = {
|
||||||
var state = {
|
var state = {
|
||||||
type = text; mutable = true; priv = user; readable = 1;
|
type = text; mutable = true; priv = user; readable = 1;
|
||||||
read_command = '1'; fetch_function = fetchState; read_function = readState;
|
read_command = '1'; fetch_function = fetchState; read_function = readState;
|
||||||
@ -13,9 +13,10 @@ driver astrium_chopper = {
|
|||||||
var aspeed = { type = float; mutable = true; }
|
var aspeed = { type = float; mutable = true; }
|
||||||
var rphase = { type = float; }
|
var rphase = { type = float; }
|
||||||
var aphase = { type = float; mutable = true; }
|
var aphase = { type = float; mutable = true; }
|
||||||
|
var frequency = { type = float; mutable = true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
group blade_2 = {
|
group disk_2 = {
|
||||||
var state = {
|
var state = {
|
||||||
type = text; mutable = true; priv = user; readable = 1;
|
type = text; mutable = true; priv = user; readable = 1;
|
||||||
read_command = '2'; fetch_function = fetchState; read_function = readState;
|
read_command = '2'; fetch_function = fetchState; read_function = readState;
|
||||||
@ -26,9 +27,10 @@ driver astrium_chopper = {
|
|||||||
var aspeed = { type = float; mutable = true; }
|
var aspeed = { type = float; mutable = true; }
|
||||||
var rphase = { type = float; }
|
var rphase = { type = float; }
|
||||||
var aphase = { type = float; mutable = true; }
|
var aphase = { type = float; mutable = true; }
|
||||||
|
var frequency = { type = float; mutable = true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
group blade_3 = {
|
group disk_3 = {
|
||||||
var state = {
|
var state = {
|
||||||
type = text; mutable = true; priv = user; readable = 1;
|
type = text; mutable = true; priv = user; readable = 1;
|
||||||
read_command = '3'; fetch_function = fetchState; read_function = readState;
|
read_command = '3'; fetch_function = fetchState; read_function = readState;
|
||||||
@ -39,9 +41,10 @@ driver astrium_chopper = {
|
|||||||
var aspeed = { type = float; mutable = true; }
|
var aspeed = { type = float; mutable = true; }
|
||||||
var rphase = { type = float; }
|
var rphase = { type = float; }
|
||||||
var aphase = { type = float; mutable = true; }
|
var aphase = { type = float; mutable = true; }
|
||||||
|
var frequency = { type = float; mutable = true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
group blade_4 = {
|
group disk_4 = {
|
||||||
var state = {
|
var state = {
|
||||||
type = text; mutable = true; priv = user; readable = 1;
|
type = text; mutable = true; priv = user; readable = 1;
|
||||||
read_command = '4'; fetch_function = fetchState; read_function = readState;
|
read_command = '4'; fetch_function = fetchState; read_function = readState;
|
||||||
@ -52,6 +55,7 @@ driver astrium_chopper = {
|
|||||||
var aspeed = { type = float; mutable = true; }
|
var aspeed = { type = float; mutable = true; }
|
||||||
var rphase = { type = float; }
|
var rphase = { type = float; }
|
||||||
var aphase = { type = float; mutable = true; }
|
var aphase = { type = float; mutable = true; }
|
||||||
|
var frequency = { type = float; mutable = true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
code fetch_function fetchState = {%%
|
code fetch_function fetchState = {%%
|
||||||
@ -87,8 +91,16 @@ driver astrium_chopper = {
|
|||||||
set rhs "[string trim [lindex ${lst} 1]]"
|
set rhs "[string trim [lindex ${lst} 1]]"
|
||||||
sct "attr_${lhs}" "${rhs}"
|
sct "attr_${lhs}" "${rhs}"
|
||||||
set base [pathname [sct]]
|
set base [pathname [sct]]
|
||||||
foreach node [list ASPEED RSPEED APHASE RPHASE MASTER] {
|
switch [string toupper ${lhs}] {
|
||||||
if { [string equal -nocase "${lhs}" "${node}"] } {
|
"ASPEED" {
|
||||||
|
if [string is double "${rhs}"] {
|
||||||
|
set freq [expr "${rhs}" / 60.0]
|
||||||
|
if { "[hval ${base}/frequency]" != "${freq}" } {
|
||||||
|
hset ${base}/frequency ${freq}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"RSPEED" - "APHASE" - "RPHASE" - "MASTER" {
|
||||||
if { "[hval ${base}/${node}]" != "${rhs}" } {
|
if { "[hval ${base}/${node}]" != "${rhs}" } {
|
||||||
hset ${base}/${node} "${rhs}"
|
hset ${base}/${node} "${rhs}"
|
||||||
}
|
}
|
||||||
|
@ -16,14 +16,14 @@ driver he3_polanal = {
|
|||||||
writeable = 1;
|
writeable = 1;
|
||||||
write_command = 'polariser';
|
write_command = 'polariser';
|
||||||
check_function = chkWrite;
|
check_function = chkWrite;
|
||||||
allowed = "+,-,Refresh"
|
allowed = "-1,0,+1"
|
||||||
}
|
}
|
||||||
var amplitude = { }
|
var amplitude = { }
|
||||||
var freq = { units = 'Hertz'; }
|
var freq = { units = 'Hertz'; }
|
||||||
var phase = { units = 'Degree'; }
|
var phase = { units = 'Degree'; }
|
||||||
var time2 = { units = 'Second'; }
|
var time2 = { units = 'Second'; }
|
||||||
var field = { units = 'Oersted'; }
|
var field = { units = 'Oersted'; }
|
||||||
var timestamp = { }
|
var timestamp = { type = int; }
|
||||||
}
|
}
|
||||||
group polariser_start = {
|
group polariser_start = {
|
||||||
conditional = '[string equal -nocase ${has_pol} "true"]';
|
conditional = '[string equal -nocase ${has_pol} "true"]';
|
||||||
@ -34,7 +34,7 @@ driver he3_polanal = {
|
|||||||
var phase = { units = 'Degree'; }
|
var phase = { units = 'Degree'; }
|
||||||
var time2 = { units = 'Second'; }
|
var time2 = { units = 'Second'; }
|
||||||
var field = { units = 'Oersted'; }
|
var field = { units = 'Oersted'; }
|
||||||
var timestamp = { }
|
var timestamp = { type = int; }
|
||||||
}
|
}
|
||||||
|
|
||||||
group analyser = {
|
group analyser = {
|
||||||
@ -54,7 +54,7 @@ driver he3_polanal = {
|
|||||||
var phase = { units = 'Degree'; }
|
var phase = { units = 'Degree'; }
|
||||||
var time2 = { units = 'Second'; }
|
var time2 = { units = 'Second'; }
|
||||||
var field = { units = 'Oersted'; }
|
var field = { units = 'Oersted'; }
|
||||||
var timestamp = { }
|
var timestamp = { type = int; }
|
||||||
}
|
}
|
||||||
group analyser_start = {
|
group analyser_start = {
|
||||||
conditional = '[string equal -nocase ${has_anal} "true"]';
|
conditional = '[string equal -nocase ${has_anal} "true"]';
|
||||||
@ -65,7 +65,7 @@ driver he3_polanal = {
|
|||||||
var phase = { units = 'Degree'; }
|
var phase = { units = 'Degree'; }
|
||||||
var time2 = { units = 'Second'; }
|
var time2 = { units = 'Second'; }
|
||||||
var field = { units = 'Oersted'; }
|
var field = { units = 'Oersted'; }
|
||||||
var timestamp = { }
|
var timestamp = { type = int; }
|
||||||
}
|
}
|
||||||
|
|
||||||
code chkWrite = {%%
|
code chkWrite = {%%
|
||||||
@ -103,27 +103,9 @@ driver he3_polanal = {
|
|||||||
|
|
||||||
code setValue = {%%
|
code setValue = {%%
|
||||||
set cmd "${cmd_str}"
|
set cmd "${cmd_str}"
|
||||||
if {[string equal -nocase [sct target] "refresh"]} {
|
|
||||||
set cmd "${cmd_str}"
|
|
||||||
}
|
|
||||||
if {[string equal -nocase [sct target] "minus"]} {
|
|
||||||
set cmd "${cmd_str} -"
|
|
||||||
}
|
|
||||||
if {[string equal -nocase [sct target] "dn"]} {
|
|
||||||
set cmd "${cmd_str} -"
|
|
||||||
}
|
|
||||||
if {[string equal -nocase [sct target] "down"]} {
|
|
||||||
set cmd "${cmd_str} -"
|
|
||||||
}
|
|
||||||
if {[sct target] == "-" || [sct target] == -1} {
|
if {[sct target] == "-" || [sct target] == -1} {
|
||||||
set cmd "${cmd_str} -"
|
set cmd "${cmd_str} -"
|
||||||
}
|
}
|
||||||
if {[string equal -nocase [sct target] "plus"]} {
|
|
||||||
set cmd "${cmd_str} +"
|
|
||||||
}
|
|
||||||
if {[string equal -nocase [sct target] "up"]} {
|
|
||||||
set cmd "${cmd_str} +"
|
|
||||||
}
|
|
||||||
if {[sct target] == "+" || [sct target] == 1} {
|
if {[sct target] == "+" || [sct target] == 1} {
|
||||||
set cmd "${cmd_str} +"
|
set cmd "${cmd_str} +"
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ driver isotech_ps = {
|
|||||||
vendor = isotech; device = ps; protocol = std;
|
vendor = isotech; device = ps; protocol = std;
|
||||||
class = environment;
|
class = environment;
|
||||||
simulation_group = environment_simulation;
|
simulation_group = environment_simulation;
|
||||||
protocol_args = '{terminator "\r"}';
|
protocol_args = '{terminator \r}';
|
||||||
group = {
|
group = {
|
||||||
readable = 5
|
readable = 5
|
||||||
mutable = true
|
mutable = true
|
||||||
|
Reference in New Issue
Block a user