I'm not proud, I'm rushed.

This commit is contained in:
Sean Harmeyer 2024-11-25 13:27:13 -06:00
parent f9d9d6ea00
commit c93585e55e
3 changed files with 15 additions and 1 deletions

View File

@ -158,6 +158,9 @@ namespace Trick {
void set_clock(Trick::Clock & in_clock) ;
Trick::JobData target_job_array; /* -- job array to access job info in realtime */
private:
std::vector<std::string> trick_jobs; // ** vector containing all trick job names
std::vector<std::string> user_jobs; // ** vector containing all user job names

View File

@ -92,7 +92,7 @@ namespace Trick {
long long frame_time ; /**< trick_io(**) */
/** Cumulative time in seconds used for job in frame (rt_stop_time - rt_start_time) / time_tic_value */
double frame_time_seconds; /**< trick_io(**) trick_units(s) */
double frame_time_seconds; /**< trick_io(*io) trick_units(s) */
/** Sim_object_id.id (for job identification in timeline logging) */
double frame_id; /**< trick_io(**) */

View File

@ -361,6 +361,13 @@ int Trick::FrameLog::frame_clock_stop(Trick::JobData * curr_job) {
Trick::JobData * target_job = (Trick::JobData *)curr_job->sup_class_data ;
int thread, mode;
double time_scale;
bool isMonitor = false;
std::string monitor_job_name = "trick_real_time.rt_sync.rt_monitor";
if ( monitor_job_name.compare(target_job->name) == 0 )
isMonitor = true;
/** @par Detailed Design: */
if ( target_job != NULL ) {
@ -370,6 +377,10 @@ int Trick::FrameLog::frame_clock_stop(Trick::JobData * curr_job) {
time_scale = 1.0 / target_job->time_tic_value;
target_job->frame_time += (target_job->rt_stop_time - target_job->rt_start_time);
target_job->frame_time_seconds = target_job->frame_time * time_scale;
if (isMonitor)
{
target_job_array = *target_job;
}
thread = target_job->thread;
mode = exec_get_mode();