MicroControl:Design: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 3: Line 3:
== Protocol description ==
== Protocol description ==


<source lang="xml">
<source lang="xml" style="display: inline-block;">


<satXML type=”response”>
<satXML type=”response”>

Revision as of 17:43, 10 January 2011


Protocol description

<source lang="xml" style="display: inline-block;">

<satXML type=”response”>

 < scalars>
    <position x="1.3 " y="2.3"/>
    <scan speed=”3”>
 </scalars>
 
 <image fname="c:\neuron.png" size="326870"/>

</satXML> </source>

Live view functionality

While setting up stage and scan settings, users tweak hardware parameters while looking through the eyepiece. This practice must be mimicked when the user is tuning hardware parameters remotely without physical access to the machine.

Since visual basic runs in event driven mode, its possible. Until one document is involved in scanning other events can be processed making this possible.

The remote client must also be multi-threaded now ready to receive images continuously updating the view window. And another communication with the server must consider possibility of this continuous interaction.

On server side, a global variable (which ?) is used to maintain the state whether continuous scan is required. Upon completion the current image is exported onto disc with a temporary filename (which ?) and a new XML response is created and is sent back to the client.

The XML handler should be processed while images are scanned. The continuous XML takes the control away from the default XML, hence it is necessary to assemble and return correct response. If non-returning satXMLControl function is called again and again, it might result into a stack overflow. But usually only once instance of continuous image generation will be accepted.

ProcessParent

Subwindow elements like panels etc can get handle of their top level window by function GetTopLevelParent(self). This is usually the main_window and has a method to process

  1. Every dialog box must be set with a window handle "processParent". This can be either supplied to the constructor __init__ method, or later set explicitly. Th