Moving usage examples into their own folder

This commit is contained in:
Michael Luciuk 2025-09-12 15:10:18 -04:00
parent 469e9422c6
commit c550aa628e
6 changed files with 48 additions and 25 deletions

View File

@ -0,0 +1,13 @@
.. _examples:
########
Examples
########
This section contains usage examples designed to help you get started with RIA Toolkit OSS.
.. toctree::
:maxdepth: 2
:caption: Contents:
SDR Examples <sdr/index>

View File

@ -0,0 +1,14 @@
.. _examples:
############
SDR Examples
############
This section contains examples of how to use the SDR package in RIA Toolkit OSS, such as receiving and transmitting signals.
.. toctree::
:maxdepth: 2
:caption: Contents:
Example 1: SDR Reception <rx>
Example 2: SDR Transmission <tx>

View File

@ -1,9 +1,7 @@
.. _rx: .. _rx:
Rx Example Example 1: SDR Reception
========== ========================
This example code for getting started with RIA Toolkit OSS SDR package.
.. contents:: .. contents::
:local: :local:
@ -18,8 +16,8 @@ In this example, we use the [bladeRF](https://www.nuand.com/bladerf-1/). However
this package presents a common interface for all SDR devices, the same code can be used this package presents a common interface for all SDR devices, the same code can be used
to interface with additional supported radios. to interface with additional supported radios.
Example 1: Recording a Signal Code
----------------------------- ----
In this example, we initialize the `Blade` SDR, configure it to record a signal for a specified duration. In this example, we initialize the `Blade` SDR, configure it to record a signal for a specified duration.
@ -48,3 +46,9 @@ In this example, we initialize the `Blade` SDR, configure it to record a signal
print(f"Total time: {end - start} seconds") print(f"Total time: {end - start} seconds")
print(f"Length of the recording: {len(my_rec)} samples") print(f"Length of the recording: {len(my_rec)} samples")
Conclusion
----------
This example demonstrates how to use the ``Blade`` class to receive samples into a ``Recording`` object. By customizing the parameters,
we can adapt this example to various signal processing and SDR tasks.

View File

@ -1,9 +1,7 @@
.. _tx: .. _tx:
Tx Example Example 2: SDR Transmission
========== ===========================
This example code for getting started with RIA Toolkit OSS SDR package.
.. contents:: .. contents::
:local: :local:
@ -14,11 +12,15 @@ Introduction
This example illustrates how to generate a custom chirp signal and transmit it using the ``Blade`` SDR. The waveform is This example illustrates how to generate a custom chirp signal and transmit it using the ``Blade`` SDR. The waveform is
created using the ``numpy`` library and encapsulated in a ``Recording`` object. created using the ``numpy`` library and encapsulated in a ``Recording`` object.
Code
----
.. code-block:: python .. code-block:: python
import time import time
import numpy as np import numpy as np
from ria_toolkit_oss.datatypes.recording import Recording from ria_toolkit_oss.datatypes.recording import Recording
from ria_toolkit_oss.sdr.blade import Blade from ria_toolkit_oss.sdr.blade import Blade
@ -63,5 +65,5 @@ created using the ``numpy`` library and encapsulated in a ``Recording`` object.
Conclusion Conclusion
---------- ----------
These examples provide a foundation for working with SDRs using the ``Blade`` class. By customizing the parameters, This example demonstrates how to use the ``Blade`` class to transmit a custom waveform. By customizing the parameters,
you can adapt these scripts to various signal processing and SDR tasks. we can adapt this example to various signal processing and SDR tasks.

View File

@ -6,8 +6,9 @@ RIA Toolkit OSS Documentation
Introduction <intro/index> Introduction <intro/index>
SDR Guides <sdr_guides/index> SDR Guides <sdr_guides/index>
Examples <examples/index>
Datatypes Package <ria_toolkit_oss/datatypes/ria_toolkit_oss.datatypes> Datatypes Package <ria_toolkit_oss/datatypes/ria_toolkit_oss.datatypes>
SDR Package <ria_toolkit_oss/sdr/ria_toolkit_oss.sdr> SDR Package <ria_toolkit_oss/ria_toolkit_oss.sdr>
IO Package <ria_toolkit_oss/ria_toolkit_oss.io> IO Package <ria_toolkit_oss/ria_toolkit_oss.io>
Transforms Package <ria_toolkit_oss/ria_toolkit_oss.transforms> Transforms Package <ria_toolkit_oss/ria_toolkit_oss.transforms>
Utils Package <ria_toolkit_oss/ria_toolkit_oss.utils> Utils Package <ria_toolkit_oss/ria_toolkit_oss.utils>

View File

@ -7,17 +7,6 @@ SDR Package (ria_toolkit_oss.sdr)
:inherited-members: :inherited-members:
:show-inheritance: :show-inheritance:
SDR Code Examples
-----------------
This section contains usage examples designed to help you get started with the RIA Toolkit OSS SDR package.
.. toctree::
:maxdepth: 2
Rx Example <examples/rx>
Tx Example <examples/tx>
Radio Classes Radio Classes
------------- -------------