Skip to content

Automatic test#17802#21

Merged
MPIDavidLiu merged 17 commits intomasterfrom
David.Liu/AutomaticTest#17802
Mar 24, 2025
Merged

Automatic test#17802#21
MPIDavidLiu merged 17 commits intomasterfrom
David.Liu/AutomaticTest#17802

Conversation

@MPIDavidLiu
Copy link
Copy Markdown
Contributor

Add the lost remote command and the remote command unit test

@MPIDavidLiu MPIDavidLiu self-assigned this Mar 24, 2025
@MPIDavidLiu MPIDavidLiu merged commit d7e5396 into master Mar 24, 2025
Copy link
Copy Markdown
Contributor

@beltoforion beltoforion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is too much to review. Can you look at the comments and split it into multiple smaller reviews?

The main issues are that the command parameters or response values are ofteh too complicated and deviate too much from the underlying remote command. Please use existing enumerations in command parameters and responses wherever possible,

resp = Response.check_resp(self.comm.read_line())
return resp.message()

def query_wafer_id(self,station : LoaderStation, slot : int) -> None:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return type specification should be string

resp = Response.check_resp(self.comm.read_line())
return resp.message()

def read_wafer_id(self,angle : str, side : str) -> None:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return type should be str

resp = Response.check_resp(self.comm.read_line())
return resp.message()

def start_prepare_wafer(self,station : LoaderStation, slot : int, angle : int, readid : int, unloadstation : LoaderStation, unloadslot : int) -> None:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this command is starting an async SENTIO command return type should be RemoteCommandResponse. Async commands are the only type of commands that should return RemoteCOmmandResponse because the command may be needed for waitcomplete.

# -------------------------------------------------------------------------
# 1) retrieve_substrate_data
# -------------------------------------------------------------------------
def retrieve_substrate_data(self, site: Optional[str] = None) -> Tuple[int, List[str]]:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The retur type should be List[ChuckSite]. Returning the number is not necessary when this number always corresponds to the size of the list which should be the case here.
If we return a list of string the client would still need to parse the result from the string to make sense of the information. The next step in the client could be a foreach loop over all the aux sites but returning a string makes this more difficult.

# -------------------------------------------------------------------------
# 2) get_substrate_type
# -------------------------------------------------------------------------
def get_substrate_type(self, site: Optional[str] = None) -> str:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second input parameter should be of type chuck site. An exception should be thrown if the site is not an aux site.

# -------------------------------------------------------------------------
def get_element_life_time(
self,
element_standard_id: str,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter should be Union[SubstrateType, ChuckSite] or Union[string,ChuckSIte], depending on wether we should have a SubstrateType enumerator

self,
element_standard_id: str,
site: Optional[str] = None
) -> Dict[str, Union[str, float, int]]:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return type should be tuple similar to remote command return type. This is too hard to unpack.

Response.check_resp(self.comm.read_line())

resp = Response.check_resp(self.comm.read_line())
return resp.message()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remote command doc says the return value if either "ok" of a wafer "id". We should never ever return "ok" because a client will not know that this is not a wafer id. If SENTIO does not give a wafer id an empty string should be returned.

Response.check_resp(self.comm.read_line())

resp = Response.check_resp(self.comm.read_line())
return resp.message()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the remote command documentation i cannot wee that prealign would ever return something other than "OK".

resp = Response.check_resp(self.comm.read_line())
return resp.message()

def start_prepare_station(self, station: LoaderStation, angle: float | None = None) -> None:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should return a RemoteCommandResponse object since it wrapping an async remote command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants