| 1 | # SPDX-License-Identifier: LGPL-2.1-or-later |
| 2 | # SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <[email protected]> |
| 3 | |
| 4 | |
| 5 | from dataclasses import dataclass |
| 6 | |
| 7 | __all__ = "ChipInfo" |
| 8 | |
| 9 | |
| 10 | @dataclass(frozen=True, repr=False) |
| 11 | class ChipInfo: |
| 12 | """ |
| 13 | Snapshot of a chip's status. |
| 14 | """ |
| 15 | |
| 16 | name: str |
| 17 | """Name of the chip.""" |
| 18 | |
| 19 | label: str |
| 20 | """Label of the chip.""" |
| 21 | |
| 22 | num_lines: int |
| 23 | """Number of lines exposed by the chip.""" |
| 24 | |
| 25 | def __str__(self): |
| 26 | return '<ChipInfo name="{}" label="{}" num_lines={}>'.format( |
| 27 | self.name, self.label, self.num_lines |
| 28 | ) |