Skip to content

Commit 69d89be

Browse files
Return command-data pairs for SCA sequence
1 parent 75a6993 commit 69d89be

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/CommandLineUtilities/AliceLowlevelFrontend/ProgramAliceLowlevelFrontendServer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ class ProgramAliceLowlevelFrontendServer: public AliceO2::Common::Program
472472
auto result = sca.read();
473473
getLogger() << (b::format("cmd=0x%x data=0x%x result=0x%x") % commandData.command % commandData.data %
474474
result.data).str() << endm;
475-
resultBuffer << std::hex << result.data << '\n';
475+
resultBuffer << std::hex << commandData.command << ',' << result.data << '\n';
476476
} catch (const ScaException &e) {
477477
// If an SCA error occurs, we stop executing the sequence of commands and return the results as far as we got
478478
// them, plus the error message.

src/CommandLineUtilities/AliceLowlevelFrontend/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ DIM server for DCS control of the cards
44

55
# Usage
66
`DIM_DNS_NODE=mydimdns roc-alf-server`
7+
78
ALF will automatically scan the system for cards.
89

910

1011
# Services
11-
1212
Service names are organized by card serial number:
13+
1314
`ALF/SERIAL_[serial number]/LINK_[link]/[service name]`
1415

1516
## RPC calls
@@ -67,15 +68,16 @@ Write and read a sequence to the SCA
6768
~~~
6869
"# Hello!\n11,22\n33,44\n# Bye!"
6970
~~~
70-
* Return: A sequence of SCA read return values corresponding to the commands from the input sequence:
71+
* Return: A sequence of pairs of SCA command (coming from the input) and corresponding SCA read return values.
72+
The pairs are separated by newline, the command and data by comma:
7173
~~~
72-
"[value 0]\n[value 1]\n[etc.]"
74+
"[command 0],[value 0]\n[command 1],[value 1]\n[etc.]"
7375
~~~
7476
For example:
7577
~~~
76-
"42\n123\n555"
78+
"10,42\n20,123\n30,555"
7779
~~~
78-
If an SCA error occurred, the sequence of return values will go up to that point, plus the error message
80+
If an SCA error occurred, the sequence of return values will go up to that point, plus the error message.
7981
If another type of error occurred (such as a formatting error), it will return a failure string.
8082
8183
#### SCA_GPIO_READ

0 commit comments

Comments
 (0)