Files
trick/trick_source/trick_swig/sim_services.i
Thomas Brain 16108b8382
Some checks failed
Linux Python 2 / build (clang-devel gcc gcc-c++ java-11-openjdk-devel libxml2-devel llvm-devel llvm-static ncurses-devel openmotif openmotif-devel perl perl-Digest-MD5 udunits2 udunits2-devel which zlib-devel python2-devel python3-devel, map[arch:rhel]) (push) Has been cancelled
Linux Python 2 / build (map[], echo package manager already configured, bison clang flex git llvm make maven cmake zip, install -y, echo gtest already installed) (push) Has been cancelled
Linux Python 2 / build (map[arch:debian arch_ver:12 os:ubuntu tag:22.04], 2) (push) Has been cancelled
Linux Python 2 / build (map[arch:rhel arch_ver:7], yum -y install epel-release yum -y update , libX11-devel libXt-devel swig3 gtest-devel, yum) (push) Has been cancelled
Linux Python 2 / build (map[arch:rhel arch_ver:8 os:oraclelinux tag:8], 2) (push) Has been cancelled
Linux Python 2 / build (map[arch:rhel arch_ver:8 os:rockylinux tag:8], 2) (push) Has been cancelled
Linux Python 2 / build (map[arch:rhel arch_ver:8], dnf -y install epel-release dnf -y update dnf install -y 'dnf-command(config-manager)' , dnf config-manager --enable powertools dnf install -y gtest-devel , dnf, swig diffutils) (push) Has been cancelled
Linux Python 2 / build (map[os:oraclelinux], dnf config-manager --enable ol8_codeready_builder dnf install -y gtest-devel ) (push) Has been cancelled
Linux Python 2 / build (swig curl g++ libx11-dev libxml2-dev libxt-dev libmotif-common libmotif-dev zlib1g-dev llvm-dev libclang-dev libudunits2-dev libgtest-dev default-jdk python2.7-dev python3-dev python3-pip python3-venv, map[arch:debian], apt-get update, apt-get i… (push) Has been cancelled
32-bit Oracle / trick_32bit_oracle (push) Has been cancelled
Test Docker Hub Images / latest (trick_ubuntu1804) (push) Has been cancelled
More Linux / build (clang-devel gcc gcc-c++ java-11-openjdk-devel libxml2-devel llvm-devel llvm-static ncurses-devel openmotif openmotif-devel perl perl-Digest-MD5 udunits2 udunits2-devel which zlib-devel python2-devel python3-devel, map[arch:rhel]) (push) Has been cancelled
More Linux / build (map[], echo package manager already configured, bison clang flex git llvm make maven cmake zip, install -y, echo gtest already installed) (push) Has been cancelled
More Linux / build (map[arch:debian arch_ver:10 os:debian tag:10], 2) (push) Has been cancelled
More Linux / build (map[arch:debian arch_ver:10 os:debian tag:10], 3) (push) Has been cancelled
More Linux / build (map[arch:debian arch_ver:10], apt-get install -y libgtest-dev cd /usr/src/gtest cmake . make cp libgtest* /usr/lib/ ) (push) Has been cancelled
More Linux / build (map[arch:debian arch_ver:11 os:debian tag:11], 2) (push) Has been cancelled
More Linux / build (map[arch:debian arch_ver:11 os:debian tag:11], 3) (push) Has been cancelled
More Linux / build (map[arch:debian arch_ver:11 os:ubuntu tag:20.04], 2) (push) Has been cancelled
More Linux / build (map[arch:debian arch_ver:11 os:ubuntu tag:20.04], 3) (push) Has been cancelled
More Linux / build (map[arch:debian arch_ver:11], export DEBIAN_FRONTEND=noninteractive apt-get update apt-get install -y tzdata ) (push) Has been cancelled
More Linux / build (map[arch:debian arch_ver:12 os:debian tag:bookworm], 2) (push) Has been cancelled
More Linux / build (map[arch:debian arch_ver:12 os:debian tag:bookworm], 3) (push) Has been cancelled
More Linux / build (map[arch:debian], 2, python2.7-dev) (push) Has been cancelled
More Linux / build (map[arch:rhel arch_ver:8 os:almalinux tag:8], 2) (push) Has been cancelled
More Linux / build (map[arch:rhel arch_ver:8 os:almalinux tag:8], 3) (push) Has been cancelled
More Linux / build (map[arch:rhel arch_ver:8], dnf -y install epel-release dnf -y update dnf install -y 'dnf-command(config-manager)' , dnf config-manager --enable powertools dnf install -y gtest-devel , dnf, swig diffutils) (push) Has been cancelled
More Linux / build (swig curl g++ libx11-dev libxml2-dev libxt-dev libmotif-common libmotif-dev zlib1g-dev llvm-dev libclang-dev libudunits2-dev libgtest-dev default-jdk python3-dev python3-pip python3-venv, map[arch:debian], apt-get update, apt-get install -y libg… (push) Has been cancelled
Integrated MultiDtInteg classes into Trick build. (#1844)
* Integrated MultiDtInteg classes into Trick build.

* Corrected some comments

* Cleaned up version and added test

* Small fixes and more interesting test case

* Added MultiDt integration User's Guide section.

* Correct numbered solutions

* Newline fix

* Added check that an integration rate can be represented in trick tics

* Fixed doc comment and added baseline sat2d_multidt sim. Need to add specific rates.

* Fixed some tics vs doubles issues. Added testing and comparison vs single rate. exact match

* cleaned up unit test input files and prevent both realtime and any guis if unit tests are enabled

* Fix input file syntax error
2025-04-22 14:49:28 -05:00

191 lines
6.1 KiB
OpenEdge ABL

%module sim_services
%{
#include <cstddef>
#include <random>
%}
#include "trick/swig/trick_swig.i"
#include "trick/swig/swig_class_typedef.i"
#include "trick/swig/cast_as.i"
#include "units_attach.i"
#include "extra_functions.i"
// Special typemap for collectee in add_collect and delete_collect.
%typemap(in) void * collectee {
// VOID *
void * argp2 ;
if ( SWIG_IsOK(SWIG_ConvertPtr($input, &argp2,SWIG_TypeQuery("void *"), 0)) ) {
// We have an address coming in, we don't have to do any translation
$1 = reinterpret_cast< $1_basetype * >(argp2) ;
} else if ( SWIG_IsOK(SWIG_ConvertPtr($input, &argp2,SWIG_TypeQuery("swig_ref *"), 0)) ) {
// Array to pointer assignment
swig_ref * temp_swig_ref = reinterpret_cast< swig_ref * >(argp2);
if ( temp_swig_ref != NULL ) {
$1 = ($1_basetype *)temp_swig_ref->ref.address ;
}
// package the array address as a void
}
}
%inline %{
#include "trick/swig/swig_global_vars.hh"
#include "trick/reference_frame.h"
#include "trick/rand_generator.h"
#include "trick/wave_form.h"
#include "trick/integrator_c_intf.h"
#include "trick/units_conv.h"
#include "trick/GetTimeOfDayClock.hh"
#include "trick/clock_proto.h"
#include "trick/CommandLineArguments.hh"
#include "trick/command_line_protos.h"
#include "trick/DRAscii.hh"
#include "trick/DRBinary.hh"
#ifdef HDF5
#include "trick/DRHDF5.hh"
#endif
#include "trick/DataRecordDispatcher.hh"
#include "trick/data_record_proto.h"
#include "trick/DebugPause.hh"
#include "trick/debug_pause_proto.h"
#include "trick/EchoJobs.hh"
#include "trick/echojobs_proto.h"
#include "trick/Environment.hh"
#include "trick/env_proto.h"
#include "trick/Executive.hh"
#include "trick/ExecutiveException.hh"
#include "trick/exec_proto.h"
#include "trick/exec_proto.hh"
#include "trick/MalfunctionsTrickView.hh"
#include "trick/MonteMonitor.hh"
#include "trick/SimControlPanel.hh"
#include "trick/StripChart.hh"
#include "trick/TrickView.hh"
#include "trick/ExternalApplicationManager.hh"
#include "trick/external_application_c_intf.h"
#include "trick/FrameDataRecordGroup.hh"
#include "trick/FrameLog.hh"
#include "trick/framelog_proto.h"
#include "trick/IPPython.hh"
#include "trick/input_processor_proto.h"
#include "trick/MTV.hh"
#include "trick/EventManager.hh"
#include "trick/EventProcessor.hh"
#include "trick/EventManager_c_intf.hh"
#include "trick/JITInputFile.hh"
#include "trick/jit_input_file_proto.hh"
#include "trick/JSONVariableServer.hh"
#include "trick/IntegLoopScheduler.hh"
#include "trick/IntegLoopManager.hh"
#include "trick/IntegLoopSimObject.hh"
#include "trick/MultiDtIntegLoopScheduler.hh"
#include "trick/MultiDtIntegLoopSimObject.hh"
#include "trick/Integrator.hh"
#include "trick/regula_falsi.h"
#include "trick/ABM_Integrator.hh"
#include "trick/Euler_Cromer_Integrator.hh"
#include "trick/Euler_Integrator.hh"
#include "trick/MM4_Integrator.hh"
#include "trick/NL2_Integrator.hh"
#include "trick/RK2_Integrator.hh"
#include "trick/RK4_Integrator.hh"
#include "trick/RKF45_Integrator.hh"
#include "trick/RKF78_Integrator.hh"
#include "trick/RKG4_Integrator.hh"
#include "trick/SimTime.hh"
#include "trick/simtime_proto.h"
#include "trick/MSSocket.hh"
#include "trick/MSSharedMem.hh"
#include "trick/Master.hh"
#include "trick/mc_master.hh"
#include "trick/mc_python_code.hh"
#include "trick/mc_variable_file.hh"
#include "trick/mc_variable_fixed.hh"
#include "trick/mc_variable.hh"
#include "trick/mc_variable_random_bool.hh"
#include "trick/mc_variable_random.hh"
#include "trick/mc_variable_random_normal.hh"
#include "trick/mc_variable_random_string.hh"
#include "trick/mc_variable_random_uniform.hh"
#include "trick/mc_variable_semi_fixed.hh"
#include "trick/Slave.hh"
#include "trick/master_proto.h"
#include "trick/MemoryManager.hh"
#include "trick/memorymanager_c_intf.h"
#include "trick/CheckPointRestart.hh"
#include "trick/CheckPointRestart_c_intf.hh"
#include "trick/collect_proto.hh"
#include "trick/AttributesMap.hh"
#include "trick/sie_c_intf.h"
#include "trick/MessageCout.hh"
#include "trick/MessageThreadedCout.hh"
#include "trick/MessageFile.hh"
#include "trick/MessageHSFile.hh"
#include "trick/MessageCustomFile.hh"
#include "trick/MessageCustomManager.hh"
#include "trick/MessageLCout.hh"
#include "trick/MessagePublisher.hh"
#include "trick/MessageSubscriber.hh"
#include "trick/MessageTCDevice.hh"
#include "trick/Message_proto.hh"
#include "trick/message_proto.h"
#include "trick/MonteCarlo.hh"
#include "trick/montecarlo_c_intf.h"
#include "trick/MonteVarCalculated.hh"
#include "trick/MonteVarFile.hh"
#include "trick/MonteVarFixed.hh"
#include "trick/MonteVarRandom.hh"
#include "trick/RealtimeSync.hh"
#include "trick/realtimesync_proto.h"
#include "trick/RtiExec.hh"
#include "trick/RtiStager.hh"
#include "trick/ITimer.hh"
#include "trick/Unit.hh"
#include "trick/UnitTest.hh"
#include "trick/trick_tests.h"
#include "trick/VariableServer.hh"
#include "trick/variable_server_proto.h"
#include "trick/vval.h"
#include "trick/Flag.h"
#include "trick/UdUnits.hh"
#include "trick/MyCivetServer.hh"
#ifdef USE_ER7_UTILS_INTEGRATORS
#include "er7_utils/integration/core/include/integrator_constructor_factory.hh"
#include "er7_utils/integration/core/include/integrable_object.hh"
#include "er7_utils/integration/core/include/base_integration_group.hh"
#include "er7_utils/trick/integration/include/trick_first_order_ode_integrator.hh"
#include "er7_utils/trick/integration/include/trick_second_order_ode_integrator.hh"
#endif
%}
%pythoncode %{
import os
import linecache
import re
curr_dir = os.getcwd()
exclude_dir = os.getcwd() + "/trick"
def traceit(frame, event, arg):
if event == "line":
lineno = frame.f_lineno
filename = frame.f_code.co_filename
if ( not filename.startswith(exclude_dir) and not filename.startswith("/usr") and not filename.startswith("/opt") and not filename.startswith("<") and not filename.startswith(".trick/") ):
if (filename.endswith(".pyc") or
filename.endswith(".pyo")):
filename = filename[:-1]
line = linecache.getline(filename, lineno)
print (filename,":",lineno,": ",line.rstrip())
return traceit
%}