more dirty hacks to check amd64 build. To be cleaned up
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Ulrich Mohr 2022-08-19 14:31:48 +02:00
parent a93fe8ef8e
commit dfb800f58a
3 changed files with 147 additions and 1 deletions

View File

@ -15,6 +15,7 @@ set(OBSW_VERSION_REVISION_IF_GIT_FAILS 0)
# set(CMAKE_VERBOSE TRUE) # set(CMAKE_VERBOSE TRUE)
# TODO WIP:
add_compile_definitions(FSFW_INTROSPECTION) add_compile_definitions(FSFW_INTROSPECTION)
include_directories("bsp_mib/include") include_directories("bsp_mib/include")
@ -360,6 +361,10 @@ if(EIVE_ADD_LINUX_FILES)
add_subdirectory(${LINUX_PATH}) add_subdirectory(${LINUX_PATH})
endif() endif()
add_subdirectory(${BSP_PATH}) add_subdirectory(${BSP_PATH})
#TODO WIP:
add_subdirectory("bsp_mib")
if(ADD_CSP_LIB) if(ADD_CSP_LIB)
add_subdirectory(${LIB_CSP_PATH}) add_subdirectory(${LIB_CSP_PATH})
endif() endif()

View File

@ -34,6 +34,114 @@ ServiceInterfaceStream sif::error("ERROR", true, false, true);
ObjectManagerIF* objectManager = nullptr; ObjectManagerIF* objectManager = nullptr;
#ifdef FSFW_INTROSPECTION
void printEnum(ParameterIF* param) {
size_t i = 0;
for (auto iter : param->getEnumValues()) {
printf("---enum value %li: \"%s\"\n", iter, param->getEnumDescriptions()[i++]);
}
}
/*void printEnum(HousekeepingEntryIF* param) {
size_t i = 0;
for (auto iter : param->getEnumValues()) {
printf("---enum value %li: \"%s\"\n", iter, param->getEnumDescriptions()[i++]);
}
}
void printModes(HasModesIF* object) {
ModeHelperIF* modeHelper = object->getModeHelper();
auto modes = modeHelper->getModes();
for (auto mode : modes) {
auto submodes = modeHelper->getSubmodes(mode.first);
if (submodes.size() == 0) {
continue;
}
printf("-mode \"%s\" (%i) with \n", mode.second, mode.first);
for (auto submode : submodes) {
printf("--submode \"%s\" (%i)\n", submode.second, submode.first);
}
}
}*/
void printAction(HasActionsIF* actionIf) {
auto actionMap = actionIf->getActionHelper()->getActionMap();
for (auto iter = actionMap->begin(); iter != actionMap->end(); iter++) {
printf("-action \"%s\" (%i) with \n", iter->second->getName(), iter->second->getId());
auto parameterList = iter->second->getParameters();
for (ParameterIF* param : *parameterList) {
printf("--parameter \"%s\" %.3E, %.3E\n", param->getName(), param->getMinFloating(),
param->getMaxFloating());
if (param->getType() == Types::ENUM) {
printEnum(param);
}
}
}
}
/*
void printHousekeeping(HousekeepingIF* housekeepingIF) {
auto dataSets = housekeepingIF->getHousekeepingHelper()->getDataSets();
for (auto iter : *dataSets) {
printf("-SID \"%s\" (%i) with:\n", iter.second->getDescription(), iter.first);
for (HousekeepingEntryIF* param : *(iter.second->getVariables())) {
printf("--parameter \"%s\"\n", param->getName());
if (param->getType() == Types::ENUM) {
printEnum(param);
}
}
}
}
const char* getClassName(uint8_t classId) {
CLASS_ID::FwClassIds fwClassId(classId);
const char* description = fwClassId.getDescription();
if (description != nullptr) {
return description;
}
return "UNKNOWN";
}
void printReturnCodes() {
puts("\nReturnvalues");
for (auto iter : ReturnValueItems::returnValues) {
uint8_t classId = iter.first >> 8;
printf("-\"%s:%s\" (%04x)\n", getClassName(classId), iter.second, iter.first);
}
}
void printEvents() {
puts("\nEvents");
for (auto iter : EventItems::events) {
uint8_t classId = iter.first >> 8;
printf("-\"%s:%s\" (%06x)\n", getClassName(classId), iter.second, iter.first);
}
}*/
#endif
void initmission::initMission() { void initmission::initMission() {
sif::info << "Building global objects.." << std::endl; sif::info << "Building global objects.." << std::endl;
try { try {
@ -46,6 +154,39 @@ void initmission::initMission() {
std::exit(1); std::exit(1);
} }
#ifdef FSFW_INTROSPECTION
sif::info << "Introspecting.." << std::endl;
ObjectManager::instance()->produce();
auto objectList = ObjectManager::instance()->getObjectList();
sif::info << "Looping.." << std::endl;
for (auto iter : *objectList) {
//SystemObjects objectId(iter.first);
printf("Object \"%s\" (0x%08x)\n", "TODO", iter.first);
HasActionsIF* actionIf = dynamic_cast<HasActionsIF*>(iter.second);
if (actionIf != nullptr) {
printAction(actionIf);
}
/*HasModesIF* hasmodesIF = dynamic_cast<HasModesIF*>(iter.second);
if (hasmodesIF != nullptr) {
printModes(hasmodesIF);
}
HousekeepingIF* hasHousekeeping = dynamic_cast<HousekeepingIF*>(iter.second);
if (hasHousekeeping != nullptr) {
printHousekeeping(hasHousekeeping);
}*/
}
// printReturnCodes();
// printEvents();
exit(0);
#endif
sif::info << "Initializing all objects.." << std::endl; sif::info << "Initializing all objects.." << std::endl;
ObjectManager::instance()->initialize(); ObjectManager::instance()->initialize();

2
fsfw

@ -1 +1 @@
Subproject commit 31f59f915cd368ef4f49a3ed071420123e07eb72 Subproject commit 3782d8eb74171343dce845606f91885e87dc54f4