trick/trick_source/sim_services/FrameLog/FrameLog_c_intf.cpp

46 lines
1.1 KiB
C++
Raw Normal View History

2015-02-26 15:02:31 +00:00
#include <stdio.h>
#include "trick/FrameLog.hh"
2015-02-26 15:02:31 +00:00
/* Global singleton pointer to the framelog class */
extern Trick::FrameLog * the_fl ;
/*************************************************************************/
/* These routines are the "C" interface to framelog instrumentation */
/*************************************************************************/
/**
* @relates Trick::FrameLog
* @copydoc Trick::FrameLog::framelog_on
* C wrapper for Trick::FrameLog::framelog_on
*/
extern "C" int frame_log_on() {
if (the_fl != NULL) {
return the_fl->framelog_on() ;
}
return(0) ;
}
/**
* @relates Trick::FrameLog
* @copydoc Trick::FrameLog::framelog_off
* C wrapper for Trick::FrameLog::framelog_off
*/
extern "C" int frame_log_off() {
if (the_fl != NULL) {
return the_fl->framelog_off() ;
}
return(0) ;
}
/**
* @relates Trick::FrameLog
* @copydoc Trick::FrameLog::set_max_samples
* C wrapper for Trick::FrameLog::set_max_samples
*/
extern "C" int frame_log_set_max_samples(int num) {
if (the_fl != NULL) {
return the_fl->set_max_samples(num) ;
}
return(0) ;
}