10.07.2015 Views

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>PPBFlush -- Flush a ping-pong buffer and force a ping-pong flipDescription:Prototype:Inputs:Returns:Flush a ping-pong buffer and force a ping-pong flipshort PPBFlush(void *ppb);ppb is the generic pointer returned by PPBOpen and used internally to manage the buffers.Returns zero for success or a non-zero error codePPBGetMemBuf -- Return the read buffer and optionally zero the sizeDescription:Prototype:Inputs:Returns:Return the read buffer and optionally zero the sizevoid *PPBGetMemBuf(void *ppb, long *size, bool flush);ppb is the generic pointer returned by PPBOpen and used internally to manage the buffers.size is a pointer to a long variable to accept the count of available bytesflush if TRUE resets the read buffer to indicate that the data has been readReturns a direct pointer to the read data bufferPPBOpen -- Open and initialize a ping-pong bufferDescription:Prototype:Inputs:Returns:Open and initialize a ping-pong buffervoid *PPBOpen(long totSize, void *buf, PPBRdf rdf, PPBWrf wrf, vfptr ppnotify);totSize is the combined size in bytes of both halves of the user supplied ping-pong bufferbuf is user supplied ping-pong bufferrdf is an optional user supplied function that reads data from the ping-pong buffer (pass zero fordefault memory functions)wrf is an optional user supplied function that writes data into the ping-pong buffer (pass zerofor default memory functions)ppnotify is an optional user supplied function to call when the ping-pong buffer wraps.Returns a generic pointer used internally by PPB to manage the buffers or zero on failureNotes: typedef long PPBWrf(void *buf, void *wrp, ulong wrofs, ulong n);typedef long PPBRdf(void *buf, void *rdp, ulong rdofs, ulong n);PPBPutByte -- Write 8-bit byte into the ping-pong bufferDescription:Prototype:Inputs:Returns:Write 8-bit byte into the ping-pong buffershort PPBPutByte(void *ppb, uchar byte);ppb is the generic pointer returned by PPBOpen and used internally to manage the buffers.byte is 8 bit value to writeReturns zero for success or a non-zero error codePERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.36 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!