[INSTRM-109] Retrieve status of individual command when using a sequencer Created: 27/Apr/17 Updated: 12/Jun/18 Resolved: 18/Oct/17 |
|
| Status: | Done |
| Project: | Instrument control development |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | arnaud.lefur | Assignee: | cloomis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Sprint: | 2017-10A |
| Reviewers: | cloomis |
| Description |
|
ics_spsaitActor has for now a very basic operating logic.
When the command is over, or overpass timeLim, we switch to next command etc ... The problem is that we don't know if the command has finished correctly or not. I did investigate a bit, in the keyvar documentation, and it seems that there is a way to pass a callback :
In the case of actorcore.cmdr.call this callFunc is overridden, so I can't use it:
I was wondering if it's something already used in the past, I may miss something. Thank you. |
| Comments |
| Comment by cloomis [ 28/Apr/17 ] |
|
`actorcore.cmdr.call` returns an object which has a `didFail` member. Umm:
cmdVar = self.actor.cmdr.call(actor='mcs', cmdStr=cmdString,
forUserCmd=cmd, timeLim=expTime+5.0)
if cmdVar.didFail:
cmd.fail('text=%s' % (qstr('Failed to expose with %s' % (cmdString))))
return
I confess that I do not know all the things to be found in those objects, but that is one of them. |
| Comment by shimono [ 28/Apr/17 ] |
|
cloomis do you have complete document pointer for them, both retuning reply to command and handling at caller? |
| Comment by arnaud.lefur [ 28/Apr/17 ] |
|
Thank you ! How could I miss that ... |
| Comment by arnaud.lefur [ 18/Oct/17 ] |
cmdVar.lastReply.canonical() This function return a string compose of 5 members separated by space:
All information needed is here, |
| Comment by cloomis [ 18/Oct/17 ] |
|
I'm not sure what you mean by "it's up to the programmer to forward this to the client." If the caller of spsait cares, it can get it by itself. If something is broken, the alertsActor will see it. If spsait sometimes cares and sometimes doesn't, it has the information it needs. If spsait is responsible for declaring parts up/down, then it can. But I don't think anything should simply "forward" another actor's keys. |
| Comment by arnaud.lefur [ 19/Oct/17 ] |
|
Hmm, I should have said "it's up to the programmer to forward or not this information to the client." But if in the end a sequence fail, I like directly to know what went wrong and why, and if it's not sufficient I can check the logs of course. But you're right, that's not ideal. |