Compare commits

..

264 Commits

Author SHA1 Message Date
nehlichp cb6dc831d4 Added missing import to taskHelper.cpp for campatibility with gcc 15.2.x 2026-05-04 10:12:48 +02:00
mspahr c4d0afe5d9 fix: include missing string header in taskHelpers.h
Co-authored-by: Copilot <copilot@github.com>
2026-04-30 11:08:29 +02:00
muellerr bf311757a2 Merge branch 'service_11_bugfixes' into mueller/new-cfdp-update-with-handlers
fsfw/fsfw/pipeline/head This commit looks good
2023-01-13 10:59:48 +01:00
muellerr a4531e4ced typo
fsfw/fsfw/pipeline/head This commit looks good
fsfw/fsfw/pipeline/pr-development This commit looks good
2023-01-13 10:59:39 +01:00
muellerr cbe1b65a33 Merge branch 'service_11_bugfixes' into mueller/new-cfdp-update-with-handlers
fsfw/fsfw/pipeline/head This commit looks good
2023-01-13 10:56:24 +01:00
muellerr 80f0060cd2 Merge remote-tracking branch 'origin/development' into mueller/new-cfdp-update-with-handlers
fsfw/fsfw/pipeline/head Build queued...
2023-01-13 10:56:16 +01:00
muellerr 97c629ad84 update changelog
fsfw/fsfw/pipeline/head This commit looks good
2023-01-13 10:53:36 +01:00
muellerr bf12f284fa add size and crc check for contained TC 2023-01-13 10:53:04 +01:00
Steffen Gaisser 8589f4d63a Merge pull request 'updates for source sequence counter' (#714) from eive/fsfw:source_seq_counter_update into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #714
2022-12-19 15:00:28 +01:00
muellerr ca80589233 make get const
fsfw/fsfw/pipeline/pr-development Build queued...
2022-12-19 14:58:08 +01:00
Steffen Gaisser f2ebaed092 Merge pull request 'vec getter, reset for content' (#716) from eive/fsfw:get_cmd_exec_read_buf into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #716
2022-12-19 14:56:11 +01:00
Steffen Gaisser f0b89e98df Merge pull request 'printout handling improvements' (#717) from eive/fsfw:i2c_printout_improvements into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #717
2022-12-19 14:45:04 +01:00
Steffen Gaisser 5557d95994 Merge branch 'development' into i2c_printout_improvements
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-12-05 14:20:58 +01:00
Steffen Gaisser fc24c9b5d8 Merge branch 'development' into get_cmd_exec_read_buf
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-12-05 14:20:52 +01:00
mohr 7ef69c839c Merge pull request 'small fix to allow teardown handling' (#713) from eive/fsfw:mueller/shutdown_for_failed_to_on_transition into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #713
2022-11-28 14:30:15 +01:00
Steffen Gaisser 9b798d798e Merge pull request 'DLE parser' (#711) from eive/fsfw:mueller/dle_parser into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #711
2022-11-28 14:13:18 +01:00
muellerr b13453f46b vec getter, reset for content
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-28 08:43:54 +01:00
muellerr d0e322d7e2 printout handling improvements
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-28 08:42:08 +01:00
muellerr ecde164f68 updates for source sequence counter
fsfw/fsfw/pipeline/pr-development Build started...
2022-11-28 08:30:45 +01:00
muellerr 50930b41ba Merge remote-tracking branch 'upstream/development' into mueller/dle_parser
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-28 08:27:24 +01:00
Steffen Gaisser d6ee2ed400 Merge pull request 'AcceptsTelemetryIF tweaks' (#712) from eive/fsfw:mueller/accepts_tm_if_adaptions into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #712
2022-11-21 16:30:43 +01:00
Steffen Gaisser f2150ff9c2 Merge pull request 'only delete table entry if not nullptr' (#710) from eive/fsfw:mueller/health_helper_bugfix into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #710
2022-11-21 16:24:13 +01:00
Steffen Gaisser 1b9c98f3fe Merge pull request 'uio able to resolve symlinks now' (#709) from eive/fsfw:mueller/uio_mapper_handle_symlinks into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #709
2022-11-21 16:14:36 +01:00
Steffen Gaisser 742152b28e Merge branch 'development' into mueller/accepts_tm_if_adaptions
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-21 15:29:35 +01:00
Steffen Gaisser bf4ca56658 Merge branch 'development' into mueller/shutdown_for_failed_to_on_transition
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-21 15:29:11 +01:00
Steffen Gaisser 16ffa00155 Merge branch 'development' into mueller/dle_parser
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-11-21 15:28:34 +01:00
Steffen Gaisser 14c681c93a Merge branch 'development' into mueller/uio_mapper_handle_symlinks
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-21 15:27:06 +01:00
Steffen Gaisser 0958c3a00e Merge branch 'development' into mueller/health_helper_bugfix
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-21 15:24:51 +01:00
Steffen Gaisser d699d16307 Merge pull request 'SP reader getPacketData is const now' (#708) from eive/fsfw:mueller/sp_reader_const_get_data into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #708
2022-11-21 15:23:39 +01:00
Steffen Gaisser 3b0fed733f Merge branch 'development' into mueller/uio_mapper_handle_symlinks
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-21 15:23:15 +01:00
muellerr 23d3812fe3 this is actually important
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-21 15:22:25 +01:00
muellerr dec7db3ae2 Merge remote-tracking branch 'upstream/development' into mueller/accepts_tm_if_adaptions
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-21 15:00:06 +01:00
muellerr 65a5abab49 move free call
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-21 14:56:08 +01:00
Steffen Gaisser 0129783e34 Merge branch 'development' into mueller/sp_reader_const_get_data
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-21 14:50:44 +01:00
Steffen Gaisser cabe0868ec Merge pull request 'move container returnvalues to namespace' (#707) from eive/fsfw:mueller/update_containers_retval into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #707
2022-11-21 14:49:44 +01:00
muellerr f05295bada small fix to allow teardown handling
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-17 15:16:29 +01:00
muellerr b85ca64690 update changelog
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-15 11:48:28 +01:00
muellerr 3bc3da5a8d update changelog
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-15 11:47:26 +01:00
muellerr f8c07ec9cf update changelog
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-15 11:46:43 +01:00
muellerr 8199b8f359 bump changelog
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-15 11:45:39 +01:00
muellerr cbc8dbcdd4 update changelog
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-11-15 11:44:45 +01:00
muellerr d31a5306f0 fix mock
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-15 11:41:03 +01:00
muellerr a236a5ec50 adaptions for AcceptsTelemetryIF 2022-11-15 11:40:26 +01:00
muellerr 03620970e2 function to get queue is const now 2022-11-15 11:38:32 +01:00
muellerr 8fe8d810e9 only delete table if not nullptr
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-15 11:27:31 +01:00
muellerr 9483c2809d DLE parser
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-15 11:26:53 +01:00
muellerr fe3d6bd432 uio able to resolve symlinks now
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-15 10:56:46 +01:00
muellerr 2a842666d5 SP reader getPacketData is const now
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-15 10:46:46 +01:00
muellerr c013fcc1f5 move container retvals to namespace
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-15 10:01:37 +01:00
Steffen Gaisser 1b8fc2af19 Merge pull request 'CFDP Update' (#682) from mueller/cfdp-update-without-handlers into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #682
2022-11-14 15:04:43 +01:00
muellerr 72d7c43445 updates for storage manager mock
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-14 14:57:37 +01:00
muellerr ab9b6c8c89 Merge remote-tracking branch 'origin/development' into mueller/cfdp-update-without-handlers
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-11-14 14:51:33 +01:00
Steffen Gaisser 69d338f9bb Merge pull request 'Local Pool Update Remove Add Data Ignore Fault Argument' (#701) from eive/fsfw:mueller/local-pool-update-remove-ignore-fault-arg into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #701
2022-11-14 14:49:34 +01:00
Steffen Gaisser 68223869d5 Merge branch 'development' into mueller/local-pool-update-remove-ignore-fault-arg
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-14 14:47:07 +01:00
Steffen Gaisser 93fda71989 Merge pull request 'refactoring of serial drivers for linux' (#705) from eive/fsfw:mueller/refactor_serial_linux into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #705
2022-11-14 14:39:41 +01:00
Steffen Gaisser 7b0db08962 Merge branch 'development' into mueller/refactor_serial_linux
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-14 14:36:31 +01:00
Steffen Gaisser 0956fbc740 Merge pull request 'fix compiler warning for fixed array list copy ctor' (#704) from eive/fsfw:mueller/fixed_array_list_copy_ctor into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #704
2022-11-14 14:28:46 +01:00
muellerr b48e0fdc0d Merge remote-tracking branch 'origin/development' into mueller/cfdp-update-without-handlers
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-11-14 14:25:36 +01:00
Steffen Gaisser 1d084ee22f Merge branch 'development' into mueller/fixed_array_list_copy_ctor
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-14 14:21:04 +01:00
muellerr 1bea2344f6 remove using declaraction
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-14 14:21:00 +01:00
Steffen Gaisser d7e16a67a7 Merge pull request 'Windows Tweaks' (#691) from eive/fsfw:windows-tweaks-upstream into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #691
2022-11-14 14:18:47 +01:00
Steffen Gaisser 6021d897b8 Merge branch 'development' into windows-tweaks-upstream
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-14 14:13:57 +01:00
muellerr 83a6f0b5f8 reenable setup function call
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-14 14:12:26 +01:00
muellerr a9c6c088f2 remove leftover debugging code
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-14 14:08:38 +01:00
muellerr b6a3c206cc smaller include tweaks
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-11 11:34:58 +01:00
muellerr 5b352978c5 rename cookie class
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-11 11:33:35 +01:00
muellerr 819a298b19 refactoring of serial drivers for linux
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-10 17:50:21 +01:00
muellerr 16246d6ece replace other memcpy
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-10 16:18:36 +01:00
muellerr 5c84f12440 this not crash
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-10 16:15:52 +01:00
muellerr 83c2c4825c fix compiler error for fixed array list copy ctor
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-11-10 15:54:03 +01:00
muellerr c913fe40bf tweaks
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-09 17:54:08 +01:00
Steffen Gaisser 70ec08bf1d Merge pull request 'missing include' (#703) from KSat/fsfw:mueller/time_reader_include into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #703
2022-11-09 16:59:25 +01:00
Steffen Gaisser ef23665d9c Merge branch 'development' into mueller/time_reader_include 2022-11-09 16:39:55 +01:00
muellerr eefc122292 Merge pull request 'defaultconfig did not build anymore' (#702) from mohr/fix_defaultconfig into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #702
2022-11-09 14:12:41 +01:00
muellerr bee33526a1 missing include
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-11-09 13:49:40 +01:00
muellerr f715b65d6e Merge remote-tracking branch 'upstream/development' into mueller/local-pool-update-remove-ignore-fault-arg
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-28 10:06:04 +02:00
muellerr c11af63015 Merge remote-tracking branch 'origin/development' into mueller/cfdp-update-without-handlers
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-10-28 10:04:21 +02:00
mohr 11a22577be defaultconfig did not build anymore
fsfw/fsfw/pipeline/head This commit looks good
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-25 11:28:13 +02:00
Steffen Gaisser dc1583c932 Merge branch 'development' into windows-tweaks-upstream
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-24 17:10:44 +02:00
Steffen Gaisser 94f1f1f908 Merge pull request 'Refactor TM and TC acceptor interfaces' (#684) from mueller/refactor-accepts-tc-tm-if into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #684
2022-10-24 17:10:03 +02:00
muellerr 81a7de2814 make dtor virtual
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-10-24 16:39:32 +02:00
muellerr d26f230bee builds
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-24 15:43:20 +02:00
muellerr 4db124c680 ignore fault 2022-10-24 15:41:29 +02:00
Steffen Gaisser 955579c856 Merge branch 'development' into mueller/refactor-accepts-tc-tm-if
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-24 14:57:38 +02:00
muellerr 2df66c9304 Merge branch 'mueller/local-pool-update' of https://egit.irs.uni-stuttgart.de/fsfw/fsfw into mueller/local-pool-update
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-10-24 14:39:11 +02:00
muellerr 54ad6b3016 add some docs 2022-10-24 14:39:05 +02:00
Steffen Gaisser 73e313c35b Merge branch 'development' into mueller/local-pool-update
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-24 14:35:24 +02:00
Steffen Gaisser c6585c8645 Merge pull request 'important bugfix for linux i2c device com IF' (#700) from eive/fsfw:mueller/i2c-com-if-bugfix into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #700
2022-10-24 14:35:01 +02:00
muellerr dd2f42d22b Merge branch 'development' into mueller/local-pool-update
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-24 14:34:56 +02:00
muellerr d8a4675842 bump changelog
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-24 14:30:14 +02:00
muellerr 1164c21ddd iter not a member anymore, more bugfixes
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-24 14:23:43 +02:00
muellerr 77b1a85b47 important bugfix for i2c device com IF
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-20 14:24:40 +02:00
muellerr 009700ce80 remove info printout
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-10-17 17:29:10 +02:00
muellerr 652c31a683 missing validity check
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-10-17 17:25:27 +02:00
muellerr 1e43296f2b missing validity check
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-10-17 17:24:46 +02:00
muellerr 1aa062df7f const specifier for AcceptsTelemetryIF
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-10-17 16:27:41 +02:00
muellerr bfe120636c this should have the same effect
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-17 15:08:46 +02:00
Steffen Gaisser a8041f220f Merge branch 'development' into mueller/cfdp-update-without-handlers
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-17 14:44:28 +02:00
muellerr dd636b186b size check bugfix
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-17 14:30:27 +02:00
Steffen Gaisser 3349fc36f8 Merge branch 'development' into windows-tweaks-upstream
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-17 14:20:48 +02:00
muellerr 14a8924a83 size check bugfix
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-10-17 14:01:21 +02:00
muellerr 9f81926aec some more basic error handling
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-10-17 12:22:01 +02:00
muellerr 79c38b45df events for FSFW specific errors
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-10-17 12:20:26 +02:00
muellerr e893e73f86 add first CFDP events
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-10-17 12:19:31 +02:00
Steffen Gaisser f3e9277e59 Merge branch 'development' into mueller/refactor-accepts-tc-tm-if
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-10 15:45:05 +02:00
Steffen Gaisser d592f1ecbc Merge pull request 'Minor API tweak' (#689) from eive/fsfw:mueller/smaller-tweaks into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #689
2022-10-10 15:10:57 +02:00
mohr 6ec18171a8 Merge pull request 'now that doc server is up, remove markdown files' (#688) from mueller/remove-markdown-docs into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #688
2022-10-10 15:04:11 +02:00
Steffen Gaisser 518dcdef4b Merge branch 'development' into mueller/smaller-tweaks
fsfw/fsfw/pipeline/pr-development Build started...
2022-10-10 15:03:04 +02:00
mohr d9730032fd Merge pull request 'DHB Countdown Bug' (#693) from eive/fsfw:mueller/dhb-countdown-bug into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #693
2022-10-10 14:55:43 +02:00
Steffen Gaisser b3ac72b7db Merge pull request 'missing retval conv' (#697) from mueller/missing-retval-conversion into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #697
2022-10-10 14:54:26 +02:00
Steffen Gaisser cd0cb43412 Merge branch 'development' into mueller/missing-retval-conversion
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-10 14:46:10 +02:00
Steffen Gaisser 32c12b3dbf Merge pull request 'small fix for helper' (#698) from mueller/small-helper-script-fix into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #698
2022-10-10 14:43:59 +02:00
Steffen Gaisser 3e9acf476e Merge branch 'development' into mueller/small-helper-script-fix
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-10 14:25:49 +02:00
Steffen Gaisser 99101ce2bf Merge pull request 'hotfix' (#699) from eive/fsfw:mueller/dhb-some-more-fixes into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #699
2022-10-10 14:22:30 +02:00
muellerr 6b991045f7 Merge branch 'development' into mueller/smaller-tweaks
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-10 13:41:47 +02:00
muellerr df06064df0 Merge branch 'development' into windows-tweaks-upstream
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-10 13:41:09 +02:00
muellerr 337cb0d6c9 hotfix
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-10 10:21:17 +02:00
muellerr c283e0c988 okay this is correct
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-04 11:02:08 +02:00
muellerr 448d20f3bd small fix for helper
fsfw/fsfw/pipeline/head Build started...
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-04 10:55:46 +02:00
muellerr 2316728d74 Merge branch 'development' into mueller/dhb-countdown-bug
fsfw/fsfw/pipeline/pr-development Build started...
2022-10-04 10:53:26 +02:00
muellerr 6f562e5f3e missing retval conv
fsfw/fsfw/pipeline/head This commit looks good
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-10-04 10:25:58 +02:00
mohr 176f243194 Merge pull request 'Switch to new documentation server' (#694) from mohr/documentation_ci into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #694
2022-09-30 15:05:16 +02:00
mohr d964fa2107 Merge branch 'development' into mohr/documentation_ci
fsfw/fsfw/pipeline/pr-development This commit looks good
fsfw/fsfw/pipeline/head This commit looks good
2022-09-30 14:50:20 +02:00
mohr 7b5ae6a445 done?
fsfw/fsfw/pipeline/head This commit looks good
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-30 14:40:59 +02:00
mohr 8e362a000c Revert "one last check"
fsfw/fsfw/pipeline/head This commit looks good
This reverts commit 7877776e24.
2022-09-30 14:36:25 +02:00
mohr 7877776e24 one last check
fsfw/fsfw/pipeline/head Something is wrong with the build of this commit
2022-09-30 14:34:25 +02:00
muellerr 3de0ae5a48 DHB bug
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-29 17:22:44 +02:00
muellerr e0c780f21c better comment
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-28 09:59:31 +02:00
muellerr 876815b1c9 another small windows tweak 2022-09-28 09:59:22 +02:00
muellerr b0ecf87580 last windows tweak 2022-09-28 09:59:12 +02:00
muellerr 68ce8b5b08 tweaks to make windows build again 2022-09-28 09:59:02 +02:00
muellerr fe03da6def Merge remote-tracking branch 'origin/development' into mueller/cfdp-update-without-handlers
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-26 15:38:45 +02:00
Steffen Gaisser 95ac53c417 Merge branch 'development' into mueller/smaller-tweaks
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-26 14:40:29 +02:00
Steffen Gaisser 62f638a3d2 Merge pull request 'doc corrections' (#687) from mueller/doc-corrections into development
fsfw/fsfw/pipeline/head There was a failure building this commit
Reviewed-on: #687
2022-09-26 14:38:39 +02:00
Steffen Gaisser bd64591f30 Merge branch 'development' into mueller/smaller-tweaks
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-26 14:34:38 +02:00
Steffen Gaisser e6a877f048 Merge branch 'development' into mueller/doc-corrections
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-26 14:26:48 +02:00
Steffen Gaisser ea8c557ee8 Merge pull request 'better error printout' (#686) from eive/fsfw:mueller/local-pool-obj-base-better-warning into development
fsfw/fsfw/pipeline/head There was a failure building this commit
Reviewed-on: #686
2022-09-26 14:26:20 +02:00
Steffen Gaisser 0bdd780f82 Merge branch 'development' into mueller/doc-corrections
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-26 14:17:24 +02:00
Steffen Gaisser 9ec397c8b7 Merge branch 'development' into mueller/local-pool-obj-base-better-warning
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-26 14:17:19 +02:00
muellerr c54d9d7ba6 add some tests
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-26 14:15:11 +02:00
Steffen Gaisser 30c03c110c Merge pull request 'include correction' (#683) from mueller/service-interface-include-correction into development
fsfw/fsfw/pipeline/head There was a failure building this commit
Reviewed-on: #683
2022-09-26 14:14:57 +02:00
Steffen Gaisser 69f1be263a Merge branch 'development' into mueller/local-pool-obj-base-better-warning
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-26 14:10:21 +02:00
muellerr c7b5309dcb Merge branch 'development' into mueller/service-interface-include-correction
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-26 14:08:38 +02:00
mohr 775d5632de update to ssh connection to doc server
fsfw/fsfw/pipeline/head This commit looks good
2022-09-23 20:26:45 +02:00
mohr 4f3361eb2b another ci check
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-23 18:33:47 +02:00
mohr 9e6c1d60e5 another ci check
fsfw/fsfw/pipeline/pr-development This commit looks good
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-23 17:54:41 +02:00
mohr 12d0c23c13 Revert "testing deployment of documentation"
fsfw/fsfw/pipeline/head Build started...
fsfw/fsfw/pipeline/pr-development This commit looks good
This reverts commit 5488ee715f.
2022-09-23 17:31:17 +02:00
mohr 5c3bb13834 Revert "testing deployment of both development and master doc"
This reverts commit c0000a8635.
2022-09-23 17:31:07 +02:00
mohr 292fe3e5e4 forgot epilog file
fsfw/fsfw/pipeline/head This commit looks good
2022-09-23 17:11:57 +02:00
mohr 33530f2819 adding Impressum and Datenschutz to lcov output
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-23 17:04:35 +02:00
mohr c0000a8635 testing deployment of both development and master doc
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-23 14:14:10 +02:00
mohr 5488ee715f testing deployment of documentation
fsfw/fsfw/pipeline/head Something is wrong with the build of this commit
2022-09-23 14:07:12 +02:00
mohr 0fea22d031 switching to rsync and deploying to web documentation 2022-09-23 14:06:28 +02:00
mohr 3b8ca09299 prepared docker for documentation rsync
fsfw/fsfw/pipeline/head This commit looks good
2022-09-23 13:46:03 +02:00
mohr 9a2146fa2d added impressum and datenschutz in sphinx documentation
fsfw/fsfw/pipeline/head This commit looks good
2022-09-23 11:36:29 +02:00
muellerr 558550ecb9 Merge branch 'development' into mueller/smaller-tweaks
fsfw/fsfw/pipeline/pr-development Build queued...
2022-09-16 18:37:39 +02:00
muellerr 72172a972b update changelog
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-16 18:24:23 +02:00
muellerr b4b11ebd3b fixes and tweaks 2022-09-16 18:20:42 +02:00
muellerr bdbe0cc9da pass message queue externally
fsfw/fsfw/pipeline/head This commit looks good
2022-09-16 16:28:41 +02:00
muellerr c38088c64b adaptions for enum renaming
fsfw/fsfw/pipeline/head This commit looks good
2022-09-15 18:44:00 +02:00
muellerr 7eb63d6d79 Merge branch 'mueller/cfdp-update-without-handlers' into mueller/new-cfdp-update-with-handlers
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-15 18:41:29 +02:00
muellerr 6f8ccf83e7 use singular enum names
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-15 18:41:15 +02:00
muellerr 67f1cd0b5f Merge branch 'development' into mueller/cfdp-update-without-handlers
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-15 18:35:22 +02:00
muellerr ed68268c0c generic cfdp handler wrapper
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-15 16:53:04 +02:00
muellerr c549914efb include helpers
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-15 16:50:06 +02:00
muellerr 753d5ff39e adaptions for enum renaming
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-15 16:47:09 +02:00
muellerr 36ca35da77 Merge branch 'mueller/cfdp-update-without-handlers' into mueller/new-cfdp-update-with-handlers 2022-09-15 16:46:25 +02:00
muellerr 54762232a4 refactoring and condition code to strin converter
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-15 16:46:09 +02:00
muellerr 4fb7375492 Merge branch 'mueller/cfdp-update-without-handlers' into mueller/new-cfdp-update-with-handlers
fsfw/fsfw/pipeline/head This commit looks good
2022-09-15 16:21:32 +02:00
muellerr 2fee2fdff5 unittest which would have caught this
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 16:20:52 +02:00
muellerr 47df9e8b5b Merge branch 'mueller/cfdp-update-without-handlers' into mueller/new-cfdp-update-with-handlers
fsfw/fsfw/pipeline/head This commit looks good
2022-09-15 16:03:06 +02:00
muellerr 954c749de0 additional docs
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-15 16:02:46 +02:00
muellerr bcbbc9763a markdown update not required, will be removed
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 14:00:01 +02:00
muellerr 0042372cb6 now that doc server is up, remove markdown files
fsfw/fsfw/pipeline/head Build queued...
fsfw/fsfw/pipeline/pr-development Build started...
2022-09-15 13:58:13 +02:00
muellerr 8dea13742f update rst file
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 13:57:39 +02:00
muellerr 0f027d29d2 doc corrections
fsfw/fsfw/pipeline/head Build queued...
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 13:53:42 +02:00
muellerr 131e3ff1e3 Revert "doc corrections"
fsfw/fsfw/pipeline/head This commit looks good
This reverts commit 423a9540ed.
2022-09-15 13:52:28 +02:00
muellerr 423a9540ed doc corrections
fsfw/fsfw/pipeline/head This commit looks good
2022-09-15 13:51:59 +02:00
muellerr ce7146e468 printout tweak
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 13:40:12 +02:00
muellerr a681a4a797 better error printout
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 13:38:38 +02:00
muellerr 86aafe4422 Merge branch 'mueller/cfdp-update-without-handlers' into mueller/new-cfdp-update-with-handlers
fsfw/fsfw/pipeline/head This commit looks good
2022-09-15 11:02:46 +02:00
muellerr e585c1d84a Merge remote-tracking branch 'origin/development' into mueller/cfdp-update-without-handlers
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 11:02:04 +02:00
muellerr 83b7b8707c Merge remote-tracking branch 'origin/development' into mueller/refactor-accepts-tc-tm-if
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 11:01:19 +02:00
muellerr 4002b74ea2 Merge branch 'development' into mueller/service-interface-include-correction
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 11:01:06 +02:00
muellerr 4f7f8310c9 Merge remote-tracking branch 'origin/development' into mueller/local-pool-update
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 11:00:43 +02:00
muellerr 1a833e2d45 another missing changelog entry
fsfw/fsfw/pipeline/head This commit looks good
2022-09-15 10:59:10 +02:00
muellerr 8df6d934d7 another missing changelog entry
fsfw/fsfw/pipeline/head This commit looks good
2022-09-15 10:56:52 +02:00
muellerr 5363868120 added another missing changelog entry
fsfw/fsfw/pipeline/head This commit looks good
2022-09-15 10:54:45 +02:00
muellerr 36cf59cc8e Merge branch 'mueller/refactor-accepts-tc-tm-if' into mueller/cfdp-update-without-handlers
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-15 10:52:13 +02:00
muellerr 97fec909f2 Merge branch 'mueller/local-pool-update' into mueller/cfdp-update-without-handlers
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 10:50:35 +02:00
muellerr 1db77753e3 Merge remote-tracking branch 'origin/development' into mueller/local-pool-update
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-15 10:49:24 +02:00
muellerr 8501477a78 Merge remote-tracking branch 'origin/development' into mueller/refactor-accepts-tc-tm-if
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-15 10:48:42 +02:00
muellerr 6eea711d9f Merge branch 'development' into mueller/service-interface-include-correction
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 10:48:28 +02:00
muellerr 9a181aa6a8 another missing changelog entry
fsfw/fsfw/pipeline/head This commit looks good
2022-09-15 10:47:50 +02:00
muellerr 655c944c0e another missing changelog entry
fsfw/fsfw/pipeline/head This commit looks good
2022-09-15 10:45:35 +02:00
muellerr 2e310fca8d add another missing changelog entry
fsfw/fsfw/pipeline/head This commit looks good
2022-09-15 10:43:45 +02:00
muellerr 37390dfc74 add missing changelog entry
fsfw/fsfw/pipeline/head This commit looks good
2022-09-15 10:42:35 +02:00
muellerr 75ddfdc65d Merge branch 'mueller/refactor-accepts-tc-tm-if' into mueller/cfdp-update-without-handlers
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-15 10:41:16 +02:00
muellerr 1efc0d2855 update changelog
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-15 10:38:40 +02:00
muellerr e063b44899 add link to PR
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-15 10:32:38 +02:00
muellerr b3c0e24611 bump changelog
fsfw/fsfw/pipeline/head Build started...
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-15 10:31:55 +02:00
muellerr ab7c3480f5 storage manager update 2022-09-15 10:30:22 +02:00
muellerr 237e29cc59 all necessary modifications
fsfw/fsfw/pipeline/head Build started...
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-14 20:21:03 +02:00
muellerr 0849c8a08d adding files manually 2022-09-14 20:10:41 +02:00
muellerr 9d626e0a5d include correction
fsfw/fsfw/pipeline/head Build started...
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-14 19:59:02 +02:00
muellerr 723f8749d4 bump changelog
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-14 19:52:33 +02:00
muellerr dbaeed83af Merge branch 'mueller/cfdp-update-without-handlers' into mueller/new-cfdp-update-with-handlers
fsfw/fsfw/pipeline/head This commit looks good
2022-09-14 19:48:25 +02:00
muellerr 2e27a85c95 finished renaming operation
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-14 19:48:11 +02:00
muellerr 385a0ffd73 add CFDP handlers manually
fsfw/fsfw/pipeline/head This commit looks good
2022-09-14 19:29:43 +02:00
muellerr 73f1917c81 update changelog
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-14 19:26:07 +02:00
muellerr 3a52454949 removed handlers
fsfw/fsfw/pipeline/head Build started...
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-14 19:15:52 +02:00
muellerr ac7dc55fc1 fix unittest
fsfw/fsfw/pipeline/pr-development This commit looks good
fsfw/fsfw/pipeline/head This commit looks good
2022-09-14 19:07:17 +02:00
muellerr 389d804735 Merge remote-tracking branch 'origin/development' into mueller/cfdp-routers
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-14 19:05:59 +02:00
muellerr 44615c150b add printout capabilities
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-14 14:00:20 +02:00
muellerr 0ce568ad26 Merge pull request 'publish documentation for development and master branch' (#681) from mohr/documentation_ci into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #681
2022-09-14 11:22:35 +02:00
mohr 6970068d56 small fix in README
fsfw/fsfw/pipeline/head This commit looks good
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-13 18:19:35 +02:00
mohr af282c7d3e reverting to only publish development
fsfw/fsfw/pipeline/head This commit looks good
2022-09-13 18:17:56 +02:00
mohr 21a9d89fb3 pushing code coverage report to documentation server
fsfw/fsfw/pipeline/head This commit looks good
2022-09-13 18:14:26 +02:00
mohr 3257935150 fixing scp yet again again
fsfw/fsfw/pipeline/head This commit looks good
2022-09-13 18:06:16 +02:00
mohr f34cf9095d fixing scp yet again
fsfw/fsfw/pipeline/head This commit looks good
2022-09-13 18:02:38 +02:00
mohr 24ecf125a3 fixing scp command again
fsfw/fsfw/pipeline/head This commit looks good
2022-09-13 17:55:12 +02:00
mohr 6451a16888 fixing scp command
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-13 17:51:01 +02:00
muellerr 4dadef34fd Merge remote-tracking branch 'origin/development' into mueller/cfdp-routers
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-13 15:35:59 +02:00
muellerr 382543fc59 important bugfix
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-13 15:26:14 +02:00
mohr fa5605c959 testing Jenkinsfile
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-13 14:50:37 +02:00
muellerr a1ea671e2f header include update
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-13 14:46:41 +02:00
mohr 8e835be55f testing Jenkinsfile
fsfw/fsfw/pipeline/head Something is wrong with the build of this commit
2022-09-13 14:46:12 +02:00
mohr 9bd600c488 testing Jenkinsfile
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-13 14:32:10 +02:00
mohr 9c7248e78e typo in Dockerfile
fsfw/fsfw/pipeline/head This commit looks good
2022-09-13 14:20:30 +02:00
mohr ecf51b2913 testing Jenkinsfile
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-13 14:09:08 +02:00
mohr 8bbde05413 add jenkins user in docker so that ssh will work
fsfw/fsfw/pipeline/head Something is wrong with the build of this commit
2022-09-13 14:08:04 +02:00
mohr d79b5348d8 testing Jenkinsfile
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-13 14:00:36 +02:00
mohr 92e3ab04f3 testing Jenkinsfile
fsfw/fsfw/pipeline/head There was a failure building this commit
2022-09-13 13:54:23 +02:00
mohr 003a6d00fa Documentation build tools in docker
fsfw/fsfw/pipeline/head This commit looks good
2022-09-13 13:13:18 +02:00
muellerr 26b3e5a013 fix misc def config
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-12 15:14:42 +02:00
muellerr 3e9b47d3a2 update docs release in conf.py
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-12 15:12:26 +02:00
mohr 9ee1896553 Merge pull request 'Refactor Local Pool API' (#667) from mueller/refactor-local-pool-api into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #667
2022-09-12 14:32:08 +02:00
mohr a5b5523111 Merge pull request 'Refactor TMTC Stack, improve test framework' (#655) from mueller/refactor-tmtc-stack into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #655
2022-09-12 14:31:22 +02:00
mohr 62cd39e573 Merge pull request 'SerialBufferAdapter refactoring' (#677) from mueller/refactor-serial-buffer-adapter into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #677
2022-09-12 14:30:51 +02:00
mohr 278ed36db8 Merge pull request 'bump catch2 version' (#678) from mueller/bump-catch2 into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #678
2022-09-12 14:24:28 +02:00
mohr aed30d54ef Merge pull request 'remove bsp specific code' (#679) from mueller/remove-bsp-specific-code into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #679
2022-09-12 14:23:48 +02:00
mohr 1126db2c8a Merge pull request 'remove user includes' (#675) from mueller/remove-user-includes into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #675
2022-09-12 14:15:18 +02:00
mohr a64a04d7fe Merge branch 'development' into mueller/refactor-tmtc-stack
fsfw/fsfw/pipeline/pr-development Build queued...
2022-09-12 14:14:49 +02:00
muellerr 80467bf097 Merge pull request 'sif::buffer: if disabeld do not print' (#680) from mohr/enableDisable into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #680
2022-09-12 14:12:13 +02:00
muellerr 6a6aa7fdd6 Merge branch 'development' into mohr/enableDisable
fsfw/fsfw/pipeline/pr-development Build queued...
2022-09-12 14:11:38 +02:00
mohr 7e379d2159 Merge pull request 'provide a weak print char impl' (#674) from mueller/provide-weak-print-char into development
fsfw/fsfw/pipeline/head This commit looks good
Reviewed-on: #674
2022-09-12 14:10:31 +02:00
muellerr 6ae709acc3 Merge branch 'development' into mueller/remove-user-includes
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-12 14:07:09 +02:00
muellerr 34dd478848 helper class OneRemoteConfigProvider
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-08 16:25:19 +02:00
muellerr b73754dfd6 implemented basic PDU forwarding
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-08 12:07:16 +02:00
muellerr ec1e07b466 some more returncodes
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-08 11:53:06 +02:00
mohr d52f335455 sif::buffer: if disabeld do not print
fsfw/fsfw/pipeline/head This commit looks good
fsfw/fsfw/pipeline/pr-development Build started...
2022-09-08 11:47:40 +02:00
muellerr 04b619a15c update header as well
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-07 17:58:49 +02:00
muellerr 282704e0fd remove bsp specific code
fsfw/fsfw/pipeline/head Build started...
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-09-07 17:54:04 +02:00
muellerr 07ef9a0ec3 bump catch2 version
fsfw/fsfw/pipeline/head Build started...
fsfw/fsfw/pipeline/pr-development Build queued...
2022-09-06 15:47:04 +02:00
muellerr 80464f2a81 Merge branch 'mueller/refactor-serial-buffer-adapter' into mueller/refactor-tmtc-stack
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-05 16:38:58 +02:00
muellerr 16688316a8 rename setBuffer to setConstBuffer
fsfw/fsfw/pipeline/head Build started...
fsfw/fsfw/pipeline/pr-development Build started...
2022-09-05 16:31:56 +02:00
muellerr b7a1f79d5b update FSFWCnfig.h
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-05 15:36:12 +02:00
muellerr 26bc80964e Merge branch 'development' into mueller/provide-weak-print-char
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-05 14:14:06 +02:00
muellerr 04800df31e another user-level-include
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-02 09:04:37 +02:00
muellerr 1e85cdadfd remove user includes
fsfw/fsfw/pipeline/head This commit looks good
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-02 08:55:33 +02:00
muellerr ebc02673dd provide a weak print char impl
fsfw/fsfw/pipeline/head Build started...
fsfw/fsfw/pipeline/pr-development This commit looks good
2022-09-02 08:50:39 +02:00
muellerr 9202c6c17f Merge branch 'mueller/refactor-tmtc-stack' into mueller/refactor-local-pool-api
fsfw/fsfw/pipeline/pr-development Build queued...
2022-09-01 17:51:50 +02:00
muellerr 5f8c549993 Merge remote-tracking branch 'origin/development' into mueller/refactor-local-pool-api 2022-09-01 17:51:44 +02:00
muellerr 9131ca688b make two helper functions protected
fsfw/fsfw/pipeline/pr-development There was a failure building this commit
2022-08-30 15:01:10 +02:00
188 changed files with 2036 additions and 1725 deletions
+76
View File
@@ -10,13 +10,42 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
# [v6.0.0]
## Fixes
- TC Scheduler Service 11: Add size and CRC check for contained TC.
- Only delete health table entry in `HealthHelper` destructor if
health table was set.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/710/files
- 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.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/700
- Bugfix for Serial Buffer Stream: Setting `doActive` to false now
actually fully disables printing.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/680
- `TcpTmTcServer.cpp`: The server was actually not able to handle
CCSDS packets which were clumped together. This has been fixed now.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/673
## Added
- `DleParser` helper class to parse DLE encoded packets from a byte stream.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/711
- `UioMapper` is able to resolve symlinks now.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/709
- Add new `UnsignedByteField` class
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/660
## Changes
- `AcceptsTelemetryIF`: `getReportReceptionQueue` is const now
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/712
- Moved some container returnvalues to dedicated header and namespace
to they can be used without template specification.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/707
- Remove default secondary header argument for
`uint16_t getTcSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag)` and
`uint16_t getTmSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag)`
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/689
- Removed `HasReturnvaluesIF` class in favor of `returnvalue` namespace with `OK` and `FAILED`
constants.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/659
@@ -24,6 +53,53 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
for other modules
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/655
which also includes a migration guide
- Bump Catch2 dependency to regular version `v3.1.0`
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/678
- `SerialBufferAdapter`: Rename `setBuffer` to `setConstBuffer` and update
API to expect `const uint8_t*` accordingly.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/677
- Remove the following user includes from `fsfw/events/Event.h` and
`fsfw/returnvalues/returnvalue.h`:
- `#include "events/subsystemIdRanges.h"`
- `#include "returnvalues/classIds.h"`
The user has to include those themselves now
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/675
- `DeviceHandlerBase`: Set command sender before calling `buildCommandFromCommand`.
This allows finishing action commands immediately inside the function.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/672
- `DeviceHandlerBase`: New signature of `handleDeviceTm` which expects
a `const SerializeIF&` and additional helper variant which expects `const uint8_t*`
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`:
- Make functions `const` where it makes sense
- Add `const char* getName const` abstract function
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/684
- 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
## CFDP
- Refactoring of CFDP stack which was done during implementation of the CFDP source and destination
handlers.
- New filesystem module, changes for filesystem abstraction `HasFileSystemIF` to better
fit requirements of CFDP
- New `HostFilesystem` implementation of the `HasFileSystemIF`
- New `cfdp::UserBase` class which is the abstraction for the CFDP user in an OBSW context.
- mib module for the CFDP stack
- PDU classes renamed from `...Serializer`/`...Deserializer` to `...Creator`/`...Reader`
respetively
- Renamed `TcDistributor` to `TcDistributorBase` to prevent confusion
- Refactored `TcDisitributorBase` to be more flexible and usable for CFDP distribution
- Renamed `CCSDSDistributor` to `CcsdsDistributor` and add feature which allows it
to remove the CCSDS header when routing a packet. This allows CCSDS agnostic receiver
implementation without an extra component
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/682
# [v5.0.0] 25.07.2022
+13 -4
View File
@@ -80,7 +80,7 @@ set(FSFW_CATCH2_LIB_MAJOR_VERSION
3
CACHE STRING "Catch2 library major version requirement")
set(FSFW_CATCH2_LIB_VERSION
v${FSFW_CATCH2_LIB_MAJOR_VERSION}.0.0-preview5
v${FSFW_CATCH2_LIB_MAJOR_VERSION}.1.0
CACHE STRING "Catch2 library exact version requirement")
# Keep this off by default for now. See PR:
@@ -122,6 +122,7 @@ if(UNIX)
option(FSFW_HAL_LINUX_ADD_PERIPHERAL_DRIVERS "Add Linux peripheral drivers"
OFF)
option(FSFW_HAL_LINUX_ADD_LIBGPIOD "Attempt to add Linux GPIOD drivers" OFF)
option(FSFW_HAL_LINUX_ADD_SERIAL_DRIVERS "Add serial drivers" ON)
endif()
# Optional sources
@@ -326,7 +327,8 @@ if(FSFW_BUILD_TESTS)
"/usr/local/include/*"
"*/fsfw_tests/*"
"*/catch2-src/*"
"*/fsfw_hal/*")
"*/fsfw_hal/*"
"unittests/*")
endif()
target_link_options(${FSFW_TEST_TGT} PRIVATE -fprofile-arcs
@@ -344,8 +346,15 @@ if(FSFW_BUILD_TESTS)
DEPENDENCIES ${FSFW_TEST_TGT})
else()
setup_target_for_coverage_lcov(
NAME ${FSFW_TEST_TGT}_coverage EXECUTABLE ${FSFW_TEST_TGT}
DEPENDENCIES ${FSFW_TEST_TGT})
NAME
${FSFW_TEST_TGT}_coverage
EXECUTABLE
${FSFW_TEST_TGT}
DEPENDENCIES
${FSFW_TEST_TGT}
GENHTML_ARGS
--html-epilog
${CMAKE_SOURCE_DIR}/unittests/lcov_epilog.html)
endif()
endif()
endif()
+1 -1
View File
@@ -175,7 +175,7 @@ cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..
Then you can generate the documentation using
```sh
cmake --build . -j
cmake --build . -- Sphinx -j
```
You can find the generated documentation inside the `docs/sphinx` folder inside the build
+18 -9
View File
@@ -5,16 +5,25 @@ RUN apt-get --yes upgrade
#tzdata is a dependency, won't install otherwise
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get --yes install gcc g++ cmake make lcov git valgrind nano iputils-ping
RUN apt-get --yes install gcc g++ cmake make lcov git valgrind nano iputils-ping python3 pip doxygen graphviz rsync
RUN python3 -m pip install sphinx breathe
RUN git clone https://github.com/catchorg/Catch2.git && \
cd Catch2 && \
git checkout v3.0.0-preview5 && \
cmake -Bbuild -H. -DBUILD_TESTING=OFF && \
cmake --build build/ --target install
cd Catch2 && \
git checkout v3.1.0 && \
cmake -Bbuild -H. -DBUILD_TESTING=OFF && \
cmake --build build/ --target install
RUN git clone https://github.com/ETLCPP/etl.git && \
cd etl && \
git checkout 20.28.0 && \
cmake -B build . && \
cmake --install build/
cd etl && \
git checkout 20.28.0 && \
cmake -B build . && \
cmake --install build/
#ssh needs a valid user to work
RUN adduser --uid 114 jenkins
#add documentation server to known hosts
RUN echo "|1|/LzCV4BuTmTb2wKnD146l9fTKgQ=|NJJtVjvWbtRt8OYqFgcYRnMQyVw= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNL8ssTonYtgiR/6RRlSIK9WU1ywOcJmxFTLcEblAwH7oifZzmYq3XRfwXrgfMpylEfMFYfCU8JRqtmi19xc21A=" >> /etc/ssh/ssh_known_hosts
RUN echo "|1|CcBvBc3EG03G+XM5rqRHs6gK/Gg=|oGeJQ+1I8NGI2THIkJsW92DpTzs= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNL8ssTonYtgiR/6RRlSIK9WU1ywOcJmxFTLcEblAwH7oifZzmYq3XRfwXrgfMpylEfMFYfCU8JRqtmi19xc21A=" >> /etc/ssh/ssh_known_hosts
+43 -1
View File
@@ -1,9 +1,13 @@
pipeline {
environment {
BUILDDIR = 'cmake-build-tests'
DOCDDIR = 'cmake-build-documentation'
}
agent {
docker { image 'fsfw-ci:d3'}
docker {
image 'fsfw-ci:d6'
args '--network host'
}
}
stages {
stage('Clean') {
@@ -39,5 +43,43 @@ pipeline {
}
}
}
stage('Documentation') {
when {
branch 'development'
}
steps {
dir(DOCDDIR) {
sh 'cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..'
sh 'make Sphinx'
sshagent(credentials: ['documentation-buildfix']) {
sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/development'
}
}
dir(BUILDDIR) {
sshagent(credentials: ['documentation-buildfix']) {
sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/coverage/development'
}
}
}
}
stage('Master Documentation') {
when {
branch 'master'
}
steps {
dir(DOCDDIR) {
sh 'cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..'
sh 'make Sphinx'
sshagent(credentials: ['documentation-buildfix']) {
sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/master'
}
}
dir(BUILDDIR) {
sshagent(credentials: ['documentation-buildfix']) {
sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/coverage/master'
}
}
}
}
}
}
+1 -1
View File
@@ -140,7 +140,7 @@ find_program( GCOV_PATH gcov )
find_program( LCOV_PATH NAMES lcov lcov.bat lcov.exe lcov.perl)
find_program( FASTCOV_PATH NAMES fastcov fastcov.py )
find_program( GENHTML_PATH NAMES genhtml genhtml.perl genhtml.bat )
find_program( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/scripts/test)
find_program( GCOVR_PATH gcovr )
find_program( CPPFILT_PATH NAMES c++filt )
if(NOT GCOV_PATH)
-40
View File
@@ -1,40 +0,0 @@
Configuring the FSFW
======
The FSFW can be configured via the `fsfwconfig` folder. A template folder has
been provided to have a starting point for this. The folder should be added
to the include path. The primary configuration file is the `FSFWConfig.h` folder. Some
of the available options will be explained in more detail here.
# Auto-Translation of Events
The FSFW allows the automatic translation of events, which allows developers to track triggered
events directly via console output. Using this feature requires:
1. `FSFW_OBJ_EVENT_TRANSLATION` set to 1 in the configuration file.
2. Special auto-generated translation files which translate event IDs and object IDs into
human readable strings. These files can be generated using the
[modgen Python scripts](https://git.ksat-stuttgart.de/source/modgen.git).
3. The generated translation files for the object IDs should be named `translatesObjects.cpp`
and `translateObjects.h` and should be copied to the `fsfwconfig/objects` folder
4. The generated translation files for the event IDs should be named `translateEvents.cpp` and
`translateEvents.h` and should be copied to the `fsfwconfig/events` folder
An example implementations of these translation file generators can be found as part
of the [SOURCE project here](https://git.ksat-stuttgart.de/source/sourceobsw/-/tree/development/generators)
or the [FSFW example](https://egit.irs.uni-stuttgart.de/fsfw/fsfw_example_public/src/branch/master/generators)
## Configuring the Event Manager
The number of allowed subscriptions can be modified with the following
parameters:
``` c++
namespace fsfwconfig {
//! Configure the allocated pool sizes for the event manager.
static constexpr size_t FSFW_EVENTMGMR_MATCHTREE_NODES = 240;
static constexpr size_t FSFW_EVENTMGMT_EVENTIDMATCHERS = 120;
static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS = 120;
}
```
-1
View File
@@ -1 +0,0 @@
## Controllers
-55
View File
@@ -1,55 +0,0 @@
## FSFW Core Modules
These core modules provide the most important functionalities of the
Flight Software Framework
### Clock
* This is a class of static functions that can be used at anytime
* Leap Seconds must be set if any time conversions from UTC to other times is used
### ObjectManager
* Must be created during program startup
* The component which handles all references. All SystemObjects register at this component.
* Any SystemObject needs to have a unique ObjectId. Those can be managed like objects::framework_objects.
* A reference to an object can be get by calling the following function. T must be the specific Interface you want to call.
A nullptr check of the returning Pointer must be done. This function is based on Run-time type information.
```cpp
template <typename T> T* ObjectManagerIF::get( object_id_t id )
```
* A typical way to create all objects on startup is a handing a static produce function to the
ObjectManager on creation. By calling objectManager->initialize() the produce function will be
called and all SystemObjects will be initialized afterwards.
### Event Manager
* Component which allows routing of events
* Other objects can subscribe to specific events, ranges of events or all events of an object.
* Subscriptions can be done during runtime but should be done during initialization
* Amounts of allowed subscriptions can be configured in `FSFWConfig.h`
### Health Table
* A component which holds every health state
* Provides a thread safe way to access all health states without the need of message exchanges
### Stores
* The message based communication can only exchange a few bytes of information inside the message
itself. Therefore, additional information can be exchanged with Stores. With this, only the
store address must be exchanged in the message.
* Internally, the FSFW uses an IPC Store to exchange data between processes. For incoming TCs a TC
Store is used. For outgoing TM a TM store is used.
* All of them should use the Thread Safe Class storagemanager/PoolManager
### Tasks
There are two different types of tasks:
* The PeriodicTask just executes objects that are of type ExecutableObjectIF in the order of the
insertion to the Tasks.
* FixedTimeslotTask executes a list of calls in the order of the given list. This is intended for
DeviceHandlers, where polling should be in a defined order. An example can be found in
`defaultcfg/fsfwconfig/pollingSequence` folder
-1
View File
@@ -1 +0,0 @@
## Device Handlers
-135
View File
@@ -1,135 +0,0 @@
High-level overview
======
# Structure
The general structure is driven by the usage of interfaces provided by objects.
The FSFW uses C++11 as baseline. The intention behind this is that this C++ Standard should be
widely available, even with older compilers.
The FSFW uses dynamic allocation during the initialization but provides static containers during runtime.
This simplifies the instantiation of objects and allows the usage of some standard containers.
Dynamic Allocation after initialization is discouraged and different solutions are provided in the
FSFW to achieve that. The fsfw uses run-time type information but exceptions are not allowed.
# Failure Handling
Functions should return a defined `ReturnValue_t` to signal to the caller that something has
gone wrong. Returnvalues must be unique. For this the function `returnvalue::makeCode`
or the macro `MAKE_RETURN` can be used. The `CLASS_ID` is a unique id for that type of object.
See `returnvalues/FwClassIds` folder. The user can add custom `CLASS_ID`s via the
`fsfwconfig` folder.
# OSAL
The FSFW provides operation system abstraction layers for Linux, FreeRTOS and RTEMS.
The OSAL provides periodic tasks, message queues, clocks and semaphores as well as mutexes.
The [OSAL README](doc/README-osal.md#top) provides more detailed information on provided components
and how to use them.
# Core Components
The FSFW has following core components. More detailed informations can be found in the
[core component section](doc/README-core.md#top):
1. Tasks: Abstraction for different (periodic) task types like periodic tasks or tasks
with fixed timeslots
2. ObjectManager: This module stores all `SystemObjects` by mapping a provided unique object ID
to the object handles.
3. Static Stores: Different stores are provided to store data of variable size (like telecommands
or small telemetry) in a pool structure without using dynamic memory allocation.
These pools are allocated up front.
3. Clock: This module provided common time related functions
4. EventManager: This module allows routing of events generated by `SystemObjects`
5. HealthTable: A component which stores the health states of objects
# Static IDs in the framework
Some parts of the framework use a static routing address for communication.
An example setup of ids can be found in the example config in `defaultcft/fsfwconfig/objects`
inside the function `Factory::setStaticFrameworkObjectIds()`.
# Events
Events are tied to objects. EventIds can be generated by calling the Macro MAKE_EVENT.
This works analog to the returnvalues. Every object that needs own EventIds has to get a
unique SUBSYSTEM_ID. Every SystemObject can call triggerEvent from the parent class.
Therefore, event messages contain the specific EventId and the objectId of the object that
has triggered.
# Internal Communication
Components communicate mostly via Messages through Queues.
Those queues are created by calling the singleton `QueueFactory::instance()->create()` which
will create `MessageQueue` instances for the used OSAL.
# External Communication
The external communication with the mission control system is mostly up to the user implementation.
The FSFW provides PUS Services which can be used to but don't need to be used.
The services can be seen as a conversion from a TC to a message based communication and back.
## TMTC Communication
The FSFW provides some components to facilitate TMTC handling via the PUS commands.
For example, a UDP or TCP PUS server socket can be opened on a specific port using the
files located in `osal/common`. The FSFW example uses this functionality to allow sending telecommands
and receiving telemetry using the [TMTC commander application](https://github.com/spacefisch/tmtccmd).
Simple commands like the PUS Service 17 ping service can be tested by simply running the
`tmtc_client_cli.py` or `tmtc_client_gui.py` utility in
the [example tmtc folder](https://egit.irs.uni-stuttgart.de/fsfw/fsfw_example_public/src/branch/master/tmtc)
while the `fsfw_example` application is running.
More generally, any class responsible for handling incoming telecommands and sending telemetry
can implement the generic `TmTcBridge` class located in `tmtcservices`. Many applications
also use a dedicated polling task for reading telecommands which passes telecommands
to the `TmTcBridge` implementation.
## CCSDS Frames, CCSDS Space Packets and PUS
If the communication is based on CCSDS Frames and Space Packets, several classes can be used to
distributed the packets to the corresponding services. Those can be found in `tcdistribution`.
If Space Packets are used, a timestamper has to be provided by the user.
An example can be found in the `timemanager` folder, which uses `CCSDSTime::CDS_short`.
# Device Handlers
DeviceHandlers are another important component of the FSFW.
The idea is, to have a software counterpart of every physical device to provide a simple mode,
health and commanding interface. By separating the underlying Communication Interface with
`DeviceCommunicationIF`, a device handler (DH) can be tested on different hardware.
The DH has mechanisms to monitor the communication with the physical device which allow
for FDIR reaction. Device Handlers can be created by implementing `DeviceHandlerBase`.
A standard FDIR component for the DH will be created automatically but can
be overwritten by the user. More information on DeviceHandlers can be found in the
related [documentation section](doc/README-devicehandlers.md#top).
# Modes and Health
The two interfaces `HasModesIF` and `HasHealthIF` provide access for commanding and monitoring
of components. On-board Mode Management is implement in hierarchy system.
DeviceHandlers and Controllers are the lowest part of the hierarchy.
The next layer are Assemblies. Those assemblies act as a component which handle
redundancies of handlers. Assemblies share a common core with the next level which
are the Subsystems.
Those Assemblies are intended to act as auto-generated components from a database which describes
the subsystem modes. The definitions contain transition and target tables which contain the DH,
Assembly and Controller Modes to be commanded.
Transition tables contain as many steps as needed to reach the mode from any other mode, e.g. a
switch into any higher AOCS mode might first turn on the sensors, than the actuators and the
controller as last component.
The target table is used to describe the state that is checked continuously by the subsystem.
All of this allows System Modes to be generated as Subsystem object as well from the same database.
This System contains list of subsystem modes in the transition and target tables.
Therefore, it allows a modular system to create system modes and easy commanding of those, because
only the highest components must be commanded.
The health state represents if the component is able to perform its tasks.
This can be used to signal the system to avoid using this component instead of a redundant one.
The on-board FDIR uses the health state for isolation and recovery.
# Unit Tests
Unit Tests are provided in the unittest folder. Those use the catch2 framework but do not include
catch2 itself. More information on how to run these tests can be found in the separate
[`fsfw_tests` reposoitory](https://egit.irs.uni-stuttgart.de/fsfw/fsfw_tests)
-174
View File
@@ -1,174 +0,0 @@
## Local Data Pools Developer Information
The following text is targeted towards mission software developers which would like
to use the local data pools provided by the FSFW to store data like sensor values so they can be
used by other software objects like controllers as well. If a custom class should have a local
pool which can be used by other software objects as well, following steps have to be performed:
1. Create a `LocalDataPoolManager` member object in the custom class
2. Implement the `HasLocalDataPoolIF` with specifies the interface between the local pool manager
and the class owning the local pool.
The local data pool manager is also able to process housekeeping service requests in form
of messages, generate periodic housekeeping packet, generate notification and snapshots of changed
variables and datasets and process notifications and snapshots coming from other objects.
The two former tasks are related to the external interface using telemetry and telecommands (TMTC)
while the later two are related to data consumers like controllers only acting on data change
detected by the data creator instead of checking the data manually each cycle. Two important
framework classes `DeviceHandlerBase` and `ExtendedControllerBase` already perform the two steps
shown above so the steps required are altered slightly.
### Storing and Accessing pool data
The pool manager is responsible for thread-safe access of the pool data, but the actual
access to the pool data from the point of view of a mission software developer happens via proxy
classes like pool variable classes. These classes store a copy
of the pool variable with the matching datatype and copy the actual data from the local pool
on a `read` call. Changed variables can then be written to the local pool with a `commit` call.
The `read` and `commit` calls are thread-safe and can be called concurrently from data creators
and data consumers. Generally, a user will create a dataset class which in turn groups all
cohesive pool variables. These sets simply iterator over the list of variables and call the
`read` and `commit` functions of each variable. The following diagram shows the
high-level architecture of the local data pools.
.. image:: ../misc/logo/FSFW_Logo_V3_bw.png
:alt: FSFW Logo
An example is shown for using the local data pools with a Gyroscope.
For example, the following code shows an implementation to access data from a Gyroscope taken
from the SOURCE CubeSat project:
```cpp
class GyroPrimaryDataset: public StaticLocalDataSet<3 * sizeof(float)> {
public:
/**
* Constructor for data users
* @param gyroId
*/
GyroPrimaryDataset(object_id_t gyroId):
StaticLocalDataSet(sid_t(gyroId, gyrodefs::GYRO_DATA_SET_ID)) {
setAllVariablesReadOnly();
}
lp_var_t<float> angVelocityX = lp_var_t<float>(sid.objectId,
gyrodefs::ANGULAR_VELOCITY_X, this);
lp_var_t<float> angVelocityY = lp_var_t<float>(sid.objectId,
gyrodefs::ANGULAR_VELOCITY_Y, this);
lp_var_t<float> angVelocityZ = lp_var_t<float>(sid.objectId,
gyrodefs::ANGULAR_VELOCITY_Z, this);
private:
friend class GyroHandler;
/**
* Constructor for data creator
* @param hkOwner
*/
GyroPrimaryDataset(HasLocalDataPoolIF* hkOwner):
StaticLocalDataSet(hkOwner, gyrodefs::GYRO_DATA_SET_ID) {}
};
```
There is a public constructor for users which sets all variables to read-only and there is a
constructor for the GyroHandler data creator by marking it private and declaring the `GyroHandler`
as a friend class. Both the atittude controller and the `GyroHandler` can now
use the same class definition to access the pool variables with `read` and `commit` semantics
in a thread-safe way. Generally, each class requiring access will have the set class as a member
class. The data creator will also be generally a `DeviceHandlerBase` subclass and some additional
steps are necessary to expose the set for housekeeping purposes.
### Using the local data pools in a `DeviceHandlerBase` subclass
It is very common to store data generated by devices like a sensor into a pool which can
then be used by other objects. Therefore, the `DeviceHandlerBase` already has a
local pool. Using the aforementioned example, our `GyroHandler` will now have the set class
as a member:
```cpp
class GyroHandler: ... {
public:
...
private:
...
GyroPrimaryDataset gyroData;
...
};
```
The constructor used for the creators expects the owner class as a parameter, so we initialize
the object in the `GyroHandler` constructor like this:
```cpp
GyroHandler::GyroHandler(object_id_t objectId, object_id_t comIF,
CookieIF *comCookie, uint8_t switchId):
DeviceHandlerBase(objectId, comIF, comCookie), switchId(switchId),
gyroData(this) {}
```
We need to assign the set to a reply ID used in the `DeviceHandlerBase`.
The combination of the `GyroHandler` object ID and the reply ID will be the 64-bit structure ID
`sid_t` and is used to globally identify the set, for example when requesting housekeeping data or
generating update messages. We need to assign our custom set class in some way so that the local
pool manager can access the custom data sets as well.
By default, the `getDataSetHandle` will take care of this tasks. The default implementation for a
`DeviceHandlerBase` subclass will use the internal command map to retrieve
a handle to a dataset from a given reply ID. Therefore,
we assign the set in the `fillCommandAndReplyMap` function:
```cpp
void GyroHandler::fillCommandAndReplyMap() {
...
this->insertInCommandAndReplyMap(gyrodefs::GYRO_DATA, 3, &gyroData);
...
}
```
Now, we need to create the actual pool entries as well, using the `initializeLocalDataPool`
function. Here, we also immediately subscribe for periodic housekeeping packets
with an interval of 4 seconds. They are still disabled in this example and can be enabled
with a housekeeping service command.
```cpp
ReturnValue_t GyroHandler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(gyrodefs::ANGULAR_VELOCITY_X,
new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(gyrodefs::ANGULAR_VELOCITY_Y,
new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(gyrodefs::ANGULAR_VELOCITY_Z,
new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(gyrodefs::GENERAL_CONFIG_REG42,
new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(gyrodefs::RANGE_CONFIG_REG43,
new PoolEntry<uint8_t>({0}));
poolManager.subscribeForPeriodicPacket(gyroData.getSid(), false, 4.0, false);
return returnvalue::OK;
}
```
Now, if we receive some sensor data and converted them into the right format,
we can write it into the pool like this, using a guard class to ensure the set is commited back
in any case:
```cpp
PoolReadGuard readHelper(&gyroData);
if(readHelper.getReadResult() == returnvalue::OK) {
if(not gyroData.isValid()) {
gyroData.setValidity(true, true);
}
gyroData.angVelocityX = angularVelocityX;
gyroData.angVelocityY = angularVelocityY;
gyroData.angVelocityZ = angularVelocityZ;
}
```
The guard class will commit the changed data on destruction automatically.
### Using the local data pools in a `ExtendedControllerBase` subclass
Coming soon
-32
View File
@@ -1,32 +0,0 @@
# Operating System Abstraction Layer (OSAL)
Some specific information on the provided OSALs are provided.
## Linux OSAL
This OSAL can be used to compile for Linux host systems like Ubuntu 20.04 or for
embedded Linux targets like the Raspberry Pi. This OSAL generally requires threading support
and real-time functionalities. For most UNIX systems, this is done by adding `-lrt` and `-lpthread` to the linked libraries in the compilation process. The CMake build support provided will do this automatically for the `fsfw` target. It should be noted that most UNIX systems need to be configured specifically to allow the real-time functionalities required by the FSFW.
More information on how to set up a Linux system accordingly can be found in the
[Linux README of the FSFW example application](https://egit.irs.uni-stuttgart.de/fsfw/fsfw_example/src/branch/master/doc/README-linux.md#top)
## Hosted OSAL
This is the newest OSAL. Support for Semaphores has not been implemented yet and will propably be implemented as soon as C++20 with Semaphore support has matured. This OSAL can be used to run the FSFW on any host system, but currently has only been tested on Windows 10 and Ubuntu 20.04. Unlike the other OSALs, it uses dynamic memory allocation (e.g. for the message queue implementation). Cross-platform serial port (USB) support might be added soon.
## FreeRTOS OSAL
FreeRTOS is not included and the developer needs to take care of compiling the FreeRTOS sources and adding the `FreeRTOSConfig.h` file location to the include path. This OSAL has only been tested extensively with the pre-emptive scheduler configuration so far but it should in principle also be possible to use a cooperative scheduler. It is recommended to use the `heap_4` allocation scheme. When using newlib (nano), it is also recommended to add `#define configUSE_NEWLIB_REENTRANT` to the FreeRTOS configuration file to ensure thread-safety.
When using this OSAL, developers also need to provide an implementation for the `vRequestContextSwitchFromISR` function. This has been done because the call to request a context switch from an ISR is generally located in the `portmacro.h` header and is different depending on the target architecture or device.
## RTEMS OSAL
The RTEMS OSAL was the first implemented OSAL which is also used on the active satellite Flying Laptop.
## TCP/IP socket abstraction
The Linux and Host OSAL provide abstraction layers for the socket API. Currently, only UDP sockets have been imlemented. This is very useful to test TMTC handling either on the host computer directly (targeting localhost with a TMTC application) or on embedded Linux devices, sending TMTC packets via Ethernet.
-1
View File
@@ -1 +0,0 @@
## PUS Services
+6 -1
View File
@@ -22,7 +22,7 @@ copyright = "2021, Institute of Space Systems (IRS)"
author = "Institute of Space Systems (IRS)"
# The full version, including alpha/beta/rc tags
release = "2.0.1"
release = "5.0.0"
# -- General configuration ---------------------------------------------------
@@ -50,6 +50,11 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
#
html_theme = "alabaster"
html_theme_options = {
"extra_nav_links": {"Impressum" : "https://www.uni-stuttgart.de/impressum", "Datenschutz": "https://info.irs.uni-stuttgart.de/datenschutz/datenschutzWebmit.html"}
}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
+8 -9
View File
@@ -6,15 +6,14 @@ High-level overview
Structure
----------
The general structure is driven by the usage of interfaces provided by objects.
The FSFW uses C++17 as baseline.
It also uses dynamic allocation during the initialization but provides
static containers during runtime.
This simplifies the instantiation of objects and allows the usage of some
standard containers.
Dynamic Allocation after initialization is discouraged and different solutions
are provided in the FSFW to achieve that. The fsfw uses run-time type
information but will not throw exceptions.
The general structure is driven by the usage of interfaces provided by objects.
The FSFW uses C++17 as baseline. Most modern compilers like GCC should have support for this
standard, even for micocontrollers.
The FSFW might use dynamic allocation during program initialization but not during runtime.
It offers pool objects, static containers and it also exposes the
`Embedded Template Library <https://www.etlcpp.com/>`_ to allow writing code which does not perform
allocation during runtime. The fsfw uses run-time type information but will not throw exceptions.
Failure Handling
-----------------
+4
View File
@@ -4,6 +4,10 @@
#include <cstddef>
#include <cstdint>
// It is assumed the user has a subsystem and class ID list in some user header files.
// #include "events/subsystemIdRanges.h"
// #include "returnvalues/classIds.h"
//! Used to determine whether C++ ostreams are used which can increase
//! the binary size significantly. If this is disabled,
//! the C stdio functions can be used alternatively
@@ -4,7 +4,6 @@
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <fsfw/events/EventManager.h>
#include <fsfw/health/HealthTable.h>
#include <fsfw/tmtcpacket/pus/tm/TmPacketStored.h>
#include <fsfw/tmtcservices/CommandingServiceBase.h>
#include <fsfw/tmtcservices/PusServiceBase.h>
#include <fsfw/internalerror/InternalErrorReporter.h>
@@ -41,13 +40,9 @@ void Factory::setStaticFrameworkObjectIds() {
CommandingServiceBase::defaultPacketSource = objects::NO_OBJECT;
CommandingServiceBase::defaultPacketDestination = objects::NO_OBJECT;
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
DeviceHandlerBase::powerSwitcherId = objects::NO_OBJECT;
DeviceHandlerBase::rawDataReceiverId = objects::PUS_SERVICE_2_DEVICE_ACCESS;
DeviceHandlerFailureIsolation::powerConfirmationId = objects::NO_OBJECT;
TmPacketBase::timeStamperId = objects::NO_OBJECT;
}
+1 -1
View File
@@ -207,7 +207,7 @@ def check_for_cmake_build_dir(build_dir_list: list) -> list:
def perform_lcov_operation(directory: str, chdir: bool):
if chdir:
os.chdir(directory)
cmd_runner("cmake --build . -- fsfw-tests_coverage -j")
cmd_runner("cmake --build . -j -- fsfw-tests_coverage")
def determine_build_dir(build_dir_list: List[str]):
+2
View File
@@ -2,8 +2,10 @@
#define FSFW_CFDP_H
#include "cfdp/definitions.h"
#include "cfdp/handler/CfdpHandler.h"
#include "cfdp/handler/DestHandler.h"
#include "cfdp/handler/FaultHandlerBase.h"
#include "cfdp/helpers.h"
#include "cfdp/tlv/Lv.h"
#include "cfdp/tlv/StringLv.h"
#include "cfdp/tlv/Tlv.h"
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(${LIB_FSFW_NAME} PRIVATE CfdpMessage.cpp CfdpDistributor.cpp
VarLenFields.cpp)
VarLenFields.cpp helpers.cpp)
add_subdirectory(pdu)
add_subdirectory(tlv)
+4
View File
@@ -131,3 +131,7 @@ bool cfdp::VarLenField::operator<(const cfdp::VarLenField &other) const {
bool cfdp::VarLenField::operator==(const cfdp::VarLenField &other) const {
return getWidth() == other.getWidth() and getValue() == other.getValue();
}
bool cfdp::VarLenField::operator!=(const cfdp::VarLenField &other) const {
return not(*this == other);
}
+16
View File
@@ -7,6 +7,7 @@
#include "fsfw/cfdp/definitions.h"
#include "fsfw/serialize/SerializeIF.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/util/UnsignedByteField.h"
namespace cfdp {
@@ -27,6 +28,7 @@ class VarLenField : public SerializeIF {
VarLenField(cfdp::WidthInBytes width, size_t value);
bool operator==(const VarLenField &other) const;
bool operator!=(const VarLenField &other) const;
bool operator<(const VarLenField &other) const;
ReturnValue_t setValue(cfdp::WidthInBytes, size_t value);
@@ -42,6 +44,14 @@ class VarLenField : public SerializeIF {
[[nodiscard]] cfdp::WidthInBytes getWidth() const;
[[nodiscard]] size_t getValue() const;
#if FSFW_CPP_OSTREAM_ENABLED == 1
friend std::ostream &operator<<(std::ostream &os, const VarLenField &id) {
os << "dec: " << id.getValue() << ", hex: " << std::hex << std::setw(id.getWidth())
<< std::setfill('0') << id.getValue() << std::dec << std::setfill('0');
return os;
}
#endif
private:
ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
Endianness streamEndianness) override;
@@ -82,6 +92,12 @@ struct TransactionId {
return entityId == other.entityId and seqNum == other.seqNum;
}
#if FSFW_CPP_OSTREAM_ENABLED == 1
friend std::ostream &operator<<(std::ostream &os, const TransactionId &id) {
os << "Source ID { " << id.entityId << " }, Sequence Number " << id.seqNum.getValue();
return os;
}
#endif
EntityId entityId;
TransactionSeqNum seqNum;
};
+10 -8
View File
@@ -20,7 +20,7 @@ static constexpr uint8_t VERSION_BITS = CFDP_VERSION_2 << 5;
static constexpr uint8_t CFDP_CLASS_ID = CLASS_ID::CFDP;
static constexpr ReturnValue_t INVALID_TLV_TYPE = returnvalue::makeCode(CFDP_CLASS_ID, 1);
static constexpr ReturnValue_t INVALID_DIRECTIVE_FIELDS = returnvalue::makeCode(CFDP_CLASS_ID, 2);
static constexpr ReturnValue_t INVALID_DIRECTIVE_FIELD = returnvalue::makeCode(CFDP_CLASS_ID, 2);
static constexpr ReturnValue_t INVALID_PDU_DATAFIELD_LEN = returnvalue::makeCode(CFDP_CLASS_ID, 3);
static constexpr ReturnValue_t INVALID_ACK_DIRECTIVE_FIELDS =
returnvalue::makeCode(CFDP_CLASS_ID, 4);
@@ -30,17 +30,18 @@ static constexpr ReturnValue_t METADATA_CANT_PARSE_OPTIONS =
returnvalue::makeCode(CFDP_CLASS_ID, 5);
static constexpr ReturnValue_t NAK_CANT_PARSE_OPTIONS = returnvalue::makeCode(CFDP_CLASS_ID, 6);
static constexpr ReturnValue_t FINISHED_CANT_PARSE_FS_RESPONSES =
returnvalue::makeCode(CFDP_CLASS_ID, 6);
returnvalue::makeCode(CFDP_CLASS_ID, 7);
static constexpr ReturnValue_t FILESTORE_REQUIRES_SECOND_FILE =
returnvalue::makeCode(CFDP_CLASS_ID, 8);
//! Can not parse filestore response because user did not pass a valid instance
//! or remaining size is invalid
static constexpr ReturnValue_t FILESTORE_RESPONSE_CANT_PARSE_FS_MESSAGE =
returnvalue::makeCode(CFDP_CLASS_ID, 9);
static constexpr ReturnValue_t INVALID_PDU_FORMAT = returnvalue::makeCode(CFDP_CLASS_ID, 10);
//! Checksum types according to the SANA Checksum Types registry
//! https://sanaregistry.org/r/checksum_identifiers/
enum ChecksumTypes {
enum ChecksumType {
// Modular legacy checksum
MODULAR = 0,
CRC_32_PROXIMITY_1 = 1,
@@ -49,9 +50,9 @@ enum ChecksumTypes {
NULL_CHECKSUM = 15
};
enum PduTypes : uint8_t { FILE_DIRECTIVE = 0, FILE_DATA = 1 };
enum PduType : uint8_t { FILE_DIRECTIVE = 0, FILE_DATA = 1 };
enum TransmissionModes : uint8_t { ACKNOWLEDGED = 0, UNACKNOWLEDGED = 1 };
enum TransmissionMode : uint8_t { ACKNOWLEDGED = 0, UNACKNOWLEDGED = 1 };
enum SegmentMetadataFlag : bool { NOT_PRESENT = false, PRESENT = true };
@@ -69,8 +70,9 @@ enum WidthInBytes : uint8_t {
FOUR_BYTES = 4,
};
enum FileDirectives : uint8_t {
enum FileDirective : uint8_t {
INVALID_DIRECTIVE = 0x0f,
// The _DIRECTIVE suffix is mandatory here because of some nameclash!
EOF_DIRECTIVE = 0x04,
FINISH = 0x05,
ACK = 0x06,
@@ -97,7 +99,7 @@ enum ConditionCode : uint8_t {
CANCEL_REQUEST_RECEIVED = 0b1111
};
enum FaultHandlerCodes {
enum FaultHandlerCode {
RESERVED = 0b0000,
NOTICE_OF_CANCELLATION = 0b0001,
NOTICE_OF_SUSPENSION = 0b0010,
@@ -123,7 +125,7 @@ enum FileDeliveryStatus {
enum PromptResponseRequired : uint8_t { PROMPT_NAK = 0, PROMPT_KEEP_ALIVE = 1 };
enum TlvTypes : uint8_t {
enum TlvType : uint8_t {
FILESTORE_REQUEST = 0x00,
FILESTORE_RESPONSE = 0x01,
MSG_TO_USER = 0x02,
+3 -2
View File
@@ -1,2 +1,3 @@
target_sources(${LIB_FSFW_NAME} PRIVATE SourceHandler.cpp DestHandler.cpp
FaultHandlerBase.cpp UserBase.cpp)
target_sources(
${LIB_FSFW_NAME} PRIVATE SourceHandler.cpp DestHandler.cpp
FaultHandlerBase.cpp UserBase.cpp CfdpHandler.cpp)
+134
View File
@@ -0,0 +1,134 @@
#include "CfdpHandler.h"
#include "fsfw/cfdp/pdu/AckPduReader.h"
#include "fsfw/cfdp/pdu/PduHeaderReader.h"
#include "fsfw/globalfunctions/arrayprinter.h"
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/tmtcservices/TmTcMessage.h"
using namespace returnvalue;
using namespace cfdp;
CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwParams, const CfdpHandlerCfg& cfdpCfg)
: SystemObject(fsfwParams.objectId),
msgQueue(fsfwParams.msgQueue),
destHandler(
DestHandlerParams(LocalEntityCfg(cfdpCfg.id, cfdpCfg.indicCfg, cfdpCfg.faultHandler),
cfdpCfg.userHandler, cfdpCfg.remoteCfgProvider, cfdpCfg.packetInfoList,
cfdpCfg.lostSegmentsList),
FsfwParams(fsfwParams.packetDest, nullptr, this, fsfwParams.tcStore,
fsfwParams.tmStore)) {
destHandler.setMsgQueue(msgQueue);
}
[[nodiscard]] const char* CfdpHandler::getName() const { return "CFDP Handler"; }
[[nodiscard]] uint32_t CfdpHandler::getIdentifier() const {
return destHandler.getDestHandlerParams().cfg.localId.getValue();
}
[[nodiscard]] MessageQueueId_t CfdpHandler::getRequestQueue() const { return msgQueue.getId(); }
ReturnValue_t CfdpHandler::initialize() {
ReturnValue_t result = destHandler.initialize();
if (result != OK) {
return result;
}
tcStore = destHandler.getTcStore();
tmStore = destHandler.getTmStore();
return SystemObject::initialize();
}
ReturnValue_t CfdpHandler::performOperation(uint8_t operationCode) {
// TODO: Receive TC packets and route them to source and dest handler, depending on which is
// correct or more appropriate
ReturnValue_t status;
ReturnValue_t result = OK;
TmTcMessage tmtcMsg;
for (status = msgQueue.receiveMessage(&tmtcMsg); status == returnvalue::OK;
status = msgQueue.receiveMessage(&tmtcMsg)) {
result = handleCfdpPacket(tmtcMsg);
if (result != OK) {
status = result;
}
}
auto& fsmRes = destHandler.performStateMachine();
// TODO: Error handling?
while (fsmRes.callStatus == CallStatus::CALL_AGAIN) {
destHandler.performStateMachine();
// TODO: Error handling?
}
return status;
}
ReturnValue_t CfdpHandler::handleCfdpPacket(TmTcMessage& msg) {
auto accessorPair = tcStore->getData(msg.getStorageId());
if (accessorPair.first != OK) {
return accessorPair.first;
}
PduHeaderReader reader(accessorPair.second.data(), accessorPair.second.size());
ReturnValue_t result = reader.parseData();
if (result != returnvalue::OK) {
return INVALID_PDU_FORMAT;
}
// The CFDP distributor should have taken care of ensuring the destination ID is correct
PduType type = reader.getPduType();
// Only the destination handler can process these PDUs
if (type == PduType::FILE_DATA) {
// Disable auto-deletion of packet
accessorPair.second.release();
PacketInfo info(type, msg.getStorageId());
result = destHandler.passPacket(info);
} else {
// Route depending on PDU type and directive type if applicable. It retrieves directive type
// from the raw stream for better performance (with sanity and directive code check).
// The routing is based on section 4.5 of the CFDP standard which specifies the PDU forwarding
// procedure.
// PDU header only. Invalid supplied data. A directive packet should have a valid data field
// with at least one byte being the directive code
const uint8_t* pduDataField = reader.getPduDataField();
if (pduDataField == nullptr) {
return INVALID_PDU_FORMAT;
}
if (not FileDirectiveReader::checkFileDirective(pduDataField[0])) {
return INVALID_DIRECTIVE_FIELD;
}
auto directive = static_cast<FileDirective>(pduDataField[0]);
auto passToDestHandler = [&]() {
accessorPair.second.release();
PacketInfo info(type, msg.getStorageId(), directive);
result = destHandler.passPacket(info);
};
auto passToSourceHandler = [&]() {
};
if (directive == FileDirective::METADATA or directive == FileDirective::EOF_DIRECTIVE or
directive == FileDirective::PROMPT) {
// Section b) of 4.5.3: These PDUs should always be targeted towards the file receiver a.k.a.
// the destination handler
passToDestHandler();
} else if (directive == FileDirective::FINISH or directive == FileDirective::NAK or
directive == FileDirective::KEEP_ALIVE) {
// Section c) of 4.5.3: These PDUs should always be targeted towards the file sender a.k.a.
// the source handler
passToSourceHandler();
} else if (directive == FileDirective::ACK) {
// Section a): Recipient depends of the type of PDU that is being acknowledged. We can simply
// extract the PDU type from the raw stream. If it is an EOF PDU, this packet is passed to
// the source handler, for a Finished PDU, it is passed to the destination handler.
FileDirective ackedDirective;
if (not AckPduReader::checkAckedDirectiveField(pduDataField[1], ackedDirective)) {
return INVALID_ACK_DIRECTIVE_FIELDS;
}
if (ackedDirective == FileDirective::EOF_DIRECTIVE) {
passToSourceHandler();
} else if (ackedDirective == FileDirective::FINISH) {
passToDestHandler();
}
}
}
return result;
}
+71
View File
@@ -0,0 +1,71 @@
#ifndef FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H
#define FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H
#include <utility>
#include "fsfw/cfdp/handler/DestHandler.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/tmtcservices/AcceptsTelecommandsIF.h"
#include "fsfw/tmtcservices/TmTcMessage.h"
struct FsfwHandlerParams {
FsfwHandlerParams(object_id_t objectId, HasFileSystemIF& vfs, AcceptsTelemetryIF& packetDest,
StorageManagerIF& tcStore, StorageManagerIF& tmStore, MessageQueueIF& msgQueue)
: objectId(objectId),
vfs(vfs),
packetDest(packetDest),
tcStore(tcStore),
tmStore(tmStore),
msgQueue(msgQueue) {}
object_id_t objectId{};
HasFileSystemIF& vfs;
AcceptsTelemetryIF& packetDest;
StorageManagerIF& tcStore;
StorageManagerIF& tmStore;
MessageQueueIF& msgQueue;
};
struct CfdpHandlerCfg {
CfdpHandlerCfg(cfdp::EntityId localId, cfdp::IndicationCfg indicationCfg,
cfdp::UserBase& userHandler, cfdp::FaultHandlerBase& userFaultHandler,
cfdp::PacketInfoListBase& packetInfo, cfdp::LostSegmentsListBase& lostSegmentsList,
cfdp::RemoteConfigTableIF& remoteCfgProvider)
: id(std::move(localId)),
indicCfg(indicationCfg),
packetInfoList(packetInfo),
lostSegmentsList(lostSegmentsList),
remoteCfgProvider(remoteCfgProvider),
userHandler(userHandler),
faultHandler(userFaultHandler) {}
cfdp::EntityId id;
cfdp::IndicationCfg indicCfg;
cfdp::PacketInfoListBase& packetInfoList;
cfdp::LostSegmentsListBase& lostSegmentsList;
cfdp::RemoteConfigTableIF& remoteCfgProvider;
cfdp::UserBase& userHandler;
cfdp::FaultHandlerBase& faultHandler;
};
class CfdpHandler : public SystemObject, public ExecutableObjectIF, public AcceptsTelecommandsIF {
public:
explicit CfdpHandler(const FsfwHandlerParams& fsfwParams, const CfdpHandlerCfg& cfdpCfg);
[[nodiscard]] const char* getName() const override;
[[nodiscard]] uint32_t getIdentifier() const override;
[[nodiscard]] MessageQueueId_t getRequestQueue() const override;
ReturnValue_t initialize() override;
ReturnValue_t performOperation(uint8_t operationCode) override;
private:
MessageQueueIF& msgQueue;
cfdp::DestHandler destHandler;
StorageManagerIF* tcStore = nullptr;
StorageManagerIF* tmStore = nullptr;
ReturnValue_t handleCfdpPacket(TmTcMessage& msg);
};
#endif // FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H
+49 -27
View File
@@ -29,8 +29,8 @@ const cfdp::DestHandler::FsmResult& cfdp::DestHandler::performStateMachine() {
fsmRes.resetOfIteration();
if (fsmRes.step == TransactionStep::IDLE) {
for (auto infoIter = dp.packetListRef.begin(); infoIter != dp.packetListRef.end();) {
if (infoIter->pduType == PduTypes::FILE_DIRECTIVE and
infoIter->directiveType == FileDirectives::METADATA) {
if (infoIter->pduType == PduType::FILE_DIRECTIVE and
infoIter->directiveType == FileDirective::METADATA) {
result = handleMetadataPdu(*infoIter);
checkAndHandleError(result, errorIdx);
// Store data was deleted in PDU handler because a store guard is used
@@ -57,13 +57,13 @@ const cfdp::DestHandler::FsmResult& cfdp::DestHandler::performStateMachine() {
if (fsmRes.state == CfdpStates::BUSY_CLASS_1_NACKED) {
if (fsmRes.step == TransactionStep::RECEIVING_FILE_DATA_PDUS) {
for (auto infoIter = dp.packetListRef.begin(); infoIter != dp.packetListRef.end();) {
if (infoIter->pduType == PduTypes::FILE_DATA) {
if (infoIter->pduType == PduType::FILE_DATA) {
result = handleFileDataPdu(*infoIter);
checkAndHandleError(result, errorIdx);
// Store data was deleted in PDU handler because a store guard is used
dp.packetListRef.erase(infoIter++);
} else if (infoIter->pduType == PduTypes::FILE_DIRECTIVE and
infoIter->directiveType == FileDirectives::EOF_DIRECTIVE) {
} else if (infoIter->pduType == PduType::FILE_DIRECTIVE and
infoIter->directiveType == FileDirective::EOF_DIRECTIVE) {
// TODO: Support for check timer missing
result = handleEofPdu(*infoIter);
checkAndHandleError(result, errorIdx);
@@ -252,7 +252,8 @@ ReturnValue_t cfdp::DestHandler::handleMetadataParseError(ReturnValue_t result,
headerReader.getDestId(destId);
RemoteEntityCfg* remoteCfg;
if (not dp.remoteCfgTable.getRemoteCfg(destId, &remoteCfg)) {
// TODO: No remote config for dest ID. I consider this a configuration error.
// TODO: No remote config for dest ID. I consider this a configuration error, which is not
// covered by the standard.
// Warning or error, yield or cache appropriate returnvalue
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "No remote config exists for destination ID" << std::endl;
@@ -267,12 +268,13 @@ ReturnValue_t cfdp::DestHandler::handleMetadataParseError(ReturnValue_t result,
ReturnValue_t cfdp::DestHandler::startTransaction(MetadataPduReader& reader, MetadataInfo& info) {
if (fsmRes.state != CfdpStates::IDLE) {
// According to standard, discard metadata PDU if we are busy
return returnvalue::OK;
return OK;
}
ReturnValue_t result = OK;
fsmRes.step = TransactionStep::TRANSACTION_START;
if (reader.getTransmissionMode() == TransmissionModes::UNACKNOWLEDGED) {
if (reader.getTransmissionMode() == TransmissionMode::UNACKNOWLEDGED) {
fsmRes.state = CfdpStates::BUSY_CLASS_1_NACKED;
} else if (reader.getTransmissionMode() == TransmissionModes::ACKNOWLEDGED) {
} else if (reader.getTransmissionMode() == TransmissionMode::ACKNOWLEDGED) {
fsmRes.state = CfdpStates::BUSY_CLASS_2_ACKED;
}
tp.checksumType = info.getChecksumType();
@@ -302,10 +304,26 @@ ReturnValue_t cfdp::DestHandler::startTransaction(MetadataPduReader& reader, Met
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "cfdp::DestHandler" << __func__
<< ": No remote configuration found for destination ID "
<< tp.pduConf.destId.getValue() << std::endl;
<< tp.pduConf.sourceId.getValue() << std::endl;
#endif
return FAILED;
}
// If both dest name size and source name size are 0, we are dealing with a metadata only PDU,
// so there is no need to create a file or truncate an existing file
if (destNameSize > 0 and sourceNameSize > 0) {
FilesystemParams fparams(tp.destName.data());
// TODO: Filesystem errors?
if (dp.user.vfs.fileExists(fparams)) {
dp.user.vfs.truncateFile(fparams);
} else {
result = dp.user.vfs.createFile(fparams);
if (result != OK) {
// TODO: Handle FS error. This is probably a case for the filestore rejection mechanism of
// CFDP.
// In any case, it does not really make sense to continue here
}
}
}
fsmRes.step = TransactionStep::RECEIVING_FILE_DATA_PDUS;
MetadataRecvdParams params(tp.transactionId, tp.pduConf.sourceId);
params.fileSize = tp.fileSize.getSize();
@@ -313,22 +331,15 @@ ReturnValue_t cfdp::DestHandler::startTransaction(MetadataPduReader& reader, Met
params.sourceFileName = tp.sourceName.data();
params.msgsToUserArray = dynamic_cast<MessageToUserTlv*>(userTlvVec.data());
params.msgsToUserLen = info.getOptionsLen();
FilesystemParams fparams(tp.destName.data());
// TODO: Filesystem errors?
if (dp.user.vfs.fileExists(fparams)) {
dp.user.vfs.truncateFile(fparams);
} else {
dp.user.vfs.createFile(fparams);
}
dp.user.metadataRecvdIndication(params);
return OK;
return result;
}
cfdp::CfdpStates cfdp::DestHandler::getCfdpState() const { return fsmRes.state; }
ReturnValue_t cfdp::DestHandler::handleTransferCompletion() {
ReturnValue_t result;
if (tp.checksumType != ChecksumTypes::NULL_CHECKSUM) {
if (tp.checksumType != ChecksumType::NULL_CHECKSUM) {
result = checksumVerification();
if (result != OK) {
// TODO: Warning / error handling?
@@ -376,7 +387,8 @@ ReturnValue_t cfdp::DestHandler::checksumVerification() {
params.size = readLen;
auto result = dp.user.vfs.readFromFile(params, buf.data(), buf.size());
if (result != OK) {
// TODO: Better error handling
// TODO: I think this is a case for a filestore rejection, but it might sense to print
// a warning or trigger an event because this should generally not happen
return FAILED;
}
crcCalc.add(buf.begin(), buf.begin() + readLen);
@@ -391,7 +403,7 @@ ReturnValue_t cfdp::DestHandler::checksumVerification() {
} else {
// TODO: Proper error handling
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CRC check for file " << tp.sourceName.data() << " failed" << std::endl;
sif::warning << "CRC check for file " << tp.destName.data() << " failed" << std::endl;
#endif
tp.conditionCode = ConditionCode::FILE_CHECKSUM_FAILURE;
}
@@ -413,21 +425,31 @@ ReturnValue_t cfdp::DestHandler::sendFinishedPdu() {
store_address_t storeId;
uint8_t* dataPtr = nullptr;
ReturnValue_t result =
fp.tcStore->getFreeElement(&storeId, finishedPdu.getSerializedSize(), &dataPtr);
fp.tmStore->getFreeElement(&storeId, finishedPdu.getSerializedSize(), &dataPtr);
if (result != OK) {
// TODO: Error handling and event, this is a non CFDP specific error (most likely store is full)
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "cfdp::DestHandler:sendFinishedPdu: Getting store slot failed" << std::endl;
#endif
fp.eventReporter->forwardEvent(events::STORE_ERROR, result, 0);
return result;
}
size_t serLen = 0;
result = finishedPdu.serialize(dataPtr, serLen, finishedPdu.getSerializedSize());
if (result != OK) {
// TODO: Error printout, this really should not happen
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "cfdp::DestHandler::sendFinishedPdu: Serializing Finished PDU failed"
<< std::endl;
#endif
fp.eventReporter->forwardEvent(events::SERIALIZATION_ERROR, result, 0);
return result;
}
TmTcMessage msg(storeId);
result = fp.msgQueue->sendMessage(fp.packetDest.getReportReceptionQueue(), &msg);
if (result != OK) {
// TODO: Error handling and event, this is a non CFDP specific error (most likely store is full)
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "cfdp::DestHandler::sendFinishedPdu: Sending PDU failed" << std::endl;
#endif
fp.eventReporter->forwardEvent(events::MSG_QUEUE_ERROR, result, 0);
return result;
}
fsmRes.packetsSent++;
@@ -464,5 +486,5 @@ void cfdp::DestHandler::setEventReporter(EventReportingProxyIF& reporter) {
const cfdp::DestHandlerParams& cfdp::DestHandler::getDestHandlerParams() const { return dp; }
StorageManagerIF* cfdp::DestHandler::getTmStore() const { return fp.tcStore; }
StorageManagerIF* cfdp::DestHandler::getTcStore() const { return fp.tmStore; }
StorageManagerIF* cfdp::DestHandler::getTmStore() const { return fp.tmStore; }
StorageManagerIF* cfdp::DestHandler::getTcStore() const { return fp.tcStore; }
+8 -8
View File
@@ -21,12 +21,12 @@
namespace cfdp {
struct PacketInfo {
PacketInfo(PduTypes type, store_address_t storeId,
std::optional<FileDirectives> directive = std::nullopt)
PacketInfo(PduType type, store_address_t storeId,
std::optional<FileDirective> directive = std::nullopt)
: pduType(type), directiveType(directive), storeId(storeId) {}
PduTypes pduType = PduTypes::FILE_DATA;
std::optional<FileDirectives> directiveType = FileDirectives::INVALID_DIRECTIVE;
PduType pduType = PduType::FILE_DATA;
std::optional<FileDirective> directiveType = FileDirective::INVALID_DIRECTIVE;
store_address_t storeId = store_address_t::invalid();
PacketInfo() = default;
};
@@ -62,9 +62,9 @@ struct DestHandlerParams {
};
struct FsfwParams {
FsfwParams(AcceptsTelemetryIF& packetDest, MessageQueueIF* msgQueue,
EventReportingProxyIF* eventReporter, StorageManagerIF& tcStore, StorageManagerIF& tmStore)
EventReportingProxyIF* eventReporter, StorageManagerIF& tcStore,
StorageManagerIF& tmStore)
: FsfwParams(packetDest, msgQueue, eventReporter) {
this->tcStore = &tcStore;
this->tmStore = &tmStore;
@@ -157,10 +157,10 @@ class DestHandler {
progress = 0;
remoteCfg = nullptr;
closureRequested = false;
checksumType = ChecksumTypes::NULL_CHECKSUM;
checksumType = ChecksumType::NULL_CHECKSUM;
}
ChecksumTypes checksumType = ChecksumTypes::NULL_CHECKSUM;
ChecksumType checksumType = ChecksumType::NULL_CHECKSUM;
bool closureRequested = false;
std::vector<char> sourceName;
std::vector<char> destName;
+16 -16
View File
@@ -6,7 +6,7 @@ FaultHandlerBase::FaultHandlerBase() = default;
FaultHandlerBase::~FaultHandlerBase() = default;
bool FaultHandlerBase::getFaultHandler(cfdp::ConditionCode code,
cfdp::FaultHandlerCodes& handler) const {
cfdp::FaultHandlerCode& handler) const {
auto iter = faultHandlerMap.find(code);
if (iter == faultHandlerMap.end()) {
return false;
@@ -15,33 +15,33 @@ bool FaultHandlerBase::getFaultHandler(cfdp::ConditionCode code,
return true;
}
bool FaultHandlerBase::setFaultHandler(cfdp::ConditionCode code, cfdp::FaultHandlerCodes handler) {
bool FaultHandlerBase::setFaultHandler(cfdp::ConditionCode code, cfdp::FaultHandlerCode handler) {
if (not faultHandlerMap.contains(code)) {
return false;
}
if (handler != FaultHandlerCodes::NOTICE_OF_SUSPENSION and
handler != FaultHandlerCodes::ABANDON_TRANSACTION and
handler != FaultHandlerCodes::NOTICE_OF_CANCELLATION and
handler != FaultHandlerCodes::IGNORE_ERROR) {
if (handler != FaultHandlerCode::NOTICE_OF_SUSPENSION and
handler != FaultHandlerCode::ABANDON_TRANSACTION and
handler != FaultHandlerCode::NOTICE_OF_CANCELLATION and
handler != FaultHandlerCode::IGNORE_ERROR) {
return false;
}
faultHandlerMap[code] = handler;
return true;
}
bool FaultHandlerBase::reportFault(cfdp::ConditionCode code) {
bool FaultHandlerBase::reportFault(cfdp::TransactionId& id, cfdp::ConditionCode code) {
if (not faultHandlerMap.contains(code)) {
return false;
}
cfdp::FaultHandlerCodes fh = faultHandlerMap[code];
if (fh == cfdp::FaultHandlerCodes::IGNORE_ERROR) {
ignoreCb(code);
} else if (fh == cfdp::FaultHandlerCodes::ABANDON_TRANSACTION) {
abandonCb(code);
} else if (fh == cfdp::FaultHandlerCodes::NOTICE_OF_CANCELLATION) {
noticeOfCancellationCb(code);
} else if (fh == cfdp::FaultHandlerCodes::NOTICE_OF_SUSPENSION) {
noticeOfSuspensionCb(code);
cfdp::FaultHandlerCode fh = faultHandlerMap[code];
if (fh == cfdp::FaultHandlerCode::IGNORE_ERROR) {
ignoreCb(id, code);
} else if (fh == cfdp::FaultHandlerCode::ABANDON_TRANSACTION) {
abandonCb(id, code);
} else if (fh == cfdp::FaultHandlerCode::NOTICE_OF_CANCELLATION) {
noticeOfCancellationCb(id, code);
} else if (fh == cfdp::FaultHandlerCode::NOTICE_OF_SUSPENSION) {
noticeOfSuspensionCb(id, code);
} else {
// Should never happen, but use defensive programming
return false;
+19 -18
View File
@@ -3,6 +3,7 @@
#include <etl/flat_map.h>
#include "fsfw/cfdp/VarLenFields.h"
#include "fsfw/cfdp/definitions.h"
namespace cfdp {
@@ -42,33 +43,33 @@ class FaultHandlerBase {
* - true if the condition code is valid
* - false otherwise
*/
bool getFaultHandler(cfdp::ConditionCode code, cfdp::FaultHandlerCodes& handler) const;
bool getFaultHandler(cfdp::ConditionCode code, cfdp::FaultHandlerCode& handler) const;
bool setFaultHandler(cfdp::ConditionCode code, cfdp::FaultHandlerCodes handler);
bool setFaultHandler(cfdp::ConditionCode code, cfdp::FaultHandlerCode handler);
bool reportFault(cfdp::ConditionCode code);
bool reportFault(cfdp::TransactionId& id, cfdp::ConditionCode code);
virtual void noticeOfSuspensionCb(cfdp::ConditionCode code) = 0;
virtual void noticeOfCancellationCb(cfdp::ConditionCode code) = 0;
virtual void abandonCb(cfdp::ConditionCode code) = 0;
virtual void ignoreCb(cfdp::ConditionCode code) = 0;
virtual void noticeOfSuspensionCb(cfdp::TransactionId& id, cfdp::ConditionCode code) = 0;
virtual void noticeOfCancellationCb(cfdp::TransactionId& id, cfdp::ConditionCode code) = 0;
virtual void abandonCb(cfdp::TransactionId& id, cfdp::ConditionCode code) = 0;
virtual void ignoreCb(cfdp::TransactionId& id, cfdp::ConditionCode code) = 0;
private:
etl::flat_map<cfdp::ConditionCode, cfdp::FaultHandlerCodes, 10> faultHandlerMap = {
etl::flat_map<cfdp::ConditionCode, cfdp::FaultHandlerCode, 10> faultHandlerMap = {
etl::pair{cfdp::ConditionCode::POSITIVE_ACK_LIMIT_REACHED,
cfdp::FaultHandlerCodes::IGNORE_ERROR},
cfdp::FaultHandlerCode::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::KEEP_ALIVE_LIMIT_REACHED,
cfdp::FaultHandlerCodes::IGNORE_ERROR},
cfdp::FaultHandlerCode::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::INVALID_TRANSMISSION_MODE,
cfdp::FaultHandlerCodes::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::FILE_CHECKSUM_FAILURE, cfdp::FaultHandlerCodes::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::FILE_SIZE_ERROR, cfdp::FaultHandlerCodes::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::NAK_LIMIT_REACHED, cfdp::FaultHandlerCodes::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::INACTIVITY_DETECTED, cfdp::FaultHandlerCodes::IGNORE_ERROR},
cfdp::FaultHandlerCode::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::FILE_CHECKSUM_FAILURE, cfdp::FaultHandlerCode::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::FILE_SIZE_ERROR, cfdp::FaultHandlerCode::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::NAK_LIMIT_REACHED, cfdp::FaultHandlerCode::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::INACTIVITY_DETECTED, cfdp::FaultHandlerCode::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::UNSUPPORTED_CHECKSUM_TYPE,
cfdp::FaultHandlerCodes::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::FILESTORE_REJECTION, cfdp::FaultHandlerCodes::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::CHECK_LIMIT_REACHED, cfdp::FaultHandlerCodes::IGNORE_ERROR}};
cfdp::FaultHandlerCode::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::FILESTORE_REJECTION, cfdp::FaultHandlerCode::IGNORE_ERROR},
etl::pair{cfdp::ConditionCode::CHECK_LIMIT_REACHED, cfdp::FaultHandlerCode::IGNORE_ERROR}};
};
} // namespace cfdp
@@ -11,6 +11,25 @@ class RemoteConfigTableIF {
virtual bool getRemoteCfg(const cfdp::EntityId& remoteId, cfdp::RemoteEntityCfg** cfg) = 0;
};
/**
* Helper class for the common case that there is exactly one remote entity
*/
class OneRemoteConfigProvider : public RemoteConfigTableIF {
public:
explicit OneRemoteConfigProvider(RemoteEntityCfg cfg) : cfg(std::move(cfg)) {}
bool getRemoteCfg(const EntityId& remoteId, cfdp::RemoteEntityCfg** cfg_) override {
if (remoteId != cfg.remoteId) {
return false;
}
*cfg_ = &cfg;
return true;
}
private:
RemoteEntityCfg cfg;
};
} // namespace cfdp
#endif // FSFW_CFDP_HANDLER_REMOTECONFIGTABLEIF_H
+11 -1
View File
@@ -5,5 +5,15 @@ namespace cfdp {
enum class CfdpStates { IDLE, BUSY_CLASS_1_NACKED, BUSY_CLASS_2_ACKED, SUSPENDED };
}
static constexpr uint8_t SSID = SUBSYSTEM_ID::CFDP;
namespace events {
static constexpr Event STORE_ERROR = event::makeEvent(SSID, 0, severity::LOW);
static constexpr Event MSG_QUEUE_ERROR = event::makeEvent(SSID, 1, severity::LOW);
static constexpr Event SERIALIZATION_ERROR = event::makeEvent(SSID, 2, severity::LOW);
} // namespace events
} // namespace cfdp
#endif // FSFW_CFDP_HANDLER_DEFS_H
+3 -2
View File
@@ -27,12 +27,13 @@ struct LocalEntityCfg {
};
struct RemoteEntityCfg {
explicit RemoteEntityCfg(EntityId id) : remoteId(std::move(id)) {}
EntityId remoteId;
size_t maxFileSegmentLen = 2048;
bool closureRequested = false;
bool crcOnTransmission = false;
TransmissionModes defaultTransmissionMode = TransmissionModes::UNACKNOWLEDGED;
ChecksumTypes defaultChecksum = ChecksumTypes::NULL_CHECKSUM;
TransmissionMode defaultTransmissionMode = TransmissionMode::UNACKNOWLEDGED;
ChecksumType defaultChecksum = ChecksumType::NULL_CHECKSUM;
const uint8_t version = CFDP_VERSION_2;
};
+50
View File
@@ -0,0 +1,50 @@
#include "helpers.h"
const char* COND_CODE_STRINGS[14] = {"Unknown",
"No Error",
"Positive ACK Limit Reached",
"Keep Alive Limit Reached",
"Invalid Transmission Mode",
"Filestore Rejection",
"File Checksum Failure",
"File Size Error",
"NAK limit reached",
"Inactivity Detected",
"Check Limit Reached",
"Unsupported Checksum Type",
"Suspend Request Received",
"Cancel Request Received"};
const char* cfdp::getConditionCodeString(cfdp::ConditionCode code) {
switch (code) {
case NO_CONDITION_FIELD:
return COND_CODE_STRINGS[0];
case NO_ERROR:
return COND_CODE_STRINGS[1];
case POSITIVE_ACK_LIMIT_REACHED:
return COND_CODE_STRINGS[2];
case KEEP_ALIVE_LIMIT_REACHED:
return COND_CODE_STRINGS[3];
case INVALID_TRANSMISSION_MODE:
return COND_CODE_STRINGS[4];
case FILESTORE_REJECTION:
return COND_CODE_STRINGS[5];
case FILE_CHECKSUM_FAILURE:
return COND_CODE_STRINGS[6];
case FILE_SIZE_ERROR:
return COND_CODE_STRINGS[7];
case NAK_LIMIT_REACHED:
return COND_CODE_STRINGS[8];
case INACTIVITY_DETECTED:
return COND_CODE_STRINGS[9];
case CHECK_LIMIT_REACHED:
return COND_CODE_STRINGS[10];
case UNSUPPORTED_CHECKSUM_TYPE:
return COND_CODE_STRINGS[11];
case SUSPEND_REQUEST_RECEIVED:
return COND_CODE_STRINGS[12];
case CANCEL_REQUEST_RECEIVED:
return COND_CODE_STRINGS[13];
}
return "Unknown";
}
+11
View File
@@ -0,0 +1,11 @@
#ifndef FSFW_EXAMPLE_HOSTED_HELPER_H
#define FSFW_EXAMPLE_HOSTED_HELPER_H
#include "definitions.h"
namespace cfdp {
const char* getConditionCodeString(cfdp::ConditionCode code);
}
#endif // FSFW_EXAMPLE_HOSTED_HELPER_H
+5 -5
View File
@@ -1,12 +1,12 @@
#include "AckInfo.h"
AckInfo::AckInfo(cfdp::FileDirectives ackedDirective, cfdp::ConditionCode ackedConditionCode,
AckInfo::AckInfo(cfdp::FileDirective ackedDirective, cfdp::ConditionCode ackedConditionCode,
cfdp::AckTransactionStatus transactionStatus, uint8_t directiveSubtypeCode)
: ackedDirective(ackedDirective),
ackedConditionCode(ackedConditionCode),
transactionStatus(transactionStatus),
directiveSubtypeCode(directiveSubtypeCode) {
if (ackedDirective == cfdp::FileDirectives::FINISH) {
if (ackedDirective == cfdp::FileDirective::FINISH) {
this->directiveSubtypeCode = 0b0001;
} else {
this->directiveSubtypeCode = 0b0000;
@@ -17,16 +17,16 @@ cfdp::ConditionCode AckInfo::getAckedConditionCode() const { return ackedConditi
void AckInfo::setAckedConditionCode(cfdp::ConditionCode ackedConditionCode) {
this->ackedConditionCode = ackedConditionCode;
if (ackedDirective == cfdp::FileDirectives::FINISH) {
if (ackedDirective == cfdp::FileDirective::FINISH) {
this->directiveSubtypeCode = 0b0001;
} else {
this->directiveSubtypeCode = 0b0000;
}
}
cfdp::FileDirectives AckInfo::getAckedDirective() const { return ackedDirective; }
cfdp::FileDirective AckInfo::getAckedDirective() const { return ackedDirective; }
void AckInfo::setAckedDirective(cfdp::FileDirectives ackedDirective) {
void AckInfo::setAckedDirective(cfdp::FileDirective ackedDirective) {
this->ackedDirective = ackedDirective;
}
+4 -4
View File
@@ -6,14 +6,14 @@
class AckInfo {
public:
AckInfo();
AckInfo(cfdp::FileDirectives ackedDirective, cfdp::ConditionCode ackedConditionCode,
AckInfo(cfdp::FileDirective ackedDirective, cfdp::ConditionCode ackedConditionCode,
cfdp::AckTransactionStatus transactionStatus, uint8_t directiveSubtypeCode = 0);
cfdp::ConditionCode getAckedConditionCode() const;
void setAckedConditionCode(cfdp::ConditionCode ackedConditionCode);
cfdp::FileDirectives getAckedDirective() const;
void setAckedDirective(cfdp::FileDirectives ackedDirective);
cfdp::FileDirective getAckedDirective() const;
void setAckedDirective(cfdp::FileDirective ackedDirective);
uint8_t getDirectiveSubtypeCode() const;
void setDirectiveSubtypeCode(uint8_t directiveSubtypeCode);
@@ -22,7 +22,7 @@ class AckInfo {
void setTransactionStatus(cfdp::AckTransactionStatus transactionStatus);
private:
cfdp::FileDirectives ackedDirective = cfdp::FileDirectives::INVALID_DIRECTIVE;
cfdp::FileDirective ackedDirective = cfdp::FileDirective::INVALID_DIRECTIVE;
cfdp::ConditionCode ackedConditionCode = cfdp::ConditionCode::NO_CONDITION_FIELD;
cfdp::AckTransactionStatus transactionStatus = cfdp::AckTransactionStatus::UNDEFINED;
uint8_t directiveSubtypeCode = 0;
@@ -1,24 +1,22 @@
#include "AckPduSerializer.h"
#include "AckPduCreator.h"
AckPduSerializer::AckPduSerializer(AckInfo &ackInfo, PduConfig &pduConf)
: FileDirectiveCreator(pduConf, cfdp::FileDirectives::ACK, 2), ackInfo(ackInfo) {}
AckPduCreator::AckPduCreator(AckInfo &ackInfo, PduConfig &pduConf)
: FileDirectiveCreator(pduConf, cfdp::FileDirective::ACK, 2), ackInfo(ackInfo) {}
size_t AckPduSerializer::getSerializedSize() const {
return FileDirectiveCreator::getWholePduSize();
}
size_t AckPduCreator::getSerializedSize() const { return FileDirectiveCreator::getWholePduSize(); }
ReturnValue_t AckPduSerializer::serialize(uint8_t **buffer, size_t *size, size_t maxSize,
Endianness streamEndianness) const {
ReturnValue_t AckPduCreator::serialize(uint8_t **buffer, size_t *size, size_t maxSize,
Endianness streamEndianness) const {
ReturnValue_t result = FileDirectiveCreator::serialize(buffer, size, maxSize, streamEndianness);
if (result != returnvalue::OK) {
return result;
}
cfdp::FileDirectives ackedDirective = ackInfo.getAckedDirective();
cfdp::FileDirective ackedDirective = ackInfo.getAckedDirective();
uint8_t directiveSubtypeCode = ackInfo.getDirectiveSubtypeCode();
cfdp::ConditionCode ackedConditionCode = ackInfo.getAckedConditionCode();
cfdp::AckTransactionStatus transactionStatus = ackInfo.getTransactionStatus();
if (ackedDirective != cfdp::FileDirectives::FINISH and
ackedDirective != cfdp::FileDirectives::EOF_DIRECTIVE) {
if (ackedDirective != cfdp::FileDirective::FINISH and
ackedDirective != cfdp::FileDirective::EOF_DIRECTIVE) {
// TODO: better returncode
return returnvalue::FAILED;
}
@@ -1,11 +1,11 @@
#ifndef FSFW_SRC_FSFW_CFDP_PDU_ACKPDUSERIALIZER_H_
#define FSFW_SRC_FSFW_CFDP_PDU_ACKPDUSERIALIZER_H_
#ifndef FSFW_CFDP_PDU_ACKPDUSERIALIZER_H_
#define FSFW_CFDP_PDU_ACKPDUSERIALIZER_H_
#include "AckInfo.h"
#include "FileDirectiveCreator.h"
#include "FileDirectiveReader.h"
class AckPduSerializer : public FileDirectiveCreator {
class AckPduCreator : public FileDirectiveCreator {
public:
/**
* @brief Serializer to pack ACK PDUs
@@ -16,9 +16,9 @@ class AckPduSerializer : public FileDirectiveCreator {
* @param transactionStatus
* @param pduConf
*/
AckPduSerializer(AckInfo& ackInfo, PduConfig& pduConf);
AckPduCreator(AckInfo& ackInfo, PduConfig& pduConf);
size_t getSerializedSize() const override;
[[nodiscard]] size_t getSerializedSize() const override;
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
Endianness streamEndianness) const override;
@@ -27,4 +27,4 @@ class AckPduSerializer : public FileDirectiveCreator {
AckInfo& ackInfo;
};
#endif /* FSFW_SRC_FSFW_CFDP_PDU_ACKPDUSERIALIZER_H_ */
#endif /* FSFW_CFDP_PDU_ACKPDUSERIALIZER_H_ */
@@ -1,9 +1,9 @@
#include "AckPduDeserializer.h"
#include "AckPduReader.h"
AckPduDeserializer::AckPduDeserializer(const uint8_t* pduBuf, size_t maxSize, AckInfo& info)
AckPduReader::AckPduReader(const uint8_t* pduBuf, size_t maxSize, AckInfo& info)
: FileDirectiveReader(pduBuf, maxSize), info(info) {}
ReturnValue_t AckPduDeserializer::parseData() {
ReturnValue_t AckPduReader::parseData() {
ReturnValue_t result = FileDirectiveReader::parseData();
if (result != returnvalue::OK) {
return result;
@@ -18,14 +18,12 @@ ReturnValue_t AckPduDeserializer::parseData() {
return returnvalue::OK;
}
bool AckPduDeserializer::checkAndSetCodes(uint8_t firstByte, uint8_t secondByte) {
uint8_t ackedDirective = static_cast<cfdp::FileDirectives>(firstByte >> 4);
if (ackedDirective != cfdp::FileDirectives::EOF_DIRECTIVE and
ackedDirective != cfdp::FileDirectives::FINISH) {
bool AckPduReader::checkAndSetCodes(uint8_t firstByte, uint8_t secondByte) {
cfdp::FileDirective directive;
if (not checkAckedDirectiveField(firstByte, directive)) {
return false;
}
this->info.setAckedDirective(static_cast<cfdp::FileDirectives>(ackedDirective));
this->info.setAckedDirective(directive);
uint8_t directiveSubtypeCode = firstByte & 0x0f;
if (directiveSubtypeCode != 0b0000 and directiveSubtypeCode != 0b0001) {
return false;
@@ -35,3 +33,13 @@ bool AckPduDeserializer::checkAndSetCodes(uint8_t firstByte, uint8_t secondByte)
this->info.setTransactionStatus(static_cast<cfdp::AckTransactionStatus>(secondByte & 0x0f));
return true;
}
bool AckPduReader::checkAckedDirectiveField(uint8_t firstPduDataByte,
cfdp::FileDirective& ackedDirective) {
uint8_t ackedDirectiveRaw = static_cast<cfdp::FileDirective>(firstPduDataByte >> 4);
if (ackedDirectiveRaw != cfdp::FileDirective::EOF_DIRECTIVE and
ackedDirectiveRaw != cfdp::FileDirective::FINISH) {
return false;
}
ackedDirective = (static_cast<cfdp::FileDirective>(ackedDirectiveRaw));
return true;
}
@@ -4,16 +4,19 @@
#include "AckInfo.h"
#include "fsfw/cfdp/pdu/FileDirectiveReader.h"
class AckPduDeserializer : public FileDirectiveReader {
class AckPduReader : public FileDirectiveReader {
public:
AckPduDeserializer(const uint8_t* pduBuf, size_t maxSize, AckInfo& info);
AckPduReader(const uint8_t* pduBuf, size_t maxSize, AckInfo& info);
/**
*
* @return
* - cfdp::INVALID_DIRECTIVE_FIELDS: Invalid fields
*/
ReturnValue_t parseData();
ReturnValue_t parseData() override;
static bool checkAckedDirectiveField(uint8_t firstPduDataByte,
cfdp::FileDirective& ackedDirective);
private:
bool checkAndSetCodes(uint8_t rawAckedByte, uint8_t rawAckedConditionCode);
+8 -8
View File
@@ -6,24 +6,24 @@ target_sources(
FileDirectiveReader.cpp
FileDirectiveCreator.cpp
AckInfo.cpp
AckPduSerializer.cpp
AckPduDeserializer.cpp
AckPduCreator.cpp
AckPduReader.cpp
EofInfo.cpp
EofPduCreator.cpp
EofPduReader.cpp
NakInfo.cpp
NakPduSerializer.cpp
NakPduDeserializer.cpp
NakPduCreator.cpp
NakPduReader.cpp
FinishedInfo.cpp
FinishedPduCreator.cpp
FinishedPduReader.cpp
MetadataInfo.cpp
MetadataPduCreator.cpp
MetadataPduReader.cpp
KeepAlivePduSerializer.cpp
KeepAlivePduDeserializer.cpp
PromptPduSerializer.cpp
PromptPduDeserializer.cpp
KeepAlivePduCreator.cpp
KeepAlivePduReader.cpp
PromptPduCreator.cpp
PromptPduReader.cpp
FileDataCreator.cpp
FileDataReader.cpp
FileDataInfo.cpp)
+1 -1
View File
@@ -3,7 +3,7 @@
#include "fsfw/FSFW.h"
EofPduCreator::EofPduCreator(PduConfig &conf, EofInfo &info)
: FileDirectiveCreator(conf, cfdp::FileDirectives::EOF_DIRECTIVE, 9), info(info) {
: FileDirectiveCreator(conf, cfdp::FileDirective::EOF_DIRECTIVE, 9), info(info) {
setDirectiveDataFieldLen(info.getSerializedSize(HeaderCreator::getLargeFileFlag()));
}
+1 -1
View File
@@ -3,7 +3,7 @@
#include <cstring>
FileDataCreator::FileDataCreator(PduConfig& conf, FileDataInfo& info)
: HeaderCreator(conf, cfdp::PduTypes::FILE_DATA, 0, info.getSegmentMetadataFlag()), info(info) {
: HeaderCreator(conf, cfdp::PduType::FILE_DATA, 0, info.getSegmentMetadataFlag()), info(info) {
update();
}
+3 -3
View File
@@ -1,8 +1,8 @@
#include "FileDirectiveCreator.h"
FileDirectiveCreator::FileDirectiveCreator(PduConfig &pduConf, cfdp::FileDirectives directiveCode,
FileDirectiveCreator::FileDirectiveCreator(PduConfig &pduConf, cfdp::FileDirective directiveCode,
size_t directiveParamFieldLen)
: HeaderCreator(pduConf, cfdp::PduTypes::FILE_DIRECTIVE, directiveParamFieldLen + 1),
: HeaderCreator(pduConf, cfdp::PduType::FILE_DIRECTIVE, directiveParamFieldLen + 1),
directiveCode(directiveCode) {}
size_t FileDirectiveCreator::getSerializedSize() const {
@@ -36,4 +36,4 @@ void FileDirectiveCreator::setDirectiveDataFieldLen(size_t len) {
HeaderCreator::setPduDataFieldLen(len + 1);
}
cfdp::FileDirectives FileDirectiveCreator::getDirectiveCode() const { return directiveCode; }
cfdp::FileDirective FileDirectiveCreator::getDirectiveCode() const { return directiveCode; }
+3 -3
View File
@@ -5,10 +5,10 @@
class FileDirectiveCreator : public HeaderCreator {
public:
FileDirectiveCreator(PduConfig& pduConf, cfdp::FileDirectives directiveCode,
FileDirectiveCreator(PduConfig& pduConf, cfdp::FileDirective directiveCode,
size_t directiveParamFieldLen);
[[nodiscard]] cfdp::FileDirectives getDirectiveCode() const;
[[nodiscard]] cfdp::FileDirective getDirectiveCode() const;
/**
* This only returns the size of the PDU header + 1 for the directive code octet.
@@ -28,7 +28,7 @@ class FileDirectiveCreator : public HeaderCreator {
void setDirectiveDataFieldLen(size_t len);
private:
cfdp::FileDirectives directiveCode = cfdp::FileDirectives::INVALID_DIRECTIVE;
cfdp::FileDirective directiveCode = cfdp::FileDirective::INVALID_DIRECTIVE;
};
#endif /* FSFW_SRC_FSFW_CFDP_PDU_FILEDIRECTIVESERIALIZER_H_ */
+7 -7
View File
@@ -3,7 +3,7 @@
FileDirectiveReader::FileDirectiveReader(const uint8_t *pduBuf, size_t maxSize)
: PduHeaderReader(pduBuf, maxSize) {}
cfdp::FileDirectives FileDirectiveReader::getFileDirective() const { return fileDirective; }
cfdp::FileDirective FileDirectiveReader::getFileDirective() const { return fileDirective; }
ReturnValue_t FileDirectiveReader::parseData() {
ReturnValue_t result = PduHeaderReader::parseData();
@@ -18,9 +18,9 @@ ReturnValue_t FileDirectiveReader::parseData() {
}
size_t currentIdx = PduHeaderReader::getHeaderSize();
if (not checkFileDirective(pointers.rawPtr[currentIdx])) {
return cfdp::INVALID_DIRECTIVE_FIELDS;
return cfdp::INVALID_DIRECTIVE_FIELD;
}
setFileDirective(static_cast<cfdp::FileDirectives>(pointers.rawPtr[currentIdx]));
setFileDirective(static_cast<cfdp::FileDirective>(pointers.rawPtr[currentIdx]));
return returnvalue::OK;
}
@@ -30,15 +30,15 @@ size_t FileDirectiveReader::getHeaderSize() const {
}
bool FileDirectiveReader::checkFileDirective(uint8_t rawByte) {
if (rawByte < cfdp::FileDirectives::EOF_DIRECTIVE or
(rawByte > cfdp::FileDirectives::PROMPT and rawByte != cfdp::FileDirectives::KEEP_ALIVE)) {
// Invalid directive field. TODO: Custom returnvalue
if (rawByte < cfdp::FileDirective::EOF_DIRECTIVE or
(rawByte > cfdp::FileDirective::PROMPT and rawByte != cfdp::FileDirective::KEEP_ALIVE)) {
// Invalid directive field
return false;
}
return true;
}
void FileDirectiveReader::setFileDirective(cfdp::FileDirectives fileDirective_) {
void FileDirectiveReader::setFileDirective(cfdp::FileDirective fileDirective_) {
fileDirective = fileDirective_;
}
+4 -5
View File
@@ -22,17 +22,16 @@ class FileDirectiveReader : public PduHeaderReader {
ReturnValue_t parseData() override;
[[nodiscard]] size_t getHeaderSize() const override;
[[nodiscard]] cfdp::FileDirectives getFileDirective() const;
[[nodiscard]] cfdp::FileDirective getFileDirective() const;
void setEndianness(SerializeIF::Endianness endianness);
[[nodiscard]] SerializeIF::Endianness getEndianness() const;
protected:
static bool checkFileDirective(uint8_t rawByte);
protected:
private:
void setFileDirective(cfdp::FileDirectives fileDirective);
cfdp::FileDirectives fileDirective = cfdp::FileDirectives::INVALID_DIRECTIVE;
void setFileDirective(cfdp::FileDirective fileDirective);
cfdp::FileDirective fileDirective = cfdp::FileDirective::INVALID_DIRECTIVE;
SerializeIF::Endianness endianness = SerializeIF::Endianness::NETWORK;
};
+2 -2
View File
@@ -1,7 +1,7 @@
#include "FinishedPduCreator.h"
FinishPduCreator::FinishPduCreator(PduConfig &conf, FinishedInfo &finishInfo)
: FileDirectiveCreator(conf, cfdp::FileDirectives::FINISH, 0), finishInfo(finishInfo) {
: FileDirectiveCreator(conf, cfdp::FileDirective::FINISH, 0), finishInfo(finishInfo) {
updateDirectiveFieldLen();
}
@@ -17,7 +17,7 @@ ReturnValue_t FinishPduCreator::serialize(uint8_t **buffer, size_t *size, size_t
if (result != returnvalue::OK) {
return result;
}
if (*size + 1 >= maxSize) {
if (*size + 1 > maxSize) {
return SerializeIF::BUFFER_TOO_SHORT;
}
**buffer = finishInfo.getConditionCode() << 4 | finishInfo.getDeliveryCode() << 2 |
+4 -4
View File
@@ -38,7 +38,7 @@ ReturnValue_t FinishPduReader::parseTlvs(size_t remLen, size_t currentIdx, const
FilestoreResponseTlv** fsResponseArray = nullptr;
size_t fsResponseMaxArrayLen = 0;
EntityIdTlv* faultLocation = nullptr;
cfdp::TlvTypes nextTlv = cfdp::TlvTypes::INVALID_TLV;
cfdp::TlvType nextTlv = cfdp::TlvType::INVALID_TLV;
while (remLen > 0) {
// Simply forward parse the TLV type. Every TLV type except the last one must be a Filestore
// Response TLV, and even the last one can be a Filestore Response TLV if the fault
@@ -46,8 +46,8 @@ ReturnValue_t FinishPduReader::parseTlvs(size_t remLen, size_t currentIdx, const
if (currentIdx + 2 > maxSize) {
return SerializeIF::STREAM_TOO_SHORT;
}
nextTlv = static_cast<cfdp::TlvTypes>(*buf);
if (nextTlv == cfdp::TlvTypes::FILESTORE_RESPONSE) {
nextTlv = static_cast<cfdp::TlvType>(*buf);
if (nextTlv == cfdp::TlvType::FILESTORE_RESPONSE) {
if (fsResponseArray == nullptr) {
if (not finishedInfo.canHoldFsResponses()) {
return cfdp::FINISHED_CANT_PARSE_FS_RESPONSES;
@@ -63,7 +63,7 @@ ReturnValue_t FinishPduReader::parseTlvs(size_t remLen, size_t currentIdx, const
return result;
}
fsResponsesIdx += 1;
} else if (nextTlv == cfdp::TlvTypes::ENTITY_ID) {
} else if (nextTlv == cfdp::TlvType::ENTITY_ID) {
// This needs to be the last TLV and it should not be here if the condition code
// is "No Error" or "Unsupported Checksum Type"
if (conditionCode == cfdp::ConditionCode::NO_ERROR or
+4 -4
View File
@@ -1,6 +1,6 @@
#include "HeaderCreator.h"
HeaderCreator::HeaderCreator(PduConfig &pduConf, cfdp::PduTypes pduType, size_t initPduDataFieldLen,
HeaderCreator::HeaderCreator(PduConfig &pduConf, cfdp::PduType pduType, size_t initPduDataFieldLen,
cfdp::SegmentMetadataFlag segmentMetadataFlag,
cfdp::SegmentationControl segCtrl)
: pduType(pduType),
@@ -65,17 +65,17 @@ void HeaderCreator::setPduDataFieldLen(size_t pduDataFieldLen_) {
pduDataFieldLen = pduDataFieldLen_;
}
void HeaderCreator::setPduType(cfdp::PduTypes pduType_) { pduType = pduType_; }
void HeaderCreator::setPduType(cfdp::PduType pduType_) { pduType = pduType_; }
void HeaderCreator::setSegmentMetadataFlag(cfdp::SegmentMetadataFlag segmentMetadataFlag_) {
segmentMetadataFlag = segmentMetadataFlag_;
}
cfdp::PduTypes HeaderCreator::getPduType() const { return pduType; }
cfdp::PduType HeaderCreator::getPduType() const { return pduType; }
cfdp::Direction HeaderCreator::getDirection() const { return pduConf.direction; }
cfdp::TransmissionModes HeaderCreator::getTransmissionMode() const { return pduConf.mode; }
cfdp::TransmissionMode HeaderCreator::getTransmissionMode() const { return pduConf.mode; }
bool HeaderCreator::getCrcFlag() const { return pduConf.crcFlag; }
+5 -5
View File
@@ -9,7 +9,7 @@
class HeaderCreator : public SerializeIF, public PduHeaderIF {
public:
HeaderCreator(
PduConfig& pduConf, cfdp::PduTypes pduType, size_t initPduDataFieldLen,
PduConfig& pduConf, cfdp::PduType pduType, size_t initPduDataFieldLen,
cfdp::SegmentMetadataFlag segmentMetadataFlag = cfdp::SegmentMetadataFlag::NOT_PRESENT,
cfdp::SegmentationControl segCtrl =
cfdp::SegmentationControl::NO_RECORD_BOUNDARIES_PRESERVATION);
@@ -29,15 +29,15 @@ class HeaderCreator : public SerializeIF, public PduHeaderIF {
Endianness streamEndianness) override;
void setPduDataFieldLen(size_t pduDataFieldLen);
void setPduType(cfdp::PduTypes pduType);
void setPduType(cfdp::PduType pduType);
void setSegmentMetadataFlag(cfdp::SegmentMetadataFlag);
[[nodiscard]] size_t getPduDataFieldLen() const override;
[[nodiscard]] size_t getWholePduSize() const override;
[[nodiscard]] cfdp::PduTypes getPduType() const override;
[[nodiscard]] cfdp::PduType getPduType() const override;
[[nodiscard]] cfdp::Direction getDirection() const override;
[[nodiscard]] cfdp::TransmissionModes getTransmissionMode() const override;
[[nodiscard]] cfdp::TransmissionMode getTransmissionMode() const override;
[[nodiscard]] bool getCrcFlag() const override;
[[nodiscard]] bool getLargeFileFlag() const override;
[[nodiscard]] cfdp::SegmentationControl getSegmentationControl() const override;
@@ -52,7 +52,7 @@ class HeaderCreator : public SerializeIF, public PduHeaderIF {
void getTransactionSeqNum(cfdp::TransactionSeqNum& seqNum) const override;
private:
cfdp::PduTypes pduType;
cfdp::PduType pduType;
cfdp::SegmentMetadataFlag segmentMetadataFlag;
cfdp::SegmentationControl segmentationCtrl;
size_t pduDataFieldLen;
+4 -4
View File
@@ -57,16 +57,16 @@ size_t PduHeaderReader::getWholePduSize() const {
return getPduDataFieldLen() + PduHeaderReader::getHeaderSize();
}
cfdp::PduTypes PduHeaderReader::getPduType() const {
return static_cast<cfdp::PduTypes>((pointers.fixedHeader->firstByte >> 4) & 0x01);
cfdp::PduType PduHeaderReader::getPduType() const {
return static_cast<cfdp::PduType>((pointers.fixedHeader->firstByte >> 4) & 0x01);
}
cfdp::Direction PduHeaderReader::getDirection() const {
return static_cast<cfdp::Direction>((pointers.fixedHeader->firstByte >> 3) & 0x01);
}
cfdp::TransmissionModes PduHeaderReader::getTransmissionMode() const {
return static_cast<cfdp::TransmissionModes>((pointers.fixedHeader->firstByte >> 2) & 0x01);
cfdp::TransmissionMode PduHeaderReader::getTransmissionMode() const {
return static_cast<cfdp::TransmissionMode>((pointers.fixedHeader->firstByte >> 2) & 0x01);
}
bool PduHeaderReader::getCrcFlag() const { return (pointers.fixedHeader->firstByte >> 1) & 0x01; }
+25
View File
@@ -0,0 +1,25 @@
#include "KeepAlivePduCreator.h"
KeepAlivePduCreator::KeepAlivePduCreator(PduConfig &conf, cfdp::FileSize &progress)
: FileDirectiveCreator(conf, cfdp::FileDirective::KEEP_ALIVE, 4), progress(progress) {
updateDirectiveFieldLen();
}
size_t KeepAlivePduCreator::getSerializedSize() const {
return FileDirectiveCreator::getWholePduSize();
}
void KeepAlivePduCreator::updateDirectiveFieldLen() {
if (this->getLargeFileFlag()) {
this->setDirectiveDataFieldLen(8);
}
}
ReturnValue_t KeepAlivePduCreator::serialize(uint8_t **buffer, size_t *size, size_t maxSize,
Endianness streamEndianness) const {
ReturnValue_t result = FileDirectiveCreator::serialize(buffer, size, maxSize, streamEndianness);
if (result != returnvalue::OK) {
return result;
}
return progress.serialize(this->getLargeFileFlag(), buffer, size, maxSize, streamEndianness);
}
+22
View File
@@ -0,0 +1,22 @@
#ifndef FSFW_CFDP_PDU_KEEPALIVEPDUSERIALIZER_H_
#define FSFW_CFDP_PDU_KEEPALIVEPDUSERIALIZER_H_
#include "fsfw/cfdp/FileSize.h"
#include "fsfw/cfdp/pdu/FileDirectiveCreator.h"
class KeepAlivePduCreator : public FileDirectiveCreator {
public:
KeepAlivePduCreator(PduConfig& conf, cfdp::FileSize& progress);
void updateDirectiveFieldLen();
[[nodiscard]] size_t getSerializedSize() const override;
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
Endianness streamEndianness) const override;
private:
cfdp::FileSize& progress;
};
#endif /* FSFW_CFDP_PDU_KEEPALIVEPDUSERIALIZER_H_ */
@@ -1,19 +0,0 @@
#ifndef FSFW_SRC_FSFW_CFDP_PDU_KEEPALIVEPDUDESERIALIZER_H_
#define FSFW_SRC_FSFW_CFDP_PDU_KEEPALIVEPDUDESERIALIZER_H_
#include "fsfw/cfdp/FileSize.h"
#include "fsfw/cfdp/pdu/FileDirectiveReader.h"
class KeepAlivePduDeserializer : public FileDirectiveReader {
public:
KeepAlivePduDeserializer(const uint8_t* pduBuf, size_t maxSize, cfdp::FileSize& progress);
ReturnValue_t parseData() override;
cfdp::FileSize& getProgress();
private:
cfdp::FileSize& progress;
};
#endif /* FSFW_SRC_FSFW_CFDP_PDU_KEEPALIVEPDUDESERIALIZER_H_ */
@@ -1,10 +1,10 @@
#include "KeepAlivePduDeserializer.h"
#include "KeepAlivePduReader.h"
KeepAlivePduDeserializer::KeepAlivePduDeserializer(const uint8_t* pduBuf, size_t maxSize,
cfdp::FileSize& progress)
KeepAlivePduReader::KeepAlivePduReader(const uint8_t* pduBuf, size_t maxSize,
cfdp::FileSize& progress)
: FileDirectiveReader(pduBuf, maxSize), progress(progress) {}
ReturnValue_t KeepAlivePduDeserializer::parseData() {
ReturnValue_t KeepAlivePduReader::parseData() {
ReturnValue_t result = FileDirectiveReader::parseData();
if (result != returnvalue::OK) {
return result;
@@ -15,4 +15,4 @@ ReturnValue_t KeepAlivePduDeserializer::parseData() {
return progress.deSerialize(&buffer, &remLen, getEndianness());
}
cfdp::FileSize& KeepAlivePduDeserializer::getProgress() { return progress; }
cfdp::FileSize& KeepAlivePduReader::getProgress() { return progress; }
+19
View File
@@ -0,0 +1,19 @@
#ifndef FSFW_CFDP_PDU_KEEPALIVEREADER_H_
#define FSFW_CFDP_PDU_KEEPALIVEREADER_H_
#include "fsfw/cfdp/FileSize.h"
#include "fsfw/cfdp/pdu/FileDirectiveReader.h"
class KeepAlivePduReader : public FileDirectiveReader {
public:
KeepAlivePduReader(const uint8_t* pduBuf, size_t maxSize, cfdp::FileSize& progress);
ReturnValue_t parseData() override;
cfdp::FileSize& getProgress();
private:
cfdp::FileSize& progress;
};
#endif /* FSFW_CFDP_PDU_KEEPALIVEPDUREADER_H_ */
@@ -1,25 +0,0 @@
#include "KeepAlivePduSerializer.h"
KeepAlivePduSerializer::KeepAlivePduSerializer(PduConfig &conf, cfdp::FileSize &progress)
: FileDirectiveCreator(conf, cfdp::FileDirectives::KEEP_ALIVE, 4), progress(progress) {
updateDirectiveFieldLen();
}
size_t KeepAlivePduSerializer::getSerializedSize() const {
return FileDirectiveCreator::getWholePduSize();
}
void KeepAlivePduSerializer::updateDirectiveFieldLen() {
if (this->getLargeFileFlag()) {
this->setDirectiveDataFieldLen(8);
}
}
ReturnValue_t KeepAlivePduSerializer::serialize(uint8_t **buffer, size_t *size, size_t maxSize,
Endianness streamEndianness) const {
ReturnValue_t result = FileDirectiveCreator::serialize(buffer, size, maxSize, streamEndianness);
if (result != returnvalue::OK) {
return result;
}
return progress.serialize(this->getLargeFileFlag(), buffer, size, maxSize, streamEndianness);
}
@@ -1,22 +0,0 @@
#ifndef FSFW_SRC_FSFW_CFDP_PDU_KEEPALIVEPDUSERIALIZER_H_
#define FSFW_SRC_FSFW_CFDP_PDU_KEEPALIVEPDUSERIALIZER_H_
#include "fsfw/cfdp/FileSize.h"
#include "fsfw/cfdp/pdu/FileDirectiveCreator.h"
class KeepAlivePduSerializer : public FileDirectiveCreator {
public:
KeepAlivePduSerializer(PduConfig& conf, cfdp::FileSize& progress);
void updateDirectiveFieldLen();
size_t getSerializedSize() const override;
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
Endianness streamEndianness) const override;
private:
cfdp::FileSize& progress;
};
#endif /* FSFW_SRC_FSFW_CFDP_PDU_KEEPALIVEPDUSERIALIZER_H_ */
+3 -3
View File
@@ -1,6 +1,6 @@
#include "MetadataInfo.h"
MetadataInfo::MetadataInfo(bool closureRequested, cfdp::ChecksumTypes checksumType,
MetadataInfo::MetadataInfo(bool closureRequested, cfdp::ChecksumType checksumType,
cfdp::FileSize& fileSize, cfdp::StringLv& sourceFileName,
cfdp::StringLv& destFileName)
: MetadataInfo(fileSize, sourceFileName, destFileName) {
@@ -23,9 +23,9 @@ void MetadataInfo::setOptionsArray(cfdp::Tlv** optionsArray_, std::optional<size
}
}
cfdp::ChecksumTypes MetadataInfo::getChecksumType() const { return checksumType; }
cfdp::ChecksumType MetadataInfo::getChecksumType() const { return checksumType; }
void MetadataInfo::setChecksumType(cfdp::ChecksumTypes checksumType_) {
void MetadataInfo::setChecksumType(cfdp::ChecksumType checksumType_) {
checksumType = checksumType_;
}
+4 -4
View File
@@ -13,15 +13,15 @@ class MetadataInfo {
public:
MetadataInfo(cfdp::FileSize& fileSize, cfdp::StringLv& sourceFileName,
cfdp::StringLv& destFileName);
MetadataInfo(bool closureRequested, cfdp::ChecksumTypes checksumType, cfdp::FileSize& fileSize,
MetadataInfo(bool closureRequested, cfdp::ChecksumType checksumType, cfdp::FileSize& fileSize,
cfdp::StringLv& sourceFileName, cfdp::StringLv& destFileName);
size_t getSerializedSize(bool fssLarge = false);
void setOptionsArray(cfdp::Tlv** optionsArray, std::optional<size_t> optionsLen,
std::optional<size_t> maxOptionsLen);
[[nodiscard]] cfdp::ChecksumTypes getChecksumType() const;
void setChecksumType(cfdp::ChecksumTypes checksumType);
[[nodiscard]] cfdp::ChecksumType getChecksumType() const;
void setChecksumType(cfdp::ChecksumType checksumType);
[[nodiscard]] bool isClosureRequested() const;
void setClosureRequested(bool closureRequested = false);
@@ -42,7 +42,7 @@ class MetadataInfo {
private:
bool closureRequested = false;
cfdp::ChecksumTypes checksumType = cfdp::ChecksumTypes::NULL_CHECKSUM;
cfdp::ChecksumType checksumType = cfdp::ChecksumType::NULL_CHECKSUM;
cfdp::FileSize& fileSize;
cfdp::StringLv& sourceFileName;
cfdp::StringLv& destFileName;
+1 -1
View File
@@ -1,7 +1,7 @@
#include "MetadataPduCreator.h"
MetadataPduCreator::MetadataPduCreator(PduConfig &conf, MetadataInfo &info)
: FileDirectiveCreator(conf, cfdp::FileDirectives::METADATA, 5), info(info) {
: FileDirectiveCreator(conf, cfdp::FileDirective::METADATA, 5), info(info) {
updateDirectiveFieldLen();
}
+1 -1
View File
@@ -15,7 +15,7 @@ ReturnValue_t MetadataPduReader::parseData() {
return SerializeIF::STREAM_TOO_SHORT;
}
info.setClosureRequested((*buf >> 6) & 0x01);
info.setChecksumType(static_cast<cfdp::ChecksumTypes>(*buf & 0x0f));
info.setChecksumType(static_cast<cfdp::ChecksumType>(*buf & 0x0f));
remSize -= 1;
buf += 1;
auto endianness = getEndianness();
@@ -1,20 +1,18 @@
#include "NakPduSerializer.h"
#include "NakPduCreator.h"
NakPduSerializer::NakPduSerializer(PduConfig &pduConf, NakInfo &nakInfo)
: FileDirectiveCreator(pduConf, cfdp::FileDirectives::NAK, 0), nakInfo(nakInfo) {
NakPduCreator::NakPduCreator(PduConfig &pduConf, NakInfo &nakInfo)
: FileDirectiveCreator(pduConf, cfdp::FileDirective::NAK, 0), nakInfo(nakInfo) {
updateDirectiveFieldLen();
}
void NakPduSerializer::updateDirectiveFieldLen() {
void NakPduCreator::updateDirectiveFieldLen() {
this->setDirectiveDataFieldLen(nakInfo.getSerializedSize(getLargeFileFlag()));
}
size_t NakPduSerializer::getSerializedSize() const {
return FileDirectiveCreator::getWholePduSize();
}
size_t NakPduCreator::getSerializedSize() const { return FileDirectiveCreator::getWholePduSize(); }
ReturnValue_t NakPduSerializer::serialize(uint8_t **buffer, size_t *size, size_t maxSize,
Endianness streamEndianness) const {
ReturnValue_t NakPduCreator::serialize(uint8_t **buffer, size_t *size, size_t maxSize,
Endianness streamEndianness) const {
ReturnValue_t result = FileDirectiveCreator::serialize(buffer, size, maxSize, streamEndianness);
if (result != returnvalue::OK) {
return result;
@@ -1,5 +1,5 @@
#ifndef FSFW_SRC_FSFW_CFDP_PDU_NAKPDUSERIALIZER_H_
#define FSFW_SRC_FSFW_CFDP_PDU_NAKPDUSERIALIZER_H_
#ifndef FSFW_CFDP_PDU_NAKPDUSERIALIZER_H_
#define FSFW_CFDP_PDU_NAKPDUSERIALIZER_H_
#include <vector>
@@ -8,7 +8,7 @@
#include "fsfw/cfdp/definitions.h"
#include "fsfw/cfdp/pdu/FileDirectiveCreator.h"
class NakPduSerializer : public FileDirectiveCreator {
class NakPduCreator : public FileDirectiveCreator {
public:
/**
*
@@ -18,9 +18,9 @@ class NakPduSerializer : public FileDirectiveCreator {
* @param [in] segmentRequests Pointer to the start of a list of segment requests
* @param segmentRequestLen Length of the segment request list to be serialized
*/
NakPduSerializer(PduConfig& PduConf, NakInfo& nakInfo);
NakPduCreator(PduConfig& PduConf, NakInfo& nakInfo);
size_t getSerializedSize() const override;
[[nodiscard]] size_t getSerializedSize() const override;
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
Endianness streamEndianness) const override;
@@ -35,4 +35,4 @@ class NakPduSerializer : public FileDirectiveCreator {
NakInfo& nakInfo;
};
#endif /* FSFW_SRC_FSFW_CFDP_PDU_NAKPDUSERIALIZER_H_ */
#endif /* FSFW_CFDP_PDU_NAKPDUSERIALIZER_H_ */
-21
View File
@@ -1,21 +0,0 @@
#ifndef FSFW_SRC_FSFW_CFDP_PDU_NAKPDUDESERIALIZER_H_
#define FSFW_SRC_FSFW_CFDP_PDU_NAKPDUDESERIALIZER_H_
#include "fsfw/cfdp/pdu/FileDirectiveReader.h"
#include "fsfw/cfdp/pdu/NakInfo.h"
class NakPduDeserializer : public FileDirectiveReader {
public:
NakPduDeserializer(const uint8_t* pduBuf, size_t maxSize, NakInfo& info);
/**
* This needs to be called before accessing the PDU fields to avoid segmentation faults.
* @return
*/
virtual ReturnValue_t parseData() override;
private:
NakInfo& nakInfo;
};
#endif /* FSFW_SRC_FSFW_CFDP_PDU_NAKPDUDESERIALIZER_H_ */
@@ -1,9 +1,9 @@
#include "NakPduDeserializer.h"
#include "NakPduReader.h"
NakPduDeserializer::NakPduDeserializer(const uint8_t* pduBuf, size_t maxSize, NakInfo& info)
NakPduReader::NakPduReader(const uint8_t* pduBuf, size_t maxSize, NakInfo& info)
: FileDirectiveReader(pduBuf, maxSize), nakInfo(info) {}
ReturnValue_t NakPduDeserializer::parseData() {
ReturnValue_t NakPduReader::parseData() {
ReturnValue_t result = FileDirectiveReader::parseData();
if (result != returnvalue::OK) {
return result;
+21
View File
@@ -0,0 +1,21 @@
#ifndef FSFW_CFDP_PDU_NAKPDUDESERIALIZER_H_
#define FSFW_CFDP_PDU_NAKPDUDESERIALIZER_H_
#include "fsfw/cfdp/pdu/FileDirectiveReader.h"
#include "fsfw/cfdp/pdu/NakInfo.h"
class NakPduReader : public FileDirectiveReader {
public:
NakPduReader(const uint8_t* pduBuf, size_t maxSize, NakInfo& info);
/**
* This needs to be called before accessing the PDU fields to avoid segmentation faults.
* @return
*/
ReturnValue_t parseData() override;
private:
NakInfo& nakInfo;
};
#endif /* FSFW_CFDP_PDU_NAKPDUDESERIALIZER_H_ */
+1 -1
View File
@@ -2,7 +2,7 @@
#include <utility>
PduConfig::PduConfig(cfdp::EntityId sourceId, cfdp::EntityId destId, cfdp::TransmissionModes mode,
PduConfig::PduConfig(cfdp::EntityId sourceId, cfdp::EntityId destId, cfdp::TransmissionMode mode,
cfdp::TransactionSeqNum seqNum, bool crcFlag, bool largeFile,
cfdp::Direction direction)
: mode(mode),
+2 -2
View File
@@ -7,11 +7,11 @@
class PduConfig {
public:
PduConfig() = default;
PduConfig(cfdp::EntityId sourceId, cfdp::EntityId destId, cfdp::TransmissionModes mode,
PduConfig(cfdp::EntityId sourceId, cfdp::EntityId destId, cfdp::TransmissionMode mode,
cfdp::TransactionSeqNum seqNum, bool crcFlag = false, bool largeFile = false,
cfdp::Direction direction = cfdp::Direction::TOWARDS_RECEIVER);
cfdp::TransmissionModes mode = cfdp::TransmissionModes::ACKNOWLEDGED;
cfdp::TransmissionMode mode = cfdp::TransmissionMode::ACKNOWLEDGED;
cfdp::TransactionSeqNum seqNum;
cfdp::EntityId sourceId;
cfdp::EntityId destId;
+2 -2
View File
@@ -17,9 +17,9 @@ class PduHeaderIF {
[[nodiscard]] virtual size_t getWholePduSize() const = 0;
[[nodiscard]] virtual size_t getPduDataFieldLen() const = 0;
[[nodiscard]] virtual cfdp::PduTypes getPduType() const = 0;
[[nodiscard]] virtual cfdp::PduType getPduType() const = 0;
[[nodiscard]] virtual cfdp::Direction getDirection() const = 0;
[[nodiscard]] virtual cfdp::TransmissionModes getTransmissionMode() const = 0;
[[nodiscard]] virtual cfdp::TransmissionMode getTransmissionMode() const = 0;
[[nodiscard]] virtual bool getCrcFlag() const = 0;
[[nodiscard]] virtual bool getLargeFileFlag() const = 0;
[[nodiscard]] virtual cfdp::SegmentationControl getSegmentationControl() const = 0;
+2 -2
View File
@@ -56,9 +56,9 @@ class PduHeaderReader : public RedirectableDataPointerIF, public PduHeaderIF {
[[nodiscard]] size_t getPduDataFieldLen() const override;
[[nodiscard]] size_t getWholePduSize() const override;
[[nodiscard]] cfdp::PduTypes getPduType() const override;
[[nodiscard]] cfdp::PduType getPduType() const override;
[[nodiscard]] cfdp::Direction getDirection() const override;
[[nodiscard]] cfdp::TransmissionModes getTransmissionMode() const override;
[[nodiscard]] cfdp::TransmissionMode getTransmissionMode() const override;
[[nodiscard]] bool getCrcFlag() const override;
[[nodiscard]] bool getLargeFileFlag() const override;
[[nodiscard]] cfdp::SegmentationControl getSegmentationControl() const override;
+24
View File
@@ -0,0 +1,24 @@
#include "PromptPduCreator.h"
PromptPduCreator::PromptPduCreator(PduConfig &conf, cfdp::PromptResponseRequired responseRequired)
: FileDirectiveCreator(conf, cfdp::FileDirective::PROMPT, 1),
responseRequired(responseRequired) {}
size_t PromptPduCreator::getSerializedSize() const {
return FileDirectiveCreator::getWholePduSize();
}
ReturnValue_t PromptPduCreator::serialize(uint8_t **buffer, size_t *size, size_t maxSize,
Endianness streamEndianness) const {
ReturnValue_t result = FileDirectiveCreator::serialize(buffer, size, maxSize, streamEndianness);
if (result != returnvalue::OK) {
return result;
}
if (*size + 1 > maxSize) {
return SerializeIF::BUFFER_TOO_SHORT;
}
**buffer = responseRequired << 7;
*buffer += 1;
*size += 1;
return result;
}
@@ -3,9 +3,9 @@
#include "fsfw/cfdp/pdu/FileDirectiveCreator.h"
class PromptPduSerializer : public FileDirectiveCreator {
class PromptPduCreator : public FileDirectiveCreator {
public:
PromptPduSerializer(PduConfig& conf, cfdp::PromptResponseRequired responseRequired);
PromptPduCreator(PduConfig& conf, cfdp::PromptResponseRequired responseRequired);
[[nodiscard]] size_t getSerializedSize() const override;
@@ -1,13 +1,13 @@
#include "PromptPduDeserializer.h"
#include "PromptPduReader.h"
PromptPduDeserializer::PromptPduDeserializer(const uint8_t *pduBuf, size_t maxSize)
PromptPduReader::PromptPduReader(const uint8_t *pduBuf, size_t maxSize)
: FileDirectiveReader(pduBuf, maxSize) {}
cfdp::PromptResponseRequired PromptPduDeserializer::getPromptResponseRequired() const {
cfdp::PromptResponseRequired PromptPduReader::getPromptResponseRequired() const {
return responseRequired;
}
ReturnValue_t PromptPduDeserializer::parseData() {
ReturnValue_t PromptPduReader::parseData() {
ReturnValue_t result = FileDirectiveReader::parseData();
if (result != returnvalue::OK) {
return result;
@@ -3,9 +3,9 @@
#include "fsfw/cfdp/pdu/FileDirectiveReader.h"
class PromptPduDeserializer : public FileDirectiveReader {
class PromptPduReader : public FileDirectiveReader {
public:
PromptPduDeserializer(const uint8_t *pduBuf, size_t maxSize);
PromptPduReader(const uint8_t *pduBuf, size_t maxSize);
[[nodiscard]] cfdp::PromptResponseRequired getPromptResponseRequired() const;
ReturnValue_t parseData() override;
-25
View File
@@ -1,25 +0,0 @@
#include "PromptPduSerializer.h"
PromptPduSerializer::PromptPduSerializer(PduConfig &conf,
cfdp::PromptResponseRequired responseRequired)
: FileDirectiveCreator(conf, cfdp::FileDirectives::PROMPT, 1),
responseRequired(responseRequired) {}
size_t PromptPduSerializer::getSerializedSize() const {
return FileDirectiveCreator::getWholePduSize();
}
ReturnValue_t PromptPduSerializer::serialize(uint8_t **buffer, size_t *size, size_t maxSize,
Endianness streamEndianness) const {
ReturnValue_t result = FileDirectiveCreator::serialize(buffer, size, maxSize, streamEndianness);
if (result != returnvalue::OK) {
return result;
}
if (*size + 1 > maxSize) {
return SerializeIF::BUFFER_TOO_SHORT;
}
**buffer = responseRequired << 7;
*buffer += 1;
*size += 1;
return result;
}
+4 -4
View File
@@ -11,7 +11,7 @@ ReturnValue_t EntityIdTlv::serialize(uint8_t **buffer, size_t *size, size_t maxS
if (maxSize < this->getSerializedSize()) {
return BUFFER_TOO_SHORT;
}
**buffer = cfdp::TlvTypes::ENTITY_ID;
**buffer = cfdp::TlvType::ENTITY_ID;
*size += 1;
*buffer += 1;
size_t serLen = entityId.getSerializedSize();
@@ -28,8 +28,8 @@ ReturnValue_t EntityIdTlv::deSerialize(const uint8_t **buffer, size_t *size,
if (*size < 3) {
return STREAM_TOO_SHORT;
}
cfdp::TlvTypes type = static_cast<cfdp::TlvTypes>(**buffer);
if (type != cfdp::TlvTypes::ENTITY_ID) {
cfdp::TlvType type = static_cast<cfdp::TlvType>(**buffer);
if (type != cfdp::TlvType::ENTITY_ID) {
return cfdp::INVALID_TLV_TYPE;
}
*buffer += 1;
@@ -54,6 +54,6 @@ ReturnValue_t EntityIdTlv::deSerialize(cfdp::Tlv &tlv, Endianness endianness) {
uint8_t EntityIdTlv::getLengthField() const { return 1 + entityId.getSerializedSize(); }
cfdp::TlvTypes EntityIdTlv::getType() const { return cfdp::TlvTypes::ENTITY_ID; }
cfdp::TlvType EntityIdTlv::getType() const { return cfdp::TlvType::ENTITY_ID; }
cfdp::EntityId &EntityIdTlv::getEntityId() { return entityId; }
+1 -1
View File
@@ -27,7 +27,7 @@ class EntityIdTlv : public TlvIF {
Endianness streamEndianness) override;
uint8_t getLengthField() const override;
cfdp::TlvTypes getType() const override;
cfdp::TlvType getType() const override;
cfdp::EntityId& getEntityId();
@@ -1,7 +1,7 @@
#include "FaultHandlerOverrideTlv.h"
FaultHandlerOverrideTlv::FaultHandlerOverrideTlv(cfdp::ConditionCode conditionCode,
cfdp::FaultHandlerCodes handlerCode)
cfdp::FaultHandlerCode handlerCode)
: conditionCode(conditionCode), handlerCode(handlerCode) {}
FaultHandlerOverrideTlv::FaultHandlerOverrideTlv() = default;
@@ -32,8 +32,8 @@ ReturnValue_t FaultHandlerOverrideTlv::deSerialize(const uint8_t **buffer, size_
if (*size < 3) {
return SerializeIF::STREAM_TOO_SHORT;
}
auto detectedType = static_cast<cfdp::TlvTypes>(**buffer);
if (detectedType != cfdp::TlvTypes::FAULT_HANDLER) {
auto detectedType = static_cast<cfdp::TlvType>(**buffer);
if (detectedType != cfdp::TlvType::FAULT_HANDLER) {
return cfdp::INVALID_TLV_TYPE;
}
*buffer += 1;
@@ -45,10 +45,10 @@ ReturnValue_t FaultHandlerOverrideTlv::deSerialize(const uint8_t **buffer, size_
*buffer += 1;
*size += 1;
this->conditionCode = static_cast<cfdp::ConditionCode>((**buffer >> 4) & 0x0f);
this->handlerCode = static_cast<cfdp::FaultHandlerCodes>(**buffer & 0x0f);
this->handlerCode = static_cast<cfdp::FaultHandlerCode>(**buffer & 0x0f);
*buffer += 1;
*size += 1;
return returnvalue::OK;
}
cfdp::TlvTypes FaultHandlerOverrideTlv::getType() const { return cfdp::TlvTypes::FAULT_HANDLER; }
cfdp::TlvType FaultHandlerOverrideTlv::getType() const { return cfdp::TlvType::FAULT_HANDLER; }
+3 -3
View File
@@ -6,7 +6,7 @@
class FaultHandlerOverrideTlv : public TlvIF {
public:
FaultHandlerOverrideTlv();
FaultHandlerOverrideTlv(cfdp::ConditionCode conditionCode, cfdp::FaultHandlerCodes handlerCode);
FaultHandlerOverrideTlv(cfdp::ConditionCode conditionCode, cfdp::FaultHandlerCode handlerCode);
ReturnValue_t serialize(uint8_t **buffer, size_t *size, size_t maxSize,
Endianness streamEndianness) const override;
@@ -16,11 +16,11 @@ class FaultHandlerOverrideTlv : public TlvIF {
ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
Endianness streamEndianness) override;
[[nodiscard]] uint8_t getLengthField() const override;
[[nodiscard]] cfdp::TlvTypes getType() const override;
[[nodiscard]] cfdp::TlvType getType() const override;
private:
cfdp::ConditionCode conditionCode = cfdp::ConditionCode::NO_CONDITION_FIELD;
cfdp::FaultHandlerCodes handlerCode = cfdp::FaultHandlerCodes::RESERVED;
cfdp::FaultHandlerCode handlerCode = cfdp::FaultHandlerCode::RESERVED;
};
#endif /* FSFW_SRC_FSFW_CFDP_TLV_FAULTHANDLEROVERRIDETLV_H_ */
+1 -1
View File
@@ -76,4 +76,4 @@ ReturnValue_t FilestoreRequestTlv::deSerializeFromValue(const uint8_t **buffer,
return result;
}
cfdp::TlvTypes FilestoreRequestTlv::getType() const { return cfdp::TlvTypes::FILESTORE_REQUEST; }
cfdp::TlvType FilestoreRequestTlv::getType() const { return cfdp::TlvType::FILESTORE_REQUEST; }
+1 -1
View File
@@ -30,7 +30,7 @@ class FilestoreRequestTlv : public cfdp::FilestoreTlvBase {
Endianness streamEndianness) override;
[[nodiscard]] uint8_t getLengthField() const override;
[[nodiscard]] cfdp::TlvTypes getType() const override;
[[nodiscard]] cfdp::TlvType getType() const override;
private:
cfdp::Lv *secondFileName = nullptr;
+1 -1
View File
@@ -112,4 +112,4 @@ ReturnValue_t FilestoreResponseTlv::deSerialize(const cfdp::Tlv &tlv, Endianness
uint8_t FilestoreResponseTlv::getStatusCode() const { return statusCode; }
cfdp::TlvTypes FilestoreResponseTlv::getType() const { return cfdp::TlvTypes::FILESTORE_RESPONSE; }
cfdp::TlvType FilestoreResponseTlv::getType() const { return cfdp::TlvType::FILESTORE_RESPONSE; }
+1 -1
View File
@@ -33,7 +33,7 @@ class FilestoreResponseTlv : public cfdp::FilestoreTlvBase {
Endianness streamEndianness) override;
[[nodiscard]] uint8_t getLengthField() const override;
[[nodiscard]] cfdp::TlvTypes getType() const override;
[[nodiscard]] cfdp::TlvType getType() const override;
private:
uint8_t statusCode;
+1 -1
View File
@@ -102,7 +102,7 @@ class FilestoreTlvBase : public TlvIF {
if (*size < 3) {
return SerializeIF::STREAM_TOO_SHORT;
}
auto type = static_cast<cfdp::TlvTypes>(**buffer);
auto type = static_cast<cfdp::TlvType>(**buffer);
if (type != getType()) {
return cfdp::INVALID_TLV_TYPE;
}
+1 -1
View File
@@ -1,4 +1,4 @@
#include "FlowLabelTlv.h"
FlowLabelTlv::FlowLabelTlv(uint8_t* value, size_t size)
: Tlv(cfdp::TlvTypes::FLOW_LABEL, value, size) {}
: Tlv(cfdp::TlvType::FLOW_LABEL, value, size) {}
+1 -1
View File
@@ -76,7 +76,7 @@ ReturnValue_t cfdp::Lv::deSerialize(const uint8_t** buffer, size_t* size,
}
zeroLen = false;
// Zero-copy implementation
value.setConstBuffer(const_cast<uint8_t*>(*buffer + 1), lengthField);
value.setConstBuffer(*buffer + 1, lengthField);
*buffer += 1 + lengthField;
*size -= 1 + lengthField;
return returnvalue::OK;
+2 -2
View File
@@ -1,9 +1,9 @@
#include "MessageToUserTlv.h"
MessageToUserTlv::MessageToUserTlv(uint8_t* value, size_t size)
: Tlv(cfdp::TlvTypes::MSG_TO_USER, value, size) {}
: Tlv(cfdp::TlvType::MSG_TO_USER, value, size) {}
MessageToUserTlv::MessageToUserTlv() : Tlv() {}
MessageToUserTlv::MessageToUserTlv(const std::vector<uint8_t>& data)
: Tlv(cfdp::TlvTypes::MSG_TO_USER, data.data(), data.size()) {}
: Tlv(cfdp::TlvType::MSG_TO_USER, data.data(), data.size()) {}
+6 -6
View File
@@ -1,6 +1,6 @@
#include "Tlv.h"
cfdp::Tlv::Tlv(TlvTypes type, const uint8_t *value, size_t size)
cfdp::Tlv::Tlv(TlvType type, const uint8_t *value, size_t size)
: type(type), value(value, size, true) {
if (size > 0) {
zeroLen = false;
@@ -17,7 +17,7 @@ ReturnValue_t cfdp::Tlv::serialize(uint8_t **buffer, size_t *size, size_t maxSiz
if (*size + 2 > maxSize) {
return BUFFER_TOO_SHORT;
}
if (type == TlvTypes::INVALID_TLV) {
if (type == TlvType::INVALID_TLV) {
return INVALID_TLV_TYPE;
}
**buffer = type;
@@ -59,7 +59,7 @@ ReturnValue_t cfdp::Tlv::deSerialize(const uint8_t **buffer, size_t *size,
return INVALID_TLV_TYPE;
}
type = static_cast<TlvTypes>(rawType);
type = static_cast<TlvType>(rawType);
*buffer += 1;
*size -= 1;
@@ -75,7 +75,7 @@ ReturnValue_t cfdp::Tlv::deSerialize(const uint8_t **buffer, size_t *size,
}
zeroLen = false;
// Zero-copy implementation
value.setConstBuffer(const_cast<uint8_t *>(*buffer + 1), lengthField);
value.setConstBuffer(*buffer + 1, lengthField);
*buffer += 1 + lengthField;
*size -= 1 + lengthField;
return returnvalue::OK;
@@ -83,7 +83,7 @@ ReturnValue_t cfdp::Tlv::deSerialize(const uint8_t **buffer, size_t *size,
const uint8_t *cfdp::Tlv::getValue() const { return value.getConstBuffer(); }
cfdp::TlvTypes cfdp::Tlv::getType() const { return type; }
cfdp::TlvType cfdp::Tlv::getType() const { return type; }
bool cfdp::Tlv::checkType(uint8_t rawType) {
if (rawType != 0x03 and rawType <= 6) {
@@ -101,4 +101,4 @@ void cfdp::Tlv::setValue(uint8_t *value, size_t len) {
uint8_t cfdp::Tlv::getLengthField() const { return this->value.getSerializedSize() - 1; }
void cfdp::Tlv::setType(TlvTypes type) { this->type = type; }
void cfdp::Tlv::setType(TlvType type) { this->type = type; }
+4 -4
View File
@@ -13,7 +13,7 @@ namespace cfdp {
*/
class Tlv : public TlvIF {
public:
Tlv(TlvTypes type, const uint8_t *value, size_t size);
Tlv(TlvType type, const uint8_t *value, size_t size);
Tlv();
/**
@@ -47,15 +47,15 @@ class Tlv : public TlvIF {
void setValue(uint8_t *value, size_t len);
[[nodiscard]] const uint8_t *getValue() const;
void setType(TlvTypes type);
[[nodiscard]] TlvTypes getType() const override;
void setType(TlvType type);
[[nodiscard]] TlvType getType() const override;
[[nodiscard]] uint8_t getLengthField() const override;
private:
bool checkType(uint8_t rawType);
bool zeroLen = true;
TlvTypes type = TlvTypes::INVALID_TLV;
TlvType type = TlvType::INVALID_TLV;
SerialBufferAdapter<uint8_t> value;
};
+1 -1
View File
@@ -8,7 +8,7 @@ class TlvIF : public SerializeIF {
virtual ~TlvIF(){};
virtual uint8_t getLengthField() const = 0;
virtual cfdp::TlvTypes getType() const = 0;
virtual cfdp::TlvType getType() const = 0;
};
#endif /* FSFW_SRC_FSFW_CFDP_TLVIF_H_ */
+2 -4
View File
@@ -4,6 +4,7 @@
#include "../returnvalues/returnvalue.h"
#include "../serialize/SerializeAdapter.h"
#include "../serialize/SerializeIF.h"
#include "definitions.h"
/**
* @brief A List that stores its values in an array.
@@ -19,9 +20,6 @@ class ArrayList {
friend class SerialArrayListAdapter;
public:
static const uint8_t INTERFACE_ID = CLASS_ID::ARRAY_LIST;
static const ReturnValue_t FULL = MAKE_RETURN_CODE(0x01);
/**
* This is the allocating constructor.
* It allocates an array of the specified size.
@@ -187,7 +185,7 @@ class ArrayList {
*/
ReturnValue_t insert(T entry) {
if (size >= maxSize_) {
return FULL;
return containers::LIST_FULL;
}
entries[size] = entry;
++size;
+6 -2
View File
@@ -20,15 +20,19 @@ class FixedArrayList : public ArrayList<T, count_t> {
FixedArrayList() : ArrayList<T, count_t>(data, MAX_SIZE) {}
FixedArrayList(const FixedArrayList& other) : ArrayList<T, count_t>(data, MAX_SIZE) {
memcpy(this->data, other.data, sizeof(this->data));
this->entries = data;
this->size = other.size;
for (size_t idx = 0; idx < this->size; idx++) {
data[idx] = other.data[idx];
}
}
FixedArrayList& operator=(FixedArrayList other) {
memcpy(this->data, other.data, sizeof(this->data));
this->entries = data;
this->size = other.size;
for (size_t idx = 0; idx < this->size; idx++) {
data[idx] = other.data[idx];
}
return *this;
}
+6 -11
View File
@@ -4,8 +4,8 @@
#include <type_traits>
#include <utility>
#include "../returnvalues/returnvalue.h"
#include "ArrayList.h"
#include "definitions.h"
/**
* @brief Map implementation for maps with a pre-defined size.
@@ -24,11 +24,6 @@ class FixedMap : public SerializeIF {
"derived class from SerializeIF to be serialize-able");
public:
static const uint8_t INTERFACE_ID = CLASS_ID::FIXED_MAP;
static const ReturnValue_t KEY_ALREADY_EXISTS = MAKE_RETURN_CODE(0x01);
static const ReturnValue_t MAP_FULL = MAKE_RETURN_CODE(0x02);
static const ReturnValue_t KEY_DOES_NOT_EXIST = MAKE_RETURN_CODE(0x03);
private:
static const key_t EMPTY_SLOT = -1;
ArrayList<std::pair<key_t, T>, uint32_t> theMap;
@@ -76,10 +71,10 @@ class FixedMap : public SerializeIF {
ReturnValue_t insert(key_t key, T value, Iterator* storedValue = nullptr) {
if (exists(key) == returnvalue::OK) {
return KEY_ALREADY_EXISTS;
return containers::KEY_ALREADY_EXISTS;
}
if (_size == theMap.maxSize()) {
return MAP_FULL;
return containers::MAP_FULL;
}
theMap[_size].first = key;
theMap[_size].second = value;
@@ -93,7 +88,7 @@ class FixedMap : public SerializeIF {
ReturnValue_t insert(std::pair<key_t, T> pair) { return insert(pair.first, pair.second); }
ReturnValue_t exists(key_t key) const {
ReturnValue_t result = KEY_DOES_NOT_EXIST;
ReturnValue_t result = containers::KEY_DOES_NOT_EXIST;
if (findIndex(key) < _size) {
result = returnvalue::OK;
}
@@ -103,7 +98,7 @@ class FixedMap : public SerializeIF {
ReturnValue_t erase(Iterator* iter) {
uint32_t i;
if ((i = findIndex((*iter).value->first)) >= _size) {
return KEY_DOES_NOT_EXIST;
return containers::KEY_DOES_NOT_EXIST;
}
theMap[i] = theMap[_size - 1];
--_size;
@@ -114,7 +109,7 @@ class FixedMap : public SerializeIF {
ReturnValue_t erase(key_t key) {
uint32_t i;
if ((i = findIndex(key)) >= _size) {
return KEY_DOES_NOT_EXIST;
return containers::KEY_DOES_NOT_EXIST;
}
theMap[i] = theMap[_size - 1];
--_size;
+14
View File
@@ -0,0 +1,14 @@
#ifndef FSFW_CONTAINER_DEFINITIONS_H_
#define FSFW_CONTAINER_DEFINITIONS_H_
#include "fsfw/retval.h"
namespace containers {
static const ReturnValue_t KEY_ALREADY_EXISTS = returnvalue::makeCode(CLASS_ID::FIXED_MAP, 0x01);
static const ReturnValue_t MAP_FULL = returnvalue::makeCode(CLASS_ID::FIXED_MAP, 0x02);
static const ReturnValue_t KEY_DOES_NOT_EXIST = returnvalue::makeCode(CLASS_ID::FIXED_MAP, 0x03);
static const ReturnValue_t LIST_FULL = returnvalue::makeCode(CLASS_ID::ARRAY_LIST, 0x01);
} // namespace containers
#endif /* FSFW_CONTAINER_DEFINITIONS_H_ */
@@ -243,13 +243,14 @@ class LocalDataPoolManager : public ProvidesDataPoolSubscriptionIF, public Acces
LocalDataPoolManager* getPoolManagerHandle() override;
ReturnValue_t subscribeForRegularPeriodicPacket(subdp::RegularHkPeriodicParams params) override;
ReturnValue_t subscribeForDiagPeriodicPacket(subdp::DiagnosticsHkPeriodicParams params) override;
ReturnValue_t subscribeForPeriodicPacket(subdp::ParamsBase& params);
ReturnValue_t subscribeForRegularUpdatePacket(subdp::RegularHkUpdateParams params) override;
ReturnValue_t subscribeForDiagUpdatePacket(subdp::DiagnosticsHkUpdateParams params) override;
ReturnValue_t subscribeForUpdatePacket(subdp::ParamsBase& params);
protected:
ReturnValue_t subscribeForPeriodicPacket(subdp::ParamsBase& params);
ReturnValue_t subscribeForUpdatePacket(subdp::ParamsBase& params);
/** Core data structure for the actual pool data */
localpool::DataPool localPoolMap;
/** Every housekeeping data manager has a mutex to protect access
@@ -48,12 +48,12 @@ LocalPoolObjectBase::LocalPoolObjectBase(object_id_t poolOwner, lp_id_t poolId,
if (hkOwner == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalPoolVariable: The supplied pool owner 0x" << std::hex << poolOwner
<< std::dec << " did not implement the correct interface "
<< std::dec << " does not exist or does not implement the correct interface "
<< "HasLocalDataPoolIF" << std::endl;
#else
sif::printError(
"LocalPoolVariable: The supplied pool owner 0x%08x did not implement the correct "
"interface HasLocalDataPoolIF\n",
"LocalPoolVariable: The supplied pool owner 0x%08x does not exist or does not implement "
"the correct interface HasLocalDataPoolIF\n",
poolOwner);
#endif
return;

Some files were not shown because too many files have changed in this diff Show More