Tables
- class ingenialink.table.Table(servo: Servo, table: DictionaryTable)[source]
Table.
Internal table that stores N values that are accessed by index register and read/written via value register.
- addresses() Iterator[int][source]
Iterate over all addresses in the table.
- Yields:
Each address in the table from min_index to max_index.
- compare_with_config_table(config_table: ConfigTable) list[str][source]
Compare the current table values with a ConfigTable.
- Returns:
A list of mismatch/error messages (empty when identical).
- get_value(index: int) float | int | str | bytes[source]
Reads a value from the table.
- Parameters:
index – Index of the value to read.
- Returns:
Value at the specified index.
- get_value_raw(index: int) bytes[source]
Reads a raw value from the table.
- Parameters:
index – Index of the value to read.
- Returns:
Raw value at the specified index
- items() Iterator[tuple[int, float | int | str | bytes]][source]
Iterate over all index-value pairs in the table.
- Yields:
Tuples of (index, value) for each entry in the table.
- items_raw() Iterator[tuple[int, bytes]][source]
Iterate over all index-raw_value pairs in the table.
- Yields:
Tuples of (index, raw_value) for each entry in the table.
- load_from_config_table(config_table: ConfigTable) None[source]
Load values of a config table to the current table.
- Parameters:
config_table – Table configuration to load
- read(start_index: int | None = None, count: int | None = None) list[float | int | str | bytes][source]
Read multiple values from the table.
- Parameters:
start_index – Starting index. Defaults to min_index.
count – Number of values to read. Defaults to all remaining.
- Returns:
List of values read from the table.
- Raises:
IndexError – If the range is out of bounds.
- set_value(index: int, value: float | int | str | bytes) None[source]
Writes a value to the table.
- Parameters:
index – Index of the value to write.
value – Value to write at the specified index.
- set_value_raw(index: int, raw_value: bytes) None[source]
Writes a raw value to the table.
- Parameters:
index – Index of the value to write.
raw_value – Raw bytes to write at the specified index.
- to_config_table() ConfigTable[source]
Convert to ConfigTable representation with the current table values.
- Returns:
ConfigTable instance with the current table values.
- write(values: Sequence[float | int | str | bytes], start_index: int | None = None) None[source]
Write multiple values to the table.
- Parameters:
values – Sequence of values to write to the table.
start_index – Starting index. Defaults to min_index.
- Raises:
IndexError – If the range is out of bounds.
- property axis: int
Axis to which the table belongs.
- property uid: str
Unique identifier for the table.