Compare commits
67 Commits
4391823f01
...
develop_up
Author | SHA1 | Date | |
---|---|---|---|
a837a78bd4 | |||
d246ce34d0 | |||
796c7a9e37 | |||
d575da8540 | |||
62ace649a7
|
|||
aac74fae38
|
|||
a26b0c38ac
|
|||
42e74d22cc | |||
36caa58043 | |||
988e07f0be
|
|||
88e8665280
|
|||
9c8b1c697b
|
|||
110cb903a6
|
|||
8da89eba80 | |||
7e8845f2c2 | |||
6aff3250c2 | |||
c3572e31a8
|
|||
2293e7f2bb | |||
a85a38c882 | |||
0f76cdb3ba | |||
268c2e87c9 | |||
87f94a252f | |||
c7037d417a | |||
f80c5980ea | |||
ad01642fee | |||
f2947bc78e | |||
0a977ea688 | |||
74b164b1da | |||
5322de0599 | |||
9a4bf51006 | |||
3a70229510 | |||
b3beedad9f | |||
efe217a197 | |||
b442ca09b9 | |||
9372b2a575 | |||
aafa53148e | |||
e0adb3325f | |||
4518fec65c | |||
dac1aacab2 | |||
0042f92fdf | |||
656faf8169 | |||
f84431e965 | |||
0cec9ebb73 | |||
a440b7c394 | |||
bbfc1b2b34 | |||
025b379e8b
|
|||
258f0d3313 | |||
0f81d5e458 | |||
b50f092939 | |||
2f90e12179 | |||
8b77fac099 | |||
47503824d7 | |||
5e3f5c4121 | |||
1f36c082ef | |||
aa84e93603 | |||
8f63a0e747 | |||
6fc8f756a7 | |||
d98ed40e3d | |||
b057250bfb | |||
066dd0d397 | |||
f735c2e9d4 | |||
54ef9ec3f6 | |||
4dc49c57d5 | |||
e9d629b9b3 | |||
48403c002d | |||
e86d8c64db | |||
1de1b045cd |
8
.idea/cmake.xml
generated
Normal file
8
.idea/cmake.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CMakeSharedSettings">
|
||||||
|
<configurations>
|
||||||
|
<configuration PROFILE_NAME="Debug Test" ENABLED="true" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DFSFW_BUILD_TESTS=ON -DFSFW_OSAL=host" />
|
||||||
|
</configurations>
|
||||||
|
</component>
|
||||||
|
</project>
|
26
CHANGELOG.md
26
CHANGELOG.md
@@ -8,14 +8,38 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
## Fixed
|
## Fixes
|
||||||
|
|
||||||
|
- The `PusTmCreator` API only accepted 255 bytes of source data. It can now accept source
|
||||||
|
data with a size limited only by the size of `size_t`.
|
||||||
- Important bugfix in CFDP PDU header format: The entity length field and the transaction sequence
|
- Important bugfix in CFDP PDU header format: The entity length field and the transaction sequence
|
||||||
number fields stored the actual length of the field instead of the length minus 1 like specified
|
number fields stored the actual length of the field instead of the length minus 1 like specified
|
||||||
in the CFDP standard.
|
in the CFDP standard.
|
||||||
|
- PUS Health Service: Size check for set health command.
|
||||||
|
Perform operation completion for announce health command.
|
||||||
|
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/746
|
||||||
|
- Linux OSAL `getUptime` fix: Check validity of `/proc/uptime` file before reading uptime.
|
||||||
|
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/745
|
||||||
|
- Small tweak for version getter
|
||||||
|
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/744
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- add CFDP subsystem ID
|
||||||
|
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/742
|
||||||
|
- `PusTmZcWriter` now exposes API to set message counter field.
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
|
|
||||||
|
- HK generation is now countdown based.
|
||||||
|
- Bump ETL version to 20.35.14
|
||||||
|
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/748
|
||||||
|
- Renamed `PCDU_2` subsystem ID to `POWER_SWITCH_IF`.
|
||||||
|
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/743
|
||||||
|
- Add new `PowerSwitchIF::SWITCH_UNKNOWN` returnvalue.
|
||||||
|
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/743
|
||||||
|
- Assert that `FixedArrayList` is larger than 0 at compile time.
|
||||||
|
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/740
|
||||||
- Health functions are virtual now.
|
- Health functions are virtual now.
|
||||||
|
|
||||||
# [v6.0.0] 2023-02-10
|
# [v6.0.0] 2023-02-10
|
||||||
|
@@ -72,7 +72,7 @@ set(FSFW_ETL_LIB_MAJOR_VERSION
|
|||||||
20
|
20
|
||||||
CACHE STRING "ETL library major version requirement")
|
CACHE STRING "ETL library major version requirement")
|
||||||
set(FSFW_ETL_LIB_VERSION
|
set(FSFW_ETL_LIB_VERSION
|
||||||
${FSFW_ETL_LIB_MAJOR_VERSION}.28.0
|
${FSFW_ETL_LIB_MAJOR_VERSION}.35.14
|
||||||
CACHE STRING "ETL library exact version requirement")
|
CACHE STRING "ETL library exact version requirement")
|
||||||
set(FSFW_ETL_LINK_TARGET etl::etl)
|
set(FSFW_ETL_LINK_TARGET etl::etl)
|
||||||
|
|
||||||
|
@@ -166,9 +166,9 @@ ReturnValue_t Sgp4Propagator::propagate(double* position, double* velocity, time
|
|||||||
timeval timeSinceEpoch = time - epoch;
|
timeval timeSinceEpoch = time - epoch;
|
||||||
double minutesSinceEpoch = timeSinceEpoch.tv_sec / 60. + timeSinceEpoch.tv_usec / 60000000.;
|
double minutesSinceEpoch = timeSinceEpoch.tv_sec / 60. + timeSinceEpoch.tv_usec / 60000000.;
|
||||||
|
|
||||||
double yearsSinceEpoch = minutesSinceEpoch / 60 / 24 / 365;
|
double monthsSinceEpoch = minutesSinceEpoch / 60 / 24 / 30;
|
||||||
|
|
||||||
if ((yearsSinceEpoch > 1) || (yearsSinceEpoch < -1)) {
|
if ((monthsSinceEpoch > 1) || (monthsSinceEpoch < -1)) {
|
||||||
return TLE_TOO_OLD;
|
return TLE_TOO_OLD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -53,8 +53,9 @@ class VectorOperations {
|
|||||||
mulScalar(vector, 1 / norm(vector, size), normalizedVector, size);
|
mulScalar(vector, 1 / norm(vector, size), normalizedVector, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static T maxAbsValue(const T *vector, uint8_t size, uint8_t *index = 0) {
|
static T maxAbsValue(const T *vector, uint8_t size, uint8_t *index = nullptr) {
|
||||||
T max = -1;
|
T max = vector[size - 1];
|
||||||
|
uint8_t foundIndex = size - 1;
|
||||||
|
|
||||||
for (; size > 0; size--) {
|
for (; size > 0; size--) {
|
||||||
T abs = vector[size - 1];
|
T abs = vector[size - 1];
|
||||||
@@ -64,24 +65,35 @@ class VectorOperations {
|
|||||||
if (abs > max) {
|
if (abs > max) {
|
||||||
max = abs;
|
max = abs;
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
*index = size - 1;
|
foundIndex = size - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (index != nullptr) {
|
||||||
|
*index = foundIndex;
|
||||||
|
}
|
||||||
|
|
||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
|
|
||||||
static T maxValue(const T *vector, uint8_t size, uint8_t *index = 0) {
|
static T maxValue(const T *vector, uint8_t size, uint8_t *index = nullptr) {
|
||||||
T max = -1;
|
T max = vector[size - 1];
|
||||||
|
uint8_t foundIndex = size - 1;
|
||||||
|
|
||||||
for (; size > 0; size--) {
|
for (; size > 0; size--) {
|
||||||
if (vector[size - 1] > max) {
|
if (vector[size - 1] > max) {
|
||||||
max = vector[size - 1];
|
max = vector[size - 1];
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
*index = size - 1;
|
foundIndex = size - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (index != nullptr) {
|
||||||
|
*index = foundIndex;
|
||||||
|
}
|
||||||
|
|
||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include "fsfw/datapoollocal/LocalPoolDataSetBase.h"
|
#include "fsfw/datapoollocal/LocalPoolDataSetBase.h"
|
||||||
|
#include "fsfw/serviceinterface.h"
|
||||||
|
|
||||||
PeriodicHousekeepingHelper::PeriodicHousekeepingHelper(LocalPoolDataSetBase* owner)
|
PeriodicHousekeepingHelper::PeriodicHousekeepingHelper(LocalPoolDataSetBase* owner)
|
||||||
: owner(owner) {}
|
: owner(owner) {}
|
||||||
@@ -10,51 +11,29 @@ PeriodicHousekeepingHelper::PeriodicHousekeepingHelper(LocalPoolDataSetBase* own
|
|||||||
void PeriodicHousekeepingHelper::initialize(float collectionInterval,
|
void PeriodicHousekeepingHelper::initialize(float collectionInterval,
|
||||||
dur_millis_t minimumPeriodicInterval) {
|
dur_millis_t minimumPeriodicInterval) {
|
||||||
this->minimumPeriodicInterval = minimumPeriodicInterval;
|
this->minimumPeriodicInterval = minimumPeriodicInterval;
|
||||||
collectionIntervalTicks = intervalSecondsToIntervalTicks(collectionInterval);
|
changeCollectionInterval(collectionInterval);
|
||||||
/* This will cause a checkOpNecessary call to be true immediately. I think it's okay
|
|
||||||
if a HK packet is generated immediately instead of waiting one generation cycle. */
|
|
||||||
internalTickCounter = collectionIntervalTicks;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float PeriodicHousekeepingHelper::getCollectionIntervalInSeconds() const {
|
float PeriodicHousekeepingHelper::getCollectionIntervalInSeconds() const {
|
||||||
return intervalTicksToSeconds(collectionIntervalTicks);
|
return collectionInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PeriodicHousekeepingHelper::checkOpNecessary() {
|
bool PeriodicHousekeepingHelper::checkOpNecessary() {
|
||||||
if (internalTickCounter >= collectionIntervalTicks) {
|
if (hkGenerationCd.hasTimedOut()) {
|
||||||
internalTickCounter = 1;
|
hkGenerationCd.resetTimer();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
internalTickCounter++;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t PeriodicHousekeepingHelper::intervalSecondsToIntervalTicks(
|
|
||||||
float collectionIntervalSeconds) {
|
|
||||||
if (owner == nullptr) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Avoid division by zero */
|
|
||||||
if (minimumPeriodicInterval == 0) {
|
|
||||||
/* Perform operation each cycle */
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
dur_millis_t intervalInMs = collectionIntervalSeconds * 1000;
|
|
||||||
uint32_t divisor = minimumPeriodicInterval;
|
|
||||||
uint32_t ticks = std::ceil(static_cast<float>(intervalInMs) / divisor);
|
|
||||||
|
|
||||||
return ticks;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
float PeriodicHousekeepingHelper::intervalTicksToSeconds(uint32_t collectionInterval) const {
|
|
||||||
/* Number of ticks times the minimum interval is in milliseconds, so we divide by 1000 to get
|
|
||||||
the value in seconds */
|
|
||||||
return static_cast<float>(collectionInterval * minimumPeriodicInterval / 1000.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PeriodicHousekeepingHelper::changeCollectionInterval(float newIntervalSeconds) {
|
void PeriodicHousekeepingHelper::changeCollectionInterval(float newIntervalSeconds) {
|
||||||
collectionIntervalTicks = intervalSecondsToIntervalTicks(newIntervalSeconds);
|
uint32_t intervalMs = newIntervalSeconds * 1000;
|
||||||
|
if (newIntervalSeconds <= 0) {
|
||||||
|
intervalMs = minimumPeriodicInterval;
|
||||||
|
newIntervalSeconds = static_cast<float>(minimumPeriodicInterval) / 1000.0;
|
||||||
|
}
|
||||||
|
collectionInterval = newIntervalSeconds;
|
||||||
|
hkGenerationCd.setTimeout(intervalMs);
|
||||||
|
// We want an immediate HK packet at the start, so time out the generation CD immediately.
|
||||||
|
hkGenerationCd.timeOut();
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "fsfw/timemanager/Clock.h"
|
#include "fsfw/timemanager/Clock.h"
|
||||||
|
#include "fsfw/timemanager/Countdown.h"
|
||||||
|
|
||||||
class LocalPoolDataSetBase;
|
class LocalPoolDataSetBase;
|
||||||
|
|
||||||
@@ -19,13 +20,10 @@ class PeriodicHousekeepingHelper {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
LocalPoolDataSetBase* owner = nullptr;
|
LocalPoolDataSetBase* owner = nullptr;
|
||||||
|
Countdown hkGenerationCd;
|
||||||
uint32_t intervalSecondsToIntervalTicks(float collectionIntervalSeconds);
|
float collectionInterval = 0.0;
|
||||||
float intervalTicksToSeconds(uint32_t collectionInterval) const;
|
|
||||||
|
|
||||||
dur_millis_t minimumPeriodicInterval = 0;
|
dur_millis_t minimumPeriodicInterval = 0;
|
||||||
uint32_t internalTickCounter = 1;
|
|
||||||
uint32_t collectionIntervalTicks = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FSFW_HOUSEKEEPING_PERIODICHOUSEKEEPINGHELPER_H_ */
|
#endif /* FSFW_HOUSEKEEPING_PERIODICHOUSEKEEPINGHELPER_H_ */
|
||||||
|
@@ -5,9 +5,12 @@
|
|||||||
#include "fsfw/ipc/QueueFactory.h"
|
#include "fsfw/ipc/QueueFactory.h"
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
InternalErrorReporter::InternalErrorReporter(object_id_t setObjectId, uint32_t messageQueueDepth)
|
InternalErrorReporter::InternalErrorReporter(object_id_t setObjectId, uint32_t messageQueueDepth,
|
||||||
|
bool enableSetByDefault, float generationFrequency)
|
||||||
: SystemObject(setObjectId),
|
: SystemObject(setObjectId),
|
||||||
poolManager(this, commandQueue),
|
poolManager(this, commandQueue),
|
||||||
|
enableSetByDefault(enableSetByDefault),
|
||||||
|
generationFrequency(generationFrequency),
|
||||||
internalErrorSid(setObjectId, InternalErrorDataset::ERROR_SET_ID),
|
internalErrorSid(setObjectId, InternalErrorDataset::ERROR_SET_ID),
|
||||||
internalErrorDataset(this) {
|
internalErrorDataset(this) {
|
||||||
commandQueue = QueueFactory::instance()->createMessageQueue(messageQueueDepth);
|
commandQueue = QueueFactory::instance()->createMessageQueue(messageQueueDepth);
|
||||||
@@ -134,9 +137,8 @@ ReturnValue_t InternalErrorReporter::initializeLocalDataPool(localpool::DataPool
|
|||||||
localDataPoolMap.emplace(errorPoolIds::TM_HITS, &tmHitsEntry);
|
localDataPoolMap.emplace(errorPoolIds::TM_HITS, &tmHitsEntry);
|
||||||
localDataPoolMap.emplace(errorPoolIds::QUEUE_HITS, &queueHitsEntry);
|
localDataPoolMap.emplace(errorPoolIds::QUEUE_HITS, &queueHitsEntry);
|
||||||
localDataPoolMap.emplace(errorPoolIds::STORE_HITS, &storeHitsEntry);
|
localDataPoolMap.emplace(errorPoolIds::STORE_HITS, &storeHitsEntry);
|
||||||
poolManager.subscribeForDiagPeriodicPacket(subdp::DiagnosticsHkPeriodicParams(
|
poolManager.subscribeForRegularPeriodicPacket(
|
||||||
internalErrorSid, false,
|
subdp::RegularHkPeriodicParams(internalErrorSid, enableSetByDefault, generationFrequency));
|
||||||
static_cast<float>(getPeriodicOperationFrequency()) / static_cast<float>(1000.0)));
|
|
||||||
internalErrorDataset.setValidity(true, true);
|
internalErrorDataset.setValidity(true, true);
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@@ -21,7 +21,8 @@ class InternalErrorReporter : public SystemObject,
|
|||||||
public InternalErrorReporterIF,
|
public InternalErrorReporterIF,
|
||||||
public HasLocalDataPoolIF {
|
public HasLocalDataPoolIF {
|
||||||
public:
|
public:
|
||||||
InternalErrorReporter(object_id_t setObjectId, uint32_t messageQueueDepth = 5);
|
InternalErrorReporter(object_id_t setObjectId, uint32_t messageQueueDepth,
|
||||||
|
bool enableSetByDefault, float generationFrequency);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable diagnostic printout. Please note that this feature will
|
* Enable diagnostic printout. Please note that this feature will
|
||||||
@@ -63,6 +64,8 @@ class InternalErrorReporter : public SystemObject,
|
|||||||
MutexIF* mutex = nullptr;
|
MutexIF* mutex = nullptr;
|
||||||
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
|
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
|
||||||
uint32_t timeoutMs = 20;
|
uint32_t timeoutMs = 20;
|
||||||
|
bool enableSetByDefault;
|
||||||
|
float generationFrequency;
|
||||||
|
|
||||||
sid_t internalErrorSid;
|
sid_t internalErrorSid;
|
||||||
InternalErrorDataset internalErrorDataset;
|
InternalErrorDataset internalErrorDataset;
|
||||||
|
@@ -89,8 +89,6 @@ timeval Clock::getUptime() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Clock::getUptime(timeval* uptime) {
|
ReturnValue_t Clock::getUptime(timeval* uptime) {
|
||||||
// TODO This is not posix compatible and delivers only seconds precision
|
|
||||||
// Linux specific file read but more precise.
|
|
||||||
double uptimeSeconds;
|
double uptimeSeconds;
|
||||||
std::ifstream ifile("/proc/uptime");
|
std::ifstream ifile("/proc/uptime");
|
||||||
if (ifile.bad()) {
|
if (ifile.bad()) {
|
||||||
|
@@ -5,8 +5,8 @@
|
|||||||
#include "fsfw/pus/servicepackets/Service3Packets.h"
|
#include "fsfw/pus/servicepackets/Service3Packets.h"
|
||||||
|
|
||||||
Service3Housekeeping::Service3Housekeeping(object_id_t objectId, uint16_t apid, uint8_t serviceId,
|
Service3Housekeeping::Service3Housekeeping(object_id_t objectId, uint16_t apid, uint8_t serviceId,
|
||||||
uint32_t queueDepth)
|
uint32_t queueDepth, uint8_t numParallelCommands)
|
||||||
: CommandingServiceBase(objectId, apid, "PUS 3 HK", serviceId, NUM_OF_PARALLEL_COMMANDS,
|
: CommandingServiceBase(objectId, apid, "PUS 3 HK", serviceId, numParallelCommands,
|
||||||
COMMAND_TIMEOUT_SECONDS, queueDepth) {}
|
COMMAND_TIMEOUT_SECONDS, queueDepth) {}
|
||||||
|
|
||||||
Service3Housekeeping::~Service3Housekeeping() {}
|
Service3Housekeeping::~Service3Housekeeping() {}
|
||||||
|
@@ -28,7 +28,8 @@ class Service3Housekeeping : public CommandingServiceBase, public AcceptsHkPacke
|
|||||||
static constexpr uint8_t NUM_OF_PARALLEL_COMMANDS = 4;
|
static constexpr uint8_t NUM_OF_PARALLEL_COMMANDS = 4;
|
||||||
static constexpr uint16_t COMMAND_TIMEOUT_SECONDS = 60;
|
static constexpr uint16_t COMMAND_TIMEOUT_SECONDS = 60;
|
||||||
|
|
||||||
Service3Housekeeping(object_id_t objectId, uint16_t apid, uint8_t serviceId, uint32_t queueDepth);
|
Service3Housekeeping(object_id_t objectId, uint16_t apid, uint8_t serviceId, uint32_t queueDepth,
|
||||||
|
uint8_t numParallelCommands);
|
||||||
virtual ~Service3Housekeeping();
|
virtual ~Service3Housekeeping();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -9,11 +9,11 @@
|
|||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
Service8FunctionManagement::Service8FunctionManagement(object_id_t objectId, uint16_t apid,
|
Service8FunctionManagement::Service8FunctionManagement(object_id_t objectId, uint16_t apid,
|
||||||
uint8_t serviceId,
|
uint8_t serviceId, size_t queueDepth,
|
||||||
uint8_t numParallelCommands,
|
uint8_t numParallelCommands,
|
||||||
uint16_t commandTimeoutSeconds)
|
uint16_t commandTimeoutSeconds)
|
||||||
: CommandingServiceBase(objectId, apid, "PUS 8 Functional Commanding", serviceId,
|
: CommandingServiceBase(objectId, apid, "PUS 8 Functional Commanding", serviceId,
|
||||||
numParallelCommands, commandTimeoutSeconds) {}
|
numParallelCommands, commandTimeoutSeconds, queueDepth) {}
|
||||||
|
|
||||||
Service8FunctionManagement::~Service8FunctionManagement() {}
|
Service8FunctionManagement::~Service8FunctionManagement() {}
|
||||||
|
|
||||||
|
@@ -31,7 +31,8 @@
|
|||||||
class Service8FunctionManagement : public CommandingServiceBase {
|
class Service8FunctionManagement : public CommandingServiceBase {
|
||||||
public:
|
public:
|
||||||
Service8FunctionManagement(object_id_t objectId, uint16_t apid, uint8_t serviceId,
|
Service8FunctionManagement(object_id_t objectId, uint16_t apid, uint8_t serviceId,
|
||||||
uint8_t numParallelCommands = 4, uint16_t commandTimeoutSeconds = 60);
|
size_t queueDepth, uint8_t numParallelCommands = 4,
|
||||||
|
uint16_t commandTimeoutSeconds = 60);
|
||||||
~Service8FunctionManagement() override;
|
~Service8FunctionManagement() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -40,7 +40,7 @@ struct PusTmParams {
|
|||||||
size_t dataLen)
|
size_t dataLen)
|
||||||
: secHeader(service, subservice, timeStamper), adapter(data, dataLen), sourceData(&adapter) {}
|
: secHeader(service, subservice, timeStamper), adapter(data, dataLen), sourceData(&adapter) {}
|
||||||
PusTmSecHeader secHeader;
|
PusTmSecHeader secHeader;
|
||||||
SerialBufferAdapter<uint8_t> adapter;
|
SerialBufferAdapter<size_t> adapter;
|
||||||
const SerializeIF* sourceData = nullptr;
|
const SerializeIF* sourceData = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -24,3 +24,9 @@ void PusTmZeroCopyWriter::updateErrorControl() {
|
|||||||
crcStart[0] = (crc16 >> 8) & 0xff;
|
crcStart[0] = (crc16 >> 8) & 0xff;
|
||||||
crcStart[1] = crc16 & 0xff;
|
crcStart[1] = crc16 & 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PusTmZeroCopyWriter::setMessageCount(uint16_t msgCount) {
|
||||||
|
size_t serSize = 0;
|
||||||
|
SerializeAdapter::serialize(&msgCount, const_cast<uint8_t*>(pointers.secHeaderStart + 3),
|
||||||
|
&serSize, 2, SerializeIF::Endianness::NETWORK);
|
||||||
|
}
|
||||||
|
@@ -14,6 +14,7 @@ class PusTmZeroCopyWriter : public PusTmReader {
|
|||||||
PusTmZeroCopyWriter(TimeReaderIF& timeReader, uint8_t* data, size_t size);
|
PusTmZeroCopyWriter(TimeReaderIF& timeReader, uint8_t* data, size_t size);
|
||||||
|
|
||||||
void setSequenceCount(uint16_t seqCount);
|
void setSequenceCount(uint16_t seqCount);
|
||||||
|
void setMessageCount(uint16_t msgCount);
|
||||||
void updateErrorControl();
|
void updateErrorControl();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -73,8 +73,10 @@ static constexpr uint8_t CTRL_REG_4_VAL = SET_BLE;
|
|||||||
/* Register 5 */
|
/* Register 5 */
|
||||||
static constexpr uint8_t SET_REBOOT_MEM = 1 << 7;
|
static constexpr uint8_t SET_REBOOT_MEM = 1 << 7;
|
||||||
static constexpr uint8_t SET_FIFO_ENB = 1 << 6;
|
static constexpr uint8_t SET_FIFO_ENB = 1 << 6;
|
||||||
|
static constexpr uint8_t SET_OUT_SEL_1 = 1 << 1;
|
||||||
|
static constexpr uint8_t SET_OUT_SEL_0 = 1 << 0;
|
||||||
|
|
||||||
static constexpr uint8_t CTRL_REG_5_VAL = 0b00000000;
|
static constexpr uint8_t CTRL_REG_5_VAL = SET_OUT_SEL_1 | SET_OUT_SEL_0;
|
||||||
|
|
||||||
/* Possible range values in degrees per second (DPS). */
|
/* Possible range values in degrees per second (DPS). */
|
||||||
static constexpr uint16_t RANGE_DPS_00 = 245;
|
static constexpr uint16_t RANGE_DPS_00 = 245;
|
||||||
|
@@ -165,7 +165,8 @@ ReturnValue_t HostFilesystem::truncateFile(FilesystemParams params) {
|
|||||||
if (not filesystem::exists(path, e)) {
|
if (not filesystem::exists(path, e)) {
|
||||||
return FILE_DOES_NOT_EXIST;
|
return FILE_DOES_NOT_EXIST;
|
||||||
}
|
}
|
||||||
ofstream of(path);
|
// Specify truncation flug explicitely.
|
||||||
|
ofstream of(path, std::ios::out | std::ios::trunc);
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@ void Factory::produceFrameworkObjects(void* args) {
|
|||||||
setStaticFrameworkObjectIds();
|
setStaticFrameworkObjectIds();
|
||||||
new EventManager(objects::EVENT_MANAGER, 120);
|
new EventManager(objects::EVENT_MANAGER, 120);
|
||||||
new HealthTable(objects::HEALTH_TABLE);
|
new HealthTable(objects::HEALTH_TABLE);
|
||||||
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);
|
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER, 20, false, 1.0);
|
||||||
|
|
||||||
{
|
{
|
||||||
PoolManager::LocalPoolConfig poolCfg = {{100, 16}, {50, 32}, {25, 64}, {15, 128}, {5, 1024}};
|
PoolManager::LocalPoolConfig poolCfg = {{100, 16}, {50, 32}, {25, 64}, {15, 128}, {5, 1024}};
|
||||||
|
@@ -28,7 +28,6 @@ TEST_CASE("Action Helper", "[action]") {
|
|||||||
REQUIRE(actionHelper.handleActionMessage(&actionMessage) == returnvalue::OK);
|
REQUIRE(actionHelper.handleActionMessage(&actionMessage) == returnvalue::OK);
|
||||||
CHECK(testDhMock.executeActionCalled);
|
CHECK(testDhMock.executeActionCalled);
|
||||||
CHECK(not testMqMock.wasMessageSent());
|
CHECK(not testMqMock.wasMessageSent());
|
||||||
CHECK(not testMqMock.wasMessageSent());
|
|
||||||
const uint8_t* ptr = nullptr;
|
const uint8_t* ptr = nullptr;
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
REQUIRE(ipcStore->getData(paramAddress, &ptr, &size) ==
|
REQUIRE(ipcStore->getData(paramAddress, &ptr, &size) ==
|
||||||
|
Reference in New Issue
Block a user