Skip to content

Commit

Permalink
feat: add model ID query
Browse files Browse the repository at this point in the history
  • Loading branch information
willeccles committed Jan 16, 2025
1 parent 21ef718 commit b475aef
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions absscpi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,22 @@ def get_model_info(self) -> AbsModelInfo:
self.__check_err(res)
return info

def get_model_id(self) -> str:
"""Query the ID of the currently loaded model. This ID is user-defined
and is not used by the unit. It is intended for use by tools.
Returns:
Model ID.
Raises:
ScpiClientError: An error occurred while executing the query.
"""
buf = create_string_buffer(256)
res = self.__dll.AbsScpiClient_GetModelId(
self.__handle, byref(buf), c_uint(len(buf)))
self.__check_err(res)
return buf.value.decode()

def set_global_model_input(self, index: int, value: float):
"""Set a single global model input.
Expand Down

0 comments on commit b475aef

Please sign in to comment.