//===========================================================================
// Summary  : 
// Filename : TimingBoardIF.idl
// Author   : 
// Project  : 
// Version  : 
// Created  : 06/28/00
// Modified : 
// Archived : 
//===========================================================================
// Modification History: 
//===========================================================================

#include "DeviceIF.idl"
#include "TimeIF.idl"

interface TimingBoardIF {

     ////////////////////////////////////////////////////////////
     // Get the current time from the PC104-SG board
     DeviceIF::Status getTime( out double time );
     DeviceIF::Status getTime( out TimeIF::TimeSpec time );

     ////////////////////////////////////////////////////////////
     // Set the current time on the PC104-SG board
     //
     // Note that the PC104SG can only be set to the resolution of seconds,
     // the so-called 'major time'.
     //
     // Bear in mind this function expects the _current_ second -- i.e. the 
     // time as of the last second rollover.  The PC104-SG expects to be fed 
     // the time as of the _next_ second rollover, but this is handled 
     // automatically in the server.
     //
     DeviceIF::Status setTime( in double time );
     DeviceIF::Status setTime( in TimeIF::TimeSpec time );

     // Sync the current system time to the PC104/SG (nominally called
     // after above setTime calls)
     DeviceIF::Status setSystemTimeToSg( );
     DeviceIF::Status setSgTimeToSystem( );


     ////////////////////////////////////////////////////////////
     // Enable/disable 1PPS input to the board
     DeviceIF::Status enable1PPS( );
     DeviceIF::Status disable1PPS( );

     ////////////////////////////////////////////////////////////
     //== Input capture functions ===============================
     DeviceIF::Status clearCapture( );
     DeviceIF::Status isCaptureTriggered( out boolean isTriggered );
     DeviceIF::Status getCapture( out double time );
     DeviceIF::Status getCapture( out TimeIF::TimeSpec time );
     DeviceIF::Status simulateCapture( );


};

