<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:21:38 JST 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>PFS-JIRA</title>
    <link>https://pfspipe.ipmu.jp/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.3.4</version>
        <build-number>803005</build-number>
        <build-date>13-09-2019</build-date>
    </build-info>


<item>
            <title>[INSTRM-109] Retrieve status of individual command when using a sequencer</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/INSTRM-109</link>
                <project id="10300" key="INSTRM">Instrument control development</project>
                    <description>&lt;p&gt;ics_spsaitActor has for now a very basic operating logic. &lt;br/&gt;
Basically, a sequence is only a list of single command. &lt;br/&gt;
For each of it, we are using &lt;b&gt;actorcore.cmdr.call&lt;/b&gt; function where we are passing a keyvar with few arguments : &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;actor&lt;/li&gt;
	&lt;li&gt;cmdStr&lt;/li&gt;
	&lt;li&gt;timeLim&lt;/li&gt;
	&lt;li&gt;forUserCmd&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;When the command is over, or overpass timeLim, we switch to next command etc ...&lt;/p&gt;

&lt;p&gt;The problem is that we don&apos;t know if the command has finished correctly or not. &lt;br/&gt;
We can check actors keywords in some cases.&lt;br/&gt;
for instance if we call a &lt;em&gt;ccd wipe&lt;/em&gt;, we know that ccdState should be &lt;b&gt;integrating&lt;/b&gt;&lt;br/&gt;
But that&apos;s not working in every cases.&lt;/p&gt;

&lt;p&gt;I did investigate a bit, in the keyvar documentation, and it seems that there is a way to  pass a callback : &lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;callFunc: a function to call when the command changes state; see addCallback for details.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;In the case of  &lt;b&gt;actorcore.cmdr.call&lt;/b&gt; this callFunc is overridden, so I can&apos;t use it: &lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;q = Queue.Queue()&lt;br/&gt;
argv&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;callFunc&amp;#39;&amp;#93;&lt;/span&gt; = q.put&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I was wondering if it&apos;s something already used in the past, I may miss something.&lt;/p&gt;

&lt;p&gt;Thank you.&lt;/p&gt;</description>
                <environment></environment>
        <key id="11602">INSTRM-109</key>
            <summary>Retrieve status of individual command when using a sequencer</summary>
                <type id="1" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10503&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/priorities/major.svg">Major</priority>
                        <status id="10002" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/generic.png" description="The issue is resolved, reviewed, and merged">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="cloomis">cloomis</assignee>
                                    <reporter username="arnaud.lefur">arnaud.lefur</reporter>
                        <labels>
                    </labels>
                <created>Thu, 27 Apr 2017 10:22:11 +0000</created>
                <updated>Mon, 11 Jun 2018 18:35:50 +0000</updated>
                            <resolved>Wed, 18 Oct 2017 13:59:55 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                <comments>
                            <comment id="12123" author="cloomis" created="Thu, 27 Apr 2017 17:35:23 +0000"  >&lt;p&gt;`actorcore.cmdr.call` returns an object which has a `didFail` member. Umm:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
        cmdVar = self.actor.cmdr.call(actor=&lt;span class=&quot;code-quote&quot;&gt;&apos;mcs&apos;&lt;/span&gt;, cmdStr=cmdString,
                                       forUserCmd=cmd, timeLim=expTime+5.0)
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; cmdVar.didFail:
            cmd.fail(&lt;span class=&quot;code-quote&quot;&gt;&apos;text=%s&apos;&lt;/span&gt; % (qstr(&lt;span class=&quot;code-quote&quot;&gt;&apos;Failed to expose with %s&apos;&lt;/span&gt; % (cmdString))))
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I confess that I do not know all the things to be found in those objects, but that is one of them.&lt;/p&gt;</comment>
                            <comment id="12124" author="atsushi.shimono" created="Thu, 27 Apr 2017 20:49:16 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=cloomis&quot; class=&quot;user-hover&quot; rel=&quot;cloomis&quot;&gt;cloomis&lt;/a&gt; do you have complete document pointer for them, both retuning reply to command and handling at caller?&lt;/p&gt;</comment>
                            <comment id="12133" author="arnaud.lefur" created="Fri, 28 Apr 2017 12:59:19 +0000"  >&lt;p&gt;Thank you ! How could I miss that ...&lt;br/&gt;
Also cmdVar has a &lt;em&gt;lastReply&lt;/em&gt; member which contain the full status of the command.&lt;br/&gt;
It&apos;s all I need for now.&lt;/p&gt;</comment>
                            <comment id="12677" author="arnaud.lefur" created="Wed, 18 Oct 2017 13:59:55 +0000"  >&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;cmdVar.lastReply.canonical()
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This function return a string compose of 5 members separated by space:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;client_id.sequencer_id (&lt;em&gt;client.alefur.spsait_sm1&lt;/em&gt;)&lt;/li&gt;
	&lt;li&gt;cmd_id (&lt;em&gt;972&lt;/em&gt;)&lt;/li&gt;
	&lt;li&gt;actor name (&lt;em&gt;xcu_r1&lt;/em&gt;)&lt;/li&gt;
	&lt;li&gt;cmd status ( &lt;b&gt;F&lt;/b&gt; for failed, &lt;b&gt;:&lt;/b&gt; for finished)&lt;/li&gt;
	&lt;li&gt;keyword (&lt;em&gt;text=&quot;communication with turbo has failed&quot;&lt;/em&gt;)&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;All information needed is here,&lt;br/&gt;
but it&apos;s up to the programmer to forward this to the client.&lt;/p&gt;</comment>
                            <comment id="12678" author="cloomis" created="Wed, 18 Oct 2017 14:17:57 +0000"  >&lt;p&gt;I&apos;m not sure what you mean by &quot;it&apos;s up to the programmer to forward this to the client.&quot; 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&apos;t, it has the information it needs. If spsait is responsible for declaring parts up/down, then it  can. But I don&apos;t think anything should simply &quot;forward&quot; another actor&apos;s keys.&lt;/p&gt;</comment>
                            <comment id="12681" author="arnaud.lefur" created="Wed, 18 Oct 2017 17:48:50 +0000"  >&lt;p&gt;Hmm, I should have said &quot;it&apos;s up to the programmer to forward &lt;b&gt;or not&lt;/b&gt; this information to the client.&quot;&lt;br/&gt;
In &lt;em&gt;spsaitActor&lt;/em&gt; if a command fail during a sequence, I&apos;ve had a optional keyword &lt;b&gt;doRetry&lt;/b&gt; which gives a sequencer another to complete its sequence.&lt;br/&gt;
That&apos;s convenient for AIT, because  bugs occurs for time to time and I think that&apos;s okay for non critical device.&lt;/p&gt;

&lt;p&gt;But if in the end a sequence fail, I like directly to know what went wrong and why, and if it&apos;s not sufficient I can check the logs of course. &lt;br/&gt;
We still don&apos;t have an actual failure handling for now, so I&apos;m shortcutting it. &lt;/p&gt;

&lt;p&gt;But you&apos;re right, that&apos;s not ideal.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10500" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|ii04ny:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10100" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Reviewers</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>cloomis</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10005" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="24">2017-10A</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>