From 0fa5fe6d93a8305bc74b19e6155d6d4a0b55931b Mon Sep 17 00:00:00 2001 From: MPIDavidLiu Date: Thu, 8 May 2025 12:35:48 +0800 Subject: [PATCH 1/2] Support low level command. --- sentio_prober_control/Sentio/ProberSentio.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sentio_prober_control/Sentio/ProberSentio.py b/sentio_prober_control/Sentio/ProberSentio.py index 3c208d0..5e72a69 100644 --- a/sentio_prober_control/Sentio/ProberSentio.py +++ b/sentio_prober_control/Sentio/ProberSentio.py @@ -1,6 +1,6 @@ import base64 import os -from typing import Tuple +from typing import Tuple,Optional from enum import Enum from deprecated import deprecated @@ -843,16 +843,14 @@ def select_module(self, module: Module, tabSheet: str | None = None): Response.check_resp(self.comm.read_line()) - def send_cmd(self, cmd: str) -> Response: + def send_cmd(self, cmd: str) -> Optional[Response|str]: """Sends a command to the prober and return a response object. This function is intended for directly sending remote commands that are not yet included in the python wrapper. It will send the command and parse the respone from SENTIO. - Do NOT send low level commands that do not have a response (i.e. "*LOCAL"). - This will lock the communication pipeline as it is waiting for a - response that never arrives. + Support low level remote command. It will then return a Response object with the extracted data from SENTIO's response. @@ -860,9 +858,17 @@ def send_cmd(self, cmd: str) -> Response: Returns: A response object with the result of the command. """ + self.comm.send(cmd) - return Response.check_resp(self.comm.read_line()) + + if '*' in cmd and '?' in cmd: + return self.comm.read_line() + elif '*' in cmd: + return None + + else: + return Response.check_resp(self.comm.read_line()) def set_chuck_site_height( self, From 0b189ddda9bd063b34b9c5069a007406066e78b7 Mon Sep 17 00:00:00 2001 From: MPIDavidLiu Date: Mon, 12 May 2025 14:37:23 +0800 Subject: [PATCH 2/2] Modify the response. --- sentio_prober_control/Sentio/ProberSentio.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sentio_prober_control/Sentio/ProberSentio.py b/sentio_prober_control/Sentio/ProberSentio.py index 5e72a69..81ab87e 100644 --- a/sentio_prober_control/Sentio/ProberSentio.py +++ b/sentio_prober_control/Sentio/ProberSentio.py @@ -1,6 +1,6 @@ import base64 import os -from typing import Tuple,Optional +from typing import Tuple from enum import Enum from deprecated import deprecated @@ -843,7 +843,7 @@ def select_module(self, module: Module, tabSheet: str | None = None): Response.check_resp(self.comm.read_line()) - def send_cmd(self, cmd: str) -> Optional[Response|str]: + def send_cmd(self, cmd: str) -> Response: """Sends a command to the prober and return a response object. This function is intended for directly sending remote commands that @@ -862,10 +862,10 @@ def send_cmd(self, cmd: str) -> Optional[Response|str]: self.comm.send(cmd) if '*' in cmd and '?' in cmd: - return self.comm.read_line() + return Response(0,0,0,self.comm.read_line()) elif '*' in cmd: - return None + return Response(0,0,0,"") else: return Response.check_resp(self.comm.read_line())