ka9q-python 3.2.0__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.
ka9q/__init__.py ADDED
@@ -0,0 +1,98 @@
1
+ """
2
+ ka9q: Python interface for ka9q-radio
3
+
4
+ A general-purpose library for controlling ka9q-radio channels and streams.
5
+ No assumptions about your application - works for everything from AM radio
6
+ listening to SuperDARN radar monitoring.
7
+
8
+ Basic usage:
9
+ from ka9q import RadiodControl, allocate_ssrc
10
+
11
+ # Use context manager for automatic cleanup
12
+ with RadiodControl("radiod.local") as control:
13
+ # SSRC-free API (recommended) - SSRC auto-allocated
14
+ ssrc = control.create_channel(
15
+ frequency_hz=10.0e6,
16
+ preset="am",
17
+ sample_rate=12000
18
+ )
19
+ print(f"Created channel with SSRC: {ssrc}")
20
+
21
+ # Or use allocate_ssrc() directly for coordination
22
+ ssrc = allocate_ssrc(10.0e6, "iq", 16000)
23
+ """
24
+
25
+ __version__ = '3.2.0'
26
+ __author__ = 'Michael Hauan AC0G'
27
+
28
+ from .control import RadiodControl, allocate_ssrc
29
+ from .discovery import (
30
+ discover_channels,
31
+ discover_channels_native,
32
+ discover_channels_via_control,
33
+ discover_radiod_services,
34
+ ChannelInfo
35
+ )
36
+ from .types import StatusType, Encoding
37
+ from .exceptions import Ka9qError, ConnectionError, CommandError, ValidationError
38
+ from .rtp_recorder import (
39
+ RTPRecorder,
40
+ RecorderState,
41
+ RTPHeader,
42
+ RecordingMetrics,
43
+ parse_rtp_header,
44
+ rtp_to_wallclock
45
+ )
46
+ from .stream_quality import (
47
+ GapSource,
48
+ GapEvent,
49
+ StreamQuality,
50
+ )
51
+ from .resequencer import (
52
+ PacketResequencer,
53
+ RTPPacket,
54
+ ResequencerStats,
55
+ )
56
+ from .stream import (
57
+ RadiodStream,
58
+ )
59
+
60
+ __all__ = [
61
+ # Control
62
+ 'RadiodControl',
63
+ 'allocate_ssrc',
64
+
65
+ # Discovery
66
+ 'discover_channels',
67
+ 'discover_channels_native',
68
+ 'discover_channels_via_control',
69
+ 'discover_radiod_services',
70
+ 'ChannelInfo',
71
+
72
+ # Types
73
+ 'StatusType',
74
+ 'Encoding',
75
+
76
+ # Exceptions
77
+ 'Ka9qError',
78
+ 'ConnectionError',
79
+ 'CommandError',
80
+ 'ValidationError',
81
+
82
+ # Low-level RTP (packet-oriented)
83
+ 'RTPRecorder',
84
+ 'RecorderState',
85
+ 'RTPHeader',
86
+ 'RecordingMetrics',
87
+ 'parse_rtp_header',
88
+ 'rtp_to_wallclock',
89
+
90
+ # Stream API (sample-oriented) - NEW
91
+ 'RadiodStream',
92
+ 'StreamQuality',
93
+ 'GapSource',
94
+ 'GapEvent',
95
+ 'PacketResequencer',
96
+ 'RTPPacket',
97
+ 'ResequencerStats',
98
+ ]