Specifications

WriteRecordingBlock
Declaration:
STATUS WriteRecordingBlock (UINT RecordingNo,
UINT StartRecordingBlock,
void * DataBuffer,
UINT DataBufferSize);
Description: Write user block(s) of a recording.
This function writes one or more user blocks of the recording specified by
RecordingNo.
If the recording contains tags then these tags are not modified by the MDR. The
StartRecordingBlock parameter maps to the user block parameter in the RECORDING
structure corresponding to the specified recording.
Returned value:
OK or ERROR.
If
ERROR is returned then the errno variable will be set accordingly. See MdrDefs.h for
MDR
errno values.
Using the WriteRecordingBlock
function while making a recording affects the recording
performance. The MDR Server may stop recording due to this.
8.4 MDR API Example Programs
Several example programs can be found in the mdr-host-sw/doc/ApiExamples
directory. These programs illustrate the use of the MDR API.
The first of these programs is called
MdrApiDemo. The MDR API example program
performs some basic operations:
Create an MDR Client object
Create some recordings
Record data
Rename a recording
This scenario may be used as a first communication test between a user’s program and
the MDR Server. All the structures needed inside the API functions are allocated in this
program. In fact, all the API functions check the input parameter(s) in order to avoid
some unexpected and fatal problems but never try to correct the input parameters if
those are wrong. Typically, if one empty pointer is passed as an input pointer, the API
function will exit returning ERROR and an error number (stored in the
errno variable).
The second program is called MdrDumpRec and is used to dump (or print) the data of a
recording to the output (console by default). On UNIX or Windows platforms for
instance, this program can be used to store recording data to any kind of device by using
UNIX pipes and/or redirections. The command line is the following:
MdrDumpRec <RecNb> <ServerName> <DiskGroupName> [<FirstRecBlkToDump>]
[<LastRecBlkToDump>]
Where:
<RecNb> is the number (or name) of the recording to be dumped,
MDR User Guide 61
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com