Function |
Description |
BError open(BString fileName, BString mode) |
Opens the data file in read or write mode |
void close() |
Closes the file |
|
|
File Write Interface |
|
BError setFormat(BString format) |
Sets the output data format. This is to allow sub-formats for example IMS-1.0 and IMS-2.0 within the sample converter. |
BError setInfo(DataInfo& dataInfo, BList<ChannelInfo>& channelInfos) |
Provides information on the data. this is used to create file
headers etc. The channelInfos list is normally provided from the Meta
data database if available. Some formats require this information while others don't. |
BError start(BUInt channel, BUInt segment); |
Start outputting data for the given channel and segment. This will, generally, introduce a header into the output format. |
BError writeData(DataBlock& data) |
Writes a data block to the file |
BError end(); |
Ends the current segment |
|
|
File Read Interface |
|
BError getFormat(BString& format) |
Gets information on the data format |
BError getInfo(DataInfo& dataInfo, Options options, BList<BErrorTime>& errors) |
Gets
information on the data from the files data
header and perhaps the data blocks. The options specify validation and
processing options defined in OptionsList. Any Validation errors and
warnings are
listed in the errors list. |
BError
seekBlock(BUInt32 channel, BUInt32 segment, BTimeStamp time,
BUInt32& blockNumber, BUInt64& sampleNumber, DataBlock&
data) |
Seeks to a particular data block given a time. This can
operate on a single channel if a channel number is given or on multiple
channels if channel number is 0 |
BError readData(BUInt32 channel, BUInt32 segment, BUInt32 blockNumber, DataBlock& data); |
Reads a data block from the file. If the channel number is
given, then it reads data from a given channel. Otherwise it will read
a set of data from all of the channels. |
|
|
Misc |
|
BStringList getFormats(); |
retuns the list or formats this converter supports. |