Skip to content

Commit

Permalink
Support for SigMF (#11)
Browse files Browse the repository at this point in the history
Introduce initial support for SigMF.

Add `sigmf-hash` and `sigmf-col` utility to manipulate SigMF files.
  • Loading branch information
loic-fejoz authored Mar 1, 2024
1 parent 37781a5 commit 7c688e2
Show file tree
Hide file tree
Showing 46 changed files with 4,463 additions and 13 deletions.
328 changes: 328 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,328 @@
{
// Utilisez IntelliSense pour en savoir plus sur les attributs possibles.
// Pointez pour afficher la description des attributs existants.
// Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fsdr-blocks'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fsdr-blocks"
],
"filter": {
"name": "fsdr-blocks",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug integration test 'type_converters'",
"cargo": {
"args": [
"test",
"--no-run",
"--test=type_converters",
"--package=fsdr-blocks"
],
"filter": {
"name": "type_converters",
"kind": "test"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug integration test 'tests'",
"cargo": {
"args": [
"test",
"--no-run",
"--test=tests",
"--package=fsdr-blocks"
],
"filter": {
"name": "tests",
"kind": "test"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug benchmark 'crossbeam_sink'",
"cargo": {
"args": [
"test",
"--no-run",
"--bench=crossbeam_sink",
"--package=fsdr-blocks"
],
"filter": {
"name": "crossbeam_sink",
"kind": "bench"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug benchmark 'crossbeam_source'",
"cargo": {
"args": [
"test",
"--no-run",
"--bench=crossbeam_source",
"--package=fsdr-blocks"
],
"filter": {
"name": "crossbeam_source",
"kind": "bench"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug benchmark 'cw_to_char'",
"cargo": {
"args": [
"test",
"--no-run",
"--bench=cw_to_char",
"--package=fsdr-blocks"
],
"filter": {
"name": "cw_to_char",
"kind": "bench"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug benchmark 'bb_to_cw'",
"cargo": {
"args": [
"test",
"--no-run",
"--bench=bb_to_cw",
"--package=fsdr-blocks"
],
"filter": {
"name": "bb_to_cw",
"kind": "bench"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug benchmark 'shared'",
"cargo": {
"args": [
"test",
"--no-run",
"--bench=shared",
"--package=fsdr-blocks"
],
"filter": {
"name": "shared",
"kind": "bench"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'sigmf'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=sigmf"
],
"filter": {
"name": "sigmf",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug integration test 'description'",
"cargo": {
"args": [
"test",
"--no-run",
"--test=description",
"--package=sigmf"
],
"filter": {
"name": "description",
"kind": "test"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug integration test 'dataset_format'",
"cargo": {
"args": [
"test",
"--no-run",
"--test=dataset_format",
"--package=sigmf"
],
"filter": {
"name": "dataset_format",
"kind": "test"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug integration test 'sigmf_meta'",
"cargo": {
"args": [
"test",
"--no-run",
"--test=sigmf_meta",
"--package=sigmf"
],
"filter": {
"name": "sigmf_meta",
"kind": "test"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'sigmf-hash'",
"cargo": {
"args": [
"build",
"--bin=sigmf-hash",
"--package=sigmf-utilities"
],
"filter": {
"name": "sigmf-hash",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'sigmf-col'",
"cargo": {
"args": [
"build",
"--bin=sigmf-col",
"--package=sigmf-utilities"
],
"filter": {
"name": "sigmf-col",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'sigmf-col'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=sigmf-col",
"--package=sigmf-utilities"
],
"filter": {
"name": "sigmf-col",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'sigmf-convert'",
"cargo": {
"args": [
"build",
"--bin=sigmf-convert",
"--package=sigmf-samples"
],
"filter": {
"name": "sigmf-convert",
"kind": "bin"
}
},
"args": ["../crates/sigmf/samples/test1.sigmf-meta", "rf32_le", "./test2"],
"cwd": "${workspaceFolder}/crates/sigmf-utilities"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'sigmf-convert'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=sigmf-convert",
"--package=sigmf-samples"
],
"filter": {
"name": "sigmf-convert",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
21 changes: 14 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,34 @@ categories = ["asynchronous", "concurrency", "hardware-support", "science"]
readme = "README.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace]
members = [
".",
"crates/*",
# "examples/*",
]

[dependencies]
futuresdr = { git = "https://github.com/FutureSDR/FutureSDR", branch = "main" }
#futuresdr = { version="0.0.32" }
#futuresdr = { path = "../FutureSDR" }
async-trait = "0.1.68"
crossbeam-channel = { version = "0.5.8", optional = true }
bimap = { version = "0.6.3", optional = true }
sigmf = { version = "0.1.0", path = "crates/sigmf" }
async-fs = "2.1.0"
serde = "1.0.193"

[dev-dependencies]
criterion = { version = "0.4.0", features = ["html_reports"] }
rand = { version = "0.8.5" }
quickcheck_macros = "1"
serde_json = "1.0.108"

[features]
default = []
crossbeam = ["dep:crossbeam-channel"]
cw = ["dep:bimap"]

[workspace]
members = [
".",
]

[[bench]]
name = "crossbeam_sink"
path = "benches/channel/crossbeam_sink.rs"
Expand Down Expand Up @@ -61,4 +68,4 @@ required-features = ["cw"]
name = "shared"
path = "benches/cw/shared.rs"
harness = false
required-features = ["cw"]
required-features = ["cw"]
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
structure.png:
cargo structure --local -m | dot -Tpng > structure.png

check:
./check.sh

.PHONY: structure.png
Loading

0 comments on commit 7c688e2

Please sign in to comment.