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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>Utility Functionsexecstr -- Pass command string from running application to PicoDOS command shellDescription:Prototype:Inputs:Pass a command to the PicoDOS command shell.short execstr(char *cmdstr);cmdstr is a zero terminated C string containing the command and parameters just as would betyped at the PicoDOS command prompt.Returns: Returns enum { execstrNoCmdMatch = -1, execstrNoError = 0, execstrGeneralFailure = 1 };Notes:Notes.flogf -- printf to console and log file (after Initflogf())Description:This function works like printf, except that it sends the formatted data to either, neither, or bothan append file and the stdout console. When working to the console, the flogf takes care ofchecking the current state of the EIA driver and if it's off, turns it on while sending then turns itback off when complete. Console writes also blocks until all characters have been sent.Similarly, when writing to a file, flogf checks the current CF enable state and if it's off, turns iton while writing, then back off. Each flogf targeting a file opens the file for append mode onentry and closes and flushes the file on exit.Prototype: short flogf(char *format, ...);Inputs:Returns:Notes:format is identical to standard printf formats and variable arguments.Returns the number of characters written.Notes.Initflog -- Setup for future flogf operationsDescription:Prototype:Inputs:Returns:Notes:Setup for printf-like runtime logging to a file and/or the console.void Initflog(char *fname, bool echoToConsole);fname is a zero terminated C string contiaining the file or full path name to log/append futureflogf messages to.echoToConsole is TRUE if flogf messages are to be echoed to the stdout console.Returns nothing.Pass zero for fname and TRUE for echoToConsole to just show messages on the console.PERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.75 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!