MicroControl:API Documentation: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
Line 9: Line 9:


A typical callback to request lots of data from  
A typical callback to request lots of data from  
<pre>
 
<source lang="python" enclose="pre" >
<source lang="python" enclose="pre" >
     def OnRequest(self, evt):
     def OnRequest(self, evt):
Line 16: Line 16:
         TCP.Read(self.TopParent,DataReadyEvent(num=0))
         TCP.Read(self.TopParent,DataReadyEvent(num=0))
</source>
</source>
</pre>

Revision as of 18:28, 11 January 2011

[[category::MircoControl]]


Sending the message

Waiting for the request


A typical callback to request lots of data from

<source lang="python" enclose="pre" >

   def OnRequest(self, evt):
       TCP.Send(XML.Request('get',position=(),scan=(),image=(),field=(), size=(), lasers=()))
       print 'Starting to read ..'
       TCP.Read(self.TopParent,DataReadyEvent(num=0))

</source>