GetLoggedCmdCount
Returns the number of logged commands available. Logged commands are useful for debugging. See remarks section for details.
Syntax
long GetLoggedCmdCount();
Parameters
None
Returns
long - The current number of logged commands.
Required Headers
CController.h
Namespace
arc
Throws
None
Remarks
See SetLogCmds() for details.
Example
        // This code demonstrates how to log and print
        // debug messages for a TDL to the controller,
        // RESET_CONTROLLER to the PCI board, and then
        // read the device driver status register.

        #include <iostream.h>
        #include "CController.h"
        using namespace std;
        using namespace arc;

        CController cController;

        // .... open driver, initialize, etc ....

        try {
            cController.SetLogCmds( true );

            cController.Command( TIM_ID, TDL, 0x112233 );
            cController.PCICommand( RESET_CONTROLLER );
            cController.IoctlDriver( ASTROPCI_GET_HSTR );

            for ( int i=0; i<cController.GetLoggedCmdCount(); i++ )
                cout << cController.GetNextLoggedCmd() << endl;

            cController.SetLogCmds( false );
		}
        catch ( std::exception &e )
        {
            cerr << "Exception Occurred: " << e.what() << endl;
        }

        Output:
        
        0x203 TDL 0x112233 -> 0x112233  // TDL ( controller )
        0x87 -> 0x535952                // RESET_CONTROLLER ( pci board )
        ASTROPCI_GET_HSTR -> 0x3        // ASTROPCI_GET_HSTR ( device driver )

© Astronomical Research Cameras, Inc.