mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 12:57:13 +02:00
WIP
This commit is contained in:
@ -1969,15 +1969,19 @@ std::string CmdProxy::PatternWord(int action) {
|
||||
if (args.size() != 1) {
|
||||
WrongNumberOfParameters(1);
|
||||
}
|
||||
auto t = det->getPatternWord(StringTo<uint64_t>(args[0]), {det_id});
|
||||
os << OutStringHex(t, 16) << '\n';
|
||||
int addr = StringTo<int>(args[0]);
|
||||
auto t = det->getPatternWord(addr, {det_id});
|
||||
os << '[' << ToStringHex(addr, 4) << ", " << OutStringHex(t, 16)
|
||||
<< "]\n";
|
||||
} else if (action == defs::PUT_ACTION) {
|
||||
if (args.size() != 2) {
|
||||
WrongNumberOfParameters(2);
|
||||
}
|
||||
det->setPatternWord(StringTo<int>(args[0]), StringTo<uint64_t>(args[1]),
|
||||
{det_id});
|
||||
os << sls::ToString(args) << '\n';
|
||||
int addr = StringTo<int>(args[0]);
|
||||
uint64_t word = StringTo<uint64_t>(args[1]);
|
||||
det->setPatternWord(addr, word, {det_id});
|
||||
os << '[' << ToStringHex(addr, 4) << ", " << ToStringHex(word, 16)
|
||||
<< "]\n";
|
||||
} else {
|
||||
throw sls::RuntimeError("Unknown action");
|
||||
}
|
||||
@ -2028,14 +2032,16 @@ std::string CmdProxy::PatternLoopAddresses(int action) {
|
||||
WrongNumberOfParameters(0);
|
||||
}
|
||||
auto t = det->getPatternLoopAddresses(level, {det_id});
|
||||
os << OutStringHex(t) << '\n';
|
||||
os << OutStringHex(t, 4) << '\n';
|
||||
} else if (action == defs::PUT_ACTION) {
|
||||
if (args.size() != 2) {
|
||||
WrongNumberOfParameters(2);
|
||||
}
|
||||
det->setPatternLoopAddresses(level, StringTo<int>(args[0]),
|
||||
StringTo<int>(args[1]), {det_id});
|
||||
os << sls::ToString(args) << '\n';
|
||||
int start = StringTo<int>(args[0]);
|
||||
int stop = StringTo<int>(args[1]);
|
||||
det->setPatternLoopAddresses(level, start, stop, {det_id});
|
||||
os << '[' << ToStringHex(start, 4) << ", " << ToStringHex(stop, 4)
|
||||
<< "]\n";
|
||||
} else {
|
||||
throw sls::RuntimeError("Unknown action");
|
||||
}
|
||||
@ -2125,13 +2131,14 @@ std::string CmdProxy::PatternWaitAddress(int action) {
|
||||
WrongNumberOfParameters(0);
|
||||
}
|
||||
auto t = det->getPatternWaitAddr(level, {det_id});
|
||||
os << OutStringHex(t) << '\n';
|
||||
os << OutStringHex(t, 4) << '\n';
|
||||
} else if (action == defs::PUT_ACTION) {
|
||||
if (args.size() != 1) {
|
||||
WrongNumberOfParameters(1);
|
||||
}
|
||||
det->setPatternWaitAddr(level, StringTo<int>(args[0]), {det_id});
|
||||
os << args.front() << '\n';
|
||||
int addr = StringTo<int>(args[0]);
|
||||
det->setPatternWaitAddr(level, addr, {det_id});
|
||||
os << ToStringHex(addr, 4) << '\n';
|
||||
} else {
|
||||
throw sls::RuntimeError("Unknown action");
|
||||
}
|
||||
|
Reference in New Issue
Block a user