channel handling
Refactored code to improve usability and error handling by implementing
automatic device selection when no device is explicitly specified. New
functionalities include opening devices based on provided info, and a
more robust way to retrieve and validate the number of RX and TX
channels. These changes streamline the device and channel setup process,
especially for systems with a single connected device.
- Introduced `openDevice` to encapsulate device opening logic with
fallback to the first available device.
- Added `getDeviceChannels` and `getChannelsFromInfo` for retrieving
channel information.
- Ensured LimeConfig struct now includes a `device` field to store the
selected device.
- Modified experiment setup to automatically select a device if not
configured and validate channel availability.
- Updated HDF attribute population to include device information.
These improvements should reduce the likelihood of user errors and
simplify the configuration process when working with LimeSDR devices.
The outdated and unused code related to antenna selection has been
purged. This cleanup simplifies `run_experiment` by removing the
comments that printed available antenna names and selected an antenna
port. The removal avoids confusion and potential maintenance issues
associated with deprecated sections of code. Future antenna selection
implementations should be designed with a more current context of the
project.
Introduced configuration options for RX and TX matching networks in the
LimeDriver, enabling manual specification of the reception and
transmission paths. This change also includes default logic to maintain
previous behavior when new options are unset. Additionally, bumped the
version to 0.3.0 to reflect new feature addition. This enhancement
provides flexibility for advanced users to optimize signal chain
characteristics based on specific requirements.
Switched the data type of 'channel' from float to int in LimeConfig
structure to ensure channel numbers are represented as integers,
aligning with typical usage and avoiding potential truncation errors.
This change improves configuration accuracy and safeguards against
invalid fractional channel values.
interactions
Enhanced the Lime driver by introducing channel selection configuration
which enables specifying the channel to be used within the driver's
processes. Adapted various Lime Suite API calls throughout the
`run_experiment` function to utilize the `LimeCfg.channel` as an
argument, ensuring dynamic channel management. This update facilitates
operations with multi-channel setups and aligns API calls with the new
configuration option. Additionally, improved code comments and removed
redundant TX FIFO slot updates.
Bumped version number to reflect new features and improvements.
"--devices"
Implemented "--dump" and "--devices" flags in the parseArguments function.
The "--dump" flag triggers the configuration to
be dumped and the program to exit immediately thereafter. Similarly, the
"--devices" flag lists available devices and exits.
Additionally, the help flow has been revised to only print usage details
when the "--help" flag is detected, preventing invalid argument errors
from appearing when help is requested. Removed redundant code that
handled the "--dump" flag, streamlining argument parsing in the main
function.
These enhancements offer users immediate access to diagnostic
information and available devices, improving usability and support.
Corrected a misspelling in the usage error message that is displayed
when the program encounters an invalid argument. This change improves
clarity for end-users troubleshooting command-line input issues.
Refactored the process of retrieving device lists to use a new
`getDeviceList` function, improving code organization and readability.
This function leverages the `std::vector` to dynamically handle the
number of detected devices, eliminating the static array limitation.
Additionally, consolidated the code for obtaining the number of RX/TX
channels and antennas, enhancing maintainability. Replaced hardcoded
device and channel counts with dynamic retrieval to prevent potential
buffer overflows and ensure robustness for varying hardware
configurations.
Included detailed build instructions for Debian-based and Arch Linux
systems in the README. C++ build dependencies and steps are now
documented, facilitating the setup process for new contributors and
users. The update ensures clarity on how to compile the software and
where to find the resulting `limedriver` executable.
Added a step to the continuous integration workflow to upload compiled
build artifacts. This permits easier access to builds for further
testing and validation post-CI process.
Streamlined the setup process in the GitHub Actions workflow by
combining system updates and package installations into a single step.
Removed the action for setting up CMake, instead directly installing it
along with build requirements, reducing redundancy and improving build
times. These adjustments enhance the efficiency of the continuous
integration process.
artifacts
Transition the project's build system from Autoconf to CMake,
streamlining the build process and conforming to modern C++ project
standards. Autoconf related files like 'configure', 'install-sh', and
'missing' have been removed while CMakeLists and relevant .cmake
configuration files are added to support the new system. This change
addresses the need for a more portable and easier-to-maintain build
system, particularly beneficial for cross-platform development. As a
result, build process customization and dependency management are
expected to be more straightforward.
Additionally, `.gitignore` has been adjusted to accommodate the CMake
build outputs. The new CMake build system introduces `build/` as the
directory for out-of-source builds, replacing the more scattered build
artifacts of the previous system.
Replaced the array parameter in `dumpConfig` function with a vector reference, streamlining parameter passing and enhancing code maintainability. Included `<cstddef>` for `size_t` definition and removed redundant code that copied vector contents to an array, thus improving performance. These changes eliminate the need for manual array sizing and copying, reducing potential errors and improving readability.
Enhanced performance and safety of the LimeDriver by passing `LimeCfg` by reference to `getHDFAttributes`. Additionally, zero-initialized `LimeCfg`, pulse duration, and frequency arrays upon creation to prevent potential use of garbage values and ensure determinate behavior. These changes may reduce memory usage and increase reliability when configuring the Lime hardware.
Replaced inline initialization of HDF attribute structs with getHDFAttributes, a new function isolating HDF configuration setup. This change improves modularity, making the main function cleaner and the codebase easier to maintain. It allows expanding or changing the attribute set without cluttering the main logic. The introduced std::vector further modernizes resource management and supports dynamic attribute collection, followed by a conversion to an array for backward compatibility with existing code.