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, int validate, BList<BError>& errors) |
Gets information on the data from the files data
header and perhaps the data blocks. If the validate flag is set a full
data validation process is performed and any validation errors are
listed in the errors list. |
BError seekBlock(BUInt32 channel, BTimeStamp time, BUInt32& blockNumber) |
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 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. |