Skip to content

Commit

Permalink
Add method to obtain monitor_state
Browse files Browse the repository at this point in the history
  • Loading branch information
cboulay committed Nov 22, 2024
1 parent b7e848d commit 497a106
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pycbsdk/cbhw/device/nsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,9 @@ def get_transport(self, force_refresh=False) -> int:
self.set_transport("CHECK", True, timeout=0.5)
return self._config["transport"]

def get_monitor_state(self) -> dict:
return self._monitor_state.copy()

def reset(self) -> int:
print("TODO: reset NSP proctime to 0")
return 0
Expand Down
4 changes: 4 additions & 0 deletions src/pycbsdk/cbsdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ def get_runlevel(device: NSPDevice) -> CBRunLevel:
return device.get_runlevel()


def get_monitor_state(device: NSPDevice) -> dict:
return device.get_monitor_state()


def register_event_callback(
device: NSPDevice, channel_type: CBChannelType, func: Callable[[Structure], None]
):
Expand Down

0 comments on commit 497a106

Please sign in to comment.