Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating the .sigmf archive format #44

Merged
merged 2 commits into from
May 18, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions sigmf-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,21 @@ file contains information that describes the dataset.
3. The metadata file MUST have a `.meta` filename extension.
4. The dataset file MUST have a `.data` filename extension.

#### Archive Format

The metadata and dataset files that comprise a SigMF recording may be combined
into a file archive. Multiple SigMF recordings may be stored in a single
archive.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should discuss the idea of combining multiple recordings separately before putting it in the spec. It is a UI/API complication for anything that wants to read a SigMF recording because you then need more than a file-picker, and people will be tempted to create little languages for representing pathnames-plus-item-in-the-archive, which gets messy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point - this is perhaps a little more complex than I first anticipated.


1. The archive MUST use the `tar` archive format, as specified by POSIX.1-2001.
2. The archive file's filename extension MUST be `.sigmf`.
3. Metadata and dataset files MUST NOT be in the top-level directory of the
archive.
4. Each SigMF recording (comprised of a metadata file and a dataset file) MUST
be in separate directories.
5. The metadata and dataset files within a directory must have the same
filenames as the directory itself.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like how point 3 is written negatively; it does not rule out that you could have two levels of directories (which is another complication), or using absolute paths (which would be bad).

I would suggest something to the effect of (I don't know what language POSIX uses to describe tar files):

  1. The archive MUST contain the following files: for each contained recording with some name given here metasyntactically as N, files named N (a directory), N/N.sigmf-meta, and N/N.sigmf-data.

  2. The archive MUST NOT contain any other files unless their pathnames begin with N/N. for some N which has .sigmf-meta and .sigmf-data files as described above.

(The item 4 is to allow for extensions without allowing for arbitrary junk. More minimally, we could say that for now no other files are allowed.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like your suggestion, @kpreid. Nice work =)


### Dataset Format

The samples in the dataset file must be in a SigMF-supported format. There are
Expand Down