iotile / iotile/coretools

Allow propagation of errors from DeviceAdapter through HardwareManager

Open
#839 0 comments 0 reactions 1 assignee Claimed by @timburke View on GitHub
iotile-core transport-bled112
Dominant language
Python
Stars
14
Forks
7
PR merge metrics
No merged PRs in 30d

Description

If an `AbstractDeviceAdapter` fundamentally breaks, there is currently no way for `HardwareManager` to find out about that problem until it tries to use the adapter in some way. This is a problem for situations where `HardwareManager` is used in a passive setting such as scanning for broadcast reports. You can have a loop that just receives broadcast reports without ever trying to send a command to the device adapter.

Since no command is ever sent, if the device adapter fails (such as because the hardware is unplugged from the machine) there is no way for it to know about that permanent failure so it will just block forever waiting for the next broadcast report, which will never come because the device adapter is missing.

There needs to be a way to communicate this problem up the change via notification events so that people who only passively subscribe can still find out about problems.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.