mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
tv dynamic allocations post initialization and test update (#1090)
* #1086 append runtime allocations when sie is requested instead of initialization * #1088 change sie error to warning and improve warning message * #1089 lowercase powertools in centOS 8 config closes #1086 closes #1088 closes #1089
This commit is contained in:
parent
54f6db2d3f
commit
939b3002d1
2
.github/workflows/test_linux.yml
vendored
2
.github/workflows/test_linux.yml
vendored
@ -113,7 +113,7 @@ jobs:
|
|||||||
dnf -y install epel-release &&
|
dnf -y install epel-release &&
|
||||||
dnf -y update &&
|
dnf -y update &&
|
||||||
dnf install -y 'dnf-command(config-manager)' &&
|
dnf install -y 'dnf-command(config-manager)' &&
|
||||||
dnf config-manager --enable PowerTools
|
dnf config-manager --enable powertools
|
||||||
tag_deps: >-
|
tag_deps: >-
|
||||||
python3-devel diffutils
|
python3-devel diffutils
|
||||||
#-------- Job definition ----------------
|
#-------- Job definition ----------------
|
||||||
|
@ -42,11 +42,11 @@ namespace Trick {
|
|||||||
void top_level_objects_print_xml() ;
|
void top_level_objects_print_xml() ;
|
||||||
void sie_print_json() ;
|
void sie_print_json() ;
|
||||||
void sie_append_runtime_objs() ;
|
void sie_append_runtime_objs() ;
|
||||||
|
void runtime_objects_print(std::fstream & sie_out) ;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void top_level_objects_print(std::ofstream & sie_out) ;
|
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) ;
|
void top_level_objects_json(std::ofstream & sie_out) ;
|
||||||
|
|
||||||
// These are singleton maps holding all attributes known to the sim
|
// These are singleton maps holding all attributes known to the sim
|
||||||
|
@ -7,6 +7,7 @@ void sie_print_xml(void) ;
|
|||||||
void sie_class_attr_map_print_xml(void) ;
|
void sie_class_attr_map_print_xml(void) ;
|
||||||
void sie_enum_attr_map_print_xml(void) ;
|
void sie_enum_attr_map_print_xml(void) ;
|
||||||
void sie_top_level_objects_print_xml(void) ;
|
void sie_top_level_objects_print_xml(void) ;
|
||||||
|
void sie_append_runtime_objs(void) ;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,8 @@ class SieSimObject : public Trick::SimObject {
|
|||||||
Trick::Sie sie ;
|
Trick::Sie sie ;
|
||||||
|
|
||||||
SieSimObject() {
|
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() ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,8 +163,8 @@ void Trick::Sie::sie_append_runtime_objs() {
|
|||||||
while(memcmp(comment, buff, commentLength) != 0) {
|
while(memcmp(comment, buff, commentLength) != 0) {
|
||||||
while(last != '!' || sie_out.peek() != '<') {
|
while(last != '!' || sie_out.peek() != '<') {
|
||||||
if(sie_out.bad() || sie_out.fail() || sie_out.eof()) {
|
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;
|
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;
|
||||||
exit(2);
|
return;
|
||||||
}
|
}
|
||||||
last = sie_out.peek();
|
last = sie_out.peek();
|
||||||
sie_out.seekg(-1, std::ios::cur);
|
sie_out.seekg(-1, std::ios::cur);
|
||||||
|
@ -27,3 +27,9 @@ extern "C" void sie_top_level_objects_print_xml(void) {
|
|||||||
the_sie->top_level_objects_print_xml() ;
|
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() ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -459,7 +459,7 @@ int Trick::VariableServerThread::send_file(std::string file_name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int Trick::VariableServerThread::send_sie_resource() {
|
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") ;
|
return transmit_file(std::string(command_line_args_get_default_dir()) + "/S_sie.resource") ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user