MicroControl:API Documentation: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[category::MircoControl]]
[[category:MicroControl]]




Line 10: Line 10:
A typical callback to request lots of data from  
A typical callback to request lots of data from  


<source lang="python" enclose="div" >
<source lang="python" enclose="pre" >
     def OnRequest(self, evt):
     def OnRequest(self, evt):
         TCP.Send(XML.Request('get',position=(),scan=(),image=(),field=(), size=(), lasers=()))
         TCP.Send(XML.Request('get',position=(),scan=(),image=(),field=(), size=(), lasers=()))

Latest revision as of 00:30, 1 March 2011


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>