ekfsm 1.0.2__py3-none-any.whl → 1.1.0a15.post1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ekfsm might be problematic. Click here for more details.
- ekfsm/__init__.py +3 -14
- ekfsm/cli.py +26 -1
- ekfsm/core/__init__.py +10 -0
- ekfsm/core/slots.py +2 -2
- ekfsm/core/sysfs.py +3 -13
- ekfsm/devices/coretemp.py +2 -4
- ekfsm/devices/eeprom.py +0 -2
- ekfsm/devices/ekf_ccu_uc.py +18 -7
- ekfsm/devices/generic.py +55 -0
- ekfsm/devices/iio_thermal_humidity.py +9 -1
- ekfsm/devices/imu.py +8 -4
- ekfsm/devices/mux.py +30 -0
- ekfsm/devices/pmbus.py +24 -2
- ekfsm/system.py +54 -10
- {ekfsm-1.0.2.dist-info → ekfsm-1.1.0a15.post1.dist-info}/METADATA +1 -1
- {ekfsm-1.0.2.dist-info → ekfsm-1.1.0a15.post1.dist-info}/RECORD +18 -18
- {ekfsm-1.0.2.dist-info → ekfsm-1.1.0a15.post1.dist-info}/WHEEL +0 -0
- {ekfsm-1.0.2.dist-info → ekfsm-1.1.0a15.post1.dist-info}/entry_points.txt +0 -0
ekfsm/__init__.py
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
from .core.slots import Slot
|
|
2
1
|
from .system import System
|
|
3
|
-
from .
|
|
4
|
-
from .
|
|
5
|
-
from .exceptions import ConfigError
|
|
6
|
-
from .lock import locking_cleanup, locking_configure
|
|
2
|
+
from .config import load_config
|
|
3
|
+
from .log import ekfsm_logger
|
|
7
4
|
|
|
8
|
-
__all__ = (
|
|
9
|
-
"System",
|
|
10
|
-
"ConfigError",
|
|
11
|
-
"HwModule",
|
|
12
|
-
"Slot",
|
|
13
|
-
"SlotType",
|
|
14
|
-
"locking_cleanup",
|
|
15
|
-
"locking_configure",
|
|
16
|
-
)
|
|
5
|
+
__all__ = ("System", "load_config", "ekfsm_logger")
|
ekfsm/cli.py
CHANGED
|
@@ -16,6 +16,8 @@ logger = ekfsm_logger(__name__)
|
|
|
16
16
|
|
|
17
17
|
sm: System | None = None
|
|
18
18
|
|
|
19
|
+
__all__ = ("cli", "main", "write", "show")
|
|
20
|
+
|
|
19
21
|
|
|
20
22
|
@click.group()
|
|
21
23
|
@click.option("--verbose", "-v", is_flag=True, help="Enable verbose output")
|
|
@@ -37,7 +39,30 @@ sm: System | None = None
|
|
|
37
39
|
)
|
|
38
40
|
def cli(verbose, debug, sysfs, config):
|
|
39
41
|
global sm
|
|
40
|
-
"""POSIX-compliant CLI tool with subcommands
|
|
42
|
+
"""POSIX-compliant CLI tool with subcommands
|
|
43
|
+
for the EKF System Management (EKFSM) library.
|
|
44
|
+
|
|
45
|
+
This tool provides a command-line interface for managing and
|
|
46
|
+
interacting with the EKF System Management library. It allows
|
|
47
|
+
users to perform various operations related to system management,
|
|
48
|
+
including reading and writing data to the system, and displaying
|
|
49
|
+
information about the system.
|
|
50
|
+
|
|
51
|
+
Parameters
|
|
52
|
+
----------
|
|
53
|
+
verbose
|
|
54
|
+
Enable verbose output. If set, the logging level will be set to INFO.
|
|
55
|
+
debug
|
|
56
|
+
Enable debug output. If set, the logging level will be set to DEBUG.
|
|
57
|
+
sysfs
|
|
58
|
+
Use custom sysfs directory for simulation mode. If set, the
|
|
59
|
+
simulation mode will be enabled and the specified directory
|
|
60
|
+
will be used for sysfs operations.
|
|
61
|
+
config
|
|
62
|
+
Path to the configuration file. This file is required for
|
|
63
|
+
initializing the system. The path should point to a valid
|
|
64
|
+
configuration file in YAML format.
|
|
65
|
+
"""
|
|
41
66
|
if verbose:
|
|
42
67
|
logging.getLogger().setLevel(logging.INFO)
|
|
43
68
|
logger.info("Verbose output enabled")
|
ekfsm/core/__init__.py
CHANGED
|
@@ -2,3 +2,13 @@ from .slots import Slot, SlotType, Slots # noqa: F401
|
|
|
2
2
|
from .sysfs import SysFSDevice, SysFSAttribute # noqa: F401
|
|
3
3
|
from .components import HwModule # noqa: F401
|
|
4
4
|
from .probe import ProbeableDevice # noqa: F401
|
|
5
|
+
|
|
6
|
+
__all__ = [
|
|
7
|
+
"Slot",
|
|
8
|
+
"SlotType",
|
|
9
|
+
"Slots",
|
|
10
|
+
"SysFSDevice",
|
|
11
|
+
"SysFSAttribute",
|
|
12
|
+
"HwModule",
|
|
13
|
+
"ProbeableDevice",
|
|
14
|
+
]
|
ekfsm/core/slots.py
CHANGED
|
@@ -142,7 +142,7 @@ class Slots(Munch):
|
|
|
142
142
|
|
|
143
143
|
Example
|
|
144
144
|
-------
|
|
145
|
-
>>> from ekfsm.
|
|
145
|
+
>>> from ekfsm..core.slots import Slot, Slots, SlotType
|
|
146
146
|
>>> slotA = Slot("SlotA", SlotType.CPCI_S0_PER, "Bla", "Blubb", 3)
|
|
147
147
|
>>> slots = Slots((slotA.name, slotA))
|
|
148
148
|
>>> print(slots[name])
|
|
@@ -192,7 +192,7 @@ class Slots(Munch):
|
|
|
192
192
|
|
|
193
193
|
Example
|
|
194
194
|
-------
|
|
195
|
-
>>> from ekfsm.
|
|
195
|
+
>>> from ekfsm.core.slots import Slot, Slots, SlotType
|
|
196
196
|
>>> slotA = Slot("SlotA", SlotType.CPCI_S0_PER, "Bla", "Blubb", 3)
|
|
197
197
|
>>> slots = Slots()
|
|
198
198
|
>>> slots.add(slotA) # add slotA to the collection
|
ekfsm/core/sysfs.py
CHANGED
|
@@ -22,18 +22,8 @@ class SysFSAttribute:
|
|
|
22
22
|
|
|
23
23
|
Attributes
|
|
24
24
|
----------
|
|
25
|
-
path
|
|
26
|
-
|
|
27
|
-
name : str
|
|
28
|
-
attribute name, or the last part of self.path
|
|
29
|
-
|
|
30
|
-
Methods
|
|
31
|
-
-------
|
|
32
|
-
read() -> Optional[str]
|
|
33
|
-
Reads the file attribute if it exists
|
|
34
|
-
write(data: Union[str, int]) -> None
|
|
35
|
-
Writes data to the file attribute
|
|
36
|
-
|
|
25
|
+
path
|
|
26
|
+
Path to the underlying file for the SysFSAttribute instance.
|
|
37
27
|
"""
|
|
38
28
|
|
|
39
29
|
def __init__(self, path: Path):
|
|
@@ -51,7 +41,7 @@ class SysFSAttribute:
|
|
|
51
41
|
|
|
52
42
|
def write(self, data: str | bytes | None, offset: int = 0) -> None:
|
|
53
43
|
if self.is_sysfs_attr() and data is not None:
|
|
54
|
-
mode =
|
|
44
|
+
mode = "r+" if isinstance(data, str) else "rb+"
|
|
55
45
|
with open(self.path, mode) as f:
|
|
56
46
|
f.seek(offset)
|
|
57
47
|
f.write(data)
|
ekfsm/devices/coretemp.py
CHANGED
|
@@ -38,12 +38,10 @@ def find_core_temp_dir(hwmon_dir) -> Path:
|
|
|
38
38
|
|
|
39
39
|
class CoreTemp(Device):
|
|
40
40
|
"""
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
A HWMON device is a virtual device that is used to read hardware monitoring values from the sysfs filesystem.
|
|
41
|
+
This class provides an interface to read the CPU core temperature from the HWMON device.
|
|
44
42
|
|
|
45
43
|
Note:
|
|
46
|
-
Currently, only the
|
|
44
|
+
Currently, only the average temperature over all cores is read from the HWMON device.
|
|
47
45
|
"""
|
|
48
46
|
|
|
49
47
|
def __init__(
|
ekfsm/devices/eeprom.py
CHANGED
ekfsm/devices/ekf_ccu_uc.py
CHANGED
|
@@ -128,9 +128,16 @@ class EKFCcuUc(Device):
|
|
|
128
128
|
|
|
129
129
|
Returns
|
|
130
130
|
-------
|
|
131
|
-
|
|
132
|
-
The desired speed
|
|
133
|
-
|
|
131
|
+
desired: float
|
|
132
|
+
The desired speed.
|
|
133
|
+
actual: float
|
|
134
|
+
The actual speed.
|
|
135
|
+
diag: int
|
|
136
|
+
The diagnostic value.
|
|
137
|
+
|
|
138
|
+
Note
|
|
139
|
+
----
|
|
140
|
+
The diagnostic value is a bitfield with the following meaning:
|
|
134
141
|
|
|
135
142
|
- bit 0: 0 = fan status is invalid, 1 = fan status is valid
|
|
136
143
|
- bit 1: 0 = no error detected, 1 = fan is stuck
|
|
@@ -184,8 +191,10 @@ class EKFCcuUc(Device):
|
|
|
184
191
|
|
|
185
192
|
Returns
|
|
186
193
|
-------
|
|
187
|
-
|
|
188
|
-
The IMU sample
|
|
194
|
+
imu_data: ImuSample | None
|
|
195
|
+
The IMU sample, or None if no sample is available.
|
|
196
|
+
more_samples: bool
|
|
197
|
+
True if more samples are available in the FIFO, False otherwise.
|
|
189
198
|
"""
|
|
190
199
|
more_samples = False
|
|
191
200
|
_data = self._smbus.read_block_data(
|
|
@@ -257,8 +266,10 @@ class EKFCcuUc(Device):
|
|
|
257
266
|
|
|
258
267
|
Returns
|
|
259
268
|
-------
|
|
260
|
-
|
|
261
|
-
The firmware title
|
|
269
|
+
title: str
|
|
270
|
+
The firmware title.
|
|
271
|
+
version: str
|
|
272
|
+
The firmware version.
|
|
262
273
|
"""
|
|
263
274
|
title = bytes(
|
|
264
275
|
self._smbus.read_block_data(
|
ekfsm/devices/generic.py
CHANGED
|
@@ -77,22 +77,77 @@ class Device(SysTree):
|
|
|
77
77
|
return provides
|
|
78
78
|
|
|
79
79
|
def read_sysfs_attr_bytes(self, attr: str) -> bytes | None:
|
|
80
|
+
"""
|
|
81
|
+
Read a sysfs attribute as bytes.
|
|
82
|
+
|
|
83
|
+
Parameters
|
|
84
|
+
----------
|
|
85
|
+
attr
|
|
86
|
+
The sysfs attribute to read.
|
|
87
|
+
|
|
88
|
+
Returns
|
|
89
|
+
-------
|
|
90
|
+
content: bytes
|
|
91
|
+
The contents of the sysfs attribute as bytes.
|
|
92
|
+
None:
|
|
93
|
+
If the sysfs device is not set or the attribute does not exist.
|
|
94
|
+
"""
|
|
80
95
|
if self.sysfs_device and len(attr) != 0:
|
|
81
96
|
return self.sysfs_device.read_attr_bytes(attr)
|
|
82
97
|
return None
|
|
83
98
|
|
|
84
99
|
def read_sysfs_attr_utf8(self, attr: str) -> str | None:
|
|
100
|
+
"""
|
|
101
|
+
Read a sysfs attribute as UTF-8 string.
|
|
102
|
+
|
|
103
|
+
Parameters
|
|
104
|
+
----------
|
|
105
|
+
attr
|
|
106
|
+
The sysfs attribute to read.
|
|
107
|
+
|
|
108
|
+
Returns
|
|
109
|
+
-------
|
|
110
|
+
content: str
|
|
111
|
+
The contents of the sysfs attribute as UTF-8 string.
|
|
112
|
+
None:
|
|
113
|
+
If the sysfs device is not set or the attribute does not exist.
|
|
114
|
+
"""
|
|
85
115
|
if self.sysfs_device and len(attr) != 0:
|
|
86
116
|
return self.sysfs_device.read_attr_utf8(attr)
|
|
87
117
|
return None
|
|
88
118
|
|
|
89
119
|
def write_sysfs_attr(self, attr: str, data: str | bytes) -> None:
|
|
120
|
+
"""
|
|
121
|
+
Write data to a sysfs attribute.
|
|
122
|
+
|
|
123
|
+
Parameters
|
|
124
|
+
----------
|
|
125
|
+
attr
|
|
126
|
+
The sysfs attribute to write to.
|
|
127
|
+
data
|
|
128
|
+
The data to write to the sysfs attribute.
|
|
129
|
+
"""
|
|
90
130
|
if self.sysfs_device and len(attr) != 0:
|
|
91
131
|
return self.sysfs_device.write_attr(attr, data)
|
|
92
132
|
return None
|
|
93
133
|
|
|
94
134
|
@property
|
|
95
135
|
def hw_module(self) -> "HwModule":
|
|
136
|
+
"""
|
|
137
|
+
Get or set the HwModule instance that this device belongs to.
|
|
138
|
+
|
|
139
|
+
Parameters
|
|
140
|
+
----------
|
|
141
|
+
hw_module: optional
|
|
142
|
+
The HwModule instance to set.
|
|
143
|
+
|
|
144
|
+
Returns
|
|
145
|
+
-------
|
|
146
|
+
HwModule
|
|
147
|
+
The HwModule instance that this device belongs to.
|
|
148
|
+
None
|
|
149
|
+
If used as a setter.
|
|
150
|
+
"""
|
|
96
151
|
from ekfsm.core.components import HwModule
|
|
97
152
|
|
|
98
153
|
if isinstance(self._hw_module, HwModule):
|
|
@@ -13,6 +13,14 @@ class IIOThermalHumidity(Device):
|
|
|
13
13
|
"""
|
|
14
14
|
Device for IIO thermal and/or humidity sensors.
|
|
15
15
|
|
|
16
|
+
Parameters
|
|
17
|
+
----------
|
|
18
|
+
name
|
|
19
|
+
The name of the device.
|
|
20
|
+
parent
|
|
21
|
+
The parent device of the IIOThermalHumidity device. If None, no parent is created.
|
|
22
|
+
children
|
|
23
|
+
The children of the IIOThermalHumidity device. If None, no children are created.
|
|
16
24
|
"""
|
|
17
25
|
|
|
18
26
|
def __init__(
|
|
@@ -24,7 +32,7 @@ class IIOThermalHumidity(Device):
|
|
|
24
32
|
**kwargs,
|
|
25
33
|
):
|
|
26
34
|
self.logger = ekfsm_logger("IIOThermalHumidity:" + name)
|
|
27
|
-
super().__init__(name, parent, children, **kwargs)
|
|
35
|
+
super().__init__(name, parent, children, *args, **kwargs)
|
|
28
36
|
self.addr = self.get_i2c_chip_addr()
|
|
29
37
|
self.sysfs_device = self.get_i2c_sysfs_device(self.addr)
|
|
30
38
|
|
ekfsm/devices/imu.py
CHANGED
|
@@ -2,10 +2,14 @@ class ImuSample:
|
|
|
2
2
|
"""
|
|
3
3
|
Class to store IMU data sample
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
Parameters
|
|
6
|
+
----------
|
|
7
|
+
accel
|
|
8
|
+
Accelerometer data in m/s^2, [x, y, z]
|
|
9
|
+
gyro
|
|
10
|
+
Gyroscope data in degrees/s, [x, y, z]
|
|
11
|
+
lost
|
|
12
|
+
True if data was lost before that sample
|
|
9
13
|
"""
|
|
10
14
|
|
|
11
15
|
def __init__(self, accel: list[float], gyro: list[float], lost: bool):
|
ekfsm/devices/mux.py
CHANGED
|
@@ -5,6 +5,23 @@ from .generic import Device
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class MuxChannel(Device):
|
|
8
|
+
"""
|
|
9
|
+
A MuxChannel is a device that represents a channel on an I2C multiplexer.
|
|
10
|
+
It is a child of the I2CMux device.
|
|
11
|
+
The MuxChannel device is used to access the I2C bus on the channel.
|
|
12
|
+
|
|
13
|
+
Parameters
|
|
14
|
+
----------
|
|
15
|
+
name
|
|
16
|
+
The name of the device.
|
|
17
|
+
channel_id
|
|
18
|
+
The channel ID of the device.
|
|
19
|
+
parent
|
|
20
|
+
The parent device of the MuxChannel.
|
|
21
|
+
children
|
|
22
|
+
The children of the MuxChannel device. If None, no children are created.
|
|
23
|
+
"""
|
|
24
|
+
|
|
8
25
|
def __init__(
|
|
9
26
|
self,
|
|
10
27
|
name: str,
|
|
@@ -25,6 +42,19 @@ class MuxChannel(Device):
|
|
|
25
42
|
|
|
26
43
|
|
|
27
44
|
class I2CMux(Device):
|
|
45
|
+
"""
|
|
46
|
+
This class represents an I2C multiplexer device.
|
|
47
|
+
|
|
48
|
+
Parameters
|
|
49
|
+
----------
|
|
50
|
+
name
|
|
51
|
+
The name of the device.
|
|
52
|
+
parent
|
|
53
|
+
The parent device of the I2CMux device. If None, no parent is created.
|
|
54
|
+
children
|
|
55
|
+
The children of the I2CMux device. If None, no children are created.
|
|
56
|
+
"""
|
|
57
|
+
|
|
28
58
|
def __init__(
|
|
29
59
|
self,
|
|
30
60
|
name: str,
|
ekfsm/devices/pmbus.py
CHANGED
|
@@ -76,9 +76,28 @@ class PsuStatus(IntFlag):
|
|
|
76
76
|
"""
|
|
77
77
|
Represents the status of a PSU according to STATUS_BYTE register.
|
|
78
78
|
|
|
79
|
-
See
|
|
79
|
+
See also
|
|
80
80
|
--------
|
|
81
|
+
External Documentation:
|
|
81
82
|
`PMBus Power System Management Protocol Specification - Part II - Revision 1.4, Fig. 60 <https://pmbus.org/>`_
|
|
83
|
+
|
|
84
|
+
Example
|
|
85
|
+
-------
|
|
86
|
+
>>> from ekfsm.devices.pmbus import PsuStatus
|
|
87
|
+
>>> status = PsuStatus(0x1F)
|
|
88
|
+
>>> status
|
|
89
|
+
<PsuStatus.OUTPUT_OVERCURRENT|INPUT_UNDERVOLTAGE|TEMP_ANORMALY|COMMUNICATION_ERROR|ERROR: 31>
|
|
90
|
+
>>> PsuStatus.OUTPUT_OVERCURRENT in status
|
|
91
|
+
True
|
|
92
|
+
>>> # OK is always present
|
|
93
|
+
>>> PsuStatus.OK in status
|
|
94
|
+
True
|
|
95
|
+
>>> # Instead, check if status is OK
|
|
96
|
+
>>> status = PsuStatus(0x00)
|
|
97
|
+
>>> status
|
|
98
|
+
<PsuStatus.OK: 0>
|
|
99
|
+
>>> PsuStatus.OUTPUT_OVERCURRENT in status
|
|
100
|
+
False
|
|
82
101
|
"""
|
|
83
102
|
|
|
84
103
|
OUTPUT_OVERVOLTAGE = 0x20
|
|
@@ -91,6 +110,9 @@ class PsuStatus(IntFlag):
|
|
|
91
110
|
|
|
92
111
|
|
|
93
112
|
class PmBus(Device, ProbeableDevice):
|
|
113
|
+
"""
|
|
114
|
+
This class represents a PMBus device (e.g. a PSU).
|
|
115
|
+
"""
|
|
94
116
|
|
|
95
117
|
def __init__(
|
|
96
118
|
self,
|
|
@@ -100,7 +122,7 @@ class PmBus(Device, ProbeableDevice):
|
|
|
100
122
|
*args,
|
|
101
123
|
**kwargs,
|
|
102
124
|
):
|
|
103
|
-
super().__init__(name, parent, children, **kwargs)
|
|
125
|
+
super().__init__(name, parent, children, *args, **kwargs)
|
|
104
126
|
self.addr = self.get_i2c_chip_addr()
|
|
105
127
|
self.sysfs_device = self.get_i2c_sysfs_device(self.addr)
|
|
106
128
|
|
ekfsm/system.py
CHANGED
|
@@ -57,15 +57,6 @@ class System(SysTree):
|
|
|
57
57
|
|
|
58
58
|
Visual representation of the system is shown as trees of HW Modules and attached devices.
|
|
59
59
|
|
|
60
|
-
Iterating over the system will iterate over all boards in the system.
|
|
61
|
-
|
|
62
|
-
Accessing boards
|
|
63
|
-
----------------
|
|
64
|
-
<board_name>
|
|
65
|
-
The board object can be accessed by its name.
|
|
66
|
-
<slot_number>
|
|
67
|
-
The board object can be accessed by its slot number.
|
|
68
|
-
|
|
69
60
|
Attributes
|
|
70
61
|
----------
|
|
71
62
|
name
|
|
@@ -81,6 +72,18 @@ class System(SysTree):
|
|
|
81
72
|
config
|
|
82
73
|
The system configuration.
|
|
83
74
|
|
|
75
|
+
|
|
76
|
+
Accessing boards
|
|
77
|
+
----------------
|
|
78
|
+
|
|
79
|
+
Iterating over the system will iterate over all boards in the system.
|
|
80
|
+
|
|
81
|
+
<board_name>
|
|
82
|
+
The board object can be accessed by its name.
|
|
83
|
+
<slot_number>
|
|
84
|
+
The board object can be accessed by its slot number.
|
|
85
|
+
|
|
86
|
+
|
|
84
87
|
Example
|
|
85
88
|
-------
|
|
86
89
|
>>> from ekfsm.system import System
|
|
@@ -101,6 +104,9 @@ class System(SysTree):
|
|
|
101
104
|
----------
|
|
102
105
|
config
|
|
103
106
|
Path to the config that specifies the system and how the slots are filled.
|
|
107
|
+
abort
|
|
108
|
+
If True, abort the program if a board cannot be created. If False, leave the slot empty.
|
|
109
|
+
Default is False.
|
|
104
110
|
"""
|
|
105
111
|
self.config_path = config
|
|
106
112
|
self.config = load_config(str(self.config_path))
|
|
@@ -171,7 +177,7 @@ class System(SysTree):
|
|
|
171
177
|
if slot.attributes.is_master:
|
|
172
178
|
master, _ = self.create_hwmodule(slot, i, None)
|
|
173
179
|
if master is not None:
|
|
174
|
-
master.master = master
|
|
180
|
+
master.master = master # ???
|
|
175
181
|
return master, i
|
|
176
182
|
else:
|
|
177
183
|
return None, -1
|
|
@@ -183,6 +189,15 @@ class System(SysTree):
|
|
|
183
189
|
"""
|
|
184
190
|
Create HwModule object for the slot.
|
|
185
191
|
|
|
192
|
+
Parameters
|
|
193
|
+
----------
|
|
194
|
+
slot_entry
|
|
195
|
+
The slot entry config (usually part of the system configuration).
|
|
196
|
+
slot_number
|
|
197
|
+
The slot number of the slot.
|
|
198
|
+
master
|
|
199
|
+
The master board of the system.
|
|
200
|
+
|
|
186
201
|
Returns
|
|
187
202
|
-------
|
|
188
203
|
HwModule and Slot. HwModule is None if it cannot be created.
|
|
@@ -310,6 +325,20 @@ class System(SysTree):
|
|
|
310
325
|
return hwmod
|
|
311
326
|
|
|
312
327
|
def get_module_in_slot(self, idx: int) -> HwModule | None:
|
|
328
|
+
"""
|
|
329
|
+
Get the hwmodule in the given slot.
|
|
330
|
+
|
|
331
|
+
Parameters
|
|
332
|
+
----------
|
|
333
|
+
idx
|
|
334
|
+
The slot index.
|
|
335
|
+
Returns
|
|
336
|
+
-------
|
|
337
|
+
HwModule
|
|
338
|
+
The hwmodule in the given slot.
|
|
339
|
+
None
|
|
340
|
+
If no hwmodule is present in the given slot.
|
|
341
|
+
"""
|
|
313
342
|
return next(
|
|
314
343
|
(
|
|
315
344
|
v.hwmodule
|
|
@@ -320,6 +349,21 @@ class System(SysTree):
|
|
|
320
349
|
)
|
|
321
350
|
|
|
322
351
|
def get_module_by_name(self, name: str) -> HwModule | None:
|
|
352
|
+
"""
|
|
353
|
+
Get the hwmodule by its name.
|
|
354
|
+
|
|
355
|
+
Parameters
|
|
356
|
+
----------
|
|
357
|
+
name
|
|
358
|
+
The name of the hwmodule.
|
|
359
|
+
|
|
360
|
+
Returns
|
|
361
|
+
-------
|
|
362
|
+
HwModule
|
|
363
|
+
The hwmodule with the given name.
|
|
364
|
+
None
|
|
365
|
+
If no hwmodule is present with the given name.
|
|
366
|
+
"""
|
|
323
367
|
return next(
|
|
324
368
|
(b for b in self.boards if getattr(b, "instance_name", None) == name),
|
|
325
369
|
None,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ekfsm
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0a15.post1
|
|
4
4
|
Summary: The EKF System Management Library (ekfsm) is a sensor monitoring suite for Compact PCI Serial devices.
|
|
5
5
|
Author-email: Klaus Popp <klaus.popp@ci4rail.com>, Jan Jansen <jan@ekf.de>, Felix Päßler <fp@ekf.de>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
ekfsm/__init__.py,sha256=
|
|
2
|
-
ekfsm/cli.py,sha256=
|
|
1
|
+
ekfsm/__init__.py,sha256=R12o_igFRTqlHUD9jyrOIPq2nBpTUWuvIPgCytBlVzk,142
|
|
2
|
+
ekfsm/cli.py,sha256=JmTO1TyxrTlGTkQo8ndSR7nj0grSGuQdh9ugXx1IeQE,3919
|
|
3
3
|
ekfsm/config.py,sha256=FTk47f3qA05Zv6Cy_L_5XlGmmbC9z_kPdQJKpVoHkWs,924
|
|
4
4
|
ekfsm/exceptions.py,sha256=25P677GxfBTdBWHRngPce0bmhcLg7MFeTtuAvguxd90,1310
|
|
5
5
|
ekfsm/lock.py,sha256=qmWkW6OA-NLiDrtSsQn-K10tZJ19t-h4iFB5zyL97Vw,2682
|
|
6
6
|
ekfsm/log.py,sha256=_GC8Y7a4fFV4_DNicbwQ-5rRzNQU6WSotXd2etXSrZk,866
|
|
7
7
|
ekfsm/py.typed,sha256=1gNRtmxvYcVqDDEyAzBLnD8dAOweUfYxW2ZPdJzN1fg,102
|
|
8
8
|
ekfsm/simctrl.py,sha256=NkmjvqOym9Wruh0f14Od6gHfEgPMAkxUzMQ-nvzcM3Q,6681
|
|
9
|
-
ekfsm/system.py,sha256=
|
|
9
|
+
ekfsm/system.py,sha256=azVFdVK7r-9RWotsD7c18YvyZfCqg-3z5t7SqUSDLh8,12922
|
|
10
10
|
ekfsm/boards/oem/ekf/ccu.yaml,sha256=qgr7YZO0kEddD9K6tv6222NyozkRNuF7NFw6hyX0XgE,2094
|
|
11
11
|
ekfsm/boards/oem/ekf/sc5-festival.yaml,sha256=_0kS5GegfyOt5CTJc9kY6HJbr9yZo4i18sVo6F4KE9c,772
|
|
12
12
|
ekfsm/boards/oem/ekf/sc9-toccata.yaml,sha256=btLgQMSsW0tRipnUYUkVQSIsjzxfKq0NXaQ1fMMyBRI,771
|
|
@@ -18,28 +18,28 @@ ekfsm/boards/oem/ekf/sq3-quartet.yaml,sha256=pBB7Tv0IWLkFUYBs3tFvZriA-uqPuPIgzja
|
|
|
18
18
|
ekfsm/boards/oem/ekf/srf-fan.yaml,sha256=Mcu1Q8B1Ih10hoc_hbkGlppBmbOFcufsVUR42iW4Rwc,1368
|
|
19
19
|
ekfsm/boards/oem/ekf/sur-uart.yaml,sha256=VaNP2BSlNTi1lDco16Ma9smPEAMaVKvx-ZNDcm3QptM,1890
|
|
20
20
|
ekfsm/boards/oem/hitron/hdrc-300s.yaml,sha256=E567QsRPvyAEXpXOeF1OvX2AoQK8BTxI0C7QVBFlT_k,548
|
|
21
|
-
ekfsm/core/__init__.py,sha256=
|
|
21
|
+
ekfsm/core/__init__.py,sha256=NVgbM5fBDbPhP5HtzMTKfloe9u5xutm47DM9Vt_kbRU,348
|
|
22
22
|
ekfsm/core/components.py,sha256=dh71jM_OJ8QhTzou-5L6RaF3abXgE470KJfxQRqq1CY,3836
|
|
23
23
|
ekfsm/core/probe.py,sha256=DgJvkvMjVk09n0Rzn13ybRvidrmFn_D2PD56XS-KgxU,262
|
|
24
|
-
ekfsm/core/slots.py,sha256=
|
|
25
|
-
ekfsm/core/sysfs.py,sha256=
|
|
24
|
+
ekfsm/core/slots.py,sha256=pKBkPUxv-Lz9GxCrlnZu4gR7f59tQ0GW1MBs7nblqaI,6582
|
|
25
|
+
ekfsm/core/sysfs.py,sha256=CVGxUEdhmJjRw8ZfnjL3hUwm6oWsp3ZKPG2qGUFYIiY,2283
|
|
26
26
|
ekfsm/core/utils.py,sha256=EoPOuRmLlvHvGneDcKjP7Qbjfsc4XlMbLeaSFRObt_E,3145
|
|
27
27
|
ekfsm/devices/__init__.py,sha256=UtFLCtAdpDJ3OaY7fedk13bx90NMsfxhyVAHV13t2U4,936
|
|
28
|
-
ekfsm/devices/coretemp.py,sha256=
|
|
29
|
-
ekfsm/devices/eeprom.py,sha256=
|
|
30
|
-
ekfsm/devices/ekf_ccu_uc.py,sha256=
|
|
28
|
+
ekfsm/devices/coretemp.py,sha256=oco909zpXw9BqkLWV3dJma1_Q23M2EUGsgdcs4QtFjU,1966
|
|
29
|
+
ekfsm/devices/eeprom.py,sha256=wj2sy52s8YtsLyfb-_J3cbmI3m-EYdRgSqNZ9_GHVb8,31971
|
|
30
|
+
ekfsm/devices/ekf_ccu_uc.py,sha256=mKOWt3T7uLUZdIzCnZwJPLEKYjN22TgOGZEo6yclnoA,15384
|
|
31
31
|
ekfsm/devices/ekf_sur_led.py,sha256=dY2EIqUx4-LV7ipCEIg8DfXWlGxpspRmEtEhVfHY6LI,1871
|
|
32
|
-
ekfsm/devices/generic.py,sha256=
|
|
32
|
+
ekfsm/devices/generic.py,sha256=9FDj8hhiCQAFmA5tt3lv1JPIZyAb3XCCriDIoR61kcE,10821
|
|
33
33
|
ekfsm/devices/gpio.py,sha256=hlJ3yJ8jSGUIkPpjymani0EcxYJX2iEybGbnV8N0O5E,9552
|
|
34
34
|
ekfsm/devices/iio.py,sha256=gMOJGdg2PvFbAvlBpLfDTIc_-9i1Z3OLpuabTke6N3I,1480
|
|
35
|
-
ekfsm/devices/iio_thermal_humidity.py,sha256=
|
|
36
|
-
ekfsm/devices/imu.py,sha256=
|
|
37
|
-
ekfsm/devices/mux.py,sha256=
|
|
38
|
-
ekfsm/devices/pmbus.py,sha256=
|
|
35
|
+
ekfsm/devices/iio_thermal_humidity.py,sha256=gALZ1B4f1ePGAEL7Q5VxbubgC3CgtC9RBM9F4YWuH4E,1478
|
|
36
|
+
ekfsm/devices/imu.py,sha256=GwJrnC-WztpE5oGnkIp-laFkSp3_gbSp9YpJ8jBsUOs,423
|
|
37
|
+
ekfsm/devices/mux.py,sha256=C2h5w8eXrL4RXXebCSnNY-VShTgeqmYDMvGSunapBqk,1830
|
|
38
|
+
ekfsm/devices/pmbus.py,sha256=QIs93qv9sXSdWEPyY55k0KVSr-XMPYNJhTux3vYLzAE,7104
|
|
39
39
|
ekfsm/devices/smbios.py,sha256=gDDYtfCd7njzqxJBKJxIR2BMCK6-uZxUVxC9y0hnz4g,1009
|
|
40
40
|
ekfsm/devices/smbus.py,sha256=zD9b6PehipMw-xoaOMC-oorDVxBoo30hc98gyFxFLs0,500
|
|
41
41
|
ekfsm/devices/utils.py,sha256=4-0Kmvy4ou8R71afNj6RqdBTjLW4SMWPHqVrzB2RUZw,397
|
|
42
|
-
ekfsm-1.
|
|
43
|
-
ekfsm-1.
|
|
44
|
-
ekfsm-1.
|
|
45
|
-
ekfsm-1.
|
|
42
|
+
ekfsm-1.1.0a15.post1.dist-info/METADATA,sha256=ylfAPwvJBbi31RurwwJQDMo6V3C-EYkeoTn_RjXs14E,6550
|
|
43
|
+
ekfsm-1.1.0a15.post1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
44
|
+
ekfsm-1.1.0a15.post1.dist-info/entry_points.txt,sha256=WhUR4FzuxPoGrbTOKLsNJO7NAnk2qd4T30fqzN1yLw8,45
|
|
45
|
+
ekfsm-1.1.0a15.post1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|