EIVE upstream #29
136
CHANGELOG.md
136
CHANGELOG.md
@ -8,30 +8,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
## Fixed
|
# [v6.0.0] 2023-02-10
|
||||||
|
|
||||||
- Use `modetree::connectModeTreeParent` in `PowerSwitcherComponent` to connect mode tree parent.
|
|
||||||
- Pool Manager now enables the `spillToHigherPools` option in `LocalPool` parent.
|
|
||||||
|
|
||||||
## Changed
|
|
||||||
|
|
||||||
- Rename FW subsystem ID from `PCDU_2` to `POWER_SYSTEM_IF`.
|
|
||||||
- Add new `SWITCH_UNKNOWN` returnvalue in `PowerSwitchIF`.
|
|
||||||
- Simplify `PeriodicHousekeepingHelper`: No non-diagnostic handling.
|
|
||||||
Start removing the distinction between diagnostics and regular
|
|
||||||
HK packets.
|
|
||||||
|
|
||||||
# [v6.0.0]
|
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
- Add monotonic watchdog Clock API and use it in `Countdown` and `Stopwatch` class.
|
- Mode Service: Add allowed subservice
|
||||||
- Bugfix in `Service11TelecommandScheduling` which allowed commands
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/739
|
||||||
time tagged in the past to be inserted.
|
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/738
|
|
||||||
- `CService200ModeManagement`: Various bugfixes which lead to now execution complete being generated
|
- `CService200ModeManagement`: Various bugfixes which lead to now execution complete being generated
|
||||||
on mode announcements, duplicate mode reply generated on announce commands, and the mode read
|
on mode announcements, duplicate mode reply generated on announce commands, and the mode read
|
||||||
subservice not working properly.
|
subservice not working properly.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/736
|
||||||
- Memory leak fixes for the TCP/IP TMTC bridge.
|
- Memory leak fixes for the TCP/IP TMTC bridge.
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/737
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/737
|
||||||
- `Service9TimeManagement`: Fix the time dump at the `SET_TIME` subservice: Include clock timeval
|
- `Service9TimeManagement`: Fix the time dump at the `SET_TIME` subservice: Include clock timeval
|
||||||
@ -40,16 +26,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- HAL MGM3100 Handler: Use axis specific gain/scaling factors. Previously,
|
- HAL MGM3100 Handler: Use axis specific gain/scaling factors. Previously,
|
||||||
only the X scaling factor was used.
|
only the X scaling factor was used.
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/724
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/724
|
||||||
- Bugfix for RM3100 MGM sensors. Z value was previously calculated
|
- HAL MGM3100 Handler: Z value was previously calculated with bytes of the X value.
|
||||||
with bytes of the X value.
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/733
|
||||||
- DHB `setNormalDatapoolEntriesInvalid`: The default implementation did not set the validity
|
- DHB `setNormalDatapoolEntriesInvalid`: The default implementation did not set the validity
|
||||||
to false correctly because the `read` and `write` calls were missing.
|
to false correctly because the `read` and `write` calls were missing.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/728
|
||||||
- PUS TMTC creator module: Sequence flags were set to continuation segment (0b00) instead
|
- PUS TMTC creator module: Sequence flags were set to continuation segment (0b00) instead
|
||||||
of the correct unsegmented flags (0b11) as specified in the standard.
|
of the correct unsegmented flags (0b11) as specified in the standard.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/727
|
||||||
- TC Scheduler Service 11: Add size and CRC check for contained TC.
|
- TC Scheduler Service 11: Add size and CRC check for contained TC.
|
||||||
|
Bug: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/issues/719
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/720
|
||||||
- Only delete health table entry in `HealthHelper` destructor if
|
- Only delete health table entry in `HealthHelper` destructor if
|
||||||
health table was set.
|
health table was set.
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/710/files
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/710
|
||||||
- I2C Bugfixes: Do not keep iterator as member and fix some incorrect handling with the iterator.
|
- I2C Bugfixes: Do not keep iterator as member and fix some incorrect handling with the iterator.
|
||||||
Also properly reset the reply size for successfull transfers and erroneous transfers.
|
Also properly reset the reply size for successfull transfers and erroneous transfers.
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/700
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/700
|
||||||
@ -59,6 +49,36 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- `TcpTmTcServer.cpp`: The server was actually not able to handle
|
- `TcpTmTcServer.cpp`: The server was actually not able to handle
|
||||||
CCSDS packets which were clumped together. This has been fixed now.
|
CCSDS packets which were clumped together. This has been fixed now.
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/673
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/673
|
||||||
|
- `CServiceHealthCommanding`: Add announce all health info implementation
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/725
|
||||||
|
- various fixes related to linux Unittests and memory leaks
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/715
|
||||||
|
- small fix to allow teardown handling
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/713
|
||||||
|
- fix compiler warning for fixed array list copy ctor
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/704
|
||||||
|
- missing include
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/703
|
||||||
|
- defaultconfig did not build anymore
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/702
|
||||||
|
- hotfix
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/699
|
||||||
|
- small fix for helper
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/698
|
||||||
|
- missing retval conv
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/697
|
||||||
|
- DHB Countdown Bug
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/693
|
||||||
|
- doc corrections
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/687
|
||||||
|
- better error printout
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/686
|
||||||
|
- include correction
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/683
|
||||||
|
- better warning for missing include paths
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/676
|
||||||
|
- Service 11 regression
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/670
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
|
||||||
@ -77,17 +97,36 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/709
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/709
|
||||||
- Add new `UnsignedByteField` class
|
- Add new `UnsignedByteField` class
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/660
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/660
|
||||||
|
- publish documentation for development and master branch
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/681
|
||||||
|
- Add Linux HAL options
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/663
|
||||||
|
- Expand SerializeIF
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/656
|
||||||
|
- PUS Service 11: Additional Safety Check
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/666
|
||||||
|
- improvements for auto-formatter script
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/665
|
||||||
|
- provide a weak print char impl
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/674
|
||||||
|
|
||||||
|
## Removed
|
||||||
|
|
||||||
|
- now that doc server is up, remove markdown files
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/688
|
||||||
|
- remove bsp specific code
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/679
|
||||||
|
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
- `CService201HealthCommanding` renamed to `CServiceHealthCommanding`,
|
- `CService201HealthCommanding` renamed to `CServiceHealthCommanding`,
|
||||||
service ID customizable now. `CServiceHealthCommanding` expects configuration struct
|
service ID customizable now. `CServiceHealthCommanding` expects configuration struct
|
||||||
`HealthServiceCfg` now
|
`HealthServiceCfg` now
|
||||||
PR: https://egit.irs.uni-stuttgart.de/eive/fsfw/pulls/122
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/725
|
||||||
- `AcceptsTelemetryIF`: `getReportReceptionQueue` is const now
|
- `AcceptsTelemetryIF`: `getReportReceptionQueue` is const now
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/712
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/712
|
||||||
- Moved some container returnvalues to dedicated header and namespace
|
- Moved some container returnvalues to dedicated header and namespace
|
||||||
to they can be used without template specification.
|
so they can be used without template specification.
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/707
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/707
|
||||||
- Remove default secondary header argument for
|
- Remove default secondary header argument for
|
||||||
`uint16_t getTcSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag)` and
|
`uint16_t getTcSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag)` and
|
||||||
@ -117,18 +156,41 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- `DeviceHandlerBase`: New signature of `handleDeviceTm` which expects
|
- `DeviceHandlerBase`: New signature of `handleDeviceTm` which expects
|
||||||
a `const SerializeIF&` and additional helper variant which expects `const uint8_t*`
|
a `const SerializeIF&` and additional helper variant which expects `const uint8_t*`
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/671
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/671
|
||||||
- Move some generic `StorageManagerIF` implementations from `LocalPool` to
|
|
||||||
interface itself so it can be re-used more easily. Also add new
|
|
||||||
abstract function `bool hasDataAtId(store_address_t storeId) const`.
|
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/685
|
|
||||||
- Improvements for `AcceptsTelemetryIF` and `AcceptsTelecommandsIF`:
|
- Improvements for `AcceptsTelemetryIF` and `AcceptsTelecommandsIF`:
|
||||||
- Make functions `const` where it makes sense
|
- Make functions `const` where it makes sense
|
||||||
- Add `const char* getName const` abstract function
|
- Add `const char* getName const` abstract function
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/684
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/684
|
||||||
- Move some generic `StorageManagerIF` implementations from `LocalPool` to
|
- Generic TMTC Bridge Update
|
||||||
interface itself so it can be re-used more easily. Also add new
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/734
|
||||||
abstract function `bool hasDataAtId(store_address_t storeId) const`.
|
- comment tweak to event parser can read everything
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/685
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/732
|
||||||
|
- CMakeLists file updates
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/731
|
||||||
|
- improve srv20 error messages
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/723
|
||||||
|
- I2C Linux: remove duplicate printout
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/718
|
||||||
|
- printout handling improvements
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/717
|
||||||
|
- vec getter, reset for content
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/716
|
||||||
|
- updates for source sequence counter
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/714
|
||||||
|
- SP reader getPacketData is const now
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/708
|
||||||
|
- refactoring of serial drivers for linux
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/705
|
||||||
|
- Local Pool Update Remove Add Data Ignore Fault Argument
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/701
|
||||||
|
- Switch to new documentation server
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/694
|
||||||
|
- Windows Tweaks
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/691
|
||||||
|
- Refactor Local Pool API
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/667
|
||||||
|
- group MGM data in local pool vectors
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/664
|
||||||
|
|
||||||
|
|
||||||
## CFDP
|
## CFDP
|
||||||
|
|
||||||
@ -148,17 +210,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
implementation without an extra component
|
implementation without an extra component
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/682
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/682
|
||||||
|
|
||||||
## HAL
|
# [v5.0.0] 2022-07-25
|
||||||
|
|
||||||
- SPI: Cache the SPI device in the communication interface. Architecturally, this makes a
|
|
||||||
lot more sense because each ComIF should be responsible for one SPI bus.
|
|
||||||
- SPI: Move the empty transfer to update the line polarity to separate function. This means
|
|
||||||
it is not automatically called when calling the setter function for SPI speed and mode.
|
|
||||||
The user should call this function after locking the CS mutex if multiple SPI devices with
|
|
||||||
differing speeds and modes are attached to one bus.
|
|
||||||
- SPI: Getter functions for SPI speed and mode.
|
|
||||||
|
|
||||||
# [v5.0.0] 25.07.2022
|
|
||||||
|
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ list(APPEND CMAKE_MODULE_PATH
|
|||||||
# Version file handling #
|
# Version file handling #
|
||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
|
|
||||||
set(FSFW_VERSION_IF_GIT_FAILS 5)
|
set(FSFW_VERSION_IF_GIT_FAILS 6)
|
||||||
set(FSFW_SUBVERSION_IF_GIT_FAILS 0)
|
set(FSFW_SUBVERSION_IF_GIT_FAILS 0)
|
||||||
set(FSFW_REVISION_IF_GIT_FAILS 0)
|
set(FSFW_REVISION_IF_GIT_FAILS 0)
|
||||||
|
|
||||||
|
110
scripts/check_release.py
Executable file
110
scripts/check_release.py
Executable file
@ -0,0 +1,110 @@
|
|||||||
|
#! /bin/python
|
||||||
|
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import json
|
||||||
|
import urllib.request
|
||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
description="List undocumented PRs"
|
||||||
|
)
|
||||||
|
parser.add_argument("-v", "--version", type=str, required=True)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
match = re.search("([0-9]+\.[0-9]+\.[0-9]+)", args.version)
|
||||||
|
|
||||||
|
if not match:
|
||||||
|
print("invalid version")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
version = "v" + match.group(1)
|
||||||
|
|
||||||
|
print("looking for milestone for " + version + " ...")
|
||||||
|
|
||||||
|
|
||||||
|
with urllib.request.urlopen("https://egit.irs.uni-stuttgart.de/api/v1/repos/fsfw/fsfw/milestones?name=" + version) as milestone_json:
|
||||||
|
milestones = json.load(milestone_json)
|
||||||
|
if (len(milestones) == 0):
|
||||||
|
print("did not find any milestone")
|
||||||
|
exit(1)
|
||||||
|
if (len(milestones) > 1):
|
||||||
|
print("found multiple milestons")
|
||||||
|
milestone_title = milestones[0]['title']
|
||||||
|
milestone = str(milestones[0]['id'])
|
||||||
|
print("Using Milestone \""+ milestone_title + "\" with id " + milestone)
|
||||||
|
|
||||||
|
milestone_prs = []
|
||||||
|
|
||||||
|
page = 1
|
||||||
|
last_count = 1;
|
||||||
|
while last_count != 0:
|
||||||
|
with urllib.request.urlopen("https://egit.irs.uni-stuttgart.de/api/v1/repos/fsfw/fsfw/pulls?state=closed&milestone=" + str(milestone) + "&limit=100&page=" + str(page)) as pull_requests_json:
|
||||||
|
pull_requests = json.load(pull_requests_json)
|
||||||
|
for pr in pull_requests:
|
||||||
|
milestone_prs.append({'number': str(pr['number']), 'title' : pr['title']})
|
||||||
|
page += 1
|
||||||
|
last_count = len(pull_requests)
|
||||||
|
|
||||||
|
print("Found " + str(len(milestone_prs)) + " closed PRs in Milestone")
|
||||||
|
|
||||||
|
print("looking for CHANGELOG.md ...")
|
||||||
|
|
||||||
|
path = Path(".")
|
||||||
|
|
||||||
|
files = list(path.glob("CHANGELOG.md"))
|
||||||
|
|
||||||
|
if (len(files) != 1):
|
||||||
|
files = list(path.glob("../CHANGELOG.md"))
|
||||||
|
|
||||||
|
if (len(files) != 1):
|
||||||
|
print("did not find CHANGELOG.md. Run script in either root directory or scripts subfolder.")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
print("Scanning CHANGELOG.md ...")
|
||||||
|
|
||||||
|
changelog_prs = []
|
||||||
|
|
||||||
|
with open(files[0]) as changelog:
|
||||||
|
line = changelog.readline()
|
||||||
|
while (line):
|
||||||
|
#print("line: " + line)
|
||||||
|
match = re.search("\#.+(v[0-9]+\.[0-9]+\.[0-9]+)", line)
|
||||||
|
if (match):
|
||||||
|
if match.group(1) == version:
|
||||||
|
#print("found version")
|
||||||
|
line = changelog.readline()
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
#print("done with " + match.group(1))
|
||||||
|
break
|
||||||
|
|
||||||
|
match = re.search("PR: https://egit\.irs\.uni-stuttgart\.de/fsfw/fsfw/pulls/([0-9]+)", line)
|
||||||
|
if match:
|
||||||
|
changelog_prs.append(match.group(1))
|
||||||
|
|
||||||
|
line = changelog.readline()
|
||||||
|
|
||||||
|
print("Found " + str(len(changelog_prs)) + " PRs in CHANGELOG.md")
|
||||||
|
|
||||||
|
print("")
|
||||||
|
|
||||||
|
copy_array = changelog_prs.copy()
|
||||||
|
print("PRs in CHANGELOG.md that are not in Milestone:")
|
||||||
|
for pr in milestone_prs:
|
||||||
|
if pr['number'] in copy_array:
|
||||||
|
copy_array.remove(pr['number'])
|
||||||
|
for pr in copy_array:
|
||||||
|
print("https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/" + pr)
|
||||||
|
|
||||||
|
print("")
|
||||||
|
|
||||||
|
print("PRs in milestone that are not in CHANGELOG.md:")
|
||||||
|
|
||||||
|
for pr in milestone_prs:
|
||||||
|
if pr['number'] not in changelog_prs:
|
||||||
|
print("- " + pr['title'] + "\n PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/" + pr['number'])
|
||||||
|
|
||||||
|
main()
|
@ -1,5 +1,5 @@
|
|||||||
#include "fsfw/osal/rtems/BinarySemaphore.h"
|
#include "fsfw/osal/rtems/BinarySemaphore.h"
|
||||||
//#include "fsfw/osal/rtems/CountingSemaphore.h"
|
// #include "fsfw/osal/rtems/CountingSemaphore.h"
|
||||||
|
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
#include "fsfw/tasks/SemaphoreFactory.h"
|
#include "fsfw/tasks/SemaphoreFactory.h"
|
||||||
|
@ -10,9 +10,23 @@
|
|||||||
CServiceHealthCommanding::CServiceHealthCommanding(HealthServiceCfg args)
|
CServiceHealthCommanding::CServiceHealthCommanding(HealthServiceCfg args)
|
||||||
: CommandingServiceBase(args.objectId, args.apid, "PUS 201 Health MGMT", args.service,
|
: CommandingServiceBase(args.objectId, args.apid, "PUS 201 Health MGMT", args.service,
|
||||||
args.numParallelCommands, args.commandTimeoutSeconds),
|
args.numParallelCommands, args.commandTimeoutSeconds),
|
||||||
healthTable(args.table),
|
healthTableId(args.table),
|
||||||
maxNumHealthInfoPerCycle(args.maxNumHealthInfoPerCycle) {}
|
maxNumHealthInfoPerCycle(args.maxNumHealthInfoPerCycle) {}
|
||||||
|
|
||||||
|
ReturnValue_t CServiceHealthCommanding::initialize() {
|
||||||
|
ReturnValue_t result = CommandingServiceBase::initialize();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
healthTable = ObjectManager::instance()->get<HealthTable>(healthTableId);
|
||||||
|
if (healthTable == nullptr) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t CServiceHealthCommanding::isValidSubservice(uint8_t subservice) {
|
ReturnValue_t CServiceHealthCommanding::isValidSubservice(uint8_t subservice) {
|
||||||
switch (subservice) {
|
switch (subservice) {
|
||||||
case (Subservice::COMMAND_SET_HEALTH):
|
case (Subservice::COMMAND_SET_HEALTH):
|
||||||
@ -91,14 +105,6 @@ ReturnValue_t CServiceHealthCommanding::prepareCommand(CommandMessage *message,
|
|||||||
return EXECUTION_COMPLETE;
|
return EXECUTION_COMPLETE;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
while (true) {
|
|
||||||
ReturnValue_t result = iterateHealthTable(false);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
// Should never happen, subservice was already checked
|
// Should never happen, subservice was already checked
|
||||||
@ -145,7 +151,7 @@ void CServiceHealthCommanding::doPeriodicOperation() {
|
|||||||
ReturnValue_t CServiceHealthCommanding::iterateHealthTable(bool reset) {
|
ReturnValue_t CServiceHealthCommanding::iterateHealthTable(bool reset) {
|
||||||
std::pair<object_id_t, HasHealthIF::HealthState> pair;
|
std::pair<object_id_t, HasHealthIF::HealthState> pair;
|
||||||
|
|
||||||
ReturnValue_t result = healthTable.iterate(&pair, reset);
|
ReturnValue_t result = healthTable->iterate(&pair, reset);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
|
@ -6,7 +6,11 @@
|
|||||||
#include "fsfw/tmtcservices/CommandingServiceBase.h"
|
#include "fsfw/tmtcservices/CommandingServiceBase.h"
|
||||||
|
|
||||||
struct HealthServiceCfg {
|
struct HealthServiceCfg {
|
||||||
|
<<<<<<< HEAD
|
||||||
HealthServiceCfg(object_id_t objectId, uint16_t apid, HealthTable &healthTable,
|
HealthServiceCfg(object_id_t objectId, uint16_t apid, HealthTable &healthTable,
|
||||||
|
=======
|
||||||
|
HealthServiceCfg(object_id_t objectId, uint16_t apid, object_id_t healthTable,
|
||||||
|
>>>>>>> upstream/development
|
||||||
uint16_t maxNumHealthInfoPerCycle)
|
uint16_t maxNumHealthInfoPerCycle)
|
||||||
: objectId(objectId),
|
: objectId(objectId),
|
||||||
apid(apid),
|
apid(apid),
|
||||||
@ -14,7 +18,11 @@ struct HealthServiceCfg {
|
|||||||
maxNumHealthInfoPerCycle(maxNumHealthInfoPerCycle) {}
|
maxNumHealthInfoPerCycle(maxNumHealthInfoPerCycle) {}
|
||||||
object_id_t objectId;
|
object_id_t objectId;
|
||||||
uint16_t apid;
|
uint16_t apid;
|
||||||
|
<<<<<<< HEAD
|
||||||
HealthTable &table;
|
HealthTable &table;
|
||||||
|
=======
|
||||||
|
object_id_t table;
|
||||||
|
>>>>>>> upstream/development
|
||||||
uint16_t maxNumHealthInfoPerCycle;
|
uint16_t maxNumHealthInfoPerCycle;
|
||||||
uint8_t service = 201;
|
uint8_t service = 201;
|
||||||
uint8_t numParallelCommands = 4;
|
uint8_t numParallelCommands = 4;
|
||||||
@ -39,6 +47,11 @@ class CServiceHealthCommanding : public CommandingServiceBase {
|
|||||||
public:
|
public:
|
||||||
CServiceHealthCommanding(HealthServiceCfg args);
|
CServiceHealthCommanding(HealthServiceCfg args);
|
||||||
~CServiceHealthCommanding() override = default;
|
~CServiceHealthCommanding() override = default;
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
ReturnValue_t initialize() override;
|
||||||
|
>>>>>>> upstream/development
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* CSB abstract function implementations */
|
/* CSB abstract function implementations */
|
||||||
@ -57,7 +70,12 @@ class CServiceHealthCommanding : public CommandingServiceBase {
|
|||||||
void doPeriodicOperation() override;
|
void doPeriodicOperation() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
<<<<<<< HEAD
|
||||||
HealthTable &healthTable;
|
HealthTable &healthTable;
|
||||||
|
=======
|
||||||
|
const object_id_t healthTableId;
|
||||||
|
HealthTable *healthTable;
|
||||||
|
>>>>>>> upstream/development
|
||||||
uint16_t maxNumHealthInfoPerCycle = 0;
|
uint16_t maxNumHealthInfoPerCycle = 0;
|
||||||
bool reportAllHealth = false;
|
bool reportAllHealth = false;
|
||||||
ReturnValue_t iterateHealthTable(bool reset);
|
ReturnValue_t iterateHealthTable(bool reset);
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
// RMAP command bits
|
// RMAP command bits
|
||||||
//#define RMAP_COMMAND_BIT_INCREMENT 2
|
// #define RMAP_COMMAND_BIT_INCREMENT 2
|
||||||
//#define RMAP_COMMAND_BIT_REPLY 3
|
// #define RMAP_COMMAND_BIT_REPLY 3
|
||||||
//#define RMAP_COMMAND_BIT_WRITE 5
|
// #define RMAP_COMMAND_BIT_WRITE 5
|
||||||
//#define RMAP_COMMAND_BIT_VERIFY 4
|
// #define RMAP_COMMAND_BIT_VERIFY 4
|
||||||
//#define RMAP_COMMAND_BIT 6
|
// #define RMAP_COMMAND_BIT 6
|
||||||
|
|
||||||
namespace RMAPIds {
|
namespace RMAPIds {
|
||||||
|
|
||||||
@ -32,14 +32,14 @@ static const uint8_t RMAP_COMMAND_READ = ((1 << RMAP_COMMAND_BIT) | (1 << RMAP_C
|
|||||||
static const uint8_t RMAP_REPLY_WRITE =
|
static const uint8_t RMAP_REPLY_WRITE =
|
||||||
((1 << RMAP_COMMAND_BIT_WRITE) | (1 << RMAP_COMMAND_BIT_REPLY));
|
((1 << RMAP_COMMAND_BIT_WRITE) | (1 << RMAP_COMMAND_BIT_REPLY));
|
||||||
static const uint8_t RMAP_REPLY_READ = ((1 << RMAP_COMMAND_BIT_REPLY));
|
static const uint8_t RMAP_REPLY_READ = ((1 << RMAP_COMMAND_BIT_REPLY));
|
||||||
//#define RMAP_COMMAND_WRITE ((1<<RMAP_COMMAND_BIT) | (1<<RMAP_COMMAND_BIT_WRITE)
|
// #define RMAP_COMMAND_WRITE ((1<<RMAP_COMMAND_BIT) | (1<<RMAP_COMMAND_BIT_WRITE)
|
||||||
//| (1<<RMAP_COMMAND_BIT_REPLY)) #define RMAP_COMMAND_WRITE_VERIFY ((1<<RMAP_COMMAND_BIT) |
|
//| (1<<RMAP_COMMAND_BIT_REPLY)) #define RMAP_COMMAND_WRITE_VERIFY ((1<<RMAP_COMMAND_BIT) |
|
||||||
//(1<<RMAP_COMMAND_BIT_WRITE) | (1<<RMAP_COMMAND_BIT_REPLY) | (1<<RMAP_COMMAND_BIT_VERIFY)) #define
|
//(1<<RMAP_COMMAND_BIT_WRITE) | (1<<RMAP_COMMAND_BIT_REPLY) | (1<<RMAP_COMMAND_BIT_VERIFY)) #define
|
||||||
// RMAP_COMMAND_READ ((1<<RMAP_COMMAND_BIT) | (1<<RMAP_COMMAND_BIT_REPLY))
|
// RMAP_COMMAND_READ ((1<<RMAP_COMMAND_BIT) | (1<<RMAP_COMMAND_BIT_REPLY))
|
||||||
|
|
||||||
//#define RMAP_REPLY_WRITE ((1<<RMAP_COMMAND_BIT_WRITE) |
|
// #define RMAP_REPLY_WRITE ((1<<RMAP_COMMAND_BIT_WRITE) |
|
||||||
//(1<<RMAP_COMMAND_BIT_REPLY))
|
//(1<<RMAP_COMMAND_BIT_REPLY))
|
||||||
//#define RMAP_REPLY_WRITE_VERIFY ((1<<RMAP_COMMAND_BIT_WRITE) |
|
// #define RMAP_REPLY_WRITE_VERIFY ((1<<RMAP_COMMAND_BIT_WRITE) |
|
||||||
//(1<<RMAP_COMMAND_BIT_REPLY) | (1<<RMAP_COMMAND_BIT_VERIFY)) #define RMAP_REPLY_READ
|
//(1<<RMAP_COMMAND_BIT_REPLY) | (1<<RMAP_COMMAND_BIT_VERIFY)) #define RMAP_REPLY_READ
|
||||||
//((1<<RMAP_COMMAND_BIT_REPLY))
|
//((1<<RMAP_COMMAND_BIT_REPLY))
|
||||||
|
|
||||||
@ -49,9 +49,9 @@ static const uint8_t RMAP_COMMAND_HEADER_LEN = 16;
|
|||||||
static const uint8_t RMAP_WRITE_REPLY_HEADER_LEN = 8;
|
static const uint8_t RMAP_WRITE_REPLY_HEADER_LEN = 8;
|
||||||
static const uint8_t RMAP_READ_REPLY_HEADER_LEN = 12;
|
static const uint8_t RMAP_READ_REPLY_HEADER_LEN = 12;
|
||||||
static const uint8_t RMAP_DATA_FOOTER_SIZE = 1; // SIZE OF CRC
|
static const uint8_t RMAP_DATA_FOOTER_SIZE = 1; // SIZE OF CRC
|
||||||
//#define RMAP_COMMAND_HEADER_LEN 16
|
// #define RMAP_COMMAND_HEADER_LEN 16
|
||||||
//#define RMAP_WRITE_REPLY_HEADER_LEN 8
|
// #define RMAP_WRITE_REPLY_HEADER_LEN 8
|
||||||
//#define RMAP_READ_REPLY_HEADER_LEN 12
|
// #define RMAP_READ_REPLY_HEADER_LEN 12
|
||||||
|
|
||||||
} // namespace RMAPIds
|
} // namespace RMAPIds
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user