# arm362/osdp-pt architecture

> Architecture diagram of the GitHub repository arm362/osdp-pt, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arm362/osdp-pt
- Repository: https://github.com/arm362/osdp-pt

## Overview

OSDP Packet Tester is a small Python library for validating individual or queued OSDP packets. The documented workflow is to pass packet bytes to PacketTester, or save packets and run the batch test; callers can also inspect or clear the saved set. The core excerpt confirms structural, command/reply payload, CRC/checksum, and error-reporting logic, but omits much of the runner wiring, so uncertain internal call edges are not shown.

Main entry points: [`osdp_pt/core.py`](https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py) (PacketTester), [`osdp_pt/__init__.py`](https://github.com/arm362/osdp-pt/blob/main/osdp_pt/__init__.py) (Package Export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Public API"]
  node_public["Package Export<br/>[__init__.py]"]
  node_tester["PacketTester<br/>[core.py]"]
  node_saved["Saved Packets<br/>[core.py]"]
end

subgraph group_validation["Packet Validation"]
  node_structure["Structure Checks<br/>[core.py]"]
  node_payload["Command Reply Checks<br/>[core.py]"]
  node_integrity["CRC CSUM Checks<br/>[core.py]"]
  node_errors["Error Reporting<br/>[core.py]"]
end

node_user(("Library Caller"))

node_public -->|"exports"| node_tester
node_user -->|"imports"| node_public
node_user -->|"tests packets"| node_tester
node_tester -->|"queues packets"| node_saved
node_tester -->|"runs each packet"| node_tester

click node_public "https://github.com/arm362/osdp-pt/blob/main/osdp_pt/__init__.py"
click node_tester "https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py"
click node_saved "https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py"
click node_structure "https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py"
click node_payload "https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py"
click node_integrity "https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py"
click node_errors "https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_public,node_tester,node_saved toneBlue
class node_structure,node_payload,node_integrity,node_errors toneAmber
class node_user toneIndigo
```

## Components

### Public API

- [Package Export](https://github.com/arm362/osdp-pt/blob/main/osdp_pt/__init__.py): `osdp_pt/__init__.py`
- [PacketTester](https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py): `osdp_pt/core.py`
- [Saved Packets](https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py): `osdp_pt/core.py`

### Packet Validation

- [Structure Checks](https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py): `osdp_pt/core.py`
- [Command Reply Checks](https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py): `osdp_pt/core.py`
- [CRC CSUM Checks](https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py): `osdp_pt/core.py`
- [Error Reporting](https://github.com/arm362/osdp-pt/blob/main/osdp_pt/core.py): `osdp_pt/core.py`

### Other components

- **Library Caller**

## Connections

- Package Export → PacketTester: exports
- Library Caller → Package Export: imports
- Library Caller → PacketTester: tests packets
- PacketTester → Saved Packets: queues packets
- PacketTester → PacketTester: runs each packet
