mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
Dev/reg bit change no validate (#970)
- do not validate write reg, setbit and clearbit by default anymore - --validate will force validation on the bitmask or entire reg - remove return value for write reg (across server to client, but thankfully not in the Detector class) - extend validation into writereg, setbit and clearbit for Eiger (always special) - need to check python (TODO) - missed the rx_zmqip implementations in detector.h and python bindings
This commit is contained in:
@ -1104,6 +1104,7 @@ clearbit:
|
||||
cast_input:
|
||||
- true
|
||||
- true
|
||||
- true
|
||||
check_det_id: false
|
||||
convert_det_id: true
|
||||
exceptions:
|
||||
@ -1113,16 +1114,56 @@ clearbit:
|
||||
input:
|
||||
- args[0]
|
||||
- args[1]
|
||||
- '"0"'
|
||||
input_types:
|
||||
- uint32_t
|
||||
- int
|
||||
- bool
|
||||
output:
|
||||
- ToString(args)
|
||||
- '"["'
|
||||
- args[0]
|
||||
- '", "'
|
||||
- args[1]
|
||||
- '"]"'
|
||||
require_det_id: true
|
||||
store_result_in_t: false
|
||||
- arg_types:
|
||||
- uint32_t
|
||||
- int
|
||||
- special::validate
|
||||
argc: 3
|
||||
cast_input:
|
||||
- true
|
||||
- true
|
||||
- true
|
||||
check_det_id: false
|
||||
convert_det_id: true
|
||||
exceptions:
|
||||
- condition: StringTo<int>(args[1]) < 0 || StringTo<int>(args[1]) > 31
|
||||
message: '"Bit number out of range: " + args[1]'
|
||||
- condition: args[2] != "--validate"
|
||||
message: '"Could not scan third argument. Did you mean --validate?"'
|
||||
function: clearBit
|
||||
input:
|
||||
- args[0]
|
||||
- args[1]
|
||||
- '"1"'
|
||||
input_types:
|
||||
- uint32_t
|
||||
- int
|
||||
- bool
|
||||
output:
|
||||
- '"["'
|
||||
- args[0]
|
||||
- '", "'
|
||||
- args[1]
|
||||
- '"]"'
|
||||
require_det_id: true
|
||||
store_result_in_t: false
|
||||
command_name: clearbit
|
||||
function_alias: clearbit
|
||||
help: "[reg address in hex] [bit index]\n\tClears bit in address."
|
||||
help: "[reg address in hex] [bit index]\n\tClears bit in address.\n\tUse --validate\
|
||||
\ to force validation."
|
||||
infer_action: true
|
||||
template: true
|
||||
clearbusy:
|
||||
@ -7973,25 +8014,64 @@ reg:
|
||||
cast_input:
|
||||
- true
|
||||
- true
|
||||
- true
|
||||
check_det_id: false
|
||||
convert_det_id: true
|
||||
function: writeRegister
|
||||
input:
|
||||
- args[0]
|
||||
- args[1]
|
||||
- '"0"'
|
||||
input_types:
|
||||
- uint32_t
|
||||
- uint32_t
|
||||
- bool
|
||||
output:
|
||||
- ToString(args)
|
||||
- '"["'
|
||||
- args[0]
|
||||
- '", "'
|
||||
- args[1]
|
||||
- '"]"'
|
||||
require_det_id: true
|
||||
store_result_in_t: false
|
||||
- arg_types:
|
||||
- uint32_t
|
||||
- uint32_t
|
||||
- special::validate
|
||||
argc: 3
|
||||
cast_input:
|
||||
- true
|
||||
- true
|
||||
- true
|
||||
check_det_id: false
|
||||
convert_det_id: true
|
||||
exceptions:
|
||||
- condition: args[2] != "--validate"
|
||||
message: '"Could not scan third argument. Did you mean --validate?"'
|
||||
function: writeRegister
|
||||
input:
|
||||
- args[0]
|
||||
- args[1]
|
||||
- '"1"'
|
||||
input_types:
|
||||
- uint32_t
|
||||
- uint32_t
|
||||
- bool
|
||||
output:
|
||||
- '"["'
|
||||
- args[0]
|
||||
- '", "'
|
||||
- args[1]
|
||||
- '"]"'
|
||||
require_det_id: true
|
||||
store_result_in_t: false
|
||||
command_name: reg
|
||||
function_alias: reg
|
||||
help: "[address] [32 bit value]\n\t[Mythen3][Gotthard2] Reads/writes to a 32 bit\
|
||||
\ register in hex. Advanced Function!\n\tGoes to stop server. Hence, can be called\
|
||||
\ while calling blocking acquire().\n\t[Eiger] +0x100 for only left, +0x200 for\
|
||||
\ only right."
|
||||
help: "[address] [32 bit value][(optional)--validate]\n\t[Mythen3][Gotthard2] Reads/writes\
|
||||
\ to a 32 bit register in hex. Advanced Function!\n\tGoes to stop server. Hence,\
|
||||
\ can be called while calling blocking acquire().\n\t\t Use --validate to force\
|
||||
\ validation when writing to it.\n\t[Eiger] +0x100 for only left, +0x200 for only\
|
||||
\ right."
|
||||
infer_action: true
|
||||
resetdacs:
|
||||
actions:
|
||||
@ -9646,6 +9726,7 @@ setbit:
|
||||
cast_input:
|
||||
- true
|
||||
- true
|
||||
- true
|
||||
check_det_id: false
|
||||
convert_det_id: true
|
||||
exceptions:
|
||||
@ -9655,16 +9736,56 @@ setbit:
|
||||
input:
|
||||
- args[0]
|
||||
- args[1]
|
||||
- '"0"'
|
||||
input_types:
|
||||
- uint32_t
|
||||
- int
|
||||
- bool
|
||||
output:
|
||||
- ToString(args)
|
||||
- '"["'
|
||||
- args[0]
|
||||
- '", "'
|
||||
- args[1]
|
||||
- '"]"'
|
||||
require_det_id: true
|
||||
store_result_in_t: false
|
||||
- arg_types:
|
||||
- uint32_t
|
||||
- int
|
||||
- special::validate
|
||||
argc: 3
|
||||
cast_input:
|
||||
- true
|
||||
- true
|
||||
- true
|
||||
check_det_id: false
|
||||
convert_det_id: true
|
||||
exceptions:
|
||||
- condition: StringTo<int>(args[1]) < 0 || StringTo<int>(args[1]) > 31
|
||||
message: '"Bit number out of range: " + args[1]'
|
||||
- condition: args[2] != "--validate"
|
||||
message: '"Could not scan third argument. Did you mean --validate?"'
|
||||
function: setBit
|
||||
input:
|
||||
- args[0]
|
||||
- args[1]
|
||||
- '"1"'
|
||||
input_types:
|
||||
- uint32_t
|
||||
- int
|
||||
- bool
|
||||
output:
|
||||
- '"["'
|
||||
- args[0]
|
||||
- '", "'
|
||||
- args[1]
|
||||
- '"]"'
|
||||
require_det_id: true
|
||||
store_result_in_t: false
|
||||
command_name: setbit
|
||||
function_alias: setbit
|
||||
help: "[reg address in hex] [bit index]\n\tSets bit in address."
|
||||
help: "[reg address in hex] [bit index]\n\tSets bit in address.\n\tUse --validate\
|
||||
\ to force validation."
|
||||
infer_action: true
|
||||
template: true
|
||||
settings:
|
||||
|
Reference in New Issue
Block a user