Documentation
¶
Index ¶
Constants ¶
View Source
const MimeType string = "application/x-hztools.rfcap"
MimeType is the rfcap v1 MIME type to be used.
Variables ¶
View Source
var Size int = 48
Size is the rfcap header size in Bytes.
Functions ¶
Types ¶
type Header ¶
type Header struct { // Magic is 'RFCAP1' Magic Magic // CaptureTime signifies the time at which this capture was started. CaptureTime time.Time // CenterFrequency represents where the Center frequency of this capture // is centered. CenterFrequency rf.Hz // Number of Samples (each iq complex number is counted as a single sample) // per second. SampleRate uint // SampleFormat denotes what format this capture is in. It's useful to keep // iq information in its native capture format, and convert when required. SampleFormat sdr.SampleFormat // Compressed may only be set if the Sample Format is int16. If this is // true for any other Sample Format, this will result in an error being // returned. // // This assumes the data is actually 12 bits, and packs every 4th sample // into the other 3. Compressed bool // Endianness defines the ByteOrder used for the data in the rfcap // file. Endianness binary.ByteOrder }
Header contains metadata around what the capture represents.
func HeaderFromSDR ¶
HeaderFromSDR will create a Header from the provided SDR
func ReadHeader ¶ added in v0.0.13
ReadHeader will read the rfcap Header from the io.Reader