Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4793da6
lewisjaggi Jan 14, 2021
ba071d6
lewisjaggi Jan 14, 2021
3db1347
lewisjaggi Jan 14, 2021
6a9f8f9
lewisjaggi Jan 14, 2021
5ffcc41
Minor FreeRTOSSim modification
jonathanmichel Jan 14, 2021
8288884
Rename PUSOpen MDB files
jonathanmichel Jan 14, 2021
c64c5ac
Implement PUS3 and 5 base, modify TlmChan
jonathanmichel Jan 14, 2021
8a45315
Fix merge changes
jonathanmichel Jan 14, 2021
d03970a
Improve downlink services - PoC
jonathanmichel Jan 14, 2021
6c368ce
GS PUS example
jonathanmichel Jan 14, 2021
c45db35
Auto stash before merge of "chess-pusopen_" and "origin/chess-pusopen_"
lewisjaggi Jan 14, 2021
5ff240a
Remove PUSOpen Lib folder
jonathanmichel Jan 15, 2021
161fd03
lewisjaggi Jan 15, 2021
918c7db
Fix PUS3-5 seg fault
jonathanmichel Jan 19, 2021
619d6bf
Update PUS5 data buffer size
jonathanmichel Jan 19, 2021
b1c533b
Implement PUS3 reports logic
jonathanmichel Jan 20, 2021
4928c23
Add second output to ActiveLogger to connect EventAction
jonathanmichel Jan 21, 2021
c54ac2d
Implement PUS3 reports with parameters array
jonathanmichel Jan 21, 2021
2229bb3
Improve fatal messages for visibility
jonathanmichel Jan 21, 2021
421edfc
Avoid HLTH_PING_LATE fatal to stop code execution
jonathanmichel Jan 21, 2021
bca9dde
Add service ID in PUS logs
jonathanmichel Jan 22, 2021
c58b5b1
Change log format to hex
jonathanmichel Jan 22, 2021
02b05b6
Remove comment for Lib folder in .gitignore
jonathanmichel Jan 22, 2021
68cefc1
Test for getting frame faster
jonathanmichel Jan 22, 2021
906c320
Update PUSOpen mdb path
jonathanmichel Jan 22, 2021
1f76f18
Fix seqgen with Python3
jonathanmichel Feb 3, 2021
56b0eaf
Remove ping receiver log
jonathanmichel Feb 3, 2021
14f37cd
Stable demo
jonathanmichel Feb 24, 2021
055393f
Remove custom code for demo
jonathanmichel Feb 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,6 @@ GTestBase.*
/Fw/Python/src/fprime.egg-info
/Gds/src/fprime_gds.egg-info
**/DefaultDict/serializable/*

# Clone CHESS-mission/pusopen as "Lib" in fprime root - Due to license restriction with PUSOpen
Lib # disable to allow VSCode to index Lib file
2 changes: 1 addition & 1 deletion Drv/SocketIpDriver/SocketHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <sysLib.h>
#include <errnoLib.h>
#include <string.h>
#elif defined TGT_OS_TYPE_LINUX || TGT_OS_TYPE_DARWIN || TGT_OS_TYPE_FREERTOS_SIM
#elif defined TGT_OS_TYPE_LINUX || TGT_OS_TYPE_DARWIN
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
Expand Down
2 changes: 1 addition & 1 deletion Drv/SocketIpDriver/SocketIpDriverComponentImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// Includes for the IP layer
#ifdef TGT_OS_TYPE_VXWORKS
#include <inetLib.h>
#elif defined TGT_OS_TYPE_LINUX || TGT_OS_TYPE_DARWIN || TGT_OS_TYPE_FREERTOS_SIM
#elif defined TGT_OS_TYPE_LINUX || TGT_OS_TYPE_DARWIN
#include <arpa/inet.h>
#else
#error OS not supported for IP Socket Communications
Expand Down
2 changes: 1 addition & 1 deletion Fw/Com/ComBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Fw {

ComBuffer::ComBuffer(const U8 *args, NATIVE_UINT_TYPE size) {
SerializeStatus stat = SerializeBufferBase::setBuff(args,size);
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
FW_ASSERT(FW_SERIALIZE_OK == stat, static_cast<NATIVE_INT_TYPE>(stat));
}

ComBuffer::ComBuffer() {
Expand Down
4 changes: 2 additions & 2 deletions Fw/Types/Assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#else

#if FW_ASSERT_LEVEL == FW_FILEID_ASSERT
#define fileIdFs "Assert file ID 0x%08X:%d "
#define fileIdFs "============= Assert file ID 0x%08X:%d ============="
#else
#define fileIdFs "Assert file \"%s\":%d "
#define fileIdFs "============= Assert file \"%s\":%d ============="
#endif

namespace Fw {
Expand Down
2 changes: 1 addition & 1 deletion Gds/bin/helpers/run_tool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ export OUTPUT_DIR="`make -f ${BUILD_ROOT}/mk/makefiles/build_vars.mk BUILD=$NATI
echo "OUTPUT_DIR: ${OUTPUT_DIR}"

export PYTHONPATH="${BUILD_ROOT}/Fw/Python/src:${BUILD_ROOT}/Gds/src"
python -m fprime_gds.common.tools."${TOOL}" "$@"
python3 -m fprime_gds.common.tools."${TOOL}" "$@"
3 changes: 1 addition & 2 deletions Ref/PingReceiver/PingReceiverComponentImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "Fw/Types/BasicTypes.hpp"

namespace Ref {

// ----------------------------------------------------------------------
// Construction, initialization, and destruction
// ----------------------------------------------------------------------
Expand Down Expand Up @@ -53,7 +52,7 @@ namespace Ref {
U32 key
)
{
//this->log_DIAGNOSTIC_PR_PingReceived(key);
this->log_DIAGNOSTIC_PR_PingReceived(key);
this->tlmWrite_PR_NumPings(this->m_pingsRecvd++);
if (not this->m_inhibitPings) {
PingOut_out(0,key);
Expand Down
2 changes: 0 additions & 2 deletions Ref/PingReceiver/PingReceiverComponentImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ namespace Ref {

bool m_inhibitPings;
U32 m_pingsRecvd;


};

} // end namespace Ref
Expand Down
2 changes: 1 addition & 1 deletion Svc/ActiveLogger/ActiveLoggerComponentAi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Telemetry input port
</comment>
</port>
<port name="LogSend" data_type="Fw::Log" kind="output" >
<port name="LogSend" data_type="Fw::Log" kind="output" max_number="2">
<comment>
Telemetry output port
</comment>
Expand Down
20 changes: 15 additions & 5 deletions Svc/ActiveLogger/ActiveLoggerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ namespace Svc {
}

void ActiveLoggerImpl::LogRecv_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::LogSeverity severity, Fw::LogBuffer &args) {
// Filter event for demo
//if (id != 0x2a)
// return;

// make sure ID is not zero. Zero is reserved for ID filter.
FW_ASSERT(id != 0);
Expand Down Expand Up @@ -187,15 +190,22 @@ namespace Svc {
FW_ASSERT(0,static_cast<NATIVE_INT_TYPE>(severity));
return;
}

if (this->isConnected_PktSend_OutputPort(0)) {
this->PktSend_out(0, this->m_comBuffer,0);
}

// redirect event through event output
// Send event to EventSequence
if (this->isConnected_LogSend_OutputPort(0)) {
this->LogSend_out(0, id, timeTag, static_cast<Fw::LogSeverity>(severity) , args);
}

#ifdef _GDS
if (this->isConnected_PktSend_OutputPort(0)) {
this->PktSend_out(0, this->m_comBuffer,0);
}
#elif defined _PUS
// Send event to GroundInterface
if (this->isConnected_LogSend_OutputPort(1)) {
this->LogSend_out(1, id, timeTag, static_cast<Fw::LogSeverity>(severity) , args);
}
#endif
}

void ActiveLoggerImpl::ALOG_SET_EVENT_REPORT_FILTER_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, InputFilterLevel FilterLevel, InputFilterEnabled FilterEnable) {
Expand Down
2 changes: 1 addition & 1 deletion Svc/ActiveLogger/docs/sdd.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Document | Link
-------- | ----
Design Checklist | [Link](Checklist_Design.xlsx)
Code Checklist | [Link](Checklist_Code.xlsx)
Unit Test Checklist | [Link](Checklist_Unit_test.xlsx)
Unit Test Checklist | [Link](Checklist_Unit_Test.xls)

## 6. Unit Testing

Expand Down
4 changes: 2 additions & 2 deletions Svc/ActiveTextLogger/ActiveTextLoggerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ namespace Svc {

stat = snprintf(textStr,
FW_INTERNAL_INTERFACE_STRING_MAX_SIZE,
"EVENT: (%d) (%04d-%02d-%02dT%02d:%02d:%02d.%03u) %s: %s\n",
"EVENT: (0x%x) (%04d-%02d-%02dT%02d:%02d:%02d.%03u) %s: %s\n",
id, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour,
tm.tm_min,tm.tm_sec,timeTag.getUSeconds(),
severityString,text.toChar());
Expand All @@ -103,7 +103,7 @@ namespace Svc {

stat = snprintf(textStr,
FW_INTERNAL_INTERFACE_STRING_MAX_SIZE,
"EVENT: (%d) (%d:%d,%d) %s: %s\n",
"EVENT: (0x%x) (%d:%d,%d) %s: %s\n",
id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severityString,text.toChar());
}

Expand Down
2 changes: 1 addition & 1 deletion Svc/AssertFatalAdapter/AssertFatalAdapterComponentImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace Svc {
arg1,arg2,arg3,arg4,arg5,arg6);
} else {
// Can't assert, what else can we do? Maybe somebody will see it.
Fw::Logger::logMsg("Svc::AssertFatalAdapter not registered!\n");
Fw::Logger::logMsg("============= Svc::AssertFatalAdapter not registered! =============\n");
assert(0);
}
}
Expand Down
8 changes: 7 additions & 1 deletion Svc/FatalHandler/FatalHandlerComponentLinuxImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ namespace Svc {
void FatalHandlerComponentImpl::FatalReceive_handler(
const NATIVE_INT_TYPE portNum,
FwEventIdType Id) {

// @todo REMOVE FOR DEBUG PURPOSE
if(Id == 0x16a) { // HLTH_PING_LATE - when EPS not connected
return;
}

// for **nix, delay then exit with error code
Fw::Logger::logMsg("FATAL %d handled.\n",(U32)Id,0,0,0,0,0);
Fw::Logger::logMsg("============= FATAL event 0x%x handled ============= \n",(U32)Id,0,0,0,0,0);
(void)Os::Task::delay(1000);
Fw::Logger::logMsg("Exiting.\n",0,0,0,0,0,0);
(void)raise( SIGSEGV );
Expand Down
14 changes: 13 additions & 1 deletion Svc/GroundInterface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@
#
# Note: using PROJECT_NAME as EXECUTABLE_NAME
####

SET(PUSOPEN_PATH ${FPRIME_FRAMEWORK_PATH}/Lib)
SET(MDB_PATH ${CMAKE_CURRENT_LIST_DIR}/../../../gs/mdb)

set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/GroundInterfaceComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/GroundInterface.cpp"
"${MDB_PATH}/pusopen_onboard_mdb.c" # PUSOpen mission database
)
set(MOD_DEPS "Utils/Types")
register_fprime_module()

add_definitions(-D_LINUB1804_GCC750)
include_directories(${PUSOPEN_PATH}/Includes)
find_library(PUSOPEN pusopen ${PUSOPEN_PATH}/lib)
target_link_libraries(Svc_GroundInterface ${PUSOPEN})

# Rules based unit testing
set(UT_MOD_DEPS
STest
Expand All @@ -23,6 +33,8 @@ set(UT_SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Tester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/TestMain.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/GroundInterfaceRules.cpp"
"${MDB_PATH}/pusopen_onboard_mdb.c" # PUSOpen mission database
)
# STest Includes for this UT
# Test Includes for this UT
register_fprime_ut()

Loading