File format:Sigrok/v2

From sigrok
Revision as of 15:43, 22 January 2012 by Uwe Hermann (talk | contribs) (sigrok session file format spec.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page contains the sigrok session file format specification.

Overview

The sigrok session file is a standard ZIP file with certain contents and some special requirements.

The recommended file extension is .sr.

ZIP file contents

mimetype

Every sigrok session file must contain an (ASCII) mimetype file. This file must be the first file in the ZIP file. It must be stored uncompressed and with no "extra field".

The mimetype file must contain (only) the following string: application/vnd.sigrok.session.

This is an entry that can be used with the UNIX file(1) command's magic(4) file:

0    string   PK\003\004
>30  string   mimetype
>>38 string   application/vnd.sigrok.session

version

This ASCII file contains the sigrok session file format version number (a single integer number). Currently this is 1. It is increased every time the file format changes.

metadata

This ASCII file contains various metadata about the sigrok session.

TODO: Details.

logic-*

There can be one or more binary files in the ZIP file, which contain the actual logic analyzer samples. These files have a file name of logic-1, logic-2, and so on.

TODO: Format, contents, endianness, etc.