2015-03-23 21:03:14 +00:00
|
|
|
/*
|
|
|
|
PURPOSE:
|
|
|
|
(Trick runtime simulation executive parameter definition.)
|
|
|
|
REFERENCE:
|
|
|
|
(((Bailey, R.W, and Paddock, E.J.) (Trick Simulation Environment)
|
|
|
|
(NASA:JSC #37943)
|
2015-02-26 15:02:31 +00:00
|
|
|
(JSC / Engineering Directorate / Automation and Robotics Division)
|
2015-03-23 21:03:14 +00:00
|
|
|
(June 1994) (--)))
|
2015-02-26 15:02:31 +00:00
|
|
|
ASSUMPTIONS AND LIMITATIONS:
|
2015-03-23 21:03:14 +00:00
|
|
|
((Only 64 levels of nested input data file inclusion.))
|
|
|
|
PROGRAMMERS:
|
|
|
|
(((Robert W. Bailey) (LinCom) (4/92) (--) (Realtime))
|
2015-02-26 15:02:31 +00:00
|
|
|
((Robert W. Bailey) (LinCom) (6/1/91) (Trick-CR-00000) (Initial Release)))
|
|
|
|
*/
|
|
|
|
|
2015-03-23 21:03:14 +00:00
|
|
|
#ifndef DEBUGPAUSE_HH
|
|
|
|
#define DEBUGPAUSE_HH
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <semaphore.h>
|
|
|
|
|
|
|
|
#include "sim_services/SimObject/include/JobData.hh"
|
|
|
|
|
|
|
|
namespace Trick {
|
|
|
|
|
|
|
|
class DebugPause {
|
|
|
|
|
|
|
|
public:
|
|
|
|
/** Set to true to pause before every job call during sim execution.\n */
|
|
|
|
bool debug_pause_flag ; /**< trick_units(--) */
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief This is the constructor of the DebugPause class.
|
|
|
|
*/
|
|
|
|
DebugPause() ;
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Instrumentation class job that pauses before each job when debug_pause is on.
|
|
|
|
Waits on a semapahore before execution continues.
|
|
|
|
@param curr_job - pointer to current instrument job that points to the job to pause at
|
|
|
|
@return always 0
|
|
|
|
*/
|
|
|
|
int debug_pause(Trick::JobData * curr_job) ;
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Command to post the semaphore so that execution continues after pause.
|
|
|
|
@return always 0
|
|
|
|
*/
|
|
|
|
int debug_signal() ;
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Command to set debug_pause_flag to true which turns on the debug pausing.
|
|
|
|
Calls Trick::Executive::instrument_job_before to insert the debug_pause routine before every job to pause at.
|
|
|
|
@return always 0
|
|
|
|
*/
|
|
|
|
int debug_pause_on() ;
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Command to set debug_pause_flag to false which turns off the debug pausing.
|
|
|
|
Calls Trick::Executive::instrument_job_remove to remove the debug_pause routine from all job queues that it was inserted in.
|
|
|
|
@return always 0
|
|
|
|
*/
|
|
|
|
int debug_pause_off() ;
|
|
|
|
|
|
|
|
private:
|
|
|
|
/** Semaphore used to control pausing.\n */
|
|
|
|
sem_t * debug_sem ; /**< trick_io(**) trick_units(--) */
|
|
|
|
/** Semaphore name for debug_sem.\n */
|
|
|
|
std::string sem_name ; /**< trick_io(**) trick_units(--) */
|
|
|
|
|
|
|
|
} ;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|