|
18 | 18 | DIGITAL_INPUT_COUNT = 4 |
19 | 19 | GLOBAL_MODEL_INPUT_COUNT = 8 |
20 | 20 | LOCAL_MODEL_INPUT_COUNT = 8 |
21 | | -MODEL_OUTPUT_COUNT = 18 |
| 21 | +MODEL_OUTPUT_COUNT = 36 |
22 | 22 |
|
23 | 23 | class AbsCellFault(IntEnum): |
24 | 24 | """ABS cell faulting mode.""" |
@@ -91,16 +91,6 @@ def get_version(self) -> str: |
91 | 91 | """Get the model's version.""" |
92 | 92 | return self.version.decode() |
93 | 93 |
|
94 | | -class AbsModelOutputPair(Structure): |
95 | | - """ABS model output pair.""" |
96 | | - |
97 | | - _fields_ = [("value_0", c_float), |
98 | | - ("value_1", c_float)] |
99 | | - |
100 | | - def to_tuple(self) -> tuple[float, float]: |
101 | | - """Get the values as a tuple.""" |
102 | | - return (self.value_0.value, self.value_1.value) |
103 | | - |
104 | 94 | class AbsEthernetDiscoveryResult(Structure): |
105 | 95 | """ABS Ethernet discovery result.""" |
106 | 96 |
|
@@ -1455,38 +1445,38 @@ def get_all_local_model_inputs(self) -> list[float]: |
1455 | 1445 | self.__check_err(res) |
1456 | 1446 | return vals[:] |
1457 | 1447 |
|
1458 | | - def get_model_output(self, index: int) -> tuple[float, float]: |
1459 | | - """Query a single pair of model outputs. |
| 1448 | + def get_model_output(self, index: int) -> float: |
| 1449 | + """Query a single model output. |
1460 | 1450 |
|
1461 | 1451 | Args: |
1462 | | - index: Output index, 0-17. |
| 1452 | + index: Output index, 0-35. |
1463 | 1453 |
|
1464 | 1454 | Returns: |
1465 | | - The model output pair. |
| 1455 | + The model output. |
1466 | 1456 |
|
1467 | 1457 | Raises: |
1468 | 1458 | ScpiClientError: An error occurred while executing the query. |
1469 | 1459 | """ |
1470 | | - pair = AbsModelOutputPair() |
| 1460 | + val = c_float() |
1471 | 1461 | res = self.__dll.AbsScpiClient_GetModelOutput( |
1472 | | - self.__handle, c_uint(index), byref(pair)) |
| 1462 | + self.__handle, c_uint(index), byref(val)) |
1473 | 1463 | self.__check_err(res) |
1474 | | - return pair.to_tuple() |
| 1464 | + return val.value |
1475 | 1465 |
|
1476 | | - def get_all_model_outputs(self) -> list[tuple[float, float]]: |
1477 | | - """Query all model output pairs. |
| 1466 | + def get_all_model_outputs(self) -> list[float]: |
| 1467 | + """Query all model outputs. |
1478 | 1468 |
|
1479 | 1469 | Returns: |
1480 | | - A list of all model output pairs. |
| 1470 | + A list of all model outputs. |
1481 | 1471 |
|
1482 | 1472 | Raises: |
1483 | 1473 | ScpiClientError: An error occurred while executing the query. |
1484 | 1474 | """ |
1485 | | - pairs = (AbsModelOutputPair * MODEL_OUTPUT_COUNT)() |
| 1475 | + values = (c_float * MODEL_OUTPUT_COUNT)() |
1486 | 1476 | res = self.__dll.AbsScpiClient_GetAllModelOutputs( |
1487 | | - self.__handle, byref(pairs), c_uint(MODEL_OUTPUT_COUNT)) |
| 1477 | + self.__handle, byref(values), c_uint(MODEL_OUTPUT_COUNT)) |
1488 | 1478 | self.__check_err(res) |
1489 | | - return [p.to_tuple() for p in pairs] |
| 1479 | + return values[:] |
1490 | 1480 |
|
1491 | 1481 | def multicast_discovery( |
1492 | 1482 | self, |
|
0 commit comments