Skip to content

Commit

Permalink
README.md: Document failure handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sjlongland committed May 4, 2024
1 parent a402e44 commit d31fa43
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@ their `received` signals and accept raw AX.25 frames via the `send` method.
Any object passed to `send` is wrapped in a `bytes` call -- this will
implicitly call the `__bytes__` method on the object you pass in.

#### Exception handling on the KISS device

There are a couple of exception cases that are emitted via a signal, so that
any consumer of the KISS device can react to issues, such as the port failing
to open, transmission failures, or failures to shut down.

```python
def _on_fail(action, exc_info, **kwargs):
# Put your error handling code here
# action is a string: "open", "send" or "close"
# exc_info is the output of sys.exc_info() at the time of the error
pass
kissdev.failed.connect(_on_fail)
```

### Setting up an AX.25 Interface

The AX.25 interface is a logical routing and queueing layer which decodes the
Expand Down

0 comments on commit d31fa43

Please sign in to comment.