@@ -129,38 +129,37 @@ def has_next_result(self) -> bool:
129129
130130 @copydoc (cuvis_il .cuvis_worker_get_next_result )
131131 def get_next_result (self , timeout ) -> WorkerResult :
132- this_mesu = cuvis_il .new_p_int ()
133- this_viewer = cuvis_il .new_p_int ()
132+ ptr_mesu = cuvis_il .new_p_int ()
133+ ptr_view = cuvis_il .new_p_int ()
134134 if cuvis_il .status_ok != cuvis_il .cuvis_worker_get_next_result (
135- self ._handle , this_mesu , this_viewer , timeout ):
135+ self ._handle , ptr_mesu , ptr_view , timeout ):
136136 raise SDKException ()
137- mesu = Measurement (cuvis_il .p_int_value (this_mesu ))
137+ mesu = Measurement (cuvis_il .p_int_value (ptr_mesu ))
138138 if self ._viewer_set :
139- view = Viewer ( cuvis_il .p_int_value (this_viewer )). apply ( this_mesu )
139+ view = Viewer . _create_view_data ( None , cuvis_il .p_int_value (ptr_view ) )
140140 else :
141141 view = None
142142 return WorkerResult (mesu , view )
143- # return mesu
144143
145144 async def get_next_result_async (self , timeout : int ) -> WorkerResult :
146145 poll_intervall = 100
147- this_mesu = cuvis_il .new_p_int ()
148- this_viewer = cuvis_il .new_p_int ()
146+ ptr_mesu = cuvis_il .new_p_int ()
147+ ptr_view = cuvis_il .new_p_int ()
149148
150149 tries = 0
151150 while tries * poll_intervall < timeout :
152151 if self .has_next_result ():
153152 await a .sleep (0 )
154153 if cuvis_il .status_ok != cuvis_il .cuvis_worker_get_next_result (
155- self ._handle , this_mesu , this_viewer , 100 ):
154+ self ._handle , ptr_mesu , ptr_view , 100 ):
156155 raise SDKException ()
157156 break
158157 else :
159158 tries += 1
160159 await a .sleep (poll_intervall / 1000 )
161- mesu = Measurement (cuvis_il .p_int_value (this_mesu ))
160+ mesu = Measurement (cuvis_il .p_int_value (ptr_mesu ))
162161 if self ._viewer_set :
163- view = Viewer ( cuvis_il .p_int_value (this_viewer )). apply ( this_mesu )
162+ view = Viewer . _create_view_data ( None , cuvis_il .p_int_value (ptr_view ) )
164163 else :
165164 view = None
166165 return WorkerResult (mesu , view )
0 commit comments