Documentation ¶
Overview ¶
Binary output format. Header contains all 64-bit words. Strings are 8 bytes long. Magic number "#dump002" Components int MeshSize [3]int MeshStep [3]float64 MeshUnit string Time float64 TimeUnit string DataLabel string DataUnit string Precission uint64 DATA crc64 of DATA and header using ISO polynomial 0xD800000000000000.
Index ¶
Constants ¶
View Source
const ( CRC_ENABLED = true CRC_DISABLED = false )
View Source
const (
FLOAT32 = 4
)
Precision identifier
View Source
const MAGIC = "#dump002"
Magic number
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Frame ¶
type Frame struct { Header Data []float32 CRC uint64 Bytes int64 // Total number of bytes read. Err error // Stores the latest I/O error, if any. }
Header+data frame.
type Header ¶
type Header struct { Magic string Components int MeshSize [3]int MeshStep [3]float64 MeshUnit string Time float64 TimeUnit string DataLabel string DataUnit string Precission uint64 }
Header for dump data frame
type Reader ¶
type Reader struct { Frame // Frame read by the last Read(). // contains filtered or unexported fields }
Reads successive data frames in dump format.
type Writer ¶
type Writer struct { Header // Written by WriteHeader(). Bytes int64 // Total number of bytes written. Err error // Stores the latest I/O error, if any. // contains filtered or unexported fields }
Writes data frames in dump format. Usage:
w := NewWriter(out, CRC_ENABLED) // set desired w.Header fields w.WriteHeader() w.WriteData(array) // may be repeated w.WriteHash() // closes this frame. // may be repeated.
Click to show internal directories.
Click to hide internal directories.