Merge branch 'mueller/restructuring' into mueller/master

This commit is contained in:
Robin Müller 2021-07-19 15:06:00 +02:00
commit 08364e2dca
5 changed files with 78 additions and 8 deletions

View File

@ -1,17 +1,80 @@
## Changes from ASTP 1.0.0 to 1.1.0
# Changed from ASTP 1.1.0 to 1.2.0
## API Changes
### FSFW Architecture
- Internal API changed completely to have separation of sources and headers
- External API mostly stayed the same
- Folder names are now all smaller case: internalError was renamed to internalerror and
FreeRTOS was renamed to freertos
### HAL
- HAL added back into FSFW. It is tightly bound to the FSFW, and compiling it as a static library
made using it more complicated than necessary
## Bugfixes
### FreeRTOS QueueMapManager
- Fixed a bug which causes the first generated Queue ID to be invalid
## Enhancements
### FSFW Architecture
- See API changes chapter. This change will keep the internal API consistent in the future
# Changes from ASTP 1.0.0 to 1.1.0
## API Changes
### PUS
- Added PUS C support
- SUBSYSTEM_IDs added for PUS Services
- Added new Parameter which must be defined in config: fsfwconfig::FSFW_MAX_TM_PACKET_SIZE
### ObjectManager
- ObjectManager is now a singelton
### Configuration
- Additional configuration option fsfwconfig::FSFW_MAX_TM_PACKET_SIZE which
need to be specified in FSFWConfig.h
### CMake
- Changed Cmake FSFW_ADDITIONAL_INC_PATH to FSFW_ADDITIONAL_INC_PATHS
## Bugfixes
- timemanager/TimeStamperIF.h: Timestamp config was not used correctly, leading to different timestamp sizes than configured in fsfwconfig::FSFW_MISSION_TIMESTAMP_SIZE
- TCP server fixes
## Enhancements
### FreeRTOS Queue Handles
- Fixed an internal issue how FreeRTOS MessageQueues were handled
### Linux OSAL
- Better printf error messages
### CMake
- Check for C++11 as mininimum required Version
### Debug Output
- Changed Warning color to magenta, which is well readable on both dark and light mode IDEs
## Changes from ASTP 0.0.1 to 1.0.0
# Changes from ASTP 0.0.1 to 1.0.0
### Host OSAL

View File

@ -39,8 +39,7 @@ private:
QueueMapManager();
~QueueMapManager();
// Start at 1 because 0 might be the NO_QUEUE value
uint32_t queueCounter = 1;
uint32_t queueCounter = MessageQueueIF::NO_QUEUE + 1;
MutexIF* mapLock;
QueueMap queueMap;
static QueueMapManager* mqManagerInstance;

View File

@ -41,7 +41,7 @@ private:
QueueMapManager();
~QueueMapManager();
uint32_t queueCounter = 0;
uint32_t queueCounter = MessageQueueIF::NO_QUEUE + 1;
MutexIF* mapLock;
QueueMap queueMap;
static QueueMapManager* mqManagerInstance;

View File

@ -17,10 +17,12 @@ QueueMapManager* QueueMapManager::instance() {
ReturnValue_t QueueMapManager::addMessageQueue(QueueHandle_t queue, MessageQueueId_t* id) {
MutexGuard lock(mapLock);
uint32_t currentId = queueCounter++;
uint32_t currentId = queueCounter;
queueCounter++;
if(currentId == MessageQueueIF::NO_QUEUE) {
// Skip the NO_QUEUE value
currentId = queueCounter++;
currentId = queueCounter;
queueCounter++;
}
auto returnPair = queueMap.emplace(currentId, queue);
if(not returnPair.second) {

View File

@ -24,7 +24,13 @@ QueueMapManager* QueueMapManager::instance() {
ReturnValue_t QueueMapManager::addMessageQueue(
MessageQueueIF* queueToInsert, MessageQueueId_t* id) {
MutexGuard lock(mapLock);
uint32_t currentId = queueCounter++;
uint32_t currentId = queueCounter;
queueCounter++;
if(currentId == MessageQueueIF::NO_QUEUE) {
// Skip the NO_QUEUE value
currentId = queueCounter;
queueCounter++;
}
auto returnPair = queueMap.emplace(currentId, queueToInsert);
if(not returnPair.second) {
/* This should never happen for the atomic variable. */