• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nasa / trick / 14091947617

26 Mar 2025 07:33PM UTC coverage: 55.952% (+0.07%) from 55.886%
14091947617

Pull #1844

github

web-flow
Merge c012bcb8f into 957682f68
Pull Request #1844: Integrated MultiDtInteg classes into Trick build.

0 of 5 new or added lines in 2 files covered. (0.0%)

14 existing lines in 3 files now uncovered.

12328 of 22033 relevant lines covered (55.95%)

79740.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/include/trick/MultiDtIntegLoopSimObject.hh
1
/*
2
    PURPOSE:
3
        (Trick Multi-Integration sim object)
4
*/
5

6
#ifndef MULTIDT_INTEG_LOOP_SIMOBJECT_HH
7
#define MULTIDT_INTEG_LOOP_SIMOBJECT_HH
8

9
#include "trick/Integrator.hh"
10
#include "trick/JobData.hh"
11
#include "trick/MultiDtIntegLoopScheduler.hh"
12
#include "trick/SimObject.hh"
13

14
#ifdef SWIG
15
// SWIG macros are not normally run on classes in sim_services.  We can add the the processed code manually
16
%trick_swig_class_typemap(MultiDtIntegLoopSimObject, MultiDtIntegLoopSimObject)
17
#endif
18

19
class MultiDtIntegLoopSimObject : public Trick::SimObject
20
{
21
public:
22
    Trick::MultiDtIntegLoopScheduler integ_sched; // trick_io(*io)
23

NEW
24
    MultiDtIntegLoopSimObject()
×
NEW
25
        : integ_sched(0.01, this)
×
26
    {
NEW
27
        add_jobs(0.01, 0);
×
NEW
28
    }
×
29

30
    MultiDtIntegLoopSimObject(double in_cycle, unsigned int child, Trick::SimObject * s_obj, ...)
31
        : integ_sched(in_cycle, this)
32
    {
33
        va_list ap;
34
        Trick::SimObject * next_sobj;
35

36
        va_start(ap, s_obj);
37
        next_sobj = s_obj;
38
        while(next_sobj != (Trick::SimObject *)NULL)
39
        {
40
            integ_sched.add_sim_object(*next_sobj);
41
            next_sobj = va_arg(ap, Trick::SimObject *);
42
        };
43
        va_end(ap);
44

45
        add_jobs(in_cycle, child);
46
    }
47

48
    // Adds common set of jobs for all constructors.
49
    void add_jobs(double in_cycle, unsigned int child);
50

51
    /**
52
     * Add an integration rate to this loop scheduler
53
     * @param integRateIn  New integration rate in seconds
54
     * @return vector index of the added rate
55
     */
56
    size_t add_rate(const double integRateIn)
57
    {
58
        return integ_sched.add_rate(integRateIn);
59
    }
60

61
    virtual int call_function(Trick::JobData * curr_job);
62
    virtual double call_function_double(Trick::JobData * curr_job);
63

64
    Trick::Integrator * getIntegrator(Integrator_type Alg, unsigned int State_size)
65
    {
66
        return integ_sched.getIntegrator(Alg, State_size);
67
    }
68

69
    int set_integ_cycle(double in_cycle)
70
    {
71
        return integ_sched.set_integ_cycle(in_cycle);
72
    }
73
};
74

75
#ifdef SWIG
76
// SWIG macros are not normally run on classes in sim_services.  We can add the the processed code manually
77
%trick_cast_as(MultiDtIntegLoopSimObject, MultiDtIntegLoopSimObject)
78
#endif
79

80
#endif /* MULTIDT_INTEG_LOOP_SIMOBJECT_HH */
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc