This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start = time.time() | |
for pv_name in pv_list: | |
ch = ca.create_channel(pv_name, connect=False, auto_cb=False) | |
result[pv_name] = [ch, None, None] | |
for pv_name, data in result.items(): | |
result[pv_name][1] = ca.connect_channel(data[0], timeout=1.0) | |
ca.poll() | |
for pv_name, data in result.items(): | |
if result[pv_name][1]: | |
ca.get(data[0], wait=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start = time.time() | |
for pv_name in pv_list: | |
pv = PV(pv_name) | |
if pv.wait_for_connection(timeout=1.0): | |
result[pv_name] = pv.get(use_monitor=False) | |
else: | |
result[pv_name] = 'not connected' | |
duration = time.time() - start | |
print int(round(duration * 1000)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find what: #(\w+_)*(\w+)- | |
replace with: #$1$2_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Json2List(json) { | |
var output = ''; | |
for (var k in json) { | |
if (json.hasOwnProperty(k)) { | |
if (typeof(json[k]) == 'object') { | |
output = output + '<dl>' + '<dt>' + k + '</dt>' + '<dd>' + Json2List(json[k]) + '</dd>' + '</dl>'; | |
} else { | |
output = output + '<b>' + k + '</b>' + ' : ' + json[k] + '<br/>'; | |
} | |
} |
NewerOlder