diff --git a/.github/workflows/test_linux.yml b/.github/workflows/test_linux.yml index dcfd22d4..67267e33 100644 --- a/.github/workflows/test_linux.yml +++ b/.github/workflows/test_linux.yml @@ -113,7 +113,7 @@ jobs: dnf -y install epel-release && dnf -y update && dnf install -y 'dnf-command(config-manager)' && - dnf config-manager --enable PowerTools + dnf config-manager --enable powertools tag_deps: >- python3-devel diffutils #-------- Job definition ---------------- diff --git a/include/trick/Sie.hh b/include/trick/Sie.hh index 7208fceb..b5d04c7b 100644 --- a/include/trick/Sie.hh +++ b/include/trick/Sie.hh @@ -42,11 +42,11 @@ namespace Trick { void top_level_objects_print_xml() ; void sie_print_json() ; void sie_append_runtime_objs() ; + void runtime_objects_print(std::fstream & sie_out) ; private: void top_level_objects_print(std::ofstream & sie_out) ; - void runtime_objects_print(std::fstream & sie_out) ; void top_level_objects_json(std::ofstream & sie_out) ; // These are singleton maps holding all attributes known to the sim diff --git a/include/trick/sie_c_intf.h b/include/trick/sie_c_intf.h index 642ea35e..cc458423 100644 --- a/include/trick/sie_c_intf.h +++ b/include/trick/sie_c_intf.h @@ -7,6 +7,7 @@ void sie_print_xml(void) ; void sie_class_attr_map_print_xml(void) ; void sie_enum_attr_map_print_xml(void) ; void sie_top_level_objects_print_xml(void) ; +void sie_append_runtime_objs(void) ; #ifdef __cplusplus } diff --git a/share/trick/sim_objects/default_trick_sys.sm b/share/trick/sim_objects/default_trick_sys.sm index 21316c9c..966ce234 100644 --- a/share/trick/sim_objects/default_trick_sys.sm +++ b/share/trick/sim_objects/default_trick_sys.sm @@ -237,7 +237,8 @@ class SieSimObject : public Trick::SimObject { Trick::Sie sie ; SieSimObject() { - {TRK} ("initialization") sie.sie_append_runtime_objs() ; + // We now append runtime objects when sie is requested by variable server instead. + // {TRK} P65535 ("initialization") sie.sie_append_runtime_objs() ; } } diff --git a/trick_source/sim_services/Sie/Sie.cpp b/trick_source/sim_services/Sie/Sie.cpp index b51d985f..6cd6889a 100644 --- a/trick_source/sim_services/Sie/Sie.cpp +++ b/trick_source/sim_services/Sie/Sie.cpp @@ -163,8 +163,8 @@ void Trick::Sie::sie_append_runtime_objs() { while(memcmp(comment, buff, commentLength) != 0) { while(last != '!' || sie_out.peek() != '<') { if(sie_out.bad() || sie_out.fail() || sie_out.eof()) { - std::cerr << "Error: S_sie.resource is corrupted or outdated. Cannot add runtime/dynamic allocations. Please rerun trick-CP" << std::endl; - exit(2); + std::cerr << "Warning: Cannot add runtime/dynamic allocations to S_sie.resource. S_sie.resource is corrupted, outdated, or missing. Please be sure that SIM_*/S_sie.resource is preserved after build time if needed at runtime for trick-tv or other variable server clients. Please also rerun trick-CP." << std::endl; + return; } last = sie_out.peek(); sie_out.seekg(-1, std::ios::cur); diff --git a/trick_source/sim_services/Sie/sie_c_intf.cpp b/trick_source/sim_services/Sie/sie_c_intf.cpp index 784d5597..0d7c46b9 100644 --- a/trick_source/sim_services/Sie/sie_c_intf.cpp +++ b/trick_source/sim_services/Sie/sie_c_intf.cpp @@ -27,3 +27,9 @@ extern "C" void sie_top_level_objects_print_xml(void) { the_sie->top_level_objects_print_xml() ; } } + +extern "C" void sie_append_runtime_objs(void) { + if ( the_sie != NULL ) { + the_sie->sie_append_runtime_objs() ; + } +} diff --git a/trick_source/sim_services/VariableServer/VariableServerThread_commands.cpp b/trick_source/sim_services/VariableServer/VariableServerThread_commands.cpp index e1763fcd..9139761b 100644 --- a/trick_source/sim_services/VariableServer/VariableServerThread_commands.cpp +++ b/trick_source/sim_services/VariableServer/VariableServerThread_commands.cpp @@ -459,7 +459,7 @@ int Trick::VariableServerThread::send_file(std::string file_name) { } int Trick::VariableServerThread::send_sie_resource() { - //sie_print_xml() ; + sie_append_runtime_objs() ; return transmit_file(std::string(command_line_args_get_default_dir()) + "/S_sie.resource") ; }