Skip to content

Commit

Permalink
Merge pull request #27 from IQTLabs/sigmfv
Browse files Browse the repository at this point in the history
Add sigmf version number.
  • Loading branch information
anarkiwi authored Apr 4, 2024
2 parents dd8439f + 34f2c3c commit 0033d15
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ sudo apt-get update && sudo apt-get install -qy \
libboost-all-dev \
libuhd-dev \
libvulkan-dev \
python3-pip \
unzip \
valgrind \
wget \
&& \
pip install sigmf && \
wget https://sourceforge.net/projects/sigpack/files/sigpack-1.2.7.zip -O sigpack.zip && unzip sigpack.zip && ln -s sigpack-*/sigpack . && \
git clone https://github.com/google/flatbuffers -b v23.5.26 && \
git clone https://github.com/nlohmann/json -b v3.11.2 && \
Expand Down
3 changes: 3 additions & 0 deletions lib/sample_pipeline_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ BOOST_AUTO_TEST_CASE(RandomFFTTest) {
samples.size() * sizeof(std::complex<float>));
enqueue_samples(write_ptr);
sample_pipeline_stop(0, file, 1e3 * 1024, 100e6, 1.1, -1, "cf32_le");
std::string sigmf_validate_cli =
"sigmf_validate --skip-checksum " + file + ".sigmf-meta";
BOOST_TEST(std::system(sigmf_validate_cli.c_str()) == 0);
arma::Col<std::complex<float>> disk_samples;
disk_samples.copy_size(samples);
FILE *samples_fp = fopen(file.c_str(), "rb");
Expand Down
1 change: 1 addition & 0 deletions lib/sample_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ void SampleWriter::write_sigmf(const std::string &filename, double timestamp,
record;
record.global.access<sigmf::core::GlobalT>().datatype = datatype;
record.global.access<sigmf::core::GlobalT>().sample_rate = sample_rate;
record.global.access<sigmf::core::GlobalT>().version = "1.0.0";
auto capture =
sigmf::Capture<sigmf::core::DescrT, sigmf::capture_details::DescrT>();
capture.get<sigmf::core::DescrT>().sample_start = 0;
Expand Down

0 comments on commit 0033d15

Please sign in to comment.