Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ts_auxiliary_telescope
-
Labels:
-
Story Points:2
-
Epic Link:
-
Team:Telescope and Site
-
Urgent?:No
Description
It appears that in ts_sal 3.9 every command topic starts with the same private_seqNum (some large integer). As a result the same seqNum is being used by all the different commands.
Two solutions that come to mind (and I'm sure there are others):
1) Use another existing ackcmd field or add a field that identifies which command the ack is for. For instance an integer that specifies the index of the command in the known command topics.
Then one can use a different content-filtered ackcmd reader for each command, for instance in SALPY using the ackCommand_x and getResponse_x functions will do exactly what a user might expect.
Does SAL provide similar functions for other languages?
2) Divide the sequence numbers up so that each command has its own range of sequence numbers. Each command writer starts out with the minimum value and rolls over when it hits the maximum.
This is a simpler change, but it means that code must (continue to) read one ackcmd topic to read acks for all commands. For instance one would use getResponse_start to read acks for all commands, including enable, disable, exitControl... which is surprising, to say the least.
salobj has not been doing this and so has a subtle bug I need to fix. I wonder how many other languages have the same bug?
(You could fix the bug using content filtered readers based on seqNum range, but that sounds riskier and hackier than using a separate field to identify the command).
This was fixed in SAL and ts_salobj (but
DM-19697helps a lot).