rudimentary clion support
This commit is contained in:
parent
e2d3158506
commit
7ab617accb
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,6 +1,14 @@
|
|||||||
|
# PyCharm and CLion
|
||||||
|
/.idea/*
|
||||||
|
!/.idea/runConfigurations
|
||||||
|
!/.idea/cmake.xml
|
||||||
|
!/.idea/codeStyles
|
||||||
|
|
||||||
|
# Eclipse
|
||||||
.cproject
|
.cproject
|
||||||
.project
|
.project
|
||||||
.settings
|
.settings
|
||||||
.metadata
|
.metadata
|
||||||
|
|
||||||
/build*
|
/build*
|
||||||
|
/cmake-build*
|
||||||
|
14
.idea/codeStyles/Project.xml
generated
Normal file
14
.idea/codeStyles/Project.xml
generated
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<code_scheme name="Project" version="173">
|
||||||
|
<clangFormatSettings>
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</clangFormatSettings>
|
||||||
|
<codeStyleSettings language="CMake">
|
||||||
|
<indentOptions>
|
||||||
|
<option name="INDENT_SIZE" value="2" />
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="0" />
|
||||||
|
<option name="TAB_SIZE" value="2" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
|
</code_scheme>
|
||||||
|
</component>
|
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||||
|
</state>
|
||||||
|
</component>
|
7
.run/fsfw-tests_coverage.run.xml
Normal file
7
.run/fsfw-tests_coverage.run.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="fsfw-tests_coverage" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="fsfw-tests" TARGET_NAME="fsfw-tests_coverage" CONFIG_NAME="Debug Unittest" RUN_TARGET_PROJECT_NAME="fsfw-tests" RUN_TARGET_NAME="fsfw-tests">
|
||||||
|
<method v="2">
|
||||||
|
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
7
.run/fsfw.run.xml
Normal file
7
.run/fsfw.run.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="fsfw" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="fsfw-tests" TARGET_NAME="fsfw" CONFIG_NAME="Debug Unittest" RUN_TARGET_PROJECT_NAME="fsfw-tests" RUN_TARGET_NAME="fsfw-tests">
|
||||||
|
<method v="2">
|
||||||
|
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
@ -1,7 +1,8 @@
|
|||||||
#include "CatchDefinitions.h"
|
#include "CatchDefinitions.h"
|
||||||
|
|
||||||
#include <fsfw/objectmanager/ObjectManager.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
|
||||||
|
#include "fsfw/serviceinterface.h"
|
||||||
|
|
||||||
StorageManagerIF* tglob::getIpcStoreHandle() {
|
StorageManagerIF* tglob::getIpcStoreHandle() {
|
||||||
if (ObjectManager::instance() != nullptr) {
|
if (ObjectManager::instance() != nullptr) {
|
||||||
@ -10,7 +11,7 @@ StorageManagerIF* tglob::getIpcStoreHandle() {
|
|||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "Global object manager uninitialized" << std::endl;
|
sif::error << "Global object manager uninitialized" << std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printError("Global object manager uninitialized\n\r");
|
FSFW_LOGE("Global object manager uninitialized\n");
|
||||||
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -6,24 +6,14 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "fsfw/objectmanager/ObjectManager.h"
|
#include "fsfw/objectmanager/ObjectManager.h"
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
|
||||||
#include "fsfw/storagemanager/StorageManagerIF.h"
|
#include "fsfw/storagemanager/StorageManagerIF.h"
|
||||||
|
|
||||||
/* Global instantiations normally done in main.cpp */
|
/* Global instantiations normally done in main.cpp */
|
||||||
/* Initialize Data Pool */
|
/* Initialize Data Pool */
|
||||||
|
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
|
||||||
namespace sif {
|
|
||||||
/* Set up output streams */
|
|
||||||
ServiceInterfaceStream debug("DEBUG");
|
|
||||||
ServiceInterfaceStream info("INFO");
|
|
||||||
ServiceInterfaceStream error("ERROR");
|
|
||||||
ServiceInterfaceStream warning("WARNING");
|
|
||||||
} // namespace sif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int customSetup() {
|
int customSetup() {
|
||||||
// global setup
|
// global setup
|
||||||
|
sif::initialize();
|
||||||
ObjectManager* objMan = ObjectManager::instance();
|
ObjectManager* objMan = ObjectManager::instance();
|
||||||
objMan->setObjectFactoryFunction(Factory::produceFrameworkObjects, nullptr);
|
objMan->setObjectFactoryFunction(Factory::produceFrameworkObjects, nullptr);
|
||||||
objMan->initialize();
|
objMan->initialize();
|
||||||
|
@ -17,14 +17,14 @@
|
|||||||
TEST_CASE("CFDP TLV LV", "[CfdpTlvLv]") {
|
TEST_CASE("CFDP TLV LV", "[CfdpTlvLv]") {
|
||||||
using namespace cfdp;
|
using namespace cfdp;
|
||||||
int result = HasReturnvaluesIF::RETURN_OK;
|
int result = HasReturnvaluesIF::RETURN_OK;
|
||||||
std::array<uint8_t, 255> rawBuf;
|
std::array<uint8_t, 255> rawBuf{};
|
||||||
uint8_t* serPtr = rawBuf.data();
|
uint8_t* serPtr = rawBuf.data();
|
||||||
const uint8_t* deserPtr = rawBuf.data();
|
const uint8_t* deserPtr = rawBuf.data();
|
||||||
size_t deserSize = 0;
|
size_t deserSize = 0;
|
||||||
cfdp::EntityId sourceId = EntityId(cfdp::WidthInBytes::TWO_BYTES, 0x0ff0);
|
cfdp::EntityId sourceId = EntityId(cfdp::WidthInBytes::TWO_BYTES, 0x0ff0);
|
||||||
|
|
||||||
SECTION("TLV Serialization") {
|
SECTION("TLV Serialization") {
|
||||||
std::array<uint8_t, 8> tlvRawBuf;
|
std::array<uint8_t, 8> tlvRawBuf{};
|
||||||
serPtr = tlvRawBuf.data();
|
serPtr = tlvRawBuf.data();
|
||||||
result =
|
result =
|
||||||
sourceId.serialize(&serPtr, &deserSize, tlvRawBuf.size(), SerializeIF::Endianness::NETWORK);
|
sourceId.serialize(&serPtr, &deserSize, tlvRawBuf.size(), SerializeIF::Endianness::NETWORK);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include "PollingSequenceFactory.h"
|
#include "PollingSequenceFactory.h"
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
|
||||||
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||||
|
|
||||||
|
#include "fsfw/serviceinterface.h"
|
||||||
#include "tests/TestsConfig.h"
|
#include "tests/TestsConfig.h"
|
||||||
|
|
||||||
ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence) {
|
ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence) {
|
||||||
@ -11,8 +11,8 @@ ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence)
|
|||||||
uint32_t length = thisSequence->getPeriodMs();
|
uint32_t length = thisSequence->getPeriodMs();
|
||||||
|
|
||||||
/* Add polling sequence table here */
|
/* Add polling sequence table here */
|
||||||
thisSequence->addSlot(objects::TEST_DEVICE, 0, DeviceHandlerIF::PERFORM_OPERATION);
|
thisSequence->addSlot(objects::TEST_DEVICE, 0 * length, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::TEST_DEVICE, 0.3, DeviceHandlerIF::SEND_WRITE);
|
thisSequence->addSlot(objects::TEST_DEVICE, 0.3 * length, DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::TEST_DEVICE, 0.45 * length, DeviceHandlerIF::GET_WRITE);
|
thisSequence->addSlot(objects::TEST_DEVICE, 0.45 * length, DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::TEST_DEVICE, 0.6 * length, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::TEST_DEVICE, 0.6 * length, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::TEST_DEVICE, 0.8 * length, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::TEST_DEVICE, 0.8 * length, DeviceHandlerIF::GET_READ);
|
||||||
@ -20,11 +20,7 @@ ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence)
|
|||||||
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
} else {
|
} else {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED
|
FSFW_LOGE("pst::pollingSequenceInitDefault: Sequence invalid!\n");
|
||||||
sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!" << std::endl;
|
|
||||||
#else
|
|
||||||
sif::printError("pst::pollingSequenceInitDefault: Sequence invalid!");
|
|
||||||
#endif
|
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user