Compare commits

..

534 Commits

Author SHA1 Message Date
45cf31c2b1 new fsfw
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/-/pipeline/head Build queued...
2022-09-14 11:30:15 +02:00
f6f6393c4a reverting mib only changes to cmake
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-09-07 12:02:18 +02:00
7754d65753 reverting changes to CMakeList.txt to move back topwards upstream 2022-09-07 11:09:17 +02:00
Uli
c14b131e6f fixed fsfw
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-09-07 10:57:39 +02:00
de856a514b workarounds for MIB build
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-09-06 22:17:54 +02:00
acd365e421 Mode introspection and fixes
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-08-26 16:12:22 +02:00
06b6c0838a compiling both with and without introspection 2022-08-25 16:28:01 +02:00
3c762e7437 switching mission object ids to FSFW_CLASSLESS_ENUM 2022-08-25 15:13:15 +02:00
4a147a442c removing debug code 2022-08-25 14:44:18 +02:00
fe8036361d I knew this was stupid: Revert "changing mission dependend object IDs to FSFW_ENUM"
This reverts commit 2800484f6b.
2022-08-25 14:43:27 +02:00
2800484f6b changing mission dependend object IDs to FSFW_ENUM
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-08-24 22:29:42 +02:00
aaeb101442 mostly done with gomspacehandlers, some todos left
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-08-24 18:13:03 +02:00
da2acd1fa8 continuing on gomspace handlers 2022-08-24 17:19:14 +02:00
1f47c970af working on gomespace handlers
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-08-23 23:34:20 +02:00
dfb800f58a more dirty hacks to check amd64 build. To be cleaned up
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-08-19 14:31:48 +02:00
a93fe8ef8e fixing bug in handlers 2022-08-19 14:31:22 +02:00
35effb9e68 stubs to be able to compile on modern amd64 2022-08-19 14:28:44 +02:00
c0e896b371 working on compiling bsp_q7s on amd64
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-08-18 19:04:49 +02:00
73971ad486 fixes 2022-08-18 16:33:53 +02:00
45e5ea362d Merge branch 'develop' into mohr/introspection
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-08-18 13:15:58 +02:00
7bcc4b18b7 compiles 2022-08-18 10:42:18 +02:00
a3b5993fdc compiles, does not link yet
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-08-17 19:19:49 +02:00
eb886dc53c Ploc Memory Dumper 2022-08-17 19:19:20 +02:00
a91393b4b4 Small fixes 2022-08-17 17:55:21 +02:00
ef40db7fe4 CCSDS Handler 2022-08-17 17:54:59 +02:00
5de9a812bb use default cross-user path for x-compiler installation
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-08-17 14:44:27 +02:00
60a20acc5b Core controlle rincomplete, but compiles
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-08-17 11:21:35 +02:00
13cc31dca9 working on core controller
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-08-16 18:31:58 +02:00
d8fa3881f6 Merge pull request 'ACS Controller Init' (#275) from mueller/acs-ctrl into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #275
Reviewed-by: Jakob Meier <meierj@irs.uni-stuttgart.de>
2022-08-16 17:34:21 +02:00
3c03471197 update changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-08-16 16:45:14 +02:00
ffed82575c bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-08-16 16:43:30 +02:00
30e7636bc9 add periodic HK subscription 2022-08-16 16:37:54 +02:00
80347a0e23 bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-08-16 12:57:43 +02:00
676b94b139 map dataset to sid
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-08-16 11:56:17 +02:00
ce08695137 bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-08-16 11:44:59 +02:00
b8b6a14e3b some bugfixes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-08-16 11:27:16 +02:00
751ae6062e finished MGM data copying function
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-08-15 11:19:08 +02:00
6821a95095 continued ACS controller impl
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-08-15 10:50:19 +02:00
c99cb4a81e schedule ACS controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-08-15 09:58:18 +02:00
6003c6afb5 Merge remote-tracking branch 'origin/develop' into mueller/acs-ctrl
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-08-12 13:13:57 +02:00
12f38aa58c Merge pull request 'Bump dependencies' (#274) from mueller/bump-deps into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #274
2022-08-12 12:59:14 +02:00
eb623e7d7c this should fix the CI/CD error
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-08-12 12:55:43 +02:00
f8f51c8fd6 include fix
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-08-12 12:35:56 +02:00
a8b1fe2e8d re-run generator scripts
Some checks failed
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-08-12 12:31:13 +02:00
961e012972 bump fsfw and tmtc dependency 2022-08-12 12:30:08 +02:00
77cfc6e714 ACS controller init
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-08-12 12:29:28 +02:00
6551cbe1b4 using correct retval translation files now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-08-09 10:38:47 +02:00
1280b77e95 re-run generators
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-08-08 17:07:55 +02:00
b12cac1e80 install obsw into variant specfiic folders now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-08-04 12:08:55 +02:00
722d7a67f5 important bugfix for FM SW
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-08-04 01:45:49 +02:00
89c9911be6 fix install script
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-08-02 20:12:25 +02:00
ad88bfa5b4 core controller bigWIP
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-07-28 17:16:24 +02:00
d92b1b170d Boilerplate Code to make ploc and star tracker compile 2022-07-27 23:09:05 +02:00
24297a6a97 WIP adapting PlocMpSoCHandler
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
major PITA, but does compile now, will be back with more patience
2022-07-27 22:03:41 +02:00
c8f4f0b03e GPSHyperionController adapted 2022-07-27 22:02:37 +02:00
eeaef13916 PdecHandler adapted 2022-07-26 21:23:41 +02:00
a2910a401e adapted SolarArrayDeploymentHandler 2022-07-26 17:18:35 +02:00
cd1200d23d introspection fsfw, HeaterHandler adapted 2022-07-26 17:18:04 +02:00
9911f58424 Merge pull request 'update-develop' (#273) from update-develop into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #273
Reviewed-by: Jakob Meier <meierj@irs.uni-stuttgart.de>
2022-07-15 08:55:46 +02:00
5b3927d988 bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-07-14 17:27:41 +02:00
035eda9cfd update develop 2022-07-14 15:46:22 +02:00
269c93a9f3 Merge branch 'main' into develop
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-07-05 11:24:52 +02:00
2e966aba77 repoint tmtc
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-07-05 11:19:42 +02:00
76a217ffc2 bump changelog and version
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-07-05 02:14:32 +02:00
be7a9af8cd disable TCS ctrl spam 2022-07-05 02:13:07 +02:00
75e71f7dca Merge pull request 'v1.12.0' (#269) from develop into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #269
2022-07-04 11:19:04 +02:00
62f725beea bump changelog and version
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-07-04 11:13:26 +02:00
812c814a30 bump tmtc
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2022-07-04 11:08:05 +02:00
e092d9bf3d Merge pull request 'CCSDS Handler Improvements' (#268) from meier/ccsds into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #268
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-06-29 13:53:29 +02:00
bf8ffac624 removed unused event
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-06-27 15:03:37 +02:00
d78155fd79 remove ccsds components from em object factory
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-06-27 14:56:46 +02:00
3a93cdc105 add thermal controller for hosted build
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-06-27 13:53:38 +02:00
a2e7c6cca6 moved ccsds object creation back to core object factory and run auto formatter
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-27 10:58:46 +02:00
b5ff0edbc9 fixed merge conflict
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-27 09:31:39 +02:00
95da2372c9 run generators
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-27 09:15:29 +02:00
70450041e6 removed command action helper form ccsds handler
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-27 08:53:14 +02:00
ed0eb4fe9c adaptions for setup with ccsds testbed
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-23 20:12:56 +02:00
af039c540a moved TmFunnel 2022-06-23 12:05:56 +02:00
d2a12ea71e Merge pull request 'fsfwgen update' (#267) from mueller/gen-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #267
2022-06-21 10:40:15 +02:00
53e556d0b3 improve csv format
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-06-21 01:21:23 +02:00
72ab141b41 use lib logger
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-06-21 01:02:00 +02:00
c6b00e2448 update deps and gen files
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-06-21 00:58:59 +02:00
d4a1cb9f62 fsfwgen update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-06-20 18:05:05 +02:00
83c93a9637 Merge pull request 'Thermal controller and temperature bugfixes' (#266) from meier/thermal-bugfixes into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #266
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-06-20 09:43:03 +02:00
89757c447c run auto-formatter
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-06-17 08:31:36 +02:00
61aa57f021 Merge branch 'develop' into meier/thermal-bugfixes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-06-16 09:00:56 +02:00
0ee912665e removed mock files from mission directory
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-06-16 08:47:56 +02:00
b53bfb9a6f dummy devices
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-06-16 08:26:40 +02:00
bd11d13b99 dummy devices for hosted build, adaptions to run thermal controller unit test 2022-06-16 07:00:09 +02:00
1133736d48 Merge pull request 'Fixed tmtc and fsfw submodule' (#265) from meier/submodules into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #265
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-06-15 11:02:48 +02:00
9918c7c255 tmtc update
Some checks are pending
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop Build started...
2022-06-15 10:49:46 +02:00
b0a175610a fsfw update 2022-06-15 10:49:22 +02:00
d96d3b155b syrlinks carrier wave command
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-15 10:37:00 +02:00
eff80a58ee improvements for hosted build
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-13 08:58:06 +02:00
5f796ec1e3 init poll variable
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-10 14:22:35 +02:00
3825304088 rtd set id
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-10 14:13:59 +02:00
66d6b6d707 changed max13865 namespace
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-10 14:01:34 +02:00
a787de531b changed namespace
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-10 13:56:35 +02:00
772ab430e0 only include core definitions in thermal controller
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-10 12:18:23 +02:00
35ea8a50f4 update tmtc submodule
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-10 11:26:00 +02:00
63c669bc27 fixed type of imtq self test temperatures
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-10 11:06:05 +02:00
17d17dce06 bugfix for some negative temperature conversions
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-10 10:39:43 +02:00
1ebae7f938 fixes for te0720 build 2022-06-08 07:16:12 +02:00
8c850614e5 fixed merge conflicts 2022-06-05 10:54:46 +02:00
b8cf825307 rerun generators 2022-06-05 09:13:08 +02:00
f2d5932883 fixes in build config 2022-06-05 09:12:56 +02:00
917090e39d Merge branch 'meier/thermal-controller-fix' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into meier/thermal-controller-fix 2022-06-04 09:42:59 +02:00
67037e2dae use memset to set invalid temperatures of cau 2022-06-04 09:31:34 +02:00
f72dfa255d submodule update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-03 18:05:54 +02:00
b3bb76c75f bugfixes in hk handling
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-03 18:03:25 +02:00
6c32ddf864 changed gomspace temperatures to float
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-03 09:33:08 +02:00
b1c20b22c8 set temeprature to invalid value when invalid flag is set by owner 2022-06-03 07:51:04 +02:00
678b22438f tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-02 18:52:09 +02:00
f47712552e hk set fixes 2022-06-02 18:46:08 +02:00
cbb8832fab tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-01 18:47:52 +02:00
b66dcc0a86 local port forward script 2022-06-01 18:46:53 +02:00
04b7c82501 type fixes in device temperatures sets
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-01 18:46:22 +02:00
5051af82c2 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-01 15:52:51 +02:00
ba7ac6bab2 variable for number of sus entries 2022-06-01 13:08:34 +02:00
52d94f44d4 device temeprature set
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-06-01 10:48:18 +02:00
87783b01f5 device temperature set wip
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-31 16:46:07 +02:00
593cc68b84 rtd dataset
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-31 16:44:57 +02:00
0e6d2354fc thermal set fix
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-30 14:32:50 +02:00
23cabe4ca6 Merge branch 'develop' into mohr/thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-30 12:10:19 +02:00
3d1e104fa4 Merge pull request 'Adaptions for EM' (#264) from meier/q7s-em into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #264
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-05-28 12:21:49 +02:00
8106722a08 replaced EM preprocessor define
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-27 16:24:41 +02:00
9e93f1c814 adaptions for EM
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-27 13:44:40 +02:00
1f1e1e8eae Merge pull request 'Bugfix SdCardManager' (#263) from meier/SdCardManager into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #263
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-05-26 12:15:32 +02:00
6f9d3c2f63 Merge branch 'develop' into meier/SdCardManager
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2022-05-26 12:15:14 +02:00
25070d9543 Merge pull request 'MPSoC Status Codes' (#262) from meier/ploc into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #262
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-05-26 12:14:19 +02:00
bbdfc0427a Merge branch 'develop' into meier/ploc
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build started...
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/-/pipeline/head Build queued...
2022-05-26 12:14:01 +02:00
97db44e500 fix raspberry pi build
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-26 11:46:28 +02:00
c588ec4a1a bugfix SdCardManager
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-26 01:56:19 +02:00
09a6707c6c run generator scripts
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-25 18:42:40 +02:00
ee9a13f59b Merge branch 'develop' into meier/ploc 2022-05-25 18:40:39 +02:00
e9ccb2fd4f status code parsing, fix in cam command 2022-05-25 18:38:54 +02:00
e5459bb1f7 re-run generators
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-25 18:15:44 +02:00
335d3ba3b0 bump submodules
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-25 15:45:11 +02:00
f50682b56a Merge pull request 'Split ACU HK' (#256) from mueller/split-acu-hk into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #256
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-25 15:23:19 +02:00
ad679a810e Merge pull request 'add and schedule PUS11' (#259) from mueller/add-schedule-pus-11 into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #259
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-25 15:21:25 +02:00
686ec4bffa Merge pull request 'GPS Reset Pin Handling Update' (#261) from mueller/gps-reset-pin-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #261
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-25 15:20:12 +02:00
ae434853aa bump number stored packets
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-25 13:14:36 +02:00
bb1e1d80cc resolve merge conflict
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-25 11:00:18 +02:00
01bac87afb update reset pin handling
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2022-05-25 10:59:20 +02:00
ffdd6bbc3c Merge branch 'develop' into mueller/add-schedule-pus-11
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-25 10:27:36 +02:00
d870f5ab10 Merge pull request 'Core Controller Remount SD Handling' (#253) from mueller/core-controller-remount-sd-handling into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #253
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-25 10:27:10 +02:00
0b3fd65c9a Merge remote-tracking branch 'origin/develop' into mueller/add-schedule-pus-11
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-25 10:16:31 +02:00
0ac38e8490 Merge remote-tracking branch 'origin/develop' into mueller/split-acu-hk
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-25 10:16:14 +02:00
d79177e544 Merge remote-tracking branch 'origin/develop' into mueller/core-controller-remount-sd-handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-25 10:15:48 +02:00
addcb2b21f Merge pull request 'IMTQ improvements' (#260) from meier/imtq into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #260
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-05-25 10:15:13 +02:00
7646b683b2 Merge remote-tracking branch 'origin/develop' into mueller/split-acu-hk
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-25 09:59:14 +02:00
3eca96fef5 Merge remote-tracking branch 'origin/develop' into mueller/core-controller-remount-sd-handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-25 09:58:06 +02:00
43fc1ab780 Merge remote-tracking branch 'origin/develop' into mueller/add-schedule-pus-11
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-25 09:57:34 +02:00
2bf044422f Merge remote-tracking branch 'origin/develop' into meier/imtq
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-25 09:56:41 +02:00
7f180ebc45 Merge pull request 'Reboot Command' (#242) from mueller/reboot-cmd into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #242
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-24 19:11:07 +02:00
1ccd12e2e1 enable hk in imtq
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-24 19:08:00 +02:00
b878508fec Thermal COntroller collecting Sus Temperatures
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-24 16:52:21 +02:00
88faf8f87d bump fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-24 16:23:00 +02:00
c0da8aef2e delete obsolete folder
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-24 15:50:39 +02:00
59d0d880bb bump fsfw
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-24 15:45:12 +02:00
3eb8525419 update changelog
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-24 15:22:45 +02:00
3fff3ba21e add and schedule PUS11
Some checks failed
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-24 15:21:37 +02:00
3e9b337e31 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-24 01:14:47 +02:00
633fe00cd6 run afmt, minor improvements
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-24 01:14:04 +02:00
23d7b8f2fb repoint tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-24 00:55:17 +02:00
d088d728b1 Merge branch 'mueller/reboot-cmd' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into mueller/reboot-cmd 2022-05-24 00:54:55 +02:00
237dd00216 Merge branch 'develop' into mueller/reboot-cmd
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-24 00:54:49 +02:00
f7075a1397 Merge remote-tracking branch 'origin/develop' into mueller/reboot-cmd 2022-05-24 00:54:39 +02:00
2ebdb5c797 tweak sd card check countdown
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-24 00:53:29 +02:00
1519b13b78 appears to work now
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-24 00:52:08 +02:00
b2c286cd7e improve and optimize SD card handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-24 00:20:23 +02:00
a1d2ec3db4 Merge remote-tracking branch 'origin/develop' into mueller/split-acu-hk
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 22:24:28 +02:00
b66a91da2e Merge branch 'develop' into mueller/core-controller-remount-sd-handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 21:32:27 +02:00
72305cc4c2 Merge pull request 'rtd bugfixes' (#258) from mueller/rtd-bugfixes into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #258
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-23 19:36:13 +02:00
f111001572 bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 18:59:31 +02:00
5df905182c these brackets are less confusing
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 18:40:17 +02:00
2f155d8350 bump changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 18:39:13 +02:00
e9908139e7 Merge branch 'develop' into mueller/core-controller-remount-sd-handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 18:37:50 +02:00
43269d4add Merge branch 'develop' into mueller/rtd-bugfixes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-23 18:37:40 +02:00
40b02aa46b Merge remote-tracking branch 'origin/develop' into mueller/split-acu-hk
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 18:37:28 +02:00
7d9ef6f887 run afmt
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-23 18:37:04 +02:00
a2fad6061a repoint tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 18:36:38 +02:00
62ef9c7e70 set datapool entries of rad sensor valid
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 18:25:39 +02:00
1f62d8284c Merge remote-tracking branch 'origin/develop' into mueller/split-acu-hk
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 18:01:37 +02:00
a4de3e9eb1 Merge remote-tracking branch 'origin/develop' into mueller/rtd-bugfixes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 18:00:45 +02:00
cc008623b6 Merge pull request 'PLOC handler improvements' (#257) from meier/ploc into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #257
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-05-23 17:53:55 +02:00
10e075efaf update changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 17:52:44 +02:00
8aa664b49f rtd bugfixes
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 17:50:54 +02:00
f18507d278 boot image select memory default argument
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-23 17:05:06 +02:00
e365b36ecd tmtc update 2022-05-23 17:04:03 +02:00
990759fbc6 commented in core controller file write
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-23 16:54:18 +02:00
d808a12c31 fixed conflicts
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-23 16:53:20 +02:00
379c5f06ba supervisor command to continue interrupted mpsoc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-23 16:43:46 +02:00
a2eabdce01 Merge pull request 'RTD Update' (#251) from mueller/rtds-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #251
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-23 16:20:37 +02:00
01ca80fa30 bump submodules
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-23 16:12:03 +02:00
660f0d2dcd some minor fixes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 14:19:57 +02:00
e522aadd44 set HKs valid
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 14:04:46 +02:00
8ae6fe0be5 moved HK defs
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 12:39:10 +02:00
fb5c6c4c17 continuation of failed mpsoc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-23 12:05:42 +02:00
4e62f3b112 bugfixes for cp script
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 11:35:55 +02:00
99e27a5a63 run afmt
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 11:25:58 +02:00
3bdad61ac0 split ACU HK set
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-23 10:42:57 +02:00
d960c371b9 bump submodules
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-23 09:37:16 +02:00
c024756540 WIP extending thermal controller
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-23 00:37:49 +02:00
dc6fa57c03 Merge branch 'develop' into mueller/core-controller-remount-sd-handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-20 08:20:13 +02:00
49a06772d2 Merge remote-tracking branch 'origin/develop' into mueller/rtds-update
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-20 08:18:57 +02:00
0119f3f8a6 Merge remote-tracking branch 'origin/develop' into mohr/thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-19 23:15:39 +02:00
93cb07238a fixing task initialization (produced warnings) 2022-05-19 23:13:29 +02:00
2f8f5ce79b thermal controller is reading pt1000 values from datapool 2022-05-19 23:08:54 +02:00
4a0aa6443b dummy faking the PT1000 Temperature Sensors for host build 2022-05-19 23:06:56 +02:00
e9725e3093 gcc 12 complained... 2022-05-19 23:06:18 +02:00
79d3755c16 Merge pull request 'fixed for new SPI HAL API' (#255) from mueller/fixes-for-spi-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #255
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-19 19:09:54 +02:00
a63e87f5f4 subscribe for periodic core ctrl packet
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-19 18:46:49 +02:00
eb20dda221 small fix for yocto script
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-19 17:52:46 +02:00
ef14fa3789 Merge remote-tracking branch 'origin/mueller/fixes-for-spi-update' into mohr/thermal_controller 2022-05-19 16:29:30 +02:00
e73bfc2c64 dev string for FM/EM
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-19 16:00:26 +02:00
Uli
710bd58ee1 Merge branch 'develop' into mohr/thermal_controller 2022-05-19 15:31:13 +02:00
d274f5647d fix EM cofig
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-19 15:28:02 +02:00
377f762ca5 fixed for new SPI HAL API
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-19 14:54:44 +02:00
847aadc7bf update shell script helper to support EM installation
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-19 14:48:16 +02:00
90a92feee1 some thermal controller code to test TM chain
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-19 00:40:42 +02:00
e49a1af9b7 bump fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-18 14:51:33 +02:00
cf49d98524 bump fsfw
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-17 18:15:21 +02:00
28a4f782f9 Merge remote-tracking branch 'origin/develop' into mueller/rtds-update
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-17 17:55:25 +02:00
8eaae461b4 Merge pull request 'apply new auto-formatter on all files' (#254) from mueller/update-aformatters into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #254
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-17 14:53:20 +02:00
140bbcb7b8 Merge remote-tracking branch 'origin/develop' into mueller/rtds-update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-17 13:43:21 +02:00
d4dd75acae Merge remote-tracking branch 'origin/develop' into mueller/core-controller-remount-sd-handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-17 13:42:08 +02:00
8a5090b8ee apply new auto-formatter on all files
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-17 13:40:19 +02:00
e2cfce634b GenericFactory bugfix
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-17 13:35:21 +02:00
8b875e13c5 repoint fsfw
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-16 15:46:20 +02:00
7080758c67 Merge remote-tracking branch 'origin/develop' into mueller/core-controller-remount-sd-handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-16 15:18:55 +02:00
a26b1bb311 Merge remote-tracking branch 'origin/develop' into mueller/rtds-update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-16 15:17:29 +02:00
5f165f666b Merge pull request 'PLOC Handler Improvements' (#252) from meier/ploc into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #252
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-05-16 15:12:28 +02:00
a6abeb697f comment
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-16 15:09:02 +02:00
a92024a858 now supports auto mode as well
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-14 17:32:33 +02:00
036024db7e perm loop not necessary anymore
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-14 17:22:57 +02:00
e040f6b218 bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-14 17:12:29 +02:00
f20fcd9a72 Merge remote-tracking branch 'origin/develop' into mueller/rtds-update 2022-05-14 17:07:27 +02:00
017cfb9d56 a lot of fixes, but some stuff doesnt work..
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-14 17:04:51 +02:00
2cfd2cc1fc switch to new dev handlers completely
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-14 15:26:08 +02:00
478975db26 spi setup more stable now
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-14 11:34:25 +02:00
1c9f411e75 new RTD handler working
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-14 09:41:28 +02:00
d60e7a706a fixed conflicts
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 18:44:52 +02:00
45f34df6b9 Merge branch 'develop' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into develop 2022-05-13 18:38:26 +02:00
4cbe732087 Merge pull request 'Heater Health IF' (#236) from mueller/heater-health-if into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #236
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-13 18:38:12 +02:00
54d7392467 improved mpsoc update handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 18:37:16 +02:00
8715683d6b enable periodic reply for eie RTD
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 17:25:06 +02:00
2c684643b3 some smaller fixed for new rtd handler
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 16:29:57 +02:00
b12a634b81 typo
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 15:16:48 +02:00
3ae1812c32 some renaming
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 15:16:10 +02:00
80eeebfaf5 Merge remote-tracking branch 'origin/develop' into mueller/core-controller-remount-sd-handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 11:21:06 +02:00
e6ec6bcfa4 Merge remote-tracking branch 'origin/develop' into mueller/reboot-cmd
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 11:15:09 +02:00
bb397a58de event with packet number for which mpsoc update failed
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 10:47:10 +02:00
44e7f06c2e shorter debug string
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 10:33:35 +02:00
f3b473ea99 some more rtd tweaks
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 10:27:26 +02:00
706e3d458b switch to direct handler again
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 10:13:16 +02:00
d999f57fef apply afmt
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 10:10:56 +02:00
6b54a4dea9 cleaning up, better fault status handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 10:10:02 +02:00
fd0de9426f Merge remote-tracking branch 'origin/develop' into mueller/rtds-update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 09:51:22 +02:00
bf7acf83ff update .cproject file
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-13 09:51:11 +02:00
23f37e19af bump fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-13 09:39:49 +02:00
b5821ec6dc changelog update
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-13 09:35:47 +02:00
be1c26ddf7 rtd testing
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-13 01:17:23 +02:00
da4d3e4891 update changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-12 20:47:19 +02:00
ac34bcbb3d Merge remote-tracking branch 'origin/develop' into mueller/heater-health-if
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-12 20:46:00 +02:00
e81ddaa1a5 added auto-shutdown for faulty heaters 2022-05-12 20:44:36 +02:00
21ba8c95ff additional parameter to identify cmd source
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-12 20:12:01 +02:00
e25c492aa4 create and schedule health PUS service
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-12 19:22:20 +02:00
82f75bde97 fix for heater creation call 2022-05-12 19:12:12 +02:00
919141ae10 ccsds handler sending command to enable transmitter 2022-05-12 18:32:19 +02:00
e48aa64766 repoint fsfw
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-12 17:48:18 +02:00
3c3884476b Merge branch 'develop' into meier/ccsds 2022-05-12 15:57:26 +02:00
569754bdad Merge branch 'develop' into meier/ploc
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-12 15:48:56 +02:00
5fe814e972 Merge remote-tracking branch 'origin/develop' into mueller/rtds-update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-12 15:48:26 +02:00
06219744ea Merge branch 'meier/ploc' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into meier/ploc
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-12 15:47:16 +02:00
9db58210b8 Merge branch 'develop' into meier/ploc 2022-05-12 15:47:06 +02:00
ee99c3312e Merge pull request 'Update EIVE OBSW' (#250) from mueller/update-eive-obsw into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #250
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-12 15:34:07 +02:00
3a6beafae5 commented time file writing in again
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-12 15:31:52 +02:00
d7316eff66 remove merge conflict markers
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-12 14:23:10 +02:00
51466e68d7 Merge remote-tracking branch 'origin/develop' into mueller/heater-health-if
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-12 14:11:46 +02:00
e6f55ba2c1 increased execution timeout of prepare update command
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-12 14:04:55 +02:00
c1faf65409 schedule new rtd reader component
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-12 12:35:05 +02:00
382d93863f create and pass correct comIF
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-12 12:21:47 +02:00
a173ef4308 create low level rtd handler in obj factory
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-12 12:12:47 +02:00
6b9e49e632 continued low level MAX31865 handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-12 11:27:30 +02:00
0dd0af73a1 change in mpsoc status codes 2022-05-12 10:50:12 +02:00
23f209fb07 added eive specific max31865 handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-12 09:48:41 +02:00
e5710784b9 Merge branch 'develop' into meier/ccsds 2022-05-12 07:47:28 +02:00
56f491befb compile fix
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-12 00:48:49 +02:00
93f605bc0a Merge remote-tracking branch 'origin/develop' into mueller/rtds-update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-12 00:45:57 +02:00
d1d365c76d bump tmtc again
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-11 18:00:11 +02:00
38d03dbe57 bump deps, regenerate translation files
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2022-05-11 17:59:08 +02:00
af52b90abe fsfwgen update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-11 17:16:40 +02:00
a315a8b529 fixed conflicts
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-11 17:08:44 +02:00
5f96d157a7 repoint fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-11 17:04:31 +02:00
c1992f59d6 Merge remote-tracking branch 'origin/develop' into mueller/reboot-cmd 2022-05-11 17:04:19 +02:00
658acb0554 Merge pull request 'RW Assembly' (#224) from mueller/rw-ass into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #224
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-11 17:03:32 +02:00
5a82fe93d9 core ctrl remount sd handling
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-11 17:02:57 +02:00
8a90f0025b commented in time file write
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-11 17:01:03 +02:00
beba258a77 update fsfw
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-11 16:57:23 +02:00
c7e2cc22af init sequence count 2022-05-11 16:49:07 +02:00
835a10e538 sequence count init
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-11 16:11:17 +02:00
1d1f04f57b Merge branch 'develop' into mueller/reboot-cmd
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-11 15:48:34 +02:00
625abcfd5b important bugfixes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-11 15:45:38 +02:00
914acd9925 fixed conflicts
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-11 14:37:36 +02:00
c7e4704234 fixed merge conflict 2022-05-11 14:36:23 +02:00
c5bccb661e Merge remote-tracking branch 'origin/develop' into mueller/rw-ass
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-11 13:54:04 +02:00
37002b47b3 sequence count init value
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-11 12:46:04 +02:00
c043375ae3 RW Refactoring
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
- FSFW update: SPI device is part of ComIF now
- Only set RW mode (speed is set a side effect but not necessary) once
- Release SPI bus in the 70 ms delay duration
2022-05-11 11:13:00 +02:00
62c885e1de re-point tmtc
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-11 10:17:49 +02:00
cf98d446f9 Merge branch 'develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-11 10:11:55 +02:00
96710159b8 added missing eclipse instructions
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-11 10:09:58 +02:00
17802aaa55 fix images in README
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-11 10:07:19 +02:00
f5b1427c38 fix images in README
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-11 10:06:56 +02:00
543ec5dfff Merge remote-tracking branch 'origin/develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-11 10:05:23 +02:00
3924430ea7 update .cproject file again
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-11 10:04:25 +02:00
4120befef0 update changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-11 01:50:49 +02:00
91b69eacf6 A lot of stuff
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
- refactored and simplified RW assemblies
- create separate SPI Com IF for RWs
- Update .cproject file: Fixed to decrease indexer parsing times
2022-05-11 01:48:26 +02:00
df7e0007d0 schedule RW ASS
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-11 01:02:29 +02:00
95fd3238e7 another .cproject update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-11 01:00:21 +02:00
8ccd55dd06 update .cproject file
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-11 00:58:19 +02:00
7e87bd713d Merge remote-tracking branch 'origin/develop' into mueller/rw-ass 2022-05-11 00:54:37 +02:00
4e78ee85c8 continued rw ass creation 2022-05-11 00:54:29 +02:00
cb8f0e61be Merge pull request 'Init ACS Test files' (#249) from mueller/acs-test-init into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #249
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-11 00:54:00 +02:00
1904cc168d catch exceptions
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-11 00:42:32 +02:00
924f114fb3 sth crashes CI..
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-11 00:36:31 +02:00
604dbea372 Merge remote-tracking branch 'origin/develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-11 00:28:57 +02:00
ca640ea18f hmm
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-11 00:24:58 +02:00
491736335b Merge remote-tracking branch 'origin/develop' into mueller/acs-test-init
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-11 00:19:40 +02:00
de0872072f Merge pull request 'Add yocto helper scripts' (#248) from mueller/yocto-helper-scripts into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #248
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-10 18:45:54 +02:00
db7dcc7e32 start creating rw ass in obj factory
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-10 18:39:23 +02:00
75d19790b8 another .cproject file update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-10 18:36:00 +02:00
1893e87f5f update .cproject file again
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-10 18:35:44 +02:00
b021590103 update .cproject file
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-10 18:35:03 +02:00
45c1ac0f61 update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-10 18:34:39 +02:00
0bd20ac9fd init acs test files
Some checks failed
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-10 17:49:10 +02:00
9d63eb837a added void cast
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-10 17:02:40 +02:00
49d21fef2a Merge branch 'develop' into meier/ccsds 2022-05-10 07:49:05 +02:00
907b8f4a5d ccsds config for te0720-1cfa 2022-05-10 07:48:36 +02:00
50c363fb6f new RTD reader module handling all RTD SPI Communication
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-09 21:29:54 +02:00
4864394590 renamed heaters
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-09 16:13:33 +02:00
71d9553f90 Merge remote-tracking branch 'origin/develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-08 13:11:56 +02:00
646925c571 removed redundant SUS OBJ ID defs
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-08 13:08:49 +02:00
d9085e81a1 Merge remote-tracking branch 'origin/develop' into mueller/heater-health-if
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-08 13:06:47 +02:00
54a36ac275 added back deleted part
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-08 12:57:24 +02:00
e59026d87c update README
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-08 12:55:17 +02:00
7de968937e repoint tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-08 12:33:49 +02:00
a66632c040 Merge remote-tracking branch 'origin/develop' into mueller/yocto-helper-scripts 2022-05-08 12:33:17 +02:00
9f9fa9b41b Merge pull request 'PLOC Handler Update' (#234) from meier/plocSupv into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #234
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-05-08 12:32:47 +02:00
421237bfb7 fixed ploc supervisor build error which was hidden by prerocessor define
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-08 12:01:35 +02:00
37e81d34c9 Merge branch 'develop' into mueller/heater-health-if
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-07 22:50:13 +02:00
1fea619ac0 Merge remote-tracking branch 'origin/develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-07 22:44:23 +02:00
2bc2325b1f removed unused includes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-07 13:59:53 +02:00
d9024b6c22 adaption in DummyGpioIF due to API change in GpioIF 2022-05-07 13:50:36 +02:00
f8addd9365 preprocessor define fixes 2022-05-07 13:38:09 +02:00
2ff8923c81 fixed reorder warning in imtq handler 2022-05-07 13:19:59 +02:00
a4e36ebdb6 update changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-07 12:55:48 +02:00
9884ea225e update CHANGELOG
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-07 12:54:25 +02:00
3cca73ae9f update other helper scripts as well
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-07 12:51:47 +02:00
631bc61d6c changed set ids
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-07 12:01:05 +02:00
43b0ed4b04 preprocessor define adjustments
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-06 20:33:46 +02:00
d9c7cccf76 run clang format script
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-06 19:53:33 +02:00
322db3d617 removed ploc updater 2022-05-06 19:52:43 +02:00
6dd57a3f5e fixed merge conflicts
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-06 19:44:18 +02:00
4ba26f057d Merge branch 'meier/ploc' into meier/plocSupv
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-06 19:36:03 +02:00
97222cafd9 increased mram dump execution timeout
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-06 19:34:12 +02:00
cbb3c92885 tmtc update 2022-05-06 19:31:09 +02:00
132751893b bugfix in missed reply hanling of supervsior MRAM dump 2022-05-06 19:30:20 +02:00
a5a79da723 install non-stripped files now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-06 16:47:09 +02:00
7ab0a3683c this works better
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-06 16:46:22 +02:00
08dc8630d6 create generic OBSW by default and copy to unique
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-06 16:43:12 +02:00
cc25489e75 important bugfix
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-06 15:54:45 +02:00
e4bbdbc532 copy version file as well
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-06 15:53:16 +02:00
2f182a5e21 docs
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-06 15:41:29 +02:00
bacce95881 corrections for install script
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-06 15:38:50 +02:00
9383a6088b build script bugfixes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-06 15:33:05 +02:00
338cb9d502 Merge remote-tracking branch 'origin/develop' into mueller/yocto-helper-scripts
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-06 15:29:25 +02:00
fe4315666b added helper script for yocto installation
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
- Installs compiled binaries into yocto repo for rootfs rebuild
2022-05-06 15:27:56 +02:00
576f71304c updated eclipse launch files
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-06 10:45:53 +02:00
385d8df466 fix .cproject file
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-06 10:43:04 +02:00
bfd7d9d82d bump fsfw (hotfix)
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-06 10:37:54 +02:00
e6cbe3068d Merge branch 'develop' into mueller/heater-health-if
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-06 10:12:23 +02:00
99a8cd0f2d Merge branch 'develop' into mueller/reboot-cmd
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-06 10:11:58 +02:00
1c2f80f48e Merge branch 'develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-06 10:11:32 +02:00
9918aae94a Merge pull request 'install Catch2 for CI/CD' (#247) from mueller/install-catch2-docker into develop
Reviewed-on: #247
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-05-06 10:00:12 +02:00
22060b9b16 Merge remote-tracking branch 'origin/develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-06 01:12:07 +02:00
68938c3b42 remove duplicate object ID
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-05 20:27:20 +02:00
a11a8c493d Merge remote-tracking branch 'origin/develop' into mueller/heater-health-if
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-05 19:53:18 +02:00
5c7c5b468a tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-05 19:21:42 +02:00
fabd81365b supervisor do startup set time 2022-05-05 19:20:14 +02:00
5911ca79b5 nvm enable command 2022-05-05 19:18:39 +02:00
cf4edac604 maybe this fixes the timing issue?
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-05 16:32:09 +02:00
c1dc5846cd bump submodules
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-05 16:24:23 +02:00
4c809e354d better heater obj id names
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-05 16:23:46 +02:00
1f6aab8124 apply afmt, some more renaming
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-05 13:40:43 +02:00
590fe6ca39 Some RW improvements
- Moved Events to definitions file
- Added new event if reset occurs
- Deliver state if there is an error (going to be 0, still deliver it)
2022-05-05 12:48:56 +02:00
9bd5595999 no time command sent during startup of supervisor 2022-05-05 10:50:23 +02:00
e5fdf23dd7 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-05-05 09:15:05 +02:00
8832d06d03 improvements for mram dump
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-05 08:55:45 +02:00
28c9e33d1c separate PST for RWs 2022-05-05 02:00:56 +02:00
95a634ea7f update .cproject file 2022-05-05 01:33:18 +02:00
3a0cf0cb38 Merge branch 'develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-05 00:51:30 +02:00
e4ebd87875 Merge branch 'develop' into mueller/reboot-cmd
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-05 00:51:11 +02:00
bcb6df87b0 update tmtc, gen files and formatting in config file
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-05 00:47:50 +02:00
5441520369 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-04 19:11:01 +02:00
8aacbc2b40 cam cmd reply handling 2022-05-04 19:08:37 +02:00
79d48d9630 Merge remote-tracking branch 'origin/develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-04 17:25:11 +02:00
9c888e75bc bump tmtc again
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-04 17:23:56 +02:00
0d15694fc3 Merge remote-tracking branch 'origin/develop' into mueller/heater-health-if 2022-05-04 17:23:34 +02:00
be7cab6032 Merge remote-tracking branch 'origin/develop' into mueller/reboot-cmd
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-04 17:22:19 +02:00
d108f7bbda Merge remote-tracking branch 'origin/develop' into mueller/reboot-cmd
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-04 16:54:39 +02:00
3458c272ad Merge remote-tracking branch 'origin/develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-04 16:47:49 +02:00
73e4b0cc81 bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-04 16:38:02 +02:00
4311c5b6a7 Merge remote-tracking branch 'origin/develop' into mueller/heater-health-if 2022-05-04 16:37:53 +02:00
d59e71b056 Merge remote-tracking branch 'origin/develop' into mueller/heater-health-if 2022-05-04 16:37:47 +02:00
a3e33bb627 Merge remote-tracking branch 'origin/develop' into mueller/heater-health-if
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-04 14:37:36 +02:00
92f95b2b97 comment out debug printout
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-04 13:25:42 +02:00
475f6f1687 removed unused ploc commands, fix in logging report reply 2022-05-04 12:49:43 +02:00
d0e18f8b35 add mutex protections for switcher states 2022-05-04 11:11:29 +02:00
86dd67bf06 bump fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-04 10:36:45 +02:00
50ca378318 update for updated gpio API
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-04 10:34:11 +02:00
5f5c996cfd bump tmtc IF
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-04 09:26:11 +02:00
1536a0f94b named heaters
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-03 18:17:10 +02:00
d79323c6ca small fix for generic factory header
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-03 17:45:39 +02:00
ae0120f3ef Merge branch 'mueller/refactoring-conf-handling' into mueller/heater-health-if
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-03 17:44:02 +02:00
8f9e8fe3fb ignore new build folder name
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-03 17:39:02 +02:00
bc28ae4d1f bump submodules 2022-05-03 17:38:37 +02:00
2470039dfb Merge remote-tracking branch 'origin/develop' into mueller/heater-health-if 2022-05-03 17:38:10 +02:00
06df558be0 Merge remote-tracking branch 'origin/develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-03 16:01:09 +02:00
88842d4f07 Merge remote-tracking branch 'origin/develop' into mueller/heater-health-if
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-03 15:59:28 +02:00
5380ed216b supervisor do startup fix 2022-05-03 15:36:38 +02:00
70884d3a46 tmtc update 2022-05-03 15:28:11 +02:00
464821cc6f supervisor set time during start up 2022-05-03 14:59:23 +02:00
0172351e89 additional try catch block
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-02 22:58:06 +02:00
1f8a68dabe re-use existing enum
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-02 22:55:39 +02:00
9449919b2b Heaters are own objects with HealthIF now
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-02 22:45:27 +02:00
b98c691c2b added health helper to heater handler
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-02 17:51:00 +02:00
238afbaa8b add health IF to heater handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-02 17:37:00 +02:00
0abb726b30 bump submodules
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-05-02 16:15:43 +02:00
a54d89c90f Merge branch 'develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-02 15:55:41 +02:00
7a6b45b102 removed debug print 2022-05-02 14:43:53 +02:00
d1a9924acc tmtc update 2022-05-02 14:43:17 +02:00
690b41777b bugfix pcdu handler command queue reading 2022-05-02 13:48:34 +02:00
3c858d26f1 tmtc update 2022-05-02 13:47:59 +02:00
eb6b166662 bump fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-02 12:56:42 +02:00
3a52540d0e bump tmtc
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-02 12:53:43 +02:00
bab8412f10 Merge remote-tracking branch 'origin/develop' into mueller/rw-ass
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-05-02 12:41:45 +02:00
9e2eca3e36 re-generate event list
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-05-02 12:41:20 +02:00
49b0825f63 added doSendReadHook to prevent com if polling when com if is used by helper task 2022-05-02 09:56:15 +02:00
be752997eb fixed merge conflicts
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-04-30 19:12:21 +02:00
3ff709a814 removed changes can rx task
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-30 16:52:22 +02:00
03b7b802c5 removed ptme test data sending
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-30 16:33:34 +02:00
20138d52b1 decreased stack size of supervisor helper task
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-30 16:23:51 +02:00
6d322c6e78 run clang format script
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-30 16:21:59 +02:00
016ca8cb7e decreased acs handler task stack size
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-30 16:20:33 +02:00
729b8f547c time file writing commended in again
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-30 16:19:00 +02:00
6636f42dc2 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-30 15:34:28 +02:00
cf4305be55 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-30 11:10:56 +02:00
e1ffa97232 improved acknowledgment and execution handling in supervisor handler 2022-04-30 11:08:36 +02:00
6524f924c9 run generator scripts 2022-04-30 09:53:42 +02:00
6f53c39485 fix conflict
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-30 09:28:22 +02:00
8ecbeb058c tmtc update 2022-04-30 09:26:55 +02:00
1635e40c79 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-29 23:36:09 +02:00
816dc43214 restructuring execution report handling
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-29 23:34:28 +02:00
7afb8e9070 execution status codes 2022-04-29 23:22:44 +02:00
cedc6bec23 gpio state sent with execution report 2022-04-29 22:55:01 +02:00
cf20d8e94d commented in time file writing again
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-29 18:23:31 +02:00
02f352e51f tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-29 18:22:03 +02:00
9d4cb2ea8d xecution status code parsing 2022-04-29 13:31:58 +02:00
5888d90fbc continued reboot command
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-29 11:16:53 +02:00
fe28588875 repoint tmtc submodule 2022-04-29 10:56:43 +02:00
bf281343c6 fixed conflicts
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-29 09:04:49 +02:00
73c653d21d execution status code wip 2022-04-29 09:03:13 +02:00
09fc8babc4 fsfw update 2022-04-29 08:35:06 +02:00
f0884c0096 read gpio tm handling 2022-04-29 08:34:23 +02:00
0b64999ce2 added generic GPIO checker
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-04-28 18:38:38 +02:00
7c770b5aec fixed conflicts
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-28 18:33:27 +02:00
794ed04761 prevent sending boot command when mpsoc booted via jtag 2022-04-28 18:30:40 +02:00
73fbdfeb25 remove etl::pair usage
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-04-28 18:27:40 +02:00
31fa2f0d8d include fix 2022-04-28 18:27:13 +02:00
1527b60fd6 Merge remote-tracking branch 'origin/develop' into mueller/rw-ass
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-04-28 18:26:34 +02:00
e18661bb59 update fsfw
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-28 14:30:35 +02:00
582d2db05f fixed conflicts 2022-04-28 14:29:23 +02:00
4f72fb355c update fsfwgen
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-04-28 13:08:44 +02:00
ca1365df5b Merge remote-tracking branch 'origin/develop' into mueller/rw-ass 2022-04-28 13:08:34 +02:00
898753f6e3 supervisor reset pl command 2022-04-28 11:27:28 +02:00
7682a1d214 fixed conflicts 2022-04-27 16:56:16 +02:00
7543a92dd9 added test code 2022-04-27 16:44:03 +02:00
20a2aa73ae tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-27 16:09:07 +02:00
8610e48b19 countdown based timeout 2022-04-27 16:08:17 +02:00
42194abb4a commented in read function again 2022-04-25 13:36:30 +02:00
3e8429b34b warning print when memory check command fails 2022-04-25 13:36:06 +02:00
311ec7b194 mpsoc shutdown after running update procedure 2022-04-25 11:03:02 +02:00
6876952bbd regenerated events 2022-04-24 12:34:08 +02:00
6bdb13b6a0 submodule update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-04-23 12:37:40 +02:00
9f3a56e5e6 Merge remote-tracking branch 'origin/develop' into mueller/rw-ass 2022-04-23 12:37:25 +02:00
9301206485 fixes identified during tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-22 18:05:03 +02:00
ce41e4c219 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-22 14:21:41 +02:00
4a2ba043cb fixed conflicts 2022-04-22 14:20:17 +02:00
b63c3bb9c3 increased delay cycles of execution report 2022-04-22 14:17:16 +02:00
8b612d9116 include fix 2022-04-22 14:16:40 +02:00
974ff0a13e make RW handler more generic
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-04-22 11:29:51 +02:00
d29dd48d1e update project file: changed default unix sysroot
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-04-22 11:18:10 +02:00
1069762903 update config.h.in file
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-04-22 11:11:04 +02:00
88249cd5be update changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-04-22 11:07:40 +02:00
165a4ef814 continued RW Assembly
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-04-22 10:28:29 +02:00
3fbebd6a9f Merge remote-tracking branch 'origin/develop' into mueller/rw-ass 2022-04-22 10:28:14 +02:00
2ee9b09b27 logging command
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-22 08:55:57 +02:00
a8f5a4054f Merge branch 'develop' into meier/plocSupvUpdate 2022-04-21 17:34:26 +02:00
afc0f37e8a rw assembly
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-21 16:56:46 +02:00
23b2d895bb submodule updates
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-21 16:40:28 +02:00
836a2327f9 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-21 16:31:14 +02:00
cf37d74728 adc report 2022-04-21 16:30:23 +02:00
0bcb332ce9 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-21 14:26:46 +02:00
52c539bc6b fsfw update 2022-04-21 14:26:15 +02:00
4895f940f3 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-19 14:26:21 +02:00
ffd64d0463 improvements in supervisor helper
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-19 13:33:37 +02:00
1ce45acba3 merged develop 2022-04-17 14:52:43 +02:00
7b54855397 supervisor fixes detected during testing 2022-04-16 17:19:32 +02:00
285ec9be6a tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-14 07:53:44 +02:00
10343a0dab supervisor event buffer request 2022-04-14 07:52:21 +02:00
f679461164 tmtc update 2022-04-13 15:31:54 +02:00
bd8cd49117 event buffer request wip 2022-04-13 11:56:37 +02:00
7f51ffc8fb use structs instead of classes 2022-04-12 17:42:41 +02:00
0fba1b6494 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-11 16:53:38 +02:00
05a85ab8a1 implemeted ICD changes 2022-04-11 16:52:50 +02:00
b440fc3df6 ploc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-10 18:46:39 +02:00
dbe4f70d8e Merge branch 'meier/plocSupv' into meier/plocSupvUpdate 2022-04-07 12:26:30 +02:00
c0fd9aee6f update helper wip 2022-04-07 11:00:07 +02:00
df2295b430 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-06 17:53:23 +02:00
d51a73f15b tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-06 17:51:31 +02:00
3f6a534db5 fixes identified during tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-06 17:27:44 +02:00
f058cf5e31 supervisor udpate wip
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-04-06 08:36:34 +02:00
9837a1b62c changes in supervisor commands
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-04-06 07:10:20 +02:00
282 changed files with 13460 additions and 8117 deletions

5
.gitmodules vendored
View File

@ -11,7 +11,7 @@
path = thirdparty/lwgps
url = https://github.com/rmspacefish/lwgps.git
[submodule "generators/fsfwgen"]
path = generators/fsfwgen
path = generators/deps/fsfwgen
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-gen.git
[submodule "thirdparty/arcsec_star_tracker"]
path = thirdparty/arcsec_star_tracker
@ -19,3 +19,6 @@
[submodule "thirdparty/json"]
path = thirdparty/json
url = https://github.com/nlohmann/json.git
[submodule "thirdparty/rapidcsv"]
path = thirdparty/rapidcsv
url = https://github.com/d99kris/rapidcsv.git

View File

@ -10,10 +10,60 @@ list yields a list of all related PRs for each release.
# [unreleased]
# [v1.12.0]
# [v1.13.0]
- Added first version of ACS Controller with gathers MGM data in a set
# [v1.12.1] 05.07.2022
- Disable periodic TCS controller HK generation by default
# [v1.12.0] 04.07.2022
## Added
- Dummy components to run OBSW without relying on external hardware
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/266
- Basic Thermal Controller
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/266
- PUS11 TC scheduler
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/259
- Regular reboot command
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/242
- Commands for individual RTD devices
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/84
- `RwAssembly` added to system components. Assembly works in principle,
issues making 4 consecutives RWs communicate at once..
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/224
- Adds a yocto helper script which is able to install the release build binaries
(OBSW and Watchdog) into the `q7s-yocto` repository as long as the `q7s-package`
or `q7s-yocto` repo was cloned in the same directory the EIVE OBSW repo.
This makes updating the root filesystem a lot easier. It also creates and installs a
version file.
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/248
- Create the generic image by default for the Q7S build. The unique binary with the
username appended at the end is created as a side-product now
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/248
## Fixed
- `q7s-cp.py` bugfix
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/256
- Generator scripts output now produce platform-independent artifacts
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/267
### Heater
- Adds `HealthIF` to heaters. Heaters are own system object with queues now which allows to set them faulty.
- SW will attempt to shut down heaters which are on but marked faulty
- Some simplifications for `HeaterHandler`, use `std::vector` instead of `std::unordered_map` for primary container. Using the heater indexes 0 to 7 allows to use natural array indexing
- Some additional input sanity checks in `executeAction`
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/236
## Changed
- CCSDS handler improvements
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/268
- Build unittest as default side product of hosted builds
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/244
- Let CI/CD build host build and run unittest side product in same step

View File

@ -1,12 +1,12 @@
################################################################################
# ##############################################################################
# CMake support for the EIVE OBSW
#
#
# Author: R. Mueller
################################################################################
# ##############################################################################
################################################################################
# ##############################################################################
# Pre-Project preparation
################################################################################
# ##############################################################################
cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR_IF_GIT_FAILS 0)
@ -15,28 +15,37 @@ set(OBSW_VERSION_REVISION_IF_GIT_FAILS 0)
# set(CMAKE_VERBOSE TRUE)
option(EIVE_HARDCODED_TOOLCHAIN_FILE "\
option(
EIVE_HARDCODED_TOOLCHAIN_FILE
"\
For Linux Board Target BSPs, a default toolchain file will be set. Should be set to OFF \
if a different toolchain file is set externally" ON
)
if a different toolchain file is set externally"
ON)
if(NOT FSFW_OSAL)
set(FSFW_OSAL linux CACHE STRING "OS for the FSFW.")
set(FSFW_OSAL
linux
CACHE STRING "OS for the FSFW.")
endif()
if(TGT_BSP)
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
option(LINUX_CROSS_COMPILE ON)
endif()
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" OFF)
elseif(TGT_BSP MATCHES "arm/q7s")
option(EIVE_Q7S_EM "Build configuration for the EM" OFF)
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" ON)
endif()
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name" ON)
if(TGT_BSP MATCHES "arm/q7s"
OR TGT_BSP MATCHES "arm/raspberrypi"
OR TGT_BSP MATCHES "arm/beagleboneblack")
option(LINUX_CROSS_COMPILE ON)
endif()
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" OFF)
elseif(TGT_BSP MATCHES "arm/q7s")
option(EIVE_Q7S_EM "Build configuration for the EM" OFF)
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" ON)
endif()
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name"
ON)
else()
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name" OFF)
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name"
OFF)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
@ -56,65 +65,103 @@ include(EiveHelpers)
option(EIVE_ADD_ETL_LIB "Add ETL library" ON)
option(EIVE_ADD_JSON_LIB "Add JSON library" ON)
if(EIVE_Q7S_EM)
set(OBSW_Q7S_EM 1 CACHE STRING "Q7S EM configuration")
set(INIT_VAL 0)
else()
set(OBSW_Q7S_EM 0 CACHE STRING "Q7S EM configuration")
set(INIT_VAL 1)
endif()
set(OBSW_ADD_MGT ${INIT_VAL} CACHE STRING "Add MGT module" )
set(OBSW_ADD_BPX_BATTERY_HANDLER ${INIT_VAL} CACHE STRING "Add MGT module")
set(OBSW_ADD_STAR_TRACKER ${INIT_VAL} CACHE STRING "Add Startracker module")
set(OBSW_ADD_SUN_SENSORS ${INIT_VAL} CACHE STRING "Add sun sensor module")
set(OBSW_ADD_SUS_BOARD_ASS ${INIT_VAL} CACHE STRING "Add sun sensor board assembly")
set(OBSW_ADD_ACS_BOARD ${INIT_VAL} CACHE STRING "Add ACS board module")
set(OBSW_ADD_ACS_HANDLERS ${INIT_VAL} CACHE STRING "Add ACS handlers")
set(OBSW_ADD_RTD_DEVICES ${INIT_VAL} CACHE STRING "Add RTD devices")
set(OBSW_ADD_RAD_SENSORS ${INIT_VAL} CACHE STRING "Add Rad Sensor module")
set(OBSW_ADD_PL_PCDU ${INIT_VAL} CACHE STRING "Add Payload PCDU modukle")
set(OBSW_ADD_SYRLINKS ${INIT_VAL} CACHE STRING "Add Syrlinks module")
set(OBSW_ADD_TMP_DEVICES ${INIT_VAL} CACHE STRING "Add TMP devices")
set(OBSW_ADD_GOMSPACE_PCDU ${INIT_VAL} CACHE STRING "Add GomSpace PCDU modules")
set(OBSW_ADD_RW ${INIT_VAL} CACHE STRING "Add RW modules")
set(OBSW_MAX_SCHEDULED_TCS 500)
################################################################################
if(EIVE_Q7S_EM)
set(OBSW_Q7S_EM
1
CACHE STRING "Q7S EM configuration")
set(INIT_VAL 0)
else()
set(OBSW_Q7S_EM
0
CACHE STRING "Q7S EM configuration")
set(INIT_VAL 1)
endif()
set(OBSW_ADD_MGT
${INIT_VAL}
CACHE STRING "Add MGT module")
set(OBSW_ADD_BPX_BATTERY_HANDLER
${INIT_VAL}
CACHE STRING "Add MGT module")
set(OBSW_ADD_STAR_TRACKER
${INIT_VAL}
CACHE STRING "Add Startracker module")
set(OBSW_ADD_SUN_SENSORS
${INIT_VAL}
CACHE STRING "Add sun sensor module")
set(OBSW_ADD_SUS_BOARD_ASS
${INIT_VAL}
CACHE STRING "Add sun sensor board assembly")
set(OBSW_ADD_ACS_BOARD
${INIT_VAL}
CACHE STRING "Add ACS board module")
set(OBSW_ADD_ACS_HANDLERS
${INIT_VAL}
CACHE STRING "Add ACS handlers")
set(OBSW_ADD_RTD_DEVICES
${INIT_VAL}
CACHE STRING "Add RTD devices")
set(OBSW_ADD_RAD_SENSORS
${INIT_VAL}
CACHE STRING "Add Rad Sensor module")
set(OBSW_ADD_PL_PCDU
${INIT_VAL}
CACHE STRING "Add Payload PCDU modukle")
set(OBSW_ADD_SYRLINKS
${INIT_VAL}
CACHE STRING "Add Syrlinks module")
set(OBSW_ADD_TMP_DEVICES
${INIT_VAL}
CACHE STRING "Add TMP devices")
set(OBSW_ADD_GOMSPACE_PCDU
${INIT_VAL}
CACHE STRING "Add GomSpace PCDU modules")
set(OBSW_ADD_RW
${INIT_VAL}
CACHE STRING "Add RW modules")
# ##############################################################################
# Pre-Sources preparation
################################################################################
# ##############################################################################
# Version handling
set(GIT_VER_HANDLING_OK FALSE)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
determine_version_with_git("--exclude" "docker_*")
set(GIT_INFO ${GIT_INFO} CACHE STRING "Version information retrieved with git describe")
if(GIT_INFO)
set(GIT_INFO ${GIT_INFO} CACHE STRING "Version information retrieved with git describe")
list(GET GIT_INFO 1 OBSW_VERSION_MAJOR)
list(GET GIT_INFO 2 OBSW_VERSION_MINOR)
list(GET GIT_INFO 3 OBSW_VERSION_REVISION)
list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1)
if(NOT OBSW_VERSION_MAJOR)
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
endif()
if(NOT OBSW_VERSION_MINOR)
set(FSFW_SUBVERSION ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
endif()
if(NOT OBSW_VERSION_REVISION)
set(FSFW_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
endif()
set(GIT_VER_HANDLING_OK TRUE)
else()
set(GIT_VER_HANDLING_OK FALSE)
endif()
determine_version_with_git("--exclude" "docker_*")
set(GIT_INFO
${GIT_INFO}
CACHE STRING "Version information retrieved with git describe")
if(GIT_INFO)
set(GIT_INFO
${GIT_INFO}
CACHE STRING "Version information retrieved with git describe")
list(GET GIT_INFO 1 OBSW_VERSION_MAJOR)
list(GET GIT_INFO 2 OBSW_VERSION_MINOR)
list(GET GIT_INFO 3 OBSW_VERSION_REVISION)
list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1)
if(NOT OBSW_VERSION_MAJOR)
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
endif()
if(NOT OBSW_VERSION_MINOR)
set(FSFW_SUBVERSION ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
endif()
if(NOT OBSW_VERSION_REVISION)
set(FSFW_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
endif()
set(GIT_VER_HANDLING_OK TRUE)
else()
set(GIT_VER_HANDLING_OK FALSE)
endif()
endif()
if(NOT GIT_VER_HANDLING_OK)
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
set(OBSW_VERSION_MINOR ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
set(OBSW_VERSION_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
set(OBSW_VERSION_MINOR ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
set(OBSW_VERSION_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
endif()
# Set names and variables
set(OBSW_NAME ${CMAKE_PROJECT_NAME})
set(OBSW_NAME ${PROJECT_NAME})
set(WATCHDOG_NAME eive-watchdog)
set(SIMPLE_OBSW_NAME eive-simple)
set(UNITTEST_NAME eive-unittest)
@ -129,13 +176,15 @@ set(LIB_CXX_FS -lstdc++fs)
set(LIB_CATCH2 Catch2)
set(LIB_GPS gps)
set(LIB_JSON_NAME nlohmann_json::nlohmann_json)
set(LIB_DUMMIES dummies)
# Set path names
set(FSFW_PATH fsfw)
set(TEST_PATH test)
set(UNITTEST_PATH unittest)
set(LINUX_PATH linux)
set(COMMON_PATH common)
set(COMMON_PATH ${CMAKE_CURRENT_SOURCE_DIR}/common)
set(DUMMY_PATH dummies)
set(WATCHDOG_PATH watchdog)
set(COMMON_CONFIG_PATH ${COMMON_PATH}/config)
set(UNITTEST_CFG_PATH ${UNITTEST_PATH}/testcfg)
@ -156,171 +205,171 @@ set(EIVE_ADD_LINUX_FILES False)
pre_source_hw_os_config()
if(TGT_BSP)
set(LIBGPS_VERSION_MAJOR 3)
# I assume a newer version than 3.17 will be installed on other Linux board
# than the Q7S
set(LIBGPS_VERSION_MINOR 20)
if(TGT_BSP MATCHES "arm/q7s"
OR TGT_BSP MATCHES "arm/raspberrypi"
OR TGT_BSP MATCHES "arm/beagleboneblack"
OR TGT_BSP MATCHES "arm/egse"
OR TGT_BSP MATCHES "arm/te0720-1cfa")
find_library(${LIB_GPS} gps)
set(FSFW_CONFIG_PATH ${CMAKE_CURRENT_SOURCE_DIR}/linux/fsfwconfig)
if(NOT BUILD_Q7S_SIMPLE_MODE)
set(EIVE_ADD_LINUX_FILES TRUE)
set(ADD_CSP_LIB TRUE)
set(FSFW_HAL_ADD_LINUX ON)
set(FSFW_HAL_LINUX_ADD_LIBGPIOD ON)
set(FSFW_HAL_LINUX_ADD_PERIPHERAL_DRIVERS ON)
endif()
endif()
if(TGT_BSP MATCHES "arm/raspberrypi")
# Used by configure file
set(RASPBERRY_PI ON)
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
endif()
if(TGT_BSP MATCHES "arm/egse")
# Used by configure file
set(EGSE ON)
set(FSFW_HAL_LINUX_ADD_LIBGPIOD OFF)
set(OBSW_ADD_STAR_TRACKER 1)
set(OBSW_DEBUG_STARTRACKER 1)
endif()
if(TGT_BSP MATCHES "arm/beagleboneblack")
# Used by configure file
set(BEAGLEBONEBLACK ON)
endif()
if(TGT_BSP MATCHES "arm/q7s")
# Used by configure file
set(XIPHOS_Q7S ON)
set(LIBGPS_VERSION_MAJOR 3)
# I assume a newer version than 3.17 will be installed on other Linux board than the Q7S
set(LIBGPS_VERSION_MINOR 20)
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/raspberrypi"
OR TGT_BSP MATCHES "arm/beagleboneblack" OR TGT_BSP MATCHES "arm/egse"
OR TGT_BSP MATCHES "arm/te0720-1cfa"
)
find_library(${LIB_GPS} gps)
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
if(NOT BUILD_Q7S_SIMPLE_MODE)
set(EIVE_ADD_LINUX_FILES TRUE)
set(ADD_CSP_LIB TRUE)
set(FSFW_HAL_ADD_LINUX ON)
endif()
endif()
if(TGT_BSP MATCHES "arm/raspberrypi" )
# Used by configure file
set(RASPBERRY_PI ON)
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
endif()
set(LIBGPS_VERSION_MINOR 17)
endif()
if(TGT_BSP MATCHES "arm/egse")
# Used by configure file
set(EGSE ON)
set(FSFW_HAL_LINUX_ADD_LIBGPIOD OFF)
set(OBSW_ADD_STAR_TRACKER 1)
set(OBSW_DEBUG_STARTRACKER 1)
endif()
if(TGT_BSP MATCHES "arm/beagleboneblack")
# Used by configure file
set(BEAGLEBONEBLACK ON)
endif()
if(TGT_BSP MATCHES "arm/q7s")
# Used by configure file
set(XIPHOS_Q7S ON)
set(LIBGPS_VERSION_MAJOR 3)
set(LIBGPS_VERSION_MINOR 17)
endif()
if(TGT_BSP MATCHES "arm/te0720-1cfa")
set(TE0720_1CFA ON)
endif()
if(TGT_BSP MATCHES "arm/te0720-1cfa")
set(TE0720_1CFA ON)
endif()
else()
# Required by FSFW library
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
# Required by FSFW library
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
endif()
# Configuration files
configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h)
configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h)
configure_file(${BSP_PATH}/OBSWConfig.h.in OBSWConfig.h)
if(TGT_BSP MATCHES "arm/q7s")
configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h)
configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h)
elseif(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/egse")
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
endif()
configure_file(${WATCHDOG_PATH}/watchdogConf.h.in watchdogConf.h)
# Set common config path for FSFW
set(FSFW_ADDITIONAL_INC_PATHS
"${COMMON_PATH}/config"
${CMAKE_CURRENT_BINARY_DIR}
)
set(FSFW_ADDITIONAL_INC_PATHS "${COMMON_PATH}"
${COMMON_CONFIG_PATH}
${CMAKE_CURRENT_BINARY_DIR})
################################################################################
# ##############################################################################
# Executable and Sources
################################################################################
# ##############################################################################
#global compiler options need to be set before adding executables
# global compiler options need to be set before adding executables
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(
"-Wall"
"-Wextra"
"-Wimplicit-fallthrough=1"
"-Wno-unused-parameter"
"-Wno-psabi"
"-Wduplicated-cond" # check for duplicate conditions
"-Wduplicated-branches" # check for duplicate branches
"-Wlogical-op" # Search for bitwise operations instead of logical
"-Wnull-dereference" # Search for NULL dereference
"-Wundef" # Warn if undefind marcos are used
"-Wformat=2" # Format string problem detection
"-Wformat-overflow=2" # Formatting issues in printf
"-Wformat-truncation=2" # Formatting issues in printf
"-Wformat-security" # Search for dangerous printf operations
"-Wstrict-overflow=3" # Warn if integer overflows might happen
"-Warray-bounds=2" # Some array bounds violations will be found
"-Wshift-overflow=2" # Search for bit left shift overflows (<c++14)
"-Wcast-qual" # Warn if the constness is cast away
"-Wstringop-overflow=4"
# -Wstack-protector # Emits a few false positives for low level access
# -Wconversion # Creates many false positives
# -Warith-conversion # Use with Wconversion to find more implicit conversions
# -fanalyzer # Should be used to look through problems
)
# Remove unused sections.
add_compile_options(
"-ffunction-sections"
"-fdata-sections"
)
add_compile_options(
"-Wall"
"-Wextra"
"-Wimplicit-fallthrough=1"
"-Wno-unused-parameter"
"-Wno-psabi"
"-Wduplicated-cond" # check for duplicate conditions
"-Wduplicated-branches" # check for duplicate branches
"-Wlogical-op" # Search for bitwise operations instead of logical
"-Wnull-dereference" # Search for NULL dereference
"-Wundef" # Warn if undefind marcos are used
"-Wformat=2" # Format string problem detection
"-Wformat-overflow=2" # Formatting issues in printf
"-Wformat-truncation=2" # Formatting issues in printf
"-Wformat-security" # Search for dangerous printf operations
"-Wstrict-overflow=3" # Warn if integer overflows might happen
"-Warray-bounds=2" # Some array bounds violations will be found
"-Wshift-overflow=2" # Search for bit left shift overflows (<c++14)
"-Wcast-qual" # Warn if the constness is cast away
"-Wstringop-overflow=4"
# -Wstack-protector # Emits a few false positives for low level access
# -Wconversion # Creates many false positives -Warith-conversion # Use with
# Wconversion to find more implicit conversions -fanalyzer # Should be used
# to look through problems
)
# Remove unused sections.
add_compile_options("-ffunction-sections" "-fdata-sections")
# Removed unused sections.
add_link_options(
"-Wl,--gc-sections"
)
# Removed unused sections.
add_link_options("-Wl,--gc-sections")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(COMPILER_FLAGS "/permissive-")
set(COMPILER_FLAGS "/permissive-")
endif()
add_library(${LIB_EIVE_MISSION})
add_library(${LIB_DUMMIES})
# Add main executable
add_executable(${OBSW_NAME})
if(EIVE_CREATE_UNIQUE_OBSW_BIN)
set(OBSW_BIN_NAME ${CMAKE_PROJECT_NAME}-$ENV{USERNAME})
else()
set(OBSW_BIN_NAME ${CMAKE_PROJECT_NAME})
endif()
set(OBSW_BIN_NAME ${PROJECT_NAME})
set_target_properties(${OBSW_NAME} PROPERTIES OUTPUT_NAME ${OBSW_BIN_NAME})
# Watchdog
if(TGT_BSP MATCHES "arm/q7s")
add_executable(${WATCHDOG_NAME})
add_executable(${WATCHDOG_NAME})
else()
add_executable(${WATCHDOG_NAME} EXCLUDE_FROM_ALL)
add_executable(${WATCHDOG_NAME} EXCLUDE_FROM_ALL)
endif()
add_subdirectory(${WATCHDOG_PATH})
target_link_libraries(${WATCHDOG_NAME} PUBLIC
${LIB_CXX_FS}
)
target_include_directories(${WATCHDOG_NAME} PUBLIC
${CMAKE_BINARY_DIR}
)
add_subdirectory(${WATCHDOG_PATH})
target_link_libraries(${WATCHDOG_NAME} PUBLIC ${LIB_CXX_FS})
target_include_directories(${WATCHDOG_NAME} PUBLIC ${CMAKE_BINARY_DIR})
# unittests
if(NOT TGT_BSP)
add_executable(${UNITTEST_NAME})
add_executable(${UNITTEST_NAME})
else()
add_executable(${UNITTEST_NAME} EXCLUDE_FROM_ALL)
add_executable(${UNITTEST_NAME} EXCLUDE_FROM_ALL)
endif()
if(EIVE_ADD_ETL_LIB)
endif()
if(EIVE_ADD_JSON_LIB)
add_subdirectory(${LIB_JSON_PATH})
add_subdirectory(${LIB_JSON_PATH})
endif()
add_subdirectory(thirdparty/rapidcsv)
if(EIVE_ADD_LINUX_FILES)
add_subdirectory(${LIB_ARCSEC_PATH})
add_subdirectory(${LINUX_PATH})
add_subdirectory(${LIB_ARCSEC_PATH})
add_subdirectory(${LINUX_PATH})
endif()
add_subdirectory(${BSP_PATH})
if(ADD_CSP_LIB)
add_subdirectory(${LIB_CSP_PATH})
add_subdirectory(${LIB_CSP_PATH})
endif()
add_subdirectory(${COMMON_PATH})
add_subdirectory(${DUMMY_PATH})
add_subdirectory(${LIB_LWGPS_PATH})
add_subdirectory(${FSFW_PATH})
@ -329,174 +378,150 @@ add_subdirectory(${TEST_PATH})
add_subdirectory(${UNITTEST_PATH})
# This should have already been downloaded by the FSFW
# Still include it to be safe
# This should have already been downloaded by the FSFW Still include it to be
# safe
find_package(etl ${FSFW_ETL_LIB_MAJOR_VERSION} CONFIG QUIET)
# Not installed, so use FetchContent to download and provide etl
if(NOT etl_FOUND)
message(STATUS
"No ETL installation was found with find_package. Installing and providing "
"etl with FindPackage"
)
include(FetchContent)
FetchContent_Declare(
etl
GIT_REPOSITORY https://github.com/ETLCPP/etl
GIT_TAG ${FSFW_ETL_LIB_VERSION}
)
list(APPEND FSFW_FETCH_CONTENT_TARGETS etl)
message(
STATUS
"No ETL installation was found with find_package. Installing and providing "
"etl with FindPackage")
include(FetchContent)
FetchContent_Declare(
etl
GIT_REPOSITORY https://github.com/ETLCPP/etl
GIT_TAG ${FSFW_ETL_LIB_VERSION})
list(APPEND FSFW_FETCH_CONTENT_TARGETS etl)
endif()
# Use same Catch2 version as framework
if (NOT(TGT_BSP MATCHES "arm/te0720-1cfa") AND NOT(TGT_BSP MATCHES "arm/q7s")
AND NOT (TGT_BSP MATCHES "arm/raspberrypi"))
# Check whether the user has already installed Catch2 first
find_package(Catch2 ${FSFW_CATCH2_LIB_MAJOR_VERSION} CONFIG QUIET)
# Not installed, so use FetchContent to download and provide Catch2
if(NOT Catch2_FOUND)
message(STATUS "${MSG_PREFIX} Catch2 installation not found. Downloading Catch2 library with FetchContent")
include(FetchContent)
if(NOT (TGT_BSP MATCHES "arm/te0720-1cfa")
AND NOT (TGT_BSP MATCHES "arm/q7s")
AND NOT (TGT_BSP MATCHES "arm/raspberrypi"))
# Check whether the user has already installed Catch2 first
find_package(Catch2 ${FSFW_CATCH2_LIB_MAJOR_VERSION} CONFIG QUIET)
# Not installed, so use FetchContent to download and provide Catch2
if(NOT Catch2_FOUND)
message(
STATUS
"${MSG_PREFIX} Catch2 installation not found. Downloading Catch2 library with FetchContent"
)
include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG ${FSFW_CATCH2_LIB_VERSION}
)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG ${FSFW_CATCH2_LIB_VERSION})
list(APPEND FSFW_FETCH_CONTENT_TARGETS Catch2)
endif()
list(APPEND FSFW_FETCH_CONTENT_TARGETS Catch2)
endif()
endif()
# The documentation for FetchContent recommends declaring all the dependencies
# before making them available. We make all declared dependency available here
# after their declaration
if(FSFW_FETCH_CONTENT_TARGETS)
FetchContent_MakeAvailable(${FSFW_FETCH_CONTENT_TARGETS})
if(TARGET etl)
add_library(${LIB_ETL_TARGET} ALIAS etl)
endif()
if(TARGET Catch2)
# Fixes regression -preview4, to be confirmed in later releases
# Related GitHub issue: https://github.com/catchorg/Catch2/issues/2417
set_target_properties(Catch2 PROPERTIES DEBUG_POSTFIX "")
set_target_properties(Catch2 PROPERTIES EXCLUDE_FROM_ALL "true")
set_target_properties(Catch2WithMain PROPERTIES EXCLUDE_FROM_ALL "true")
endif()
FetchContent_MakeAvailable(${FSFW_FETCH_CONTENT_TARGETS})
if(TARGET etl)
add_library(${LIB_ETL_TARGET} ALIAS etl)
endif()
if(TARGET Catch2)
# Fixes regression -preview4, to be confirmed in later releases Related
# GitHub issue: https://github.com/catchorg/Catch2/issues/2417
set_target_properties(Catch2 PROPERTIES DEBUG_POSTFIX "")
set_target_properties(Catch2 PROPERTIES EXCLUDE_FROM_ALL "true")
set_target_properties(Catch2WithMain PROPERTIES EXCLUDE_FROM_ALL "true")
endif()
endif()
################################################################################
# ##############################################################################
# Post-Sources preparation
################################################################################
# ##############################################################################
# Add libraries
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_FSFW_NAME}
${LIB_LWGPS_NAME}
${LIB_OS_NAME}
)
target_link_libraries(${LIB_EIVE_MISSION}
PUBLIC ${LIB_FSFW_NAME} ${LIB_LWGPS_NAME} ${LIB_OS_NAME})
target_link_libraries(${OBSW_NAME} PRIVATE
${LIB_EIVE_MISSION}
)
target_link_libraries(${LIB_DUMMIES} PUBLIC ${LIB_FSFW_NAME} ${LIB_JSON_NAME})
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_EIVE_MISSION} ${LIB_DUMMIES})
if(TGT_BSP MATCHES "arm/q7s")
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_GPS}
${LIB_ARCSEC}
)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_GPS} ${LIB_ARCSEC})
endif()
target_link_libraries(${UNITTEST_NAME} PRIVATE
Catch2
${LIB_EIVE_MISSION}
)
target_link_libraries(${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION}
rapidcsv ${LIB_DUMMIES})
if(TGT_BSP MATCHES "arm/egse")
target_link_libraries(${OBSW_NAME} PRIVATE
${LIB_ARCSEC}
)
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
endif()
if(ADD_CSP_LIB)
target_link_libraries(${OBSW_NAME} PRIVATE
${LIB_CSP_NAME}
)
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_CSP_NAME})
endif()
if(EIVE_ADD_ETL_LIB)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_ETL_TARGET}
)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_ETL_TARGET})
endif()
if(EIVE_ADD_JSON_LIB)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_JSON_NAME}
)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_JSON_NAME})
endif()
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_CXX_FS}
)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_CXX_FS})
# Add include paths for all sources.
target_include_directories(${LIB_EIVE_MISSION} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${FSFW_CONFIG_PATH}
${CMAKE_CURRENT_BINARY_DIR}
${LIB_ARCSEC_PATH}
)
target_include_directories(
${LIB_EIVE_MISSION} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${FSFW_CONFIG_PATH}
${CMAKE_CURRENT_BINARY_DIR} ${LIB_ARCSEC_PATH})
target_include_directories(
${LIB_DUMMIES} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${FSFW_CONFIG_PATH}
${CMAKE_CURRENT_BINARY_DIR})
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/egse")
target_include_directories(${LIB_EIVE_MISSION} PUBLIC
${ARCSEC_LIB_PATH}
)
target_include_directories(${LIB_EIVE_MISSION} PUBLIC ${ARCSEC_LIB_PATH})
endif()
if(CMAKE_VERBOSE)
message(STATUS "Warning flags: ${WARNING_FLAGS}")
message(STATUS "Warning flags: ${WARNING_FLAGS}")
endif()
if(CMAKE_CROSSCOMPILING)
include (HardwareOsPostConfig)
post_source_hw_os_config()
include(HardwareOsPostConfig)
post_source_hw_os_config()
endif()
if(NOT CMAKE_SIZE)
set(CMAKE_SIZE size)
if(WIN32)
set(FILE_SUFFIX ".exe")
endif()
set(CMAKE_SIZE size)
if(WIN32)
set(FILE_SUFFIX ".exe")
endif()
endif()
if(EIVE_BUILD_WATCHDOG)
set(TARGET_STRING "OBSW Watchdog")
set(TARGET_STRING "OBSW Watchdog")
else()
if(TGT_BSP)
set(TARGET_STRING "Target BSP: ${TGT_BSP}")
else()
set(TARGET_STRING "Target BSP: Hosted")
endif()
if(TGT_BSP)
set(TARGET_STRING "Target BSP: ${TGT_BSP}")
else()
set(TARGET_STRING "Target BSP: Hosted")
endif()
endif()
install(TARGETS ${OBSW_NAME} RUNTIME DESTINATION bin)
string(CONCAT POST_BUILD_COMMENT
"Build directory: ${CMAKE_BINARY_DIR}\n"
"Target OSAL: ${FSFW_OSAL}\n"
"Target Build Type: ${CMAKE_BUILD_TYPE}\n"
"${TARGET_STRING}"
)
string(CONCAT POST_BUILD_COMMENT "Build directory: ${CMAKE_BINARY_DIR}\n"
"Target OSAL: ${FSFW_OSAL}\n"
"Target Build Type: ${CMAKE_BUILD_TYPE}\n" "${TARGET_STRING}")
add_custom_command(
TARGET ${OBSW_NAME}
POST_BUILD
COMMAND ${CMAKE_SIZE} ${OBSW_BIN_NAME}${FILE_SUFFIX}
COMMENT ${POST_BUILD_COMMENT}
)
TARGET ${OBSW_NAME}
POST_BUILD
COMMAND ${CMAKE_SIZE} ${OBSW_BIN_NAME}${FILE_SUFFIX}
COMMENT ${POST_BUILD_COMMENT})
include (BuildType)
include(BuildType)
set_build_type()

129
README.md
View File

@ -70,8 +70,9 @@ prerequisites.
## Building the OBSW and flashing it on the Q7S
1. ARM cross-compiler installed, either as part of [Vivado 2018.2 installation](#vivado) or
as a [separate download](#arm-toolchain)
2. [Q7S sysroot](#sysroot) on local development machine
as a [separate download](#arm-toolchain). The Xiphos SDK also installs a cross-compiler,
but its version is currently too old to compile the OBSW (7.3.0).
2. [Q7S sysroot](#sysroot) on local development machine. It is installed by the Xiphos SDK
3. Recommended: Eclipse or [Vivado 2018.2 SDK](#vivado) for OBSW development
3. [TCF agent](https://wiki.eclipse.org/TCF) running on Q7S
@ -88,7 +89,7 @@ When using Windows, run theses steps in MSYS2.
1. Clone the repository with
```sh
git clone https://egit.irs.uni-stuttgart.de/eive/eive_obsw.git
git clone https://egit.irs.uni-stuttgart.de/eive/eive-obsw.git
```
2. Update all the submodules
@ -143,7 +144,7 @@ When using Windows, run theses steps in MSYS2.
There are also different values for `-DTGT_BSP` to build for the Raspberry Pi
or the Beagle Bone Black: `arm/raspberrypi` and `arm/beagleboneblack`.
5. Build the software with
```sh
@ -151,6 +152,53 @@ When using Windows, run theses steps in MSYS2.
cmake --build . -j
```
## Build for the Q7S target root filesystem with `yocto`
The EIVE root filesystem will contain the EIVE OBSW and the Watchdog component.
It is currently generated with `yocto`, but the tool can not compile the primary
OBSW due to toolchain version incompatibility. Therefore, the OBSW components
are currently compiled using the toolchain specified in this README (e.g. installed by Vivado).
However, it is still possible to install the two components using yocto. A few helper files were
provided to make this process easier. The following steps can be used to install the OBSW
components and a version file to the yocto sources for the generation of the complete EIVE root
file system image. The steps here are shown for Ubuntu, you can use the according Windows
helper scripts as well.
1. Copy the `q7s-env.sh` script to the same layer as the `eive-obsw`.
```sh
cp scripts/q7s-env.sh ..
cd ..
./q7s-env.sh
q7s-make-release.sh
```
2. Compile the OBSW components in release mode
```sh
cd cmake-build-release-q7s
cmake --build . -j
```
3. Make sure the [`q7s-yocto`](https://egit.irs.uni-stuttgart.de/eive/q7s-yocto)
repository or the [`q7s-package`](https://egit.irs.uni-stuttgart.de/eive/q7s-package.git)
repository and its `q7s-yocto` submodule were cloned in the same directory layer as
the `eive-obsw`.
4. Run the install script to install the files into `q7s-yocto`.
```sh
install-obsw-yocto.sh
```
5. Navigate into the `q7s-yocto` repo and review the changes. You can then add and push those
changes.
6. You can now rebuild the root filesystem with the updated OBSW using `yocto`. This probably needs
to be done on another machine or in a VM. The [`q7s-yocto`](https://egit.irs.uni-stuttgart.de/eive/q7s-yocto)
repository contains details on how to best do this.
## Building in Xilinx SDK 2018.2
1. Open Xilinx SDK 2018.2
@ -326,7 +374,7 @@ If you are comiling for the Raspberry Pi, you have to set the `LINUX_ROOTFS` env
variable instead. You can find a base root filesystem for the Raspberry Pi
[here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/rootfs).
## <a id="vivado"></a> Installing Vivado the the Xilinx development tools
## <a id="vivado"></a> Installing Vivado and the Xilinx development tools
It's also possible to perform debugging with a normal Eclipse installation by installing
the TCF plugin and downloading the cross-compiler as specified in the section below. However,
@ -342,9 +390,9 @@ installed Vivado with the SDK core tools.
<img src="https://egit.irs.uni-stuttgart.de/eive/eive-obsw/raw/branch/develop/doc/img/vivado-edition.png" width="50%"> <br>
<img src="https://egit.irs.uni-stuttgart.de/eive/eive-obsw/raw/branch/mueller/master/doc/img/vivado-hl-design.png" width="50%"> <br>
<img src="https://egit.irs.uni-stuttgart.de/eive/eive-obsw/raw/branch/develop/doc/img/vivado-hl-design.png" width="50%"> <br>
<img src="https://egit.irs.uni-stuttgart.de/eive/eive-obsw/raw/branch/mueller/master/doc/img/xilinx-install.PNG" width="50%"> <br>
<img src="https://egit.irs.uni-stuttgart.de/eive/eive-obsw/raw/branch/develop/doc/img/xilinx-install.PNG" width="50%"> <br>
* For supported OS refer to https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_2/ug973-vivado-release-notes-install-license.pdf .
Installation was tested on Windows and Ubuntu 21.04.
@ -661,35 +709,7 @@ Thus the replies are received with a larger delay compared to a direct TCP conne
3. Make sure the netmask of the ehternet interface of the workstation matches the netmask of the Q7S
* When IP address is set to 192.168.133.10 and the netmask is 255.255.255.0, an example IP address for the workstation
is 192.168.133.2
4. Run tcf-agent on Q7S
* Tcf-agent is not yet integrated in the rootfs of the Q7S. Therefore build tcf-agent manually
```sh
git clone git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git
cd org.eclipse.tcf.agent/agent
make CC=arm-linux-gnueabihf-gcc LD=arm-linux-gnueabihf-ld MACHINE=arm NO_SSL=1 NO_UUID=1
```
* Transfer executable agent from org.eclipse.tcf.agent/agent/obj/GNU/Linux/arm/Debug to /tmp of Q7S
```sh
cd obj/GNU/Linux/arm/Debug
scp agent root@192.168.133.10:/tmp
```
* On Q7S
```sh
cd /tmp
chmod +x agent
```
* Run agent
```sh
./agent
```
4. Make sure th `tcf-agent` is running by checking `systemctl status tcf-agent`
5. In Xilinx SDK 2018.2 right click on project &rarr; Debug As &rarr; Debug Configurations
6. Right click Xilinx C/C++ applicaton (System Debugger) &rarr; New &rarr;
7. Set Debug Type to Linux Application Debug and Connectin to Linux Agent
@ -699,8 +719,8 @@ Thus the replies are received with a larger delay compared to a direct TCP conne
11. Test connection (This ensures the TCF Agent is running on the Q7S)
12. Select Application tab
* Project Name: eive_obsw
* Local File Path: Path to eiveobsw-linux.elf (in `_bin\linux\devel`)
* Remote File Path: `/tmp/eive_obsw.elf`
* Local File Path: Path to OBSW application image with debug symbols (non-stripped)
* Remote File Path: `/tmp/<OBSW NAME>`
# <a id="file-transfer"></a> Transfering Files to the Q7S
@ -726,7 +746,8 @@ From a windows machine files can be copied with putty tools (note: use IPv4 addr
pscp -scp -P 22 eive@192.168.199.227:</directory-to-example-file/>/example-file </windows-machine-path/>
````
More detailed information about the used q7s commands can be found in the Q7S user manual.
A helper script named `q7s-cp.py` can be used together with the `q7s-port.sh`
script to make this process easier.
# <a id="q7s"></a> Q7S OBC
@ -1106,16 +1127,28 @@ Eclipse indexer.
The [TCF agent](https://wiki.eclipse.org/TCF) can be used to perform remote debugging on the Q7S.
1. Install the TCF agent plugin in Eclipse from
1. Copy the `.cproject` file and the `.project` file inside the `misc/eclipse` folder into the
repo root
```sh
cd eive-obsw
cp misc/eclipse/.cproject .
cp misc/eclipse/.project .
```
2. Open the repo in Eclipse as a folder.
3. Install the TCF agent plugin in Eclipse from
the [releases](https://www.eclipse.org/tcf/downloads.php). Go to
Help &rarr; Install New Software and use the download page, for
example https://download.eclipse.org/tools/tcf/releases/1.7/1.7.0/ to search for the plugin and install it. You can find the newest version [here](https://www.eclipse.org/tcf/downloads.php)
example https://download.eclipse.org/tools/tcf/releases/1.7/1.7.0/ to search for the plugin and
install it. You can find the newest version [here](https://www.eclipse.org/tcf/downloads.php)
2. Go to Window &rarr; Perspective &rarr; Open Perspective and open the **Target Explorer Perspective**.
4. Go to Window &rarr; Perspective &rarr; Open Perspective and open the **Target Explorer Perspective**.
Here, the Q7S should show up if the local port forwarding was set up as explained previously.
Please note that you have to connect to `localhost` and port `1534` with port forwaring set up.
3. A launch configuration was provided, but it might be necessary to adapt it for your own needs.
5. A launch configuration was provided, but it might be necessary to adapt it for your own needs.
Alternatively:
- Create a new **TCF Remote Application** by pressing the cogs button at the top or going to
@ -1204,7 +1237,7 @@ in the same way.
* the formatting is based on the clang-format tools
## Setting up eclipse auto-fromatter with clang-format
## Setting up auto-formatter with clang-format in Xilinx SDK
1. Help &rarr; Install New Software &rarr; Add
2. In location insert the link http://www.cppstyle.com/luna
@ -1214,3 +1247,11 @@ in the same way.
6. Insert the path to the clang-format executable
7. Under C/C++ &rarr; Code Style &rarr; Formatter, change the formatter to CppStyle (clang-format)
8. Code can now be formatted with the clang tool by using the key combination Ctrl + Shift + f
## Setting up auto-fromatter with clang-format in eclipse
1. Help &rarr; Eclipse market place &rarr; Search for "Cppstyle" and install
2. On windows download the clang-formatting tools from https://llvm.org/builds/. On linux clang-format can be installed with the package manager.
3. Navigate to Preferences &rarr; C/C++ &rarr; CppStyle
4. Insert the path to the clang-format executable
5. Under C/C++ &rarr; Code Style &rarr; Formatter, change the formatter to CppStyle (clang-format)
6. Code can now be formatted with the clang tool by using the key combination Ctrl + Shift + f

View File

@ -1,7 +1,3 @@
target_sources(${OBSW_NAME} PUBLIC
InitMission.cpp
main.cpp
ObjectFactory.cpp
)
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp ObjectFactory.cpp)
add_subdirectory(boardconfig)

View File

@ -1,7 +1,3 @@
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_sources(${OBSW_NAME} PRIVATE print.c)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -1,8 +1,4 @@
target_sources(${OBSW_NAME} PUBLIC
InitMission.cpp
main.cpp
ObjectFactory.cpp
)
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp ObjectFactory.cpp)
add_subdirectory(fsfwconfig)
add_subdirectory(boardconfig)

View File

@ -1,6 +1,7 @@
#include "InitMission.h"
#include <OBSWConfig.h>
#include <bsp_hosted/fsfwconfig/pollingsequence/DummyPst.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/objectmanager/ObjectManagerIF.h>
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
@ -89,9 +90,13 @@ void initmission::initTasks() {
sif::error << "Object add component failed" << std::endl;
}
PeriodicTaskIF* pusEvents = factory->createPeriodicTask(
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
result = pusVerification->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
PeriodicTaskIF* eventHandling = factory->createPeriodicTask(
"EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
result = eventHandling->addComponent(objects::EVENT_MANAGER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("EVENT_MNGR", objects::EVENT_MANAGER);
}
result = eventHandling->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS5", objects::PUS_SERVICE_5_EVENT_REPORTING);
}
@ -106,6 +111,10 @@ void initmission::initTasks() {
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
}
result = pusHighPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
}
PeriodicTaskIF* pusMedPrio = factory->createPeriodicTask(
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
@ -129,8 +138,34 @@ void initmission::initTasks() {
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
}
PeriodicTaskIF* testTask = factory->createPeriodicTask(
"TEST_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
PeriodicTaskIF* thermalTask = factory->createPeriodicTask(
"THERMAL_CTL_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
result = thermalTask->addComponent(objects::RTD_0_IC3_PLOC_HEATSPREADER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("RTD_0_dummy", objects::RTD_0_IC3_PLOC_HEATSPREADER);
}
result = thermalTask->addComponent(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("SUS_0_dummy", objects::SUS_0_N_LOC_XFYFZM_PT_XF);
}
result = thermalTask->addComponent(objects::CORE_CONTROLLER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER);
}
result = thermalTask->addComponent(objects::THERMAL_CONTROLLER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
}
FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask(
"DUMMY_PST", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
result = dummy_pst::pst(pstTask);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Failed to add dummy pst to fixed timeslot task" << std::endl;
}
#if OBSW_ADD_TEST_CODE == 1
result = testTask->addComponent(objects::TEST_TASK);
if (result != HasReturnvaluesIF::RETURN_OK) {
@ -144,11 +179,14 @@ void initmission::initTasks() {
tmtcPollingTask->startTask();
pusVerification->startTask();
pusEvents->startTask();
eventHandling->startTask();
pusHighPrio->startTask();
pusMedPrio->startTask();
pusLowPrio->startTask();
pstTask->startTask();
thermalTask->startTask();
#if OBSW_ADD_TEST_CODE == 1
testTask->startTask();
#endif /* OBSW_ADD_TEST_CODE == 1 */

View File

@ -2,8 +2,9 @@
#include <fsfw/tmtcservices/CommandingServiceBase.h>
#include <fsfw/tmtcservices/PusServiceBase.h>
#include <mission/controller/ThermalController.h>
#include <mission/core/GenericFactory.h>
#include <mission/utility/TmFunnel.h>
#include <mission/tmtc/TmFunnel.h>
#include <objects/systemObjectList.h>
#include <tmtc/apid.h>
#include <tmtc/pusIds.h>
@ -25,6 +26,24 @@
#include <test/testtasks/TestTask.h>
#endif
#include <dummies/AcuDummy.h>
#include <dummies/BpxDummy.h>
#include <dummies/ComCookieDummy.h>
#include <dummies/ComIFDummy.h>
#include <dummies/CoreControllerDummy.h>
#include <dummies/GyroAdisDummy.h>
#include <dummies/GyroL3GD20Dummy.h>
#include <dummies/ImtqDummy.h>
#include <dummies/MgmLIS3MDLDummy.h>
#include <dummies/P60DockDummy.h>
#include <dummies/PduDummy.h>
#include <dummies/PlPcduDummy.h>
#include <dummies/RwDummy.h>
#include <dummies/StarTrackerDummy.h>
#include <dummies/SusDummy.h>
#include <dummies/SyrlinksDummy.h>
#include <dummies/TemperatureSensorsDummy.h>
void Factory::setStaticFrameworkObjectIds() {
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
PusServiceBase::packetDestination = objects::TM_FUNNEL;
@ -44,5 +63,31 @@ void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
new TestTask(objects::TEST_TASK);
new ComIFDummy(objects::DUMMY_COM_IF);
ComCookieDummy* comCookieDummy = new ComCookieDummy();
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new CoreControllerDummy(objects::CORE_CONTROLLER);
new RwDummy(objects::RW1, objects::DUMMY_COM_IF, comCookieDummy);
new RwDummy(objects::RW2, objects::DUMMY_COM_IF, comCookieDummy);
new RwDummy(objects::RW3, objects::DUMMY_COM_IF, comCookieDummy);
new RwDummy(objects::RW4, objects::DUMMY_COM_IF, comCookieDummy);
new StarTrackerDummy(objects::STAR_TRACKER, objects::DUMMY_COM_IF, comCookieDummy);
new SyrlinksDummy(objects::SYRLINKS_HK_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new ImtqDummy(objects::IMTQ_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new AcuDummy(objects::ACU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new PduDummy(objects::PDU1_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new PduDummy(objects::PDU2_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new P60DockDummy(objects::P60DOCK_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new GyroAdisDummy(objects::GYRO_0_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new GyroL3GD20Dummy(objects::GYRO_1_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new GyroAdisDummy(objects::GYRO_2_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new GyroL3GD20Dummy(objects::GYRO_3_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new MgmLIS3MDLDummy(objects::MGM_0_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new MgmLIS3MDLDummy(objects::MGM_2_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new TemperatureSensorsDummy();
new SusDummy();
new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT);
// new TestTask(objects::TEST_TASK);
}

View File

@ -1,10 +1,3 @@
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_sources(${OBSW_NAME} PRIVATE print.c)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -1,8 +1 @@
target_sources(${TARGET_NAME} PUBLIC
ArduinoComIF.cpp
ArduinoCookie.cpp
)
target_sources(${OBSW_NAME} PUBLIC ArduinoComIF.cpp ArduinoCookie.cpp)

View File

@ -1,27 +1,17 @@
target_sources(${OBSW_NAME} PRIVATE
ipc/MissionMessageTypes.cpp
)
target_sources(${OBSW_NAME} PRIVATE ipc/MissionMessageTypes.cpp)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
# If a special translation file for object IDs exists, compile it.
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
target_sources(${OBSW_NAME} PRIVATE
objects/translateObjects.cpp
)
target_sources(${UNITTEST_NAME} PRIVATE
objects/translateObjects.cpp
)
target_sources(${OBSW_NAME} PRIVATE objects/translateObjects.cpp)
target_sources(${UNITTEST_NAME} PRIVATE objects/translateObjects.cpp)
endif()
# If a special translation file for events exists, compile it.
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
target_sources(${OBSW_NAME} PRIVATE
events/translateEvents.cpp
)
target_sources(${UNITTEST_NAME} PRIVATE
events/translateEvents.cpp
)
target_sources(${OBSW_NAME} PRIVATE events/translateEvents.cpp)
target_sources(${UNITTEST_NAME} PRIVATE events/translateEvents.cpp)
endif()
add_subdirectory(pollingsequence)

View File

@ -7,41 +7,41 @@
//! 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
#define FSFW_CPP_OSTREAM_ENABLED 1
#define FSFW_CPP_OSTREAM_ENABLED 1
//! More FSFW related printouts depending on level. Useful for development.
#define FSFW_VERBOSE_LEVEL 1
#define FSFW_VERBOSE_LEVEL 1
//! Can be used to completely disable printouts, even the C stdio ones.
#if FSFW_CPP_OSTREAM_ENABLED == 0 && FSFW_VERBOSE_LEVEL == 0
#define FSFW_DISABLE_PRINTOUT 0
#define FSFW_DISABLE_PRINTOUT 0
#endif
#define FSFW_USE_PUS_C_TELEMETRY 1
#define FSFW_USE_PUS_C_TELEMETRY 1
#define FSFW_USE_PUS_C_TELECOMMANDS 1
//! Can be used to disable the ANSI color sequences for C stdio.
#define FSFW_COLORED_OUTPUT 1
#define FSFW_COLORED_OUTPUT 1
//! If FSFW_OBJ_EVENT_TRANSLATION is set to one,
//! additional output which requires the translation files translateObjects
//! and translateEvents (and their compiled source files)
#define FSFW_OBJ_EVENT_TRANSLATION 1
#define FSFW_OBJ_EVENT_TRANSLATION 1
#if FSFW_OBJ_EVENT_TRANSLATION == 1
//! Specify whether info events are printed too.
#define FSFW_DEBUG_INFO 1
#include "objects/translateObjects.h"
#define FSFW_DEBUG_INFO 1
#include "events/translateEvents.h"
#include "objects/translateObjects.h"
#else
#endif
//! When using the newlib nano library, C99 support for stdio facilities
//! will not be provided. This define should be set to 1 if this is the case.
#define FSFW_NO_C99_IO 1
#define FSFW_NO_C99_IO 1
//! Specify whether a special mode store is used for Subsystem components.
#define FSFW_USE_MODESTORE 0
#define FSFW_USE_MODESTORE 0
//! Defines if the real time scheduler for linux should be used.
//! If set to 0, this will also disable priority settings for linux
@ -58,7 +58,7 @@ static constexpr uint8_t FSFW_MISSION_TIMESTAMP_SIZE = 7;
//! 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;
static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS = 120;
//! Defines the FIFO depth of each commanding service base which
//! also determines how many commands a CSB service can handle in one cycle
@ -70,6 +70,6 @@ static constexpr size_t FSFW_PRINT_BUFFER_SIZE = 124;
static constexpr size_t FSFW_MAX_TM_PACKET_SIZE = 2048;
}
} // namespace fsfwconfig
#endif /* CONFIG_FSFWCONFIG_H_ */

View File

@ -22,10 +22,11 @@ enum sourceObjects : uint32_t {
TEST_TASK = 0x42694269,
DUMMY_INTERFACE = 0xCAFECAFE,
DUMMY_HANDLER = 0x4400AFFE,
DUMMY_HANDLER = 0x44000001,
/* 0x49 ('I') for Communication Interfaces **/
ARDUINO_COM_IF = 0x49000001
ARDUINO_COM_IF = 0x49000001,
DUMMY_COM_IF = 0x49000002
};
}

View File

@ -6,6 +6,8 @@
*/
#include "translateObjects.h"
#include "systemObjectList.h"
const char *TEST_TASK_STRING = "TEST_TASK";
const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER";
const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
@ -36,6 +38,7 @@ const char *IPC_STORE_STRING = "IPC_STORE";
const char *TIME_STAMPER_STRING = "TIME_STAMPER";
const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END";
const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE";
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
const char *NO_OBJECT_STRING = "NO_OBJECT";
const char *translateObject(object_id_t object) {
@ -100,6 +103,8 @@ const char *translateObject(object_id_t object) {
return FSFW_OBJECTS_END_STRING;
case 0xCAFECAFE:
return DUMMY_INTERFACE_STRING;
case objects::THERMAL_CONTROLLER:
return THERMAL_CONTROLLER_STRING;
case 0xFFFFFFFF:
return NO_OBJECT_STRING;
default:

View File

@ -0,0 +1 @@
target_sources(${OBSW_NAME} PRIVATE DummyPst.cpp)

View File

@ -0,0 +1,140 @@
#include "DummyPst.h"
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
#include <objects/systemObjectList.h>
ReturnValue_t dummy_pst::pst(FixedTimeslotTaskIF *thisSequence) {
uint32_t length = thisSequence->getPeriodMs();
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
return HasReturnvaluesIF::RETURN_OK;
} else {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!" << std::endl;
#endif
return HasReturnvaluesIF::RETURN_FAILED;
}
}

View File

@ -0,0 +1,14 @@
#ifndef POLLINGSEQUENCEFACTORY_H_
#define POLLINGSEQUENCEFACTORY_H_
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
class FixedTimeslotTaskIF;
namespace dummy_pst {
ReturnValue_t pst(FixedTimeslotTaskIF *thisSequence);
}
#endif /* POLLINGSEQUENCEINIT_H_ */

View File

@ -1,18 +0,0 @@
#ifndef FSFWCONFIG_TMTC_APID_H_
#define FSFWCONFIG_TMTC_APID_H_
#include <stdint.h>
/**
* Application Process Definition: entity, uniquely identified by an
* application process ID (APID), capable of generating telemetry source
* packets and receiving telecommand packets
*
* SOURCE APID: 0x73 / 115 / s
* APID is a 11 bit number
*/
namespace apid {
static const uint16_t EIVE_OBSW = 0x65;
}
#endif /* FSFWCONFIG_TMTC_APID_H_ */

View File

@ -1,9 +1,17 @@
#include <objects/systemObjectList.h>
#include <iostream>
#include "InitMission.h"
#include "commonConfig.h"
#include "fsfw/FSFWVersion.h"
#include "fsfw/controller/ControllerBase.h"
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/modes/HasModesIF.h"
#include "fsfw/modes/ModeMessage.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/tasks/TaskFactory.h"
#ifdef WIN32
static const char* COMPILE_PRINTOUT = "Windows";
#elif LINUX

View File

@ -1,9 +1,5 @@
target_sources(${OBSW_NAME} PUBLIC
InitMission.cpp
main.cpp
gpioInit.cpp
ObjectFactory.cpp
)
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp gpioInit.cpp
ObjectFactory.cpp)
add_subdirectory(boardconfig)
add_subdirectory(boardtest)

View File

@ -3,7 +3,7 @@
#include <vector>
#include "fsfw/tasks/Typedef.h"
#include "fsfw/tasks/definitions.h"
class PeriodicTaskIF;
class TaskFactory;

View File

@ -67,7 +67,7 @@ void ObjectFactory::produce(void* args) {
GpioCookie* gpioCookie = nullptr;
static_cast<void>(gpioCookie);
SpiComIF* spiComIF = new SpiComIF(objects::SPI_COM_IF, gpioIF);
SpiComIF* spiComIF = new SpiComIF(objects::SPI_MAIN_COM_IF, spi::DEV, gpioIF);
static_cast<void>(spiComIF);
auto pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
static_cast<void>(pwrSwitcher);
@ -116,73 +116,72 @@ void ObjectFactory::createRpiAcsBoard(GpioIF* gpioIF, std::string spiDev) {
gpio::Direction::OUT, gpio::Levels::HIGH);
gpioIF->addGpios(gpioCookie);
SpiCookie* spiCookie =
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler =
new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_COM_IF, spiCookie, 0);
new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, 0);
mgmLis3Handler->setStartUpImmediately();
#if OBSW_TEST_ACS == 1
mgmLis3Handler->setToGoToNormalMode(true);
#endif
spiCookie =
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
auto mgmRm3100Handler =
new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_COM_IF, spiCookie, 0);
new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, 0);
mgmRm3100Handler->setStartUpImmediately();
#if OBSW_TEST_ACS == 1
mgmRm3100Handler->setToGoToNormalMode(true);
#endif
spiCookie =
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
mgmLis3Handler =
new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_COM_IF, spiCookie, 0);
new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, 0);
mgmLis3Handler->setStartUpImmediately();
#if OBSW_TEST_ACS == 1
mgmLis3Handler->setToGoToNormalMode(true);
#endif
spiCookie =
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
mgmRm3100Handler =
new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_COM_IF, spiCookie, 0);
new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, 0);
mgmRm3100Handler->setStartUpImmediately();
#if OBSW_TEST_ACS == 1
mgmRm3100Handler->setToGoToNormalMode(true);
#endif
spiCookie =
new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
ADIS1650X::MAXIMUM_REPLY_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto adisHandler = new GyroADIS1650XHandler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_COM_IF,
spiCookie, ADIS1650X::Type::ADIS16505);
adisHandler->setStartUpImmediately();
spiCookie =
new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev, L3GD20H::MAX_BUFFER_SIZE,
new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, ADIS1650X::MAXIMUM_REPLY_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto adisHandler =
new GyroADIS1650XHandler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
ADIS1650X::Type::ADIS16505);
adisHandler->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto gyroL3gHandler =
new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF, spiCookie, 0);
new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, 0);
gyroL3gHandler->setStartUpImmediately();
#if OBSW_TEST_ACS == 1
gyroL3gHandler->setToGoToNormalMode(true);
#endif
spiCookie =
new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, spiDev,
ADIS1650X::MAXIMUM_REPLY_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
adisHandler = new GyroADIS1650XHandler(objects::GYRO_2_ADIS_HANDLER, objects::SPI_COM_IF,
new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, ADIS1650X::MAXIMUM_REPLY_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
adisHandler = new GyroADIS1650XHandler(objects::GYRO_2_ADIS_HANDLER, objects::SPI_MAIN_COM_IF,
spiCookie, ADIS1650X::Type::ADIS16505);
adisHandler->setStartUpImmediately();
spiCookie =
new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, spiDev, L3GD20H::MAX_BUFFER_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
gyroL3gHandler =
new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_COM_IF, spiCookie, 0);
new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, 0);
gyroL3gHandler->setStartUpImmediately();
#if OBSW_TEST_ACS == 1
gyroL3gHandler->setToGoToNormalMode(true);

View File

@ -1,7 +1,3 @@
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_sources(${OBSW_NAME} PRIVATE print.c)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -1,6 +1 @@
target_sources(${OBSW_NAME} PRIVATE
)
target_sources(${OBSW_NAME} PRIVATE)

View File

@ -1,31 +1,24 @@
#simple mode
# simple mode
add_executable(${SIMPLE_OBSW_NAME} EXCLUDE_FROM_ALL)
target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE")
target_sources(${SIMPLE_OBSW_NAME} PUBLIC
main.cpp
)
#I think this is unintentional? (produces linker errors for stuff in /linux)
target_link_libraries(${SIMPLE_OBSW_NAME} PUBLIC
${LIB_FSFW_NAME}
)
target_sources(${SIMPLE_OBSW_NAME} PUBLIC main.cpp)
# I think this is unintentional? (produces linker errors for stuff in /linux)
target_link_libraries(${SIMPLE_OBSW_NAME} PUBLIC ${LIB_FSFW_NAME})
target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE")
add_subdirectory(simple)
target_sources(${OBSW_NAME} PUBLIC
main.cpp
obsw.cpp
)
target_sources(${OBSW_NAME} PUBLIC main.cpp obsw.cpp)
add_subdirectory(boardtest)
#add_subdirectory(boardtest)
add_subdirectory(boardconfig)
add_subdirectory(comIF)
add_subdirectory(core)
if(EIVE_Q7S_EM)
add_subdirectory(em)
add_subdirectory(em)
else()
add_subdirectory(fm)
target_sources(${OBSW_NAME} PUBLIC fmObjectFactory.cpp)
endif()
add_subdirectory(memory)

View File

@ -25,8 +25,8 @@
#define OBSW_ADD_MGT @OBSW_ADD_MGT@
#define OBSW_ADD_BPX_BATTERY_HANDLER @OBSW_ADD_BPX_BATTERY_HANDLER@
#define OBSW_ADD_STAR_TRACKER @OBSW_ADD_STAR_TRACKER@
#define OBSW_ADD_PLOC_SUPERVISOR 0
#define OBSW_ADD_PLOC_MPSOC 0
#define OBSW_ADD_PLOC_SUPERVISOR 1
#define OBSW_ADD_PLOC_MPSOC 1
#define OBSW_ADD_SUN_SENSORS @OBSW_ADD_SUN_SENSORS@
#define OBSW_ADD_SUS_BOARD_ASS @OBSW_ADD_SUS_BOARD_ASS@
#define OBSW_ADD_ACS_BOARD @OBSW_ADD_ACS_BOARD@
@ -38,6 +38,7 @@
#define OBSW_ADD_PL_PCDU @OBSW_ADD_PL_PCDU@
#define OBSW_ADD_SYRLINKS @OBSW_ADD_SYRLINKS@
#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0
#define OBSW_MPSOC_JTAG_BOOT 0
// This is a really tricky switch.. It initializes the PCDU switches to their default states
// at powerup. I think it would be better

View File

@ -1,12 +1,5 @@
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_sources(${OBSW_NAME} PRIVATE print.c)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
print.c
)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE print.c)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -4,6 +4,8 @@
namespace q7s {
static constexpr char SPI_DEFAULT_DEV[] = "/dev/spi-main";
static constexpr uint32_t SPI_MAIN_BUS_LOCK_TIMEOUT = 50;
static constexpr char SPI_RW_DEV[] = "/dev/spi-rw";
static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-eive";
@ -15,9 +17,9 @@ static constexpr char UART_SYRLINKS_DEV[] = "/dev/ul-syrlinks";
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ul-str";
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio0";
static constexpr char UIO_PTME[] = "/dev/uio1";
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio2";
static constexpr char UIO_PDEC_RAM[] = "/dev/uio3";
static constexpr char UIO_PTME[] = "/dev/uio1";
static constexpr int MAP_ID_PTME_CONFIG = 3;
namespace uiomapids {

View File

@ -34,5 +34,6 @@ SOFTWARE.
#define ETL_CPP11_SUPPORTED 1
#define ETL_NO_NULLPTR_SUPPORT 0
#define ETL_HAS_ERROR_ON_STRING_TRUNCATION 1
#endif

View File

@ -1,10 +1,5 @@
target_sources(${OBSW_NAME} PRIVATE
FileSystemTest.cpp
Q7STestTask.cpp
)
target_sources(${OBSW_NAME} PUBLIC FileSystemTest.cpp Q7STestTask.cpp)
if(EIVE_BUILD_Q7S_SIMPLE_MODE)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
FileSystemTest.cpp
)
endif()
target_sources(${SIMPLE_OBSW_NAME} PRIVATE FileSystemTest.cpp)
endif()

View File

@ -1,6 +1,2 @@
target_sources(${OBSW_NAME} PRIVATE
rwSpiCallback.cpp
gnssCallback.cpp
pcduSwitchCb.cpp
q7sGpioCallbacks.cpp
)
target_sources(${OBSW_NAME} PRIVATE rwSpiCallback.cpp gnssCallback.cpp
pcduSwitchCb.cpp q7sGpioCallbacks.cpp)

View File

@ -1,9 +1,10 @@
#include "gnssCallback.h"
#include "devices/gpioIds.h"
#include "fsfw/action/HasActionsIF.h"
#include "fsfw/tasks/TaskFactory.h"
ReturnValue_t gps::triggerGpioResetPin(void* args) {
ReturnValue_t gps::triggerGpioResetPin(uint8_t gpsId, void* args) {
ResetArgs* resetArgs = reinterpret_cast<ResetArgs*>(args);
if (args == nullptr) {
return HasReturnvaluesIF::RETURN_FAILED;
@ -11,12 +12,9 @@ ReturnValue_t gps::triggerGpioResetPin(void* args) {
if (resetArgs->gpioComIF == nullptr) {
return HasReturnvaluesIF::RETURN_FAILED;
}
gpioId_t gpioId;
if (resetArgs->gnss1) {
gpioId_t gpioId = gpioIds::GNSS_0_NRESET;
if (gpsId == 1) {
gpioId = gpioIds::GNSS_1_NRESET;
} else {
gpioId = gpioIds::GNSS_0_NRESET;
}
resetArgs->gpioComIF->pullLow(gpioId);
TaskFactory::delayTask(resetArgs->waitPeriodMs);

View File

@ -5,14 +5,13 @@
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
struct ResetArgs {
bool gnss1 = false;
LinuxLibgpioIF* gpioComIF = nullptr;
uint32_t waitPeriodMs = 100;
};
namespace gps {
ReturnValue_t triggerGpioResetPin(void* args);
ReturnValue_t triggerGpioResetPin(uint8_t gpsId, void* args);
}

View File

@ -48,7 +48,7 @@ void q7s::gpioCallbacks::initSpiCsDecoder(GpioIF* gpioComIF) {
result = gpioComIF->addGpios(spiMuxGpios);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "initSpiCsDecoder: Failed to add mux bit gpios to gpioComIF" << std::endl;
sif::error << "initSpiCsDecoder: Failed to add SPI MUX bit GPIOs" << std::endl;
return;
}
}

View File

@ -1,5 +1,7 @@
#include "rwSpiCallback.h"
#include <fsfw/timemanager/Stopwatch.h>
#include "devices/gpioIds.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw_hal/linux/UnixFileGuard.h"
@ -8,8 +10,25 @@
namespace rwSpiCallback {
namespace {
static bool MODE_SET = false;
ReturnValue_t openSpi(const std::string& devname, int flags, GpioIF* gpioIF, gpioId_t gpioId,
MutexIF* mutex, MutexIF::TimeoutType timeoutType, uint32_t timeoutMs,
int& fd);
/**
* @brief This function closes a spi session. Pulls the chip select to high an releases the
* mutex.
* @param gpioId Gpio ID of chip select
* @param gpioIF Pointer to gpio interface to drive the chip select
* @param mutex The spi mutex
*/
void closeSpi(int fd, gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex);
} // namespace
ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sendData,
size_t sendLen, void* args) {
// Stopwatch watch;
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
RwHandler* handler = reinterpret_cast<RwHandler*>(args);
@ -18,51 +37,45 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
return HasReturnvaluesIF::RETURN_FAILED;
}
uint8_t writeBuffer[2];
uint8_t writeBuffer[2] = {};
uint8_t writeSize = 0;
gpioId_t gpioId = cookie->getChipSelectPin();
GpioIF* gpioIF = comIf->getGpioInterface();
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
uint32_t timeoutMs = 0;
MutexIF* mutex = comIf->getMutex(&timeoutType, &timeoutMs);
MutexIF* mutex = comIf->getCsMutex();
cookie->getMutexParams(timeoutType, timeoutMs);
if (mutex == nullptr or gpioIF == nullptr) {
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
int fileDescriptor = 0;
std::string device = cookie->getSpiDevice();
UnixFileGuard fileHelper(device, &fileDescriptor, O_RDWR, "rwSpiCallback::spiCallback");
if (fileHelper.getOpenResult() != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::spiCallback: Failed to open device file" << std::endl;
return SpiComIF::OPENING_FILE_FAILED;
}
spi::SpiModes spiMode = spi::SpiModes::MODE_0;
uint32_t spiSpeed = 0;
cookie->getSpiParameters(spiMode, spiSpeed, nullptr);
comIf->setSpiSpeedAndMode(fileDescriptor, spiMode, spiSpeed);
result = mutex->lockMutex(timeoutType, timeoutMs);
const std::string& dev = comIf->getSpiDev();
result = openSpi(dev, O_RDWR, gpioIF, gpioId, mutex, timeoutType, timeoutMs, fileDescriptor);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "rwSpiCallback::spiCallback: Failed to lock mutex" << std::endl;
return result;
}
/** Sending frame start sign */
writeBuffer[0] = 0x7E;
writeSize = 1;
// Pull SPI CS low. For now, no support for active high given
if (gpioId != gpio::NO_GPIO) {
if (gpioIF->pullLow(gpioId) != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::spiCallback: Failed to pull chip select low" << std::endl;
}
spi::SpiModes spiMode = spi::SpiModes::MODE_0;
uint32_t spiSpeed = 0;
cookie->getSpiParameters(spiMode, spiSpeed, nullptr);
// We are in protected section, so we can use the static variable here without issues.
// We don't need to set the speed because a SPI core is used, but the mode has to be set once
// correctly for all RWs
if (not MODE_SET) {
comIf->setSpiSpeedAndMode(fileDescriptor, spiMode, spiSpeed);
MODE_SET = true;
}
/** Sending frame start sign */
writeBuffer[0] = FLAG_BYTE;
writeSize = 1;
if (write(fileDescriptor, writeBuffer, writeSize) != static_cast<ssize_t>(writeSize)) {
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
return RwHandler::SPI_WRITE_FAILURE;
}
@ -87,33 +100,39 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
}
if (write(fileDescriptor, writeBuffer, writeSize) != static_cast<ssize_t>(writeSize)) {
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
return RwHandler::SPI_WRITE_FAILURE;
}
idx++;
}
/** Sending frame end sign */
writeBuffer[0] = 0x7E;
writeBuffer[0] = FLAG_BYTE;
writeSize = 1;
if (write(fileDescriptor, writeBuffer, writeSize) != static_cast<ssize_t>(writeSize)) {
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
return RwHandler::SPI_WRITE_FAILURE;
}
uint8_t* rxBuf = nullptr;
result = comIf->getReadBuffer(cookie->getSpiAddress(), &rxBuf);
if (result != HasReturnvaluesIF::RETURN_OK) {
closeSpi(gpioId, gpioIF, mutex);
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
return result;
}
size_t replyBufferSize = cookie->getMaxBufferSize();
/** There must be a delay of at least 20 ms after sending the command */
// There must be a delay of at least 20 ms after sending the command.
// Delay for 70 ms here and release the SPI bus for that duration.
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
usleep(RwDefinitions::SPI_REPLY_DELAY);
result = openSpi(dev, O_RDWR, gpioIF, gpioId, mutex, timeoutType, timeoutMs, fileDescriptor);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
/**
* The reaction wheel responds with empty frames while preparing the reply data.
@ -123,13 +142,13 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
for (int idx = 0; idx < 10; idx++) {
if (read(fileDescriptor, &byteRead, 1) != 1) {
sif::error << "rwSpiCallback::spiCallback: Read failed" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
return RwHandler::SPI_READ_FAILURE;
}
if (idx == 0) {
if (byteRead != FLAG_BYTE) {
sif::error << "Invalid data, expected start marker" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
return RwHandler::NO_START_MARKER;
}
}
@ -140,7 +159,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
if (idx == 9) {
sif::error << "rwSpiCallback::spiCallback: Empty frame timeout" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
return RwHandler::NO_REPLY;
}
}
@ -180,7 +199,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
continue;
} else {
sif::error << "rwSpiCallback::spiCallback: Invalid substitute" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
result = RwHandler::INVALID_SUBSTITUTE;
break;
}
@ -201,8 +220,9 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
result = RwHandler::SPI_READ_FAILURE;
break;
}
if (byteRead != 0x7E) {
sif::error << "rwSpiCallback::spiCallback: Missing end sign 0x7E" << std::endl;
if (byteRead != FLAG_BYTE) {
sif::error << "rwSpiCallback::spiCallback: Missing end sign " << static_cast<int>(FLAG_BYTE)
<< std::endl;
decodedFrameLen--;
result = RwHandler::MISSING_END_SIGN;
break;
@ -213,12 +233,40 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
cookie->setTransferSize(decodedFrameLen);
closeSpi(gpioId, gpioIF, mutex);
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
return result;
}
void closeSpi(gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex) {
namespace {
ReturnValue_t openSpi(const std::string& devname, int flags, GpioIF* gpioIF, gpioId_t gpioId,
MutexIF* mutex, MutexIF::TimeoutType timeoutType, uint32_t timeoutMs,
int& fd) {
ReturnValue_t result = mutex->lockMutex(timeoutType, timeoutMs);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "rwSpiCallback::spiCallback: Failed to lock mutex" << std::endl;
return result;
}
fd = open(devname.c_str(), flags);
if (fd < 0) {
sif::error << "rwSpiCallback::spiCallback: Failed to open device file" << std::endl;
return SpiComIF::OPENING_FILE_FAILED;
}
// Pull SPI CS low. For now, no support for active high given
if (gpioId != gpio::NO_GPIO) {
result = gpioIF->pullLow(gpioId);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::spiCallback: Failed to pull chip select low" << std::endl;
return result;
}
}
return HasReturnvaluesIF::RETURN_OK;
}
void closeSpi(int fd, gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex) {
close(fd);
if (gpioId != gpio::NO_GPIO) {
if (gpioIF->pullHigh(gpioId) != HasReturnvaluesIF::RETURN_OK) {
sif::error << "closeSpi: Failed to pull chip select high" << std::endl;
@ -229,4 +277,7 @@ void closeSpi(gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex) {
;
}
}
} // namespace
} // namespace rwSpiCallback

View File

@ -33,14 +33,5 @@ static constexpr uint8_t FLAG_BYTE = 0x7E;
ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sendData,
size_t sendLen, void* args);
/**
* @brief This function closes a spi session. Pulls the chip select to high an releases the
* mutex.
* @param gpioId Gpio ID of chip select
* @param gpioIF Pointer to gpio interface to drive the chip select
* @param mutex The spi mutex
*/
void closeSpi(gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex);
} // namespace rwSpiCallback
#endif /* BSP_Q7S_RW_SPI_CALLBACK_H_ */

View File

@ -1,6 +1 @@
target_sources(${OBSW_NAME} PRIVATE
)
target_sources(${OBSW_NAME} PRIVATE)

View File

@ -1,8 +1,4 @@
target_sources(${OBSW_NAME} PRIVATE
CoreController.cpp
InitMission.cpp
)
target_sources(${OBSW_NAME} PRIVATE CoreController.cpp InitMission.cpp
ObjectFactory.cpp)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
InitMission.cpp
)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE InitMission.cpp)

View File

@ -0,0 +1,87 @@
#pragma once
#include <fsfw/action/MinMaxParameter.h>
#include <fsfw/action/TemplateAction.h>
#include <fsfw/introspection/Enum.h>
class CoreController;
namespace core {
FSFW_ENUM(ActionId, ActionId_t,
((LIST_DIRECTORY_INTO_FILE, 0, "List Directory into file"))(
(SWITCH_REBOOT_FILE_HANDLING, 5,
"Switch Reboot File Handling"))((RESET_REBOOT_COUNTERS, 6, "Reset Boot Counters"))(
(SWITCH_IMG_LOCK, 7, "Switch Image Lock"))((SET_MAX_REBOOT_CNT, 8,
"Set maximum reboot Count"))(
(XSC_REBOOT_OBC, 32, "Reboot using the xsc_boot_copy command"))(
(MOUNT_OTHER_COPY, 33, "Mount Other Copy"))((REBOOT_OBC, 34,
"Reboot using the reboot command")))
FSFW_ENUM(Boolenum, uint8_t, ((NO, 0, "NO"))((YES, 1, "Yes")))
class ListDirectoryIntoFileAction
: public TemplateAction<CoreController, ListDirectoryIntoFileAction, ActionId> {
public:
ListDirectoryIntoFileAction(CoreController *owner)
: TemplateAction(owner, ActionId::LIST_DIRECTORY_INTO_FILE){};
};
class SwitchRebootFileHandlingAction
: public TemplateAction<CoreController, SwitchRebootFileHandlingAction, ActionId> {
public:
SwitchRebootFileHandlingAction(CoreController *owner)
: TemplateAction(owner, ActionId::SWITCH_REBOOT_FILE_HANDLING){};
Parameter<Boolenum> enableRebootFile =
Parameter<Boolenum>::createParameter(this, "Enable Reboot File");
};
class ResetRebootCountersAction
: public TemplateAction<CoreController, ResetRebootCountersAction, ActionId> {
public:
FSFW_ENUM(Selection, uint8_t, ((ZERO, "0"))((ONE, "1"))((ALL, "All")))
ResetRebootCountersAction(CoreController *owner)
: TemplateAction(owner, ActionId::RESET_REBOOT_COUNTERS){};
Parameter<Selection> chip = Parameter<Selection>::createParameter(this, "Chip");
Parameter<Selection> copy = Parameter<Selection>::createParameter(this, "Copy");
};
class SwitchImageLockAction
: public TemplateAction<CoreController, SwitchImageLockAction, ActionId> {
public:
FSFW_ENUM(Selection, uint8_t, ((ZERO, "0"))((ONE, "1")))
SwitchImageLockAction(CoreController *owner) : TemplateAction(owner, ActionId::SWITCH_IMG_LOCK){};
Parameter<Boolenum> lock = Parameter<Boolenum>::createParameter(this, "Lock Image");
Parameter<Selection> chip = Parameter<Selection>::createParameter(this, "Chip");
Parameter<Selection> copy = Parameter<Selection>::createParameter(this, "Copy");
};
class SetMaxRebootCntAction
: public TemplateAction<CoreController, SetMaxRebootCntAction, ActionId> {
public:
SetMaxRebootCntAction(CoreController *owner)
: TemplateAction(owner, ActionId::SET_MAX_REBOOT_CNT){};
Parameter<uint8_t> maxCount = Parameter<uint8_t>::createParameter(this, "Count");
};
class XscRebootObcAction : public TemplateAction<CoreController, XscRebootObcAction, ActionId> {
public:
FSFW_ENUM(Selection, uint8_t, ((ZERO, "0"))((ONE, "1"))((SAME, "Same")))
XscRebootObcAction(CoreController *owner) : TemplateAction(owner, ActionId::XSC_REBOOT_OBC){};
Parameter<Selection> chip = Parameter<Selection>::createParameter(this, "Chip");
Parameter<Selection> copy = Parameter<Selection>::createParameter(this, "Copy");
};
class RebootObcAction : public TemplateAction<CoreController, RebootObcAction, ActionId> {
public:
RebootObcAction(CoreController *owner) : TemplateAction(owner, ActionId::REBOOT_OBC){};
};
} // namespace core

View File

@ -56,6 +56,7 @@ CoreController::CoreController(object_id_t objectId)
} catch (const std::filesystem::filesystem_error &e) {
sif::error << "CoreController::CoreController: Failed with exception " << e.what() << std::endl;
}
sdCardCheckCd.timeOut();
eventQueue = QueueFactory::instance()->createMessageQueue(5, EventMessage::MAX_MESSAGE_SIZE);
}
@ -77,6 +78,10 @@ void CoreController::performControlOperation() {
performWatchdogControlOperation();
sdStateMachine();
performMountedSdCardOperations();
if (sdCardCheckCd.hasTimedOut()) {
performSdCardCheck();
sdCardCheckCd.resetTimer();
}
readHkData();
opDivider5.checkAndIncrement();
opDivider10.checkAndIncrement();
@ -87,6 +92,7 @@ ReturnValue_t CoreController::initializeLocalDataPool(localpool::DataPool &local
localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry<float>({0}));
poolManager.subscribeForPeriodicPacket(hkSet.getSid(), false, 10.0, false);
return HasReturnvaluesIF::RETURN_OK;
}
@ -133,6 +139,9 @@ ReturnValue_t CoreController::initialize() {
ReturnValue_t CoreController::initializeAfterTaskCreation() {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
sdInfo.pref = sdcMan->getPreferredSdCard();
sdcMan->setActiveSdCard(sdInfo.pref);
currMntPrefix = sdcMan->getCurrentMountPrefix();
if (BLOCKING_SD_INIT) {
ReturnValue_t result = initSdCardBlocking();
if (result != HasReturnvaluesIF::RETURN_OK and result != SdCardManager::ALREADY_MOUNTED) {
@ -154,70 +163,73 @@ ReturnValue_t CoreController::initializeAfterTaskCreation() {
return result;
}
ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t *data, size_t size) {
switch (actionId) {
case (LIST_DIRECTORY_INTO_FILE): {
return actionListDirectoryIntoFile(actionId, commandedBy, data, size);
}
case (SWITCH_REBOOT_FILE_HANDLING): {
if (size < 1) {
return HasActionsIF::INVALID_PARAMETERS;
}
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.pref) + REBOOT_FILE;
// Disable the reboot file mechanism
parseRebootFile(path, rebootFile);
if (data[0] == 0) {
rebootFile.enabled = false;
rewriteRebootFile(rebootFile);
} else if (data[0] == 1) {
rebootFile.enabled = true;
rewriteRebootFile(rebootFile);
} else {
return HasActionsIF::INVALID_PARAMETERS;
}
return HasActionsIF::EXECUTION_FINISHED;
}
case (RESET_REBOOT_COUNTERS): {
if (size == 0) {
resetRebootCount(xsc::ALL_CHIP, xsc::ALL_COPY);
} else if (size == 2) {
if (data[0] > 1 or data[1] > 1) {
return HasActionsIF::INVALID_PARAMETERS;
}
resetRebootCount(static_cast<xsc::Chip>(data[0]), static_cast<xsc::Copy>(data[1]));
}
return HasActionsIF::EXECUTION_FINISHED;
}
case (SWITCH_IMG_LOCK): {
if (size != 3) {
return HasActionsIF::INVALID_PARAMETERS;
}
if (data[1] > 1 or data[2] > 1) {
return HasActionsIF::INVALID_PARAMETERS;
}
setRebootMechanismLock(data[0], static_cast<xsc::Chip>(data[1]),
static_cast<xsc::Copy>(data[2]));
return HasActionsIF::EXECUTION_FINISHED;
}
case (SET_MAX_REBOOT_CNT): {
if (size < 1) {
return HasActionsIF::INVALID_PARAMETERS;
}
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.pref) + REBOOT_FILE;
// Disable the reboot file mechanism
parseRebootFile(path, rebootFile);
rebootFile.maxCount = data[0];
rewriteRebootFile(rebootFile);
return HasActionsIF::EXECUTION_FINISHED;
}
case (REBOOT_OBC): {
return actionPerformReboot(data, size);
}
default: {
return HasActionsIF::INVALID_ACTION_ID;
}
ReturnValue_t CoreController::executeAction(Action *action) { return action->handle(); }
ReturnValue_t CoreController::handleAction(core::SwitchRebootFileHandlingAction *action) {
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE;
// Disable the reboot file mechanism
parseRebootFile(path, rebootFile);
if (action->enableRebootFile.value == core::Boolenum::NO) {
rebootFile.enabled = false;
rewriteRebootFile(rebootFile);
} else {
rebootFile.enabled = true;
rewriteRebootFile(rebootFile);
}
return HasActionsIF::EXECUTION_FINISHED;
}
ReturnValue_t CoreController::handleAction(core::ResetRebootCountersAction *action) {
xsc::Chip chip = xsc::NO_CHIP;
switch (action->chip.value) {
case core::ResetRebootCountersAction::Selection::ALL:
chip = xsc::ALL_CHIP;
break;
case core::ResetRebootCountersAction::Selection::ZERO:
chip = xsc::CHIP_0;
break;
case core::ResetRebootCountersAction::Selection::ONE:
chip = xsc::CHIP_1;
break;
}
xsc::Copy copy = xsc::NO_COPY;
switch (action->copy.value) {
case core::ResetRebootCountersAction::Selection::ALL:
copy = xsc::ALL_COPY;
break;
case core::ResetRebootCountersAction::Selection::ZERO:
copy = xsc::COPY_0;
break;
case core::ResetRebootCountersAction::Selection::ONE:
copy = xsc::COPY_1;
break;
}
resetRebootCount(chip, copy);
return HasActionsIF::EXECUTION_FINISHED;
}
ReturnValue_t CoreController::handleAction(core::SwitchImageLockAction *action) {
bool lock = action->lock.value == core::Boolenum::YES;
xsc::Chip chip = xsc::CHIP_0;
if (action->chip.value == core::SwitchImageLockAction::Selection::ONE) {
chip = xsc::CHIP_1;
}
xsc::Copy copy = xsc::COPY_0;
if (action->copy.value == core::SwitchImageLockAction::Selection::ONE) {
copy = xsc::COPY_0;
}
setRebootMechanismLock(lock, chip, copy);
return HasActionsIF::EXECUTION_FINISHED;
}
ReturnValue_t CoreController::handleAction(core::SetMaxRebootCntAction *action) {
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE;
// Disable the reboot file mechanism
parseRebootFile(path, rebootFile);
rebootFile.maxCount = action->maxCount;
rewriteRebootFile(rebootFile);
return HasActionsIF::EXECUTION_FINISHED;
}
ReturnValue_t CoreController::checkModeCommand(Mode_t mode, Submode_t submode,
@ -236,13 +248,12 @@ ReturnValue_t CoreController::initSdCardBlocking() {
return HasReturnvaluesIF::RETURN_OK;
#else
result = sdcMan->getSdCardActiveStatus(sdInfo.currentState);
result = sdcMan->getSdCardsStatus(sdInfo.currentState);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Getting SD card activity status failed" << std::endl;
}
#if Q7S_SD_CARD_CONFIG == Q7S_SD_COLD_REDUNDANT
determinePreferredSdCard();
updateSdInfoOther();
sif::info << "Cold redundant SD card configuration, preferred SD card: "
<< static_cast<int>(sdInfo.pref) << std::endl;
@ -323,8 +334,8 @@ ReturnValue_t CoreController::sdStateMachine() {
if (sdInfo.state == SdStates::SET_STATE_SELF) {
if (not sdInfo.commandExecuted) {
result = sdcMan->getSdCardActiveStatus(sdInfo.currentState);
determinePreferredSdCard();
result = sdcMan->getSdCardsStatus(sdInfo.currentState);
sdInfo.pref = sdcMan->getPreferredSdCard();
updateSdInfoOther();
if (sdInfo.pref != sd::SdCard::SLOT_0 and sdInfo.pref != sd::SdCard::SLOT_1) {
sif::warning << "Preferred SD card invalid. Setting to card 0.." << std::endl;
@ -467,7 +478,7 @@ ReturnValue_t CoreController::sdStateMachine() {
sdInfo.state = SdStates::IDLE;
sdInfo.cycleCount = 0;
sdcMan->setBlocking(false);
sdcMan->getSdCardActiveStatus(sdInfo.currentState);
sdcMan->getSdCardsStatus(sdInfo.currentState);
if (not sdInfo.initFinished) {
updateSdInfoOther();
sdInfo.initFinished = true;
@ -735,30 +746,29 @@ ReturnValue_t CoreController::initVersionFile() {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t CoreController::actionListDirectoryIntoFile(ActionId_t actionId,
MessageQueueId_t commandedBy,
const uint8_t *data, size_t size) {
ReturnValue_t CoreController::handleAction(core::ListDirectoryIntoFileAction *action) {
// TODO: Packet definition for clean deserialization
// 2 bytes for a and R flag, at least 5 bytes for minimum valid path /tmp with
// null termination, at least 7 bytes for minimum target file name /tmp/a with
// null termination.
if (size < 14) {
return HasActionsIF::INVALID_PARAMETERS;
}
// TODO make work again
// if (size < 14) {
// return HasActionsIF::INVALID_PARAMETERS;
// }
// We could also make -l optional, but I can't think of a reason why to not use -l..
// This flag specifies to run ls with -a
bool aFlag = data[0];
data += 1;
// This flag specifies to run ls with -R
bool RFlag = data[1];
data += 1;
bool aFlag = 0; // data[0];
// data += 1;
// This flag specifies to run ls with -R
bool RFlag = 0; // data[1];
// data += 1;
size_t remainingSize = size - 2;
size_t remainingSize = 0; // size - 2;
// One larger for null termination, which prevents undefined behaviour if the sent
// strings are not 0 terminated properly
std::vector<uint8_t> repoAndTargetFileBuffer(remainingSize + 1, 0);
std::memcpy(repoAndTargetFileBuffer.data(), data, remainingSize);
// std::memcpy(repoAndTargetFileBuffer.data(), data, remainingSize);
const char *currentCharPtr = reinterpret_cast<const char *>(repoAndTargetFileBuffer.data());
// Full target file name
std::string repoName(currentCharPtr);
@ -785,7 +795,7 @@ ReturnValue_t CoreController::actionListDirectoryIntoFile(ActionId_t actionId,
int result = std::system(oss.str().c_str());
if (result != 0) {
utility::handleSystemError(result, "CoreController::actionListDirectoryIntoFile");
actionHelper.finish(false, commandedBy, actionId);
actionHelper.finish(false, action->commandedBy, action->getId());
}
return HasReturnvaluesIF::RETURN_OK;
}
@ -844,25 +854,23 @@ void CoreController::initPrint() {
#endif
}
ReturnValue_t CoreController::actionPerformReboot(const uint8_t *data, size_t size) {
if (size < 1) {
ReturnValue_t CoreController::handleAction(core::XscRebootObcAction *action) {
if (action->chip.value == core::XscRebootObcAction::Selection::SAME and
not(action->copy.value == core::XscRebootObcAction::Selection::SAME)) {
return HasActionsIF::INVALID_PARAMETERS;
}
bool rebootSameBootCopy = data[0];
bool protOpPerformed;
bool rebootSameBootCopy = false;
if (action->chip.value == core::XscRebootObcAction::Selection::SAME and
action->copy.value == core::XscRebootObcAction::Selection::SAME) {
rebootSameBootCopy = true;
}
bool protOpPerformed = false;
SdCardManager::instance()->setBlocking(true);
if (rebootSameBootCopy) {
#if OBSW_VERBOSE_LEVEL >= 1
sif::info << "CoreController::actionPerformReboot: Rebooting on current image" << std::endl;
#endif
// Attempt graceful shutdown by unmounting and switching off SD cards
SdCardManager::instance()->switchOffSdCard(sd::SdCard::SLOT_0);
SdCardManager::instance()->switchOffSdCard(sd::SdCard::SLOT_1);
// If any boot copies are unprotected
ReturnValue_t retval = setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
protOpPerformed, false);
if (retval == HasReturnvaluesIF::RETURN_OK and protOpPerformed) {
sif::info << "Running slot was writeprotected before reboot" << std::endl;
}
gracefulShutdownTasks(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, protOpPerformed);
int result = std::system("xsc_boot_copy -r");
if (result != 0) {
utility::handleSystemError(result, "CoreController::executeAction");
@ -870,26 +878,26 @@ ReturnValue_t CoreController::actionPerformReboot(const uint8_t *data, size_t si
}
return HasActionsIF::EXECUTION_FINISHED;
}
if (size < 3 or (data[1] > 1 or data[2] > 1)) {
return HasActionsIF::INVALID_PARAMETERS;
}
#if OBSW_VERBOSE_LEVEL >= 1
sif::info << "CoreController::actionPerformReboot: Rebooting on " << static_cast<int>(data[1])
<< " " << static_cast<int>(data[2]) << std::endl;
sif::info << "CoreController::actionPerformReboot: Rebooting on "
<< static_cast<uint8_t>(action->chip.value) << " "
<< static_cast<uint8_t>(action->copy.value) << std::endl;
#endif
// Check that the target chip and copy is writeprotected first
generateChipStateFile();
// If any boot copies are unprotected, protect them here
auto tgtChip = static_cast<xsc::Chip>(data[1]);
auto tgtCopy = static_cast<xsc::Copy>(data[2]);
ReturnValue_t retval =
setBootCopyProtection(static_cast<xsc::Chip>(data[1]), static_cast<xsc::Copy>(data[2]), true,
protOpPerformed, false);
if (retval == HasReturnvaluesIF::RETURN_OK and protOpPerformed) {
sif::info << "Target slot was writeprotected before reboot" << std::endl;
auto tgtChip = xsc::CHIP_0;
if (action->chip.value == core::XscRebootObcAction::Selection::ONE) {
tgtChip = xsc::CHIP_1;
}
auto tgtCopy = xsc::COPY_0;
if (action->copy.value == core::XscRebootObcAction::Selection::ONE) {
tgtCopy = xsc::COPY_1;
}
// This function can not really fail
gracefulShutdownTasks(tgtChip, tgtCopy, protOpPerformed);
switch (tgtChip) {
case (xsc::Chip::CHIP_0): {
@ -930,27 +938,32 @@ ReturnValue_t CoreController::actionPerformReboot(const uint8_t *data, size_t si
return HasReturnvaluesIF::RETURN_FAILED;
}
CoreController::~CoreController() {}
void CoreController::determinePreferredSdCard() {
if (sdInfo.pref == sd::SdCard::NONE) {
ReturnValue_t result = sdcMan->getPreferredSdCard(sdInfo.pref);
if (result != HasReturnvaluesIF::RETURN_OK) {
if (result == scratch::KEY_NOT_FOUND) {
sif::warning << "CoreController::sdCardInit: "
"Preferred SD card not set. Setting to 0"
<< std::endl;
sdcMan->setPreferredSdCard(sd::SdCard::SLOT_0);
sdInfo.pref = sd::SdCard::SLOT_0;
} else {
sif::warning << "CoreController::sdCardInit: Could not get preferred SD card"
"information from the scratch buffer"
<< std::endl;
}
}
}
ReturnValue_t CoreController::handleAction(core::RebootObcAction *action) {
bool protOpPerformed = false;
gracefulShutdownTasks(xsc::Chip::CHIP_0, xsc::Copy::COPY_0, protOpPerformed);
std::system("reboot");
return RETURN_OK;
}
ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy,
bool &protOpPerformed) {
sdcMan->setBlocking(true);
// Attempt graceful shutdown by unmounting and switching off SD cards
sdcMan->switchOffSdCard(sd::SdCard::SLOT_0);
sdcMan->switchOffSdCard(sd::SdCard::SLOT_1);
// If any boot copies are unprotected
ReturnValue_t result = setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
protOpPerformed, false);
if (result == HasReturnvaluesIF::RETURN_OK and protOpPerformed) {
// TODO: Would be nice to notify operator. But we can't use the filesystem anymore
// and a reboot is imminent. Use scratch buffer?
sif::info << "Running slot was writeprotected before reboot" << std::endl;
}
return result;
}
CoreController::~CoreController() {}
void CoreController::updateSdInfoOther() {
if (sdInfo.pref == sd::SdCard::SLOT_0) {
sdInfo.prefChar = "0";
@ -1234,24 +1247,73 @@ void CoreController::performWatchdogControlOperation() {
}
void CoreController::performMountedSdCardOperations() {
currMntPrefix = sdcMan->getCurrentMountPrefix();
if (doPerformMountedSdCardOps) {
bool sdCardMounted = false;
sdCardMounted = sdcMan->isSdCardMounted(sdInfo.pref);
if (sdCardMounted) {
std::string path = currMntPrefix + "/" + CONF_FOLDER;
if (not std::filesystem::exists(path)) {
std::filesystem::create_directory(path);
auto mountedSdCardOp = [&](bool &mntSwitch, sd::SdCard sdCard, std::string mntPoint) {
if (mntSwitch) {
bool sdCardMounted = sdcMan->isSdCardMounted(sdCard);
if (sdCardMounted and not performOneShotSdCardOpsSwitch) {
std::ostringstream path;
path << mntPoint << "/" << CONF_FOLDER;
if (not std::filesystem::exists(path.str())) {
std::filesystem::create_directory(path.str());
}
initVersionFile();
initClockFromTimeFile();
performRebootFileHandling(false);
performOneShotSdCardOpsSwitch = true;
}
initVersionFile();
initClockFromTimeFile();
performRebootFileHandling(false);
doPerformMountedSdCardOps = false;
mntSwitch = false;
}
};
if (sdInfo.pref == sd::SdCard::SLOT_1) {
mountedSdCardOp(sdInfo.mountSwitch.second, sd::SdCard::SLOT_1, SdCardManager::SD_1_MOUNT_POINT);
mountedSdCardOp(sdInfo.mountSwitch.first, sd::SdCard::SLOT_0, SdCardManager::SD_0_MOUNT_POINT);
} else {
mountedSdCardOp(sdInfo.mountSwitch.first, sd::SdCard::SLOT_0, SdCardManager::SD_0_MOUNT_POINT);
mountedSdCardOp(sdInfo.mountSwitch.second, sd::SdCard::SLOT_1, SdCardManager::SD_1_MOUNT_POINT);
}
timeFileHandler();
}
ReturnValue_t CoreController::performSdCardCheck() {
bool mountedReadOnly = false;
SdCardManager::SdStatePair active;
sdcMan->getSdCardsStatus(active);
auto sdCardCheck = [&](sd::SdCard sdCard) {
ReturnValue_t result = sdcMan->isSdCardMountedReadOnly(sdCard, mountedReadOnly);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "CoreController::performSdCardCheck: Could not check "
"read-only mount state"
<< std::endl;
mountedReadOnly = true;
}
if (mountedReadOnly) {
int linuxErrno = 0;
result = sdcMan->performFsck(sdCard, true, linuxErrno);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "CoreController::performSdCardCheck: fsck command on SD Card "
<< static_cast<uint8_t>(sdCard) << " failed with code " << linuxErrno << " | "
<< strerror(linuxErrno);
}
result = sdcMan->remountReadWrite(sdCard);
if (result == HasReturnvaluesIF::RETURN_OK) {
sif::warning << "CoreController::performSdCardCheck: Remounted SD Card "
<< static_cast<uint8_t>(sdCard) << " read-write";
} else {
sif::error << "CoreController::performSdCardCheck: Remounting SD Card "
<< static_cast<uint8_t>(sdCard) << " read-write failed";
}
}
};
if (active.first == sd::SdState::MOUNTED) {
sdCardCheck(sd::SdCard::SLOT_0);
}
if (active.second == sd::SdState::MOUNTED) {
sdCardCheck(sd::SdCard::SLOT_1);
}
return RETURN_OK;
}
void CoreController::performRebootFileHandling(bool recreateFile) {
using namespace std;
std::string path = currMntPrefix + REBOOT_FILE;
@ -1636,24 +1698,20 @@ void CoreController::resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
std::string path = currMntPrefix + REBOOT_FILE;
// Disable the reboot file mechanism
parseRebootFile(path, rebootFile);
if (tgtChip == xsc::ALL_CHIP and tgtCopy == xsc::ALL_COPY) {
rebootFile.img00Cnt = 0;
rebootFile.img01Cnt = 0;
rebootFile.img10Cnt = 0;
rebootFile.img11Cnt = 0;
} else {
if (tgtChip == xsc::CHIP_0) {
if (tgtCopy == xsc::COPY_0) {
rebootFile.img00Cnt = 0;
} else {
rebootFile.img01Cnt = 0;
}
} else {
if (tgtCopy == xsc::COPY_0) {
rebootFile.img10Cnt = 0;
} else {
rebootFile.img11Cnt = 0;
}
if (tgtChip == xsc::ALL_CHIP or tgtChip == xsc::CHIP_0) {
if (tgtCopy == xsc::ALL_COPY or tgtCopy == xsc::COPY_0) {
rebootFile.img00Cnt = 0;
}
if (tgtCopy == xsc::ALL_COPY or tgtCopy == xsc::COPY_1) {
rebootFile.img01Cnt = 0;
}
}
if (tgtChip == xsc::ALL_CHIP or tgtChip == xsc::CHIP_1) {
if (tgtCopy == xsc::ALL_COPY or tgtCopy == xsc::COPY_0) {
rebootFile.img10Cnt = 0;
}
if (tgtCopy == xsc::ALL_COPY or tgtCopy == xsc::COPY_1) {
rebootFile.img11Cnt = 0;
}
}
rewriteRebootFile(rebootFile);
@ -1677,7 +1735,7 @@ void CoreController::rewriteRebootFile(RebootFile file) {
}
void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy) {
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.pref) + REBOOT_FILE;
std::string path = currMntPrefix + REBOOT_FILE;
// Disable the reboot file mechanism
parseRebootFile(path, rebootFile);
if (tgtChip == xsc::CHIP_0) {
@ -1793,3 +1851,7 @@ bool CoreController::isNumber(const std::string &s) {
return !s.empty() && std::find_if(s.begin(), s.end(),
[](unsigned char c) { return !std::isdigit(c); }) == s.end();
}
ModeDefinitionHelper CoreController::getModeDefinitionHelper() {
return ModeDefinitionHelper::create<ControllerModes, DefaultSubmode>();
}

View File

@ -6,6 +6,7 @@
#include <cstddef>
#include "CoreActions.h"
#include "CoreDefinitions.h"
#include "bsp_q7s/memory/SdCardManager.h"
#include "events/subsystemIdRanges.h"
@ -61,19 +62,10 @@ class CoreController : public ExtendedControllerBase {
"/" + std::string(CONF_FOLDER) + "/" + std::string(REBOOT_FILE_NAME);
const std::string TIME_FILE = "/" + std::string(CONF_FOLDER) + "/" + std::string(TIME_FILE_NAME);
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
static constexpr ActionId_t SWITCH_REBOOT_FILE_HANDLING = 5;
static constexpr ActionId_t RESET_REBOOT_COUNTERS = 6;
static constexpr ActionId_t SWITCH_IMG_LOCK = 7;
static constexpr ActionId_t SET_MAX_REBOOT_CNT = 8;
static constexpr ActionId_t REBOOT_OBC = 32;
static constexpr ActionId_t MOUNT_OTHER_COPY = 33;
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::CORE;
static constexpr Event ALLOC_FAILURE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
//! [EXPORT] : [COMMENT] Software reboot occured. Can also be a systemd reboot.
//! [EXPORT] : [COMMENT] Software reboot occurred. Can also be a systemd reboot.
//! P1: Current Chip, P2: Current Copy
static constexpr Event REBOOT_SW = event::makeEvent(SUBSYSTEM_ID, 1, severity::MEDIUM);
//! [EXPORT] : [COMMENT] The reboot mechanism was triggered.
@ -91,8 +83,17 @@ class CoreController : public ExtendedControllerBase {
ReturnValue_t initializeAfterTaskCreation() override;
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) override;
ReturnValue_t executeAction(Action* action) override;
ReturnValue_t handleAction(core::ListDirectoryIntoFileAction* action);
ReturnValue_t handleAction(core::SwitchRebootFileHandlingAction* action);
ReturnValue_t handleAction(core::ResetRebootCountersAction* action);
ReturnValue_t handleAction(core::SwitchImageLockAction* action);
ReturnValue_t handleAction(core::SetMaxRebootCntAction* action);
ReturnValue_t handleAction(core::XscRebootObcAction* action);
ReturnValue_t handleAction(core::RebootObcAction* action);
ModeDefinitionHelper getModeDefinitionHelper() override;
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
void performControlOperation() override;
@ -159,11 +160,12 @@ class CoreController : public ExtendedControllerBase {
struct SdInfo {
sd::SdCard pref = sd::SdCard::NONE;
sd::SdState prefState = sd::SdState::OFF;
sd::SdCard other = sd::SdCard::NONE;
sd::SdState prefState = sd::SdState::OFF;
sd::SdState otherState = sd::SdState::OFF;
std::string prefChar = "0";
std::string otherChar = "1";
std::pair<bool, bool> mountSwitch = {true, true};
SdStates state = SdStates::START;
// Used to track whether a command was executed
bool commandExecuted = true;
@ -179,7 +181,7 @@ class CoreController : public ExtendedControllerBase {
} sdInfo;
RebootFile rebootFile = {};
std::string currMntPrefix;
bool doPerformMountedSdCardOps = true;
bool performOneShotSdCardOpsSwitch = true;
/**
* Index 0: Chip 0 Copy 0
@ -193,14 +195,26 @@ class CoreController : public ExtendedControllerBase {
core::HkSet hkSet;
core::ListDirectoryIntoFileAction listDirectoryIntoFileAction =
core::ListDirectoryIntoFileAction(this);
core::SwitchRebootFileHandlingAction switchRebootFileHandlingAction =
core::SwitchRebootFileHandlingAction(this);
core::ResetRebootCountersAction resetRebootCountersAction = core::ResetRebootCountersAction(this);
core::SwitchImageLockAction switchImageLockAction = core::SwitchImageLockAction(this);
core::SetMaxRebootCntAction setMaxRebootCntAction = core::SetMaxRebootCntAction(this);
core::XscRebootObcAction xscRebootObcAction = core::XscRebootObcAction(this);
core::RebootObcAction rebootObcAction = core::RebootObcAction(this);
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override;
Countdown sdCardCheckCd = Countdown(120000);
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, uint32_t* msToReachTheMode);
void performMountedSdCardOperations();
ReturnValue_t initVersionFile();
ReturnValue_t initClockFromTimeFile();
ReturnValue_t performSdCardCheck();
ReturnValue_t timeFileHandler();
ReturnValue_t initBootCopy();
ReturnValue_t initWatchdogFifo();
@ -214,14 +228,14 @@ class CoreController : public ExtendedControllerBase {
ReturnValue_t sdColdRedundantBlockingInit();
void currentStateSetter(sd::SdCard sdCard, sd::SdState newState);
void determinePreferredSdCard();
void executeNextExternalSdCommand();
void checkExternalSdCommandStatus();
void performRebootFileHandling(bool recreateFile);
ReturnValue_t actionListDirectoryIntoFile(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size);
ReturnValue_t actionPerformReboot(const uint8_t* data, size_t size);
ReturnValue_t actionXscReboot(const uint8_t* data, size_t size);
ReturnValue_t actionReboot(const uint8_t* data, size_t size);
ReturnValue_t gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy, bool& protOpPerformed);
void performWatchdogControlOperation();

View File

@ -1,5 +1,7 @@
#include "bsp_q7s/core/InitMission.h"
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
#include <iostream>
#include <vector>
@ -13,6 +15,7 @@
#include "fsfw/tasks/FixedTimeslotTaskIF.h"
#include "fsfw/tasks/PeriodicTaskIF.h"
#include "fsfw/tasks/TaskFactory.h"
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
#include "mission/utility/InitMission.h"
#include "pollingsequence/pollingSequenceFactory.h"
@ -33,8 +36,16 @@ ObjectManagerIF* objectManager = nullptr;
void initmission::initMission() {
sif::info << "Building global objects.." << std::endl;
/* Instantiate global object manager and also create all objects */
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
try {
/* Instantiate global object manager and also create all objects */
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
} catch (const std::invalid_argument& e) {
sif::error << "initmission::initMission: Object Construction failed with an "
"invalid argument: "
<< e.what();
std::exit(1);
}
sif::info << "Initializing all objects.." << std::endl;
ObjectManager::instance()->initialize();
@ -115,30 +126,77 @@ void initmission::initTasks() {
#if OBSW_ADD_ACS_HANDLERS == 1
PeriodicTaskIF* acsTask = factory->createPeriodicTask(
"ACS_CTRL", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
"ACS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
result = acsTask->addComponent(objects::GPS_CONTROLLER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("GPS_CTRL", objects::GPS_CONTROLLER);
}
#endif /* OBSW_ADD_ACS_HANDLERS */
acsTask->addComponent(objects::ACS_CONTROLLER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("ACS_CTRL", objects::ACS_CONTROLLER);
}
PeriodicTaskIF* sysTask = factory->createPeriodicTask(
"SYS_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
static_cast<void>(sysTask);
#if OBSW_ADD_ACS_HANDLERS == 1
result = sysTask->addComponent(objects::ACS_BOARD_ASS);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("ACS_BOARD_ASS", objects::ACS_BOARD_ASS);
}
#endif /* OBSW_ADD_ACS_HANDLERS */
#if OBSW_ADD_RW == 1
result = sysTask->addComponent(objects::RW_ASS);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("RW_ASS", objects::RW_ASS);
}
#endif
#if OBSW_ADD_SUS_BOARD_ASS == 1
result = sysTask->addComponent(objects::SUS_BOARD_ASS);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("SUS_BOARD_ASS", objects::SUS_BOARD_ASS);
}
#endif
result = sysTask->addComponent(objects::TCS_BOARD_ASS);
#if OBSW_ADD_RTD_DEVICES == 1
PeriodicTaskIF* tcsPollingTask = factory->createPeriodicTask(
"TCS_POLLING_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.5, missedDeadlineFunc);
result = tcsPollingTask->addComponent(objects::SPI_RTD_COM_IF);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TCS_BOARD_ASS", objects::TCS_BOARD_ASS);
initmission::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF);
}
PeriodicTaskIF* tcsTask = factory->createPeriodicTask(
"TCS_TASK", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
std::array<object_id_t, EiveMax31855::NUM_RTDS> rtdIds = {
objects::RTD_0_IC3_PLOC_HEATSPREADER,
objects::RTD_1_IC4_PLOC_MISSIONBOARD,
objects::RTD_2_IC5_4K_CAMERA,
objects::RTD_3_IC6_DAC_HEATSPREADER,
objects::RTD_4_IC7_STARTRACKER,
objects::RTD_5_IC8_RW1_MX_MY,
objects::RTD_6_IC9_DRO,
objects::RTD_7_IC10_SCEX,
objects::RTD_8_IC11_X8,
objects::RTD_9_IC12_HPA,
objects::RTD_10_IC13_PL_TX,
objects::RTD_11_IC14_MPA,
objects::RTD_12_IC15_ACU,
objects::RTD_13_IC16_PLPCDU_HEATSPREADER,
objects::RTD_14_IC17_TCS_BOARD,
objects::RTD_15_IC18_IMTQ,
};
tcsTask->addComponent(objects::TCS_BOARD_ASS);
tcsTask->addComponent(objects::THERMAL_CONTROLLER);
for (const auto& rtd : rtdIds) {
tcsTask->addComponent(rtd, DeviceHandlerIF::PERFORM_OPERATION);
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_WRITE);
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_WRITE);
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_READ);
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_READ);
}
#endif /* OBSW_ADD_RTD_DEVICES */
// FS task, task interval does not matter because it runs in permanent loop, priority low
// because it is a non-essential background task
@ -167,6 +225,15 @@ void initmission::initTasks() {
}
#endif /* OBSW_ADD_PLOC_MPSOC */
#if OBSW_ADD_PLOC_SUPERVISOR == 1
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
"PLOC_SUPV_HELPER", 10, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
}
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
#if OBSW_TEST_CCSDS_BRIDGE == 1
PeriodicTaskIF* ptmeTestTask = factory->createPeriodicTask(
"PTME_TEST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
@ -228,9 +295,15 @@ void initmission::initTasks() {
#if OBSW_ADD_ACS_HANDLERS == 1
acsTask->startTask();
#endif
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
sysTask->startTask();
#if OBSW_ADD_RTD_DEVICES == 1
tcsPollingTask->startTask();
tcsTask->startTask();
#endif /* OBSW_ADD_RTD_DEVICES == 1 */
#if OBSW_ADD_PLOC_SUPERVISOR == 1
supvHelperTask->startTask();
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
sif::info << "Tasks started.." << std::endl;
}
@ -241,7 +314,7 @@ void initmission::createPstTasks(TaskFactory& factory,
/* Polling Sequence Table Default */
#if OBSW_ADD_SPI_TEST_CODE == 0
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
"PST_TASK_DEFAULT", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
"MAIN_SPI", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
result = pst::pstSpi(spiPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
@ -254,8 +327,23 @@ void initmission::createPstTasks(TaskFactory& factory,
}
#endif
#if OBSW_ADD_RW == 1
FixedTimeslotTaskIF* rwPstTask = factory.createFixedTimeslotTask(
"RW_SPI", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 1.0, missedDeadlineFunc);
result = pst::pstSpiRw(rwPstTask);
if (result != HasReturnvaluesIF::RETURN_OK) {
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::warning << "InitMission::initTasks: SPI PST is empty" << std::endl;
} else {
sif::error << "InitMission::initTasks: Creating SPI PST failed!" << std::endl;
}
} else {
taskVec.push_back(rwPstTask);
}
#endif
FixedTimeslotTaskIF* uartPst = factory.createFixedTimeslotTask(
"UART_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
"UART_PST", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
result = pst::pstUart(uartPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
@ -268,7 +356,7 @@ void initmission::createPstTasks(TaskFactory& factory,
}
FixedTimeslotTaskIF* gpioPst = factory.createFixedTimeslotTask(
"GPIO_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
"GPIO_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.2, missedDeadlineFunc);
result = pst::pstGpio(gpioPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
@ -281,7 +369,7 @@ void initmission::createPstTasks(TaskFactory& factory,
}
#if OBSW_ADD_I2C_TEST_CODE == 0
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
"I2C_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
"I2C_PST", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
result = pst::pstI2c(i2cPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
@ -346,21 +434,30 @@ void initmission::createPusTasks(TaskFactory& factory,
PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask(
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_3", objects::PUS_SERVICE_3_HOUSEKEEPING);
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
result = pusMedPrio->addComponent(objects::PUS_SERVICE_11_TC_SCHEDULER);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Object add component failed" << std::endl;
initmission::printAddObjectError("PUS_11", objects::PUS_SERVICE_11_TC_SCHEDULER);
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_20", objects::PUS_SERVICE_20_PARAMETERS);
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_200", objects::PUS_SERVICE_200_MODE_MGMT);
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
result = pusMedPrio->addComponent(objects::PUS_SERVICE_201_HEALTH);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_20", objects::PUS_SERVICE_20_PARAMETERS);
initmission::printAddObjectError("PUS_201", objects::PUS_SERVICE_201_HEALTH);
}
taskVec.push_back(pusMedPrio);

View File

@ -3,7 +3,7 @@
#include <vector>
#include "fsfw/tasks/Typedef.h"
#include "fsfw/tasks/definitions.h"
class PeriodicTaskIF;
class TaskFactory;

View File

@ -1,5 +1,4 @@
#include <mission/system/fdir/GomspacePowerFdir.h>
#include <mission/system/fdir/SyrlinksFdir.h>
#include "ObjectFactory.h"
#include "OBSWConfig.h"
#include "bsp_q7s/boardtest/Q7STestTask.h"
@ -7,8 +6,6 @@
#include "bsp_q7s/callbacks/pcduSwitchCb.h"
#include "bsp_q7s/callbacks/q7sGpioCallbacks.h"
#include "bsp_q7s/callbacks/rwSpiCallback.h"
#include "bsp_q7s/core/CoreController.h"
#include "bsp_q7s/core/ObjectFactory.h"
#include "bsp_q7s/memory/FileSystemHandler.h"
#include "busConf.h"
#include "ccsdsConfig.h"
@ -31,7 +28,6 @@
#include "linux/devices/ploc/PlocMPSoCHelper.h"
#include "linux/devices/ploc/PlocMemoryDumper.h"
#include "linux/devices/ploc/PlocSupervisorHandler.h"
#include "linux/devices/ploc/PlocUpdater.h"
#include "linux/devices/startracker/StarTrackerHandler.h"
#include "linux/devices/startracker/StrHelper.h"
#include "linux/obc/AxiPtmeConfig.h"
@ -39,11 +35,12 @@
#include "linux/obc/PdecHandler.h"
#include "linux/obc/Ptme.h"
#include "linux/obc/PtmeConfig.h"
#include "mission/system/SusAssembly.h"
#include "mission/system/TcsBoardAssembly.h"
#include "mission/system/RwAssembly.h"
#include "mission/system/fdir/AcsBoardFdir.h"
#include "mission/system/fdir/GomspacePowerFdir.h"
#include "mission/system/fdir/RtdFdir.h"
#include "mission/system/fdir/SusFdir.h"
#include "mission/system/fdir/SyrlinksFdir.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
#if OBSW_TEST_LIBGPIOD == 1
@ -82,24 +79,20 @@
#include "mission/devices/RadiationSensorHandler.h"
#include "mission/devices/RwHandler.h"
#include "mission/devices/SolarArrayDeploymentHandler.h"
#include "mission/devices/SusHandler.h"
#include "mission/devices/SyrlinksHkHandler.h"
#include "mission/devices/Tmp1075Handler.h"
#include "mission/devices/devicedefinitions/GomspaceDefinitions.h"
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
#include "mission/devices/devicedefinitions/RadSensorDefinitions.h"
#include "mission/devices/devicedefinitions/RwDefinitions.h"
#include "mission/devices/devicedefinitions/SusDefinitions.h"
#include "mission/devices/devicedefinitions/SyrlinksDefinitions.h"
#include "mission/devices/devicedefinitions/payloadPcduDefinitions.h"
#include "mission/system/AcsBoardAssembly.h"
#include "mission/tmtc/CCSDSHandler.h"
#include "mission/tmtc/TmFunnel.h"
#include "mission/tmtc/VirtualChannel.h"
#include "mission/utility/TmFunnel.h"
ResetArgs resetArgsGnss0;
ResetArgs resetArgsGnss1;
void ObjectFactory::setStatics() { Factory::setStaticFrameworkObjectIds(); }
ResetArgs RESET_ARGS_GNSS;
void Factory::setStaticFrameworkObjectIds() {
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
@ -108,8 +101,12 @@ void Factory::setStaticFrameworkObjectIds() {
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
#if OBSW_Q7S_EM == 1
DeviceHandlerBase::powerSwitcherId = objects::NO_OBJECT;
#else
DeviceHandlerBase::powerSwitcherId = objects::PCDU_HANDLER;
// DeviceHandlerBase::powerSwitcherId = objects::NO_OBJECT;
#endif /* OBSW_Q7S_EM == 1 */
#if OBSW_TM_TO_PTME == 1
TmFunnel::downlinkDestination = objects::CCSDS_HANDLER;
#else
@ -124,87 +121,7 @@ void Factory::setStaticFrameworkObjectIds() {
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
}
void ObjectFactory::produce(void* args) {
ObjectFactory::setStatics();
ObjectFactory::produceGenericObjects();
LinuxLibgpioIF* gpioComIF = nullptr;
UartComIF* uartComIF = nullptr;
SpiComIF* spiComIF = nullptr;
I2cComIF* i2cComIF = nullptr;
PowerSwitchIF* pwrSwitcher = nullptr;
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiComIF, &i2cComIF);
createTmpComponents();
new CoreController(objects::CORE_CONTROLLER);
gpioCallbacks::disableAllDecoder(gpioComIF);
createPcduComponents(gpioComIF, &pwrSwitcher);
createRadSensorComponent(gpioComIF);
createSunSensorComponents(gpioComIF, spiComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
#if OBSW_ADD_ACS_BOARD == 1
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher);
#endif
createHeaterComponents();
createSolarArrayDeploymentComponents();
createPlPcduComponents(gpioComIF, spiComIF, pwrSwitcher);
#if OBSW_ADD_SYRLINKS == 1
createSyrlinksComponents(pwrSwitcher);
#endif /* OBSW_ADD_SYRLINKS == 1 */
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher);
createPayloadComponents(gpioComIF);
#if OBSW_ADD_MGT == 1
I2cCookie* imtqI2cCookie =
new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, q7s::I2C_DEFAULT_DEV);
auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie,
pcdu::Switches::PDU1_CH3_MGT_5V);
imtqHandler->setPowerSwitcher(pwrSwitcher);
static_cast<void>(imtqHandler);
#if OBSW_TEST_IMTQ == 1
imtqHandler->setStartUpImmediately();
imtqHandler->setToGoToNormal(true);
#endif
#if OBSW_DEBUG_IMTQ == 1
imtqHandler->setDebugMode(true);
#endif
#endif
createReactionWheelComponents(gpioComIF);
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
BpxBatteryHandler* bpxHandler =
new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie);
bpxHandler->setStartUpImmediately();
bpxHandler->setToGoToNormalMode(true);
#if OBSW_DEBUG_BPX_BATT == 1
bpxHandler->setDebugMode(true);
#endif
#endif
new FileSystemHandler(objects::FILE_SYSTEM_HANDLER);
#if OBSW_ADD_STAR_TRACKER == 1
UartCookie* starTrackerCookie =
new UartCookie(objects::STAR_TRACKER, q7s::UART_STAR_TRACKER_DEV, uart::STAR_TRACKER_BAUD,
startracker::MAX_FRAME_SIZE * 2 + 2, UartModes::NON_CANONICAL);
starTrackerCookie->setNoFixedSizeReply();
StrHelper* strHelper = new StrHelper(objects::STR_HELPER);
auto starTracker =
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie,
strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V);
starTracker->setPowerSwitcher(pwrSwitcher);
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
#if OBSW_USE_CCSDS_IP_CORE == 1
createCcsdsComponents(gpioComIF);
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
/* Test Task */
#if OBSW_ADD_TEST_CODE == 1
createTestComponents(gpioComIF);
#endif /* OBSW_ADD_TEST_CODE == 1 */
new PlocUpdater(objects::PLOC_UPDATER);
new PlocMemoryDumper(objects::PLOC_MEMORY_DUMPER);
}
void ObjectFactory::setStatics() { Factory::setStaticFrameworkObjectIds(); }
void ObjectFactory::createTmpComponents() {
I2cCookie* i2cCookieTmp1075tcs1 =
@ -222,8 +139,10 @@ void ObjectFactory::createTmpComponents() {
}
void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
SpiComIF** spiComIF, I2cComIF** i2cComIF) {
if (gpioComIF == nullptr or uartComIF == nullptr or spiComIF == nullptr) {
SpiComIF** spiMainComIF, I2cComIF** i2cComIF,
SpiComIF** spiRWComIF) {
if (gpioComIF == nullptr or uartComIF == nullptr or spiMainComIF == nullptr or
spiRWComIF == nullptr) {
sif::error << "ObjectFactory::createCommunicationInterfaces: Invalid passed ComIF pointer"
<< std::endl;
}
@ -233,8 +152,8 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, Ua
new CspComIF(objects::CSP_COM_IF);
*i2cComIF = new I2cComIF(objects::I2C_COM_IF);
*uartComIF = new UartComIF(objects::UART_COM_IF);
*spiComIF = new SpiComIF(objects::SPI_COM_IF, *gpioComIF);
*spiMainComIF = new SpiComIF(objects::SPI_MAIN_COM_IF, q7s::SPI_DEFAULT_DEV, *gpioComIF);
*spiRWComIF = new SpiComIF(objects::SPI_RW_COM_IF, q7s::SPI_RW_DEV, *gpioComIF);
/* Adding gpios for chip select decoding to the gpioComIf */
q7s::gpioCallbacks::initSpiCsDecoder(*gpioComIF);
}
@ -292,12 +211,13 @@ void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
gpio = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_RADFET, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookieRadSensor->addGpio(gpioIds::ENABLE_RADFET, gpio);
gpioComIF->addGpios(gpioCookieRadSensor);
gpioChecker(gpioComIF->addGpios(gpioCookieRadSensor), "RAD sensor");
SpiCookie* spiCookieRadSensor = new SpiCookie(
addresses::RAD_SENSOR, gpioIds::CS_RAD_SENSOR, std::string(q7s::SPI_DEFAULT_DEV),
RAD_SENSOR::READ_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::DEFAULT_MAX_1227_SPEED);
auto radSensor = new RadiationSensorHandler(objects::RAD_SENSOR, objects::SPI_COM_IF,
SpiCookie* spiCookieRadSensor =
new SpiCookie(addresses::RAD_SENSOR, gpioIds::CS_RAD_SENSOR, RAD_SENSOR::READ_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::DEFAULT_MAX_1227_SPEED);
spiCookieRadSensor->setMutexParams(MutexIF::TimeoutType::WAITING, spi::RAD_SENSOR_CS_TIMEOUT);
auto radSensor = new RadiationSensorHandler(objects::RAD_SENSOR, objects::SPI_MAIN_COM_IF,
spiCookieRadSensor, gpioComIF);
static_cast<void>(radSensor);
// The radiation sensor ADC is powered by the 5V stack connector which should always be on
@ -408,16 +328,16 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_SELECT, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_SELECT, gpio);
gpioComIF->addGpios(gpioCookieAcsBoard);
gpioChecker(gpioComIF->addGpios(gpioCookieAcsBoard), "ACS Board");
AcsBoardFdir* fdir = nullptr;
static_cast<void>(fdir);
#if OBSW_ADD_ACS_HANDLERS == 1
std::string spiDev = q7s::SPI_DEFAULT_DEV;
SpiCookie* spiCookie =
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_COM_IF,
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_MAIN_COM_IF,
spiCookie, spi::LIS3_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_0_LIS3_HANDLER);
mgmLis3Handler->setCustomFdir(fdir);
@ -430,10 +350,11 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
mgmLis3Handler->enablePeriodicPrintouts(true, 10);
#endif
spiCookie =
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
auto mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_COM_IF,
spiCookie, spi::RM3100_TRANSITION_DELAY);
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
auto mgmRm3100Handler =
new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
spi::RM3100_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_1_RM3100_HANDLER);
mgmRm3100Handler->setCustomFdir(fdir);
mgmRm3100Handler->setParent(objects::ACS_BOARD_ASS);
@ -446,9 +367,9 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
mgmRm3100Handler->enablePeriodicPrintouts(true, 10);
#endif
spiCookie =
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_COM_IF,
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_MAIN_COM_IF,
spiCookie, spi::LIS3_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_2_LIS3_HANDLER);
mgmLis3Handler->setCustomFdir(fdir);
@ -462,9 +383,9 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
mgmLis3Handler->enablePeriodicPrintouts(true, 10);
#endif
spiCookie =
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_COM_IF,
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_MAIN_COM_IF,
spiCookie, spi::RM3100_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_3_RM3100_HANDLER);
mgmRm3100Handler->setCustomFdir(fdir);
@ -478,11 +399,12 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
#endif
// Commented until ACS board V2 in in clean room again
// Gyro 0 Side A
spiCookie = new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
ADIS1650X::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE,
spi::DEFAULT_ADIS16507_SPEED);
auto adisHandler = new GyroADIS1650XHandler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_COM_IF,
spiCookie, ADIS1650X::Type::ADIS16505);
spiCookie =
new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, ADIS1650X::MAXIMUM_REPLY_SIZE,
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
auto adisHandler =
new GyroADIS1650XHandler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
ADIS1650X::Type::ADIS16505);
fdir = new AcsBoardFdir(objects::GYRO_0_ADIS_HANDLER);
adisHandler->setCustomFdir(fdir);
adisHandler->setParent(objects::ACS_BOARD_ASS);
@ -495,11 +417,10 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
adisHandler->enablePeriodicPrintouts(true, 10);
#endif
// Gyro 1 Side A
spiCookie =
new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev, L3GD20H::MAX_BUFFER_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF,
spiCookie, spi::L3G_TRANSITION_DELAY);
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto gyroL3gHandler = new GyroHandlerL3GD20H(
objects::GYRO_1_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::GYRO_1_L3G_HANDLER);
gyroL3gHandler->setCustomFdir(fdir);
gyroL3gHandler->setParent(objects::ACS_BOARD_ASS);
@ -512,10 +433,10 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
gyroL3gHandler->enablePeriodicPrintouts(true, 10);
#endif
// Gyro 2 Side B
spiCookie = new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, spiDev,
ADIS1650X::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE,
spi::DEFAULT_ADIS16507_SPEED);
adisHandler = new GyroADIS1650XHandler(objects::GYRO_2_ADIS_HANDLER, objects::SPI_COM_IF,
spiCookie =
new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, ADIS1650X::MAXIMUM_REPLY_SIZE,
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
adisHandler = new GyroADIS1650XHandler(objects::GYRO_2_ADIS_HANDLER, objects::SPI_MAIN_COM_IF,
spiCookie, ADIS1650X::Type::ADIS16505);
fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER);
adisHandler->setCustomFdir(fdir);
@ -525,10 +446,9 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
adisHandler->setToGoToNormalModeImmediately();
#endif
// Gyro 3 Side B
spiCookie =
new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, spiDev, L3GD20H::MAX_BUFFER_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_COM_IF,
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_MAIN_COM_IF,
spiCookie, spi::L3G_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::GYRO_3_L3G_HANDLER);
gyroL3gHandler->setCustomFdir(fdir);
@ -544,15 +464,11 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
#if OBSW_DEBUG_GPS == 1
debugGps = true;
#endif
resetArgsGnss1.gnss1 = true;
resetArgsGnss1.gpioComIF = gpioComIF;
resetArgsGnss1.waitPeriodMs = 100;
resetArgsGnss0.gnss1 = false;
resetArgsGnss0.gpioComIF = gpioComIF;
resetArgsGnss0.waitPeriodMs = 100;
auto gpsHandler0 =
RESET_ARGS_GNSS.gpioComIF = gpioComIF;
RESET_ARGS_GNSS.waitPeriodMs = 100;
auto gpsCtrl =
new GPSHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss0);
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
AcsBoardHelper acsBoardHelper = AcsBoardHelper(
objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER,
@ -564,7 +480,8 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
}
void ObjectFactory::createHeaterComponents() {
void ObjectFactory::createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher,
HealthTableIF* healthTable) {
using namespace gpio;
GpioCookie* heaterGpiosCookie = new GpioCookie;
GpiodRegularByLineName* gpio = nullptr;
@ -605,8 +522,21 @@ void ObjectFactory::createHeaterComponents() {
Levels::LOW);
heaterGpiosCookie->addGpio(gpioIds::HEATER_7, gpio);
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, heaterGpiosCookie,
objects::PCDU_HANDLER, pcdu::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V);
gpioIF->addGpios(heaterGpiosCookie);
HeaterHelper helper({{
{new HealthDevice(objects::HEATER_0_PLOC_PROC_BRD, MessageQueueIF::NO_QUEUE),
gpioIds::HEATER_0},
{new HealthDevice(objects::HEATER_1_PCDU_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_1},
{new HealthDevice(objects::HEATER_2_ACS_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_2},
{new HealthDevice(objects::HEATER_3_OBC_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_3},
{new HealthDevice(objects::HEATER_4_CAMERA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_4},
{new HealthDevice(objects::HEATER_5_STR, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_5},
{new HealthDevice(objects::HEATER_6_DRO, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_6},
{new HealthDevice(objects::HEATER_7_HPA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_7},
}});
new HeaterHandler(objects::HEATER_HANDLER, gpioIF, helper, pwrSwitcher,
pcdu::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V);
}
void ObjectFactory::createSolarArrayDeploymentComponents() {
@ -655,7 +585,7 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
consumer.str(), Direction::OUT, Levels::HIGH);
auto mpsocGpioCookie = new GpioCookie;
mpsocGpioCookie->addGpio(gpioIds::ENABLE_MPSOC_UART, gpioConfigMPSoC);
gpioComIF->addGpios(mpsocGpioCookie);
gpioChecker(gpioComIF->addGpios(mpsocGpioCookie), "PLOC MPSoC");
auto mpsocCookie =
new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV, uart::PLOC_MPSOC_BAUD,
mpsoc::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
@ -668,22 +598,24 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
#if OBSW_ADD_PLOC_SUPERVISOR == 1
consumer << "0x" << std::hex << objects::PLOC_SUPERVISOR_HANDLER;
auto gpioConfigSupv = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_SUPV_UART, consumer.str(),
Direction::OUT, Levels::HIGH);
Direction::OUT, Levels::LOW);
auto supvGpioCookie = new GpioCookie;
supvGpioCookie->addGpio(gpioIds::ENABLE_SUPV_UART, gpioConfigSupv);
gpioComIF->addGpios(supvGpioCookie);
auto supervisorCookie = new UartCookie(objects::PLOC_SUPERVISOR_HANDLER,
q7s::UART_PLOC_SUPERVSIOR_DEV, uart::PLOC_SUPERVISOR_BAUD,
supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
auto supervisorCookie =
new UartCookie(objects::PLOC_SUPERVISOR_HANDLER, q7s::UART_PLOC_SUPERVSIOR_DEV,
uart::PLOC_SUPV_BAUD, supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
supervisorCookie->setNoFixedSizeReply();
auto supvHelper = new PlocSupvHelper(objects::PLOC_SUPERVISOR_HELPER);
new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF,
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
pcdu::PDU1_CH6_PLOC_12V);
pcdu::PDU1_CH6_PLOC_12V, supvHelper);
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
static_cast<void>(consumer);
}
void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF,
PowerSwitchIF* pwrSwitcher) {
using namespace gpio;
GpioCookie* gpioCookieRw = new GpioCookie;
GpioCallback* csRw1 =
@ -725,50 +657,38 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
Levels::LOW);
gpioCookieRw->addGpio(gpioIds::EN_RW4, gpio);
gpioComIF->addGpios(gpioCookieRw);
gpioChecker(gpioComIF->addGpios(gpioCookieRw), "RWs");
#if OBSW_ADD_RW == 1
auto rw1SpiCookie =
new SpiCookie(addresses::RW1, gpioIds::CS_RW1, q7s::SPI_RW_DEV, RwDefinitions::MAX_REPLY_SIZE,
spi::RW_MODE, spi::RW_SPEED, &rwSpiCallback::spiCallback, nullptr);
auto rw2SpiCookie =
new SpiCookie(addresses::RW2, gpioIds::CS_RW2, q7s::SPI_RW_DEV, RwDefinitions::MAX_REPLY_SIZE,
spi::RW_MODE, spi::RW_SPEED, &rwSpiCallback::spiCallback, nullptr);
auto rw3SpiCookie =
new SpiCookie(addresses::RW3, gpioIds::CS_RW3, q7s::SPI_RW_DEV, RwDefinitions::MAX_REPLY_SIZE,
spi::RW_MODE, spi::RW_SPEED, &rwSpiCallback::spiCallback, nullptr);
auto rw4SpiCookie =
new SpiCookie(addresses::RW4, gpioIds::CS_RW4, q7s::SPI_RW_DEV, RwDefinitions::MAX_REPLY_SIZE,
spi::RW_MODE, spi::RW_SPEED, &rwSpiCallback::spiCallback, nullptr);
std::array<std::pair<address_t, gpioId_t>, 4> rwCookieParams = {
{{addresses::RW1, gpioIds::CS_RW1},
{addresses::RW2, gpioIds::CS_RW2},
{addresses::RW3, gpioIds::CS_RW3},
{addresses::RW4, gpioIds::CS_RW4}}};
std::array<SpiCookie*, 4> rwCookies = {};
std::array<object_id_t, 4> rwIds = {objects::RW1, objects::RW2, objects::RW3, objects::RW4};
std::array<gpioId_t, 4> rwGpioIds = {gpioIds::EN_RW1, gpioIds::EN_RW2, gpioIds::EN_RW3,
gpioIds::EN_RW4};
std::array<RwHandler*, 4> rws = {};
for (uint8_t idx = 0; idx < rwCookies.size(); idx++) {
rwCookies[idx] = new SpiCookie(rwCookieParams[idx].first, rwCookieParams[idx].second,
RwDefinitions::MAX_REPLY_SIZE, spi::RW_MODE, spi::RW_SPEED,
&rwSpiCallback::spiCallback, nullptr);
rws[idx] = new RwHandler(rwIds[idx], objects::SPI_RW_COM_IF, rwCookies[idx], gpioComIF,
rwGpioIds[idx]);
rwCookies[idx]->setCallbackArgs(rws[idx]);
#if OBSW_TEST_RW == 1
rws[idx]->setStartUpImmediately();
#endif
#if OBSW_DEBUG_RW == 1
rws[idx]->setDebugMode(true);
#endif
}
auto rwHandler1 =
new RwHandler(objects::RW1, objects::SPI_COM_IF, rw1SpiCookie, gpioComIF, gpioIds::EN_RW1);
rw1SpiCookie->setCallbackArgs(rwHandler1);
#if OBSW_DEBUG_RW == 1
rwHandler1->setStartUpImmediately();
rwHandler1->setDebugMode(true);
#endif
auto rwHandler2 =
new RwHandler(objects::RW2, objects::SPI_COM_IF, rw2SpiCookie, gpioComIF, gpioIds::EN_RW2);
rw2SpiCookie->setCallbackArgs(rwHandler2);
#if OBSW_DEBUG_RW == 1
rwHandler2->setStartUpImmediately();
rwHandler2->setDebugMode(true);
#endif
auto rwHandler3 =
new RwHandler(objects::RW3, objects::SPI_COM_IF, rw3SpiCookie, gpioComIF, gpioIds::EN_RW3);
rw3SpiCookie->setCallbackArgs(rwHandler3);
#if OBSW_DEBUG_RW == 1
rwHandler3->setStartUpImmediately();
rwHandler3->setDebugMode(true);
#endif
auto rwHandler4 =
new RwHandler(objects::RW4, objects::SPI_COM_IF, rw4SpiCookie, gpioComIF, gpioIds::EN_RW4);
rw4SpiCookie->setCallbackArgs(rwHandler4);
#if OBSW_DEBUG_RW == 1
rwHandler4->setStartUpImmediately();
rwHandler4->setDebugMode(true);
#endif
RwHelper rwHelper(rwIds);
auto* rwAss = new RwAssembly(objects::RW_ASS, objects::NO_OBJECT, pwrSwitcher,
pcdu::Switches::PDU2_CH2_RW_5V, rwHelper);
static_cast<void>(rwAss);
#endif /* OBSW_ADD_RW == 1 */
}
@ -806,9 +726,7 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
consumer.str("PAPB VC 3");
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC3, consumer.str());
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_EMPTY, gpio);
gpioComIF->addGpios(gpioCookiePtmeIp);
gpioChecker(gpioComIF->addGpios(gpioCookiePtmeIp), "PTME PAPB VCs");
// Creating virtual channel interfaces
VcInterfaceIF* vc0 =
new PapbVcInterface(gpioComIF, gpioIds::VC0_PAPB_BUSY, gpioIds::VC0_PAPB_EMPTY, q7s::UIO_PTME,
@ -822,14 +740,12 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
VcInterfaceIF* vc3 =
new PapbVcInterface(gpioComIF, gpioIds::VC3_PAPB_BUSY, gpioIds::VC3_PAPB_EMPTY, q7s::UIO_PTME,
q7s::uiomapids::PTME_VC3);
// Creating ptme object and adding virtual channel interfaces
Ptme* ptme = new Ptme(objects::PTME);
ptme->addVcInterface(ccsds::VC0, vc0);
ptme->addVcInterface(ccsds::VC1, vc1);
ptme->addVcInterface(ccsds::VC2, vc2);
ptme->addVcInterface(ccsds::VC3, vc3);
AxiPtmeConfig* axiPtmeConfig =
new AxiPtmeConfig(objects::AXI_PTME_CONFIG, q7s::UIO_PTME, q7s::uiomapids::PTME_CONFIG);
PtmeConfig* ptmeConfig = new PtmeConfig(objects::PTME_CONFIG, axiPtmeConfig);
@ -842,7 +758,6 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
CCSDSHandler* ccsdsHandler = new CCSDSHandler(
objects::CCSDS_HANDLER, objects::PTME, objects::CCSDS_PACKET_DISTRIBUTOR, ptmeConfig,
gpioComIF, gpioIds::RS485_EN_TX_CLOCK, gpioIds::RS485_EN_TX_DATA, TRANSMITTER_TIMEOUT);
VirtualChannel* vc = nullptr;
vc = new VirtualChannel(ccsds::VC0, common::VC0_QUEUE_SIZE, objects::CCSDS_HANDLER);
ccsdsHandler->addVirtualChannel(ccsds::VC0, vc);
@ -852,7 +767,6 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
ccsdsHandler->addVirtualChannel(ccsds::VC2, vc);
vc = new VirtualChannel(ccsds::VC3, common::VC3_QUEUE_SIZE, objects::CCSDS_HANDLER);
ccsdsHandler->addVirtualChannel(ccsds::VC3, vc);
GpioCookie* gpioCookiePdec = new GpioCookie;
consumer.str("");
consumer << "0x" << std::hex << objects::PDEC_HANDLER;
@ -860,12 +774,9 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
gpio = new GpiodRegularByLineName(q7s::gpioNames::PDEC_RESET, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookiePdec->addGpio(gpioIds::PDEC_RESET, gpio);
gpioComIF->addGpios(gpioCookiePdec);
gpioChecker(gpioComIF->addGpios(gpioCookiePdec), "PDEC");
new PdecHandler(objects::PDEC_HANDLER, objects::CCSDS_HANDLER, gpioComIF, gpioIds::PDEC_RESET,
q7s::UIO_PDEC_CONFIG_MEMORY, q7s::UIO_PDEC_RAM, q7s::UIO_PDEC_REGISTERS);
GpioCookie* gpioRS485Chip = new GpioCookie;
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_CLOCK, "RS485 Transceiver",
Direction::OUT, Levels::LOW);
@ -873,7 +784,6 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_DATA, "RS485 Transceiver",
Direction::OUT, Levels::LOW);
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_DATA, gpio);
// Default configuration enables RX channels (RXEN = LOW)
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_RX_CLOCK, "RS485 Transceiver",
Direction::OUT, Levels::LOW);
@ -881,8 +791,7 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_RX_DATA, "RS485 Transceiver",
Direction::OUT, Levels::LOW);
gpioRS485Chip->addGpio(gpioIds::RS485_EN_RX_DATA, gpio);
gpioComIF->addGpios(gpioRS485Chip);
gpioChecker(gpioComIF->addGpios(gpioRS485Chip), "RS485 Transceiver");
}
void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
@ -927,14 +836,14 @@ void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF*
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ADC_CS, consumer, Direction::OUT,
gpio::Levels::HIGH);
plPcduGpios->addGpio(gpioIds::PLPCDU_ADC_CS, gpio);
gpioComIF->addGpios(plPcduGpios);
SpiCookie* spiCookie = new SpiCookie(addresses::PLPCDU_ADC, gpioIds::PLPCDU_ADC_CS,
q7s::SPI_DEFAULT_DEV, plpcdu::MAX_ADC_REPLY_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::PL_PCDU_MAX_1227_SPEED);
gpioChecker(gpioComIF->addGpios(plPcduGpios), "PL PCDU");
SpiCookie* spiCookie =
new SpiCookie(addresses::PLPCDU_ADC, gpioIds::PLPCDU_ADC_CS, plpcdu::MAX_ADC_REPLY_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::PL_PCDU_MAX_1227_SPEED);
// Create device handler components
auto plPcduHandler = new PayloadPcduHandler(
objects::PLPCDU_HANDLER, objects::SPI_COM_IF, spiCookie, gpioComIF, SdCardManager::instance(),
pwrSwitcher, pcdu::Switches::PDU2_CH1_PL_PCDU_BATT_0_14V8,
objects::PLPCDU_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, gpioComIF,
SdCardManager::instance(), pwrSwitcher, pcdu::Switches::PDU2_CH1_PL_PCDU_BATT_0_14V8,
pcdu::Switches::PDU2_CH6_PL_PCDU_BATT_1_14V8, false);
spiCookie->setCallbackMode(PayloadPcduHandler::extConvAsTwoCallback, plPcduHandler);
// plPcduHandler->enablePeriodicPrintout(true, 5);
@ -961,6 +870,50 @@ void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
#endif
}
void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
UartCookie* starTrackerCookie =
new UartCookie(objects::STAR_TRACKER, q7s::UART_STAR_TRACKER_DEV, uart::STAR_TRACKER_BAUD,
startracker::MAX_FRAME_SIZE * 2 + 2, UartModes::NON_CANONICAL);
starTrackerCookie->setNoFixedSizeReply();
StrHelper* strHelper = new StrHelper(objects::STR_HELPER);
auto starTracker =
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie,
strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V);
starTracker->setPowerSwitcher(pwrSwitcher);
}
void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
I2cCookie* imtqI2cCookie =
new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, q7s::I2C_DEFAULT_DEV);
auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie,
pcdu::Switches::PDU1_CH3_MGT_5V);
imtqHandler->setPowerSwitcher(pwrSwitcher);
static_cast<void>(imtqHandler);
#if OBSW_TEST_IMTQ == 1
imtqHandler->setStartUpImmediately();
imtqHandler->setToGoToNormal(true);
#endif
#if OBSW_DEBUG_IMTQ == 1
imtqHandler->setDebugMode(true);
#endif
}
void ObjectFactory::createBpxBatteryComponent() {
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
BpxBatteryHandler* bpxHandler =
new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie);
bpxHandler->setStartUpImmediately();
bpxHandler->setToGoToNormalMode(true);
#if OBSW_DEBUG_BPX_BATT == 1
bpxHandler->setDebugMode(true);
#endif
}
void ObjectFactory::createMiscComponents() {
new FileSystemHandler(objects::FILE_SYSTEM_HANDLER);
new PlocMemoryDumper(objects::PLOC_MEMORY_DUMPER);
}
void ObjectFactory::testAcsBrdAss(AcsBoardAssembly* acsAss) {
CommandMessage msg;
ModeMessage::setModeMessage(&msg, ModeMessage::CMD_MODE_COMMAND, DeviceHandlerIF::MODE_NORMAL,

View File

@ -1,12 +1,18 @@
#ifndef BSP_Q7S_OBJECTFACTORY_H_
#define BSP_Q7S_OBJECTFACTORY_H_
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include <string>
class LinuxLibgpioIF;
class UartComIF;
class SpiComIF;
class I2cComIF;
class PowerSwitchIF;
class HealthTableIF;
class AcsBoardAssembly;
class GpioIF;
namespace ObjectFactory {
@ -14,7 +20,8 @@ void setStatics();
void produce(void* args);
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
SpiComIF** spiComIF, I2cComIF** i2cComIF);
SpiComIF** spiMainComIF, I2cComIF** i2cComIF,
SpiComIF** spiRwComIF);
void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher);
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
PowerSwitchIF* pwrSwitcher);
@ -22,12 +29,17 @@ void createTmpComponents();
void createRadSensorComponent(LinuxLibgpioIF* gpioComIF);
void createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF,
PowerSwitchIF* pwrSwitcher);
void createHeaterComponents();
void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable);
void createImtqComponents(PowerSwitchIF* pwrSwitcher);
void createBpxBatteryComponent();
void createStrComponents(PowerSwitchIF* pwrSwitcher);
void createSolarArrayDeploymentComponents();
void createSyrlinksComponents(PowerSwitchIF* pwrSwitcher);
void createPayloadComponents(LinuxLibgpioIF* gpioComIF);
void createReactionWheelComponents(LinuxLibgpioIF* gpioComIF);
void createReactionWheelComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF* pwrSwitcher);
void createCcsdsComponents(LinuxLibgpioIF* gpioComIF);
void createMiscComponents();
void createTestComponents(LinuxLibgpioIF* gpioComIF);
void testAcsBrdAss(AcsBoardAssembly* assAss);

View File

@ -1,3 +1 @@
target_sources(${OBSW_NAME} PRIVATE
emObjectFactory.cpp
)
target_sources(${OBSW_NAME} PRIVATE emObjectFactory.cpp)

View File

@ -1,199 +1,63 @@
#include <mission/system/fdir/GomspacePowerFdir.h>
#include <mission/system/fdir/SyrlinksFdir.h>
#include <fsfw/health/HealthTableIF.h>
#include "OBSWConfig.h"
#include "bsp_q7s/boardtest/Q7STestTask.h"
#include "bsp_q7s/callbacks/gnssCallback.h"
#include "bsp_q7s/callbacks/pcduSwitchCb.h"
#include "bsp_q7s/callbacks/q7sGpioCallbacks.h"
#include "bsp_q7s/callbacks/rwSpiCallback.h"
#include "bsp_q7s/core/CoreController.h"
#include "bsp_q7s/core/ObjectFactory.h"
#include "bsp_q7s/memory/FileSystemHandler.h"
#include "busConf.h"
#include "ccsdsConfig.h"
#include "commonObjects.h"
#include "devConf.h"
#include "devices/addresses.h"
#include "devices/gpioIds.h"
#include "devices/powerSwitcherList.h"
#include "fsfw/ipc/QueueFactory.h"
#include "linux/ObjectFactory.h"
#include "linux/boardtest/I2cTestClass.h"
#include "linux/boardtest/SpiTestClass.h"
#include "linux/boardtest/UartTestClass.h"
#include "linux/callbacks/gpioCallbacks.h"
#include "linux/csp/CspComIF.h"
#include "linux/csp/CspCookie.h"
#include "linux/devices/GPSHyperionLinuxController.h"
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
#include "linux/devices/ploc/PlocMPSoCHandler.h"
#include "linux/devices/ploc/PlocMPSoCHelper.h"
#include "linux/devices/ploc/PlocMemoryDumper.h"
#include "linux/devices/ploc/PlocSupervisorHandler.h"
#include "linux/devices/ploc/PlocUpdater.h"
#include "linux/devices/startracker/StarTrackerHandler.h"
#include "linux/devices/startracker/StrHelper.h"
#include "linux/obc/AxiPtmeConfig.h"
#include "linux/obc/PapbVcInterface.h"
#include "linux/obc/PdecHandler.h"
#include "linux/obc/Ptme.h"
#include "linux/obc/PtmeConfig.h"
#include "mission/system/SusAssembly.h"
#include "mission/system/TcsBoardAssembly.h"
#include "mission/system/fdir/AcsBoardFdir.h"
#include "mission/system/fdir/RtdFdir.h"
#include "mission/system/fdir/SusFdir.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
#if OBSW_TEST_LIBGPIOD == 1
#include "linux/boardtest/LibgpiodTest.h"
#endif
#include <sstream>
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
#include "fsfw/tmtcpacket/pus/tm.h"
#include "fsfw/tmtcservices/CommandingServiceBase.h"
#include "fsfw/tmtcservices/PusServiceBase.h"
#include "fsfw_hal/common/gpio/GpioCookie.h"
#include "fsfw_hal/common/gpio/gpioDefinitions.h"
#include "fsfw_hal/devicehandlers/GyroL3GD20Handler.h"
#include "fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h"
#include "fsfw_hal/devicehandlers/MgmRM3100Handler.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw_hal/linux/i2c/I2cComIF.h"
#include "fsfw_hal/linux/i2c/I2cCookie.h"
#include "fsfw_hal/linux/spi/SpiComIF.h"
#include "fsfw_hal/linux/spi/SpiCookie.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "fsfw_hal/linux/uart/UartCookie.h"
#include "linux/ObjectFactory.h"
#include "linux/callbacks/gpioCallbacks.h"
#include "mission/core/GenericFactory.h"
#include "mission/devices/ACUHandler.h"
#include "mission/devices/BpxBatteryHandler.h"
#include "mission/devices/GyroADIS1650XHandler.h"
#include "mission/devices/HeaterHandler.h"
#include "mission/devices/IMTQHandler.h"
#include "mission/devices/Max31865PT1000Handler.h"
#include "mission/devices/P60DockHandler.h"
#include "mission/devices/PCDUHandler.h"
#include "mission/devices/PDU1Handler.h"
#include "mission/devices/PDU2Handler.h"
#include "mission/devices/PayloadPcduHandler.h"
#include "mission/devices/RadiationSensorHandler.h"
#include "mission/devices/RwHandler.h"
#include "mission/devices/SolarArrayDeploymentHandler.h"
#include "mission/devices/SusHandler.h"
#include "mission/devices/SyrlinksHkHandler.h"
#include "mission/devices/Tmp1075Handler.h"
#include "mission/devices/devicedefinitions/GomspaceDefinitions.h"
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
#include "mission/devices/devicedefinitions/RadSensorDefinitions.h"
#include "mission/devices/devicedefinitions/RwDefinitions.h"
#include "mission/devices/devicedefinitions/SusDefinitions.h"
#include "mission/devices/devicedefinitions/SyrlinksDefinitions.h"
#include "mission/devices/devicedefinitions/payloadPcduDefinitions.h"
#include "mission/system/AcsBoardAssembly.h"
#include "mission/tmtc/CCSDSHandler.h"
#include "mission/tmtc/VirtualChannel.h"
#include "mission/utility/TmFunnel.h"
ResetArgs resetArgsGnss0;
ResetArgs resetArgsGnss1;
void ObjectFactory::setStatics() { Factory::setStaticFrameworkObjectIds(); }
void Factory::setStaticFrameworkObjectIds() {
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
PusServiceBase::packetDestination = objects::TM_FUNNEL;
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
DeviceHandlerBase::powerSwitcherId = objects::PCDU_HANDLER;
// DeviceHandlerBase::powerSwitcherId = objects::NO_OBJECT;
#if OBSW_TM_TO_PTME == 1
TmFunnel::downlinkDestination = objects::CCSDS_HANDLER;
#else
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
#endif /* OBSW_TM_TO_PTME == 1 */
// No storage object for now.
TmFunnel::storageDestination = objects::NO_OBJECT;
LocalDataPoolManager::defaultHkDestination = objects::PUS_SERVICE_3_HOUSEKEEPING;
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
}
void ObjectFactory::produce(void* args) {
ObjectFactory::setStatics();
ObjectFactory::produceGenericObjects();
HealthTableIF* healthTable = nullptr;
ObjectFactory::produceGenericObjects(&healthTable);
LinuxLibgpioIF* gpioComIF = nullptr;
UartComIF* uartComIF = nullptr;
SpiComIF* spiComIF = nullptr;
SpiComIF* spiMainComIF = nullptr;
I2cComIF* i2cComIF = nullptr;
PowerSwitchIF* pwrSwitcher = nullptr;
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiComIF, &i2cComIF);
SpiComIF* spiRwComIF = nullptr;
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF, &spiRwComIF);
createTmpComponents();
new CoreController(objects::CORE_CONTROLLER);
gpioCallbacks::disableAllDecoder(gpioComIF);
createPcduComponents(gpioComIF, &pwrSwitcher);
createRadSensorComponent(gpioComIF);
createSunSensorComponents(gpioComIF, spiComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
#if OBSW_ADD_ACS_BOARD == 1
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher);
#endif
createHeaterComponents();
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
createSolarArrayDeploymentComponents();
createPlPcduComponents(gpioComIF, spiComIF, pwrSwitcher);
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
#if OBSW_ADD_SYRLINKS == 1
#if OBSW_Q7S_EM == 1
createSyrlinksComponents(nullptr);
#else
createSyrlinksComponents(pwrSwitcher);
#endif /* OBSW_Q7S_EM == 1 */
#endif /* OBSW_ADD_SYRLINKS == 1 */
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher);
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
createPayloadComponents(gpioComIF);
#if OBSW_ADD_MGT == 1
I2cCookie* imtqI2cCookie =
new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, q7s::I2C_DEFAULT_DEV);
auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie,
pcdu::Switches::PDU1_CH3_MGT_5V);
imtqHandler->setPowerSwitcher(pwrSwitcher);
static_cast<void>(imtqHandler);
#if OBSW_TEST_IMTQ == 1
imtqHandler->setStartUpImmediately();
imtqHandler->setToGoToNormal(true);
createImtqComponents(pwrSwitcher);
#endif
#if OBSW_DEBUG_IMTQ == 1
imtqHandler->setDebugMode(true);
#endif
#endif
createReactionWheelComponents(gpioComIF);
createReactionWheelComponents(gpioComIF, pwrSwitcher);
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
BpxBatteryHandler* bpxHandler =
new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie);
bpxHandler->setStartUpImmediately();
bpxHandler->setToGoToNormalMode(true);
#if OBSW_DEBUG_BPX_BATT == 1
bpxHandler->setDebugMode(true);
createBpxBatteryComponent();
#endif
#endif
new FileSystemHandler(objects::FILE_SYSTEM_HANDLER);
#if OBSW_ADD_STAR_TRACKER == 1
UartCookie* starTrackerCookie =
new UartCookie(objects::STAR_TRACKER, q7s::UART_STAR_TRACKER_DEV, uart::STAR_TRACKER_BAUD,
startracker::MAX_FRAME_SIZE * 2 + 2, UartModes::NON_CANONICAL);
starTrackerCookie->setNoFixedSizeReply();
StrHelper* strHelper = new StrHelper(objects::STR_HELPER);
auto starTracker =
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie,
strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V);
starTracker->setPowerSwitcher(pwrSwitcher);
createStrComponents(pwrSwitcher);
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
#if OBSW_USE_CCSDS_IP_CORE == 1
createCcsdsComponents(gpioComIF);
@ -202,771 +66,6 @@ void ObjectFactory::produce(void* args) {
#if OBSW_ADD_TEST_CODE == 1
createTestComponents(gpioComIF);
#endif /* OBSW_ADD_TEST_CODE == 1 */
new PlocUpdater(objects::PLOC_UPDATER);
new PlocMemoryDumper(objects::PLOC_MEMORY_DUMPER);
}
void ObjectFactory::createTmpComponents() {
I2cCookie* i2cCookieTmp1075tcs1 =
new I2cCookie(addresses::TMP1075_TCS_1, TMP1075::MAX_REPLY_LENGTH, q7s::I2C_DEFAULT_DEV);
I2cCookie* i2cCookieTmp1075tcs2 =
new I2cCookie(addresses::TMP1075_TCS_2, TMP1075::MAX_REPLY_LENGTH, q7s::I2C_DEFAULT_DEV);
/* Temperature sensors */
Tmp1075Handler* tmp1075Handler_1 =
new Tmp1075Handler(objects::TMP1075_HANDLER_1, objects::I2C_COM_IF, i2cCookieTmp1075tcs1);
(void)tmp1075Handler_1;
Tmp1075Handler* tmp1075Handler_2 =
new Tmp1075Handler(objects::TMP1075_HANDLER_2, objects::I2C_COM_IF, i2cCookieTmp1075tcs2);
(void)tmp1075Handler_2;
}
void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
SpiComIF** spiComIF, I2cComIF** i2cComIF) {
if (gpioComIF == nullptr or uartComIF == nullptr or spiComIF == nullptr) {
sif::error << "ObjectFactory::createCommunicationInterfaces: Invalid passed ComIF pointer"
<< std::endl;
}
*gpioComIF = new LinuxLibgpioIF(objects::GPIO_IF);
/* Communication interfaces */
new CspComIF(objects::CSP_COM_IF);
*i2cComIF = new I2cComIF(objects::I2C_COM_IF);
*uartComIF = new UartComIF(objects::UART_COM_IF);
*spiComIF = new SpiComIF(objects::SPI_COM_IF, *gpioComIF);
/* Adding gpios for chip select decoding to the gpioComIf */
q7s::gpioCallbacks::initSpiCsDecoder(*gpioComIF);
}
void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher) {
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_LENGTH, addresses::P60DOCK);
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH, addresses::PDU1);
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH, addresses::PDU2);
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_LENGTH, addresses::ACU);
auto p60Fdir = new GomspacePowerFdir(objects::P60DOCK_HANDLER);
P60DockHandler* p60dockhandler =
new P60DockHandler(objects::P60DOCK_HANDLER, objects::CSP_COM_IF, p60DockCspCookie, p60Fdir);
auto pdu1Fdir = new GomspacePowerFdir(objects::PDU1_HANDLER);
PDU1Handler* pdu1handler =
new PDU1Handler(objects::PDU1_HANDLER, objects::CSP_COM_IF, pdu1CspCookie, pdu1Fdir);
auto pdu2Fdir = new GomspacePowerFdir(objects::PDU2_HANDLER);
PDU2Handler* pdu2handler =
new PDU2Handler(objects::PDU2_HANDLER, objects::CSP_COM_IF, pdu2CspCookie, pdu2Fdir);
auto acuFdir = new GomspacePowerFdir(objects::ACU_HANDLER);
ACUHandler* acuhandler =
new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF, acuCspCookie, acuFdir);
auto pcduHandler = new PCDUHandler(objects::PCDU_HANDLER, 50);
/**
* Setting PCDU devices to mode normal immediately after start up because PCDU is always
* running.
*/
p60dockhandler->setModeNormal();
pdu1handler->setModeNormal();
pdu2handler->setModeNormal();
acuhandler->setModeNormal();
if (pwrSwitcher != nullptr) {
*pwrSwitcher = pcduHandler;
}
#if OBSW_DEBUG_P60DOCK == 1
p60dockhandler->setDebugMode(true);
#endif
#if OBSW_DEBUG_ACU == 1
acuhandler->setDebugMode(true);
#endif
}
void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
using namespace gpio;
GpioCookie* gpioCookieRadSensor = new GpioCookie;
std::stringstream consumer;
consumer << "0x" << std::hex << objects::RAD_SENSOR;
GpiodRegularByLineName* gpio = new GpiodRegularByLineName(
q7s::gpioNames::RAD_SENSOR_CHIP_SELECT, consumer.str(), Direction::OUT, Levels::HIGH);
gpioCookieRadSensor->addGpio(gpioIds::CS_RAD_SENSOR, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_RADFET, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookieRadSensor->addGpio(gpioIds::ENABLE_RADFET, gpio);
gpioComIF->addGpios(gpioCookieRadSensor);
SpiCookie* spiCookieRadSensor = new SpiCookie(
addresses::RAD_SENSOR, gpioIds::CS_RAD_SENSOR, std::string(q7s::SPI_DEFAULT_DEV),
RAD_SENSOR::READ_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::DEFAULT_MAX_1227_SPEED);
auto radSensor = new RadiationSensorHandler(objects::RAD_SENSOR, objects::SPI_COM_IF,
spiCookieRadSensor, gpioComIF);
static_cast<void>(radSensor);
// The radiation sensor ADC is powered by the 5V stack connector which should always be on
radSensor->setStartUpImmediately();
// It's a simple sensor, so just to to normal mode immediately
radSensor->setToGoToNormalModeImmediately();
#if OBSW_DEBUG_RAD_SENSOR == 1
radSensor->enablePeriodicDataPrint(true);
#endif
}
void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF,
PowerSwitchIF* pwrSwitcher) {
using namespace gpio;
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
std::stringstream consumer;
GpiodRegularByLineName* gpio = nullptr;
consumer << "0x" << std::hex << objects::GYRO_0_ADIS_HANDLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_0_ADIS_CS, consumer.str(), Direction::OUT,
Levels::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::GYRO_1_L3G_HANDLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_1_L3G_CS, consumer.str(), Direction::OUT,
Levels::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::GYRO_2_ADIS_HANDLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_2_ADIS_CS, consumer.str(), Direction::OUT,
Levels::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ADIS_CS, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::GYRO_3_L3G_HANDLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_3_L3G_CS, consumer.str(), Direction::OUT,
Levels::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_3_L3G_CS, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::MGM_0_LIS3_HANDLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_0_CS, consumer.str(), Direction::OUT,
Levels::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::MGM_0_LIS3_CS, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::MGM_1_RM3100_HANDLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_1_CS, consumer.str(), Direction::OUT,
Levels::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::MGM_1_RM3100_CS, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::MGM_2_LIS3_HANDLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_2_CS, consumer.str(), Direction::OUT,
Levels::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::MGM_3_RM3100_HANDLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_3_CS, consumer.str(), Direction::OUT,
Levels::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
// GNSS reset pins are active low
gpio = new GpiodRegularByLineName(q7s::gpioNames::RESET_GNSS_0, consumer.str(), Direction::OUT,
Levels::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_NRESET, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::RESET_GNSS_1, consumer.str(), Direction::OUT,
Levels::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_NRESET, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::GYRO_0_ADIS_HANDLER;
// Enable pins must be pulled low for regular operations
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_0_ENABLE, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ENABLE, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::GYRO_2_ADIS_HANDLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_2_ENABLE, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ENABLE, gpio);
// Enable pins for GNSS
consumer.str("");
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_0_ENABLE, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_ENABLE, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_1_ENABLE, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_ENABLE, gpio);
// Select pin. 0 for GPS side A, 1 for GPS side B
consumer.str("");
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_SELECT, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_SELECT, gpio);
gpioComIF->addGpios(gpioCookieAcsBoard);
AcsBoardFdir* fdir = nullptr;
static_cast<void>(fdir);
#if OBSW_ADD_ACS_HANDLERS == 1
std::string spiDev = q7s::SPI_DEFAULT_DEV;
SpiCookie* spiCookie =
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_COM_IF,
spiCookie, spi::LIS3_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_0_LIS3_HANDLER);
mgmLis3Handler->setCustomFdir(fdir);
static_cast<void>(mgmLis3Handler);
#if OBSW_TEST_ACS == 1
mgmLis3Handler->setStartUpImmediately();
mgmLis3Handler->setToGoToNormalMode(true);
#endif
#if OBSW_DEBUG_ACS == 1
mgmLis3Handler->enablePeriodicPrintouts(true, 10);
#endif
spiCookie =
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
auto mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_COM_IF,
spiCookie, spi::RM3100_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_1_RM3100_HANDLER);
mgmRm3100Handler->setCustomFdir(fdir);
mgmRm3100Handler->setParent(objects::ACS_BOARD_ASS);
static_cast<void>(mgmRm3100Handler);
#if OBSW_TEST_ACS == 1
mgmRm3100Handler->setStartUpImmediately();
mgmRm3100Handler->setToGoToNormalMode(true);
#endif
#if OBSW_DEBUG_ACS == 1
mgmRm3100Handler->enablePeriodicPrintouts(true, 10);
#endif
spiCookie =
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_COM_IF,
spiCookie, spi::LIS3_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_2_LIS3_HANDLER);
mgmLis3Handler->setCustomFdir(fdir);
mgmLis3Handler->setParent(objects::ACS_BOARD_ASS);
static_cast<void>(mgmLis3Handler);
#if OBSW_TEST_ACS == 1
mgmLis3Handler->setStartUpImmediately();
mgmLis3Handler->setToGoToNormalMode(true);
#endif
#if OBSW_DEBUG_ACS == 1
mgmLis3Handler->enablePeriodicPrintouts(true, 10);
#endif
spiCookie =
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_COM_IF,
spiCookie, spi::RM3100_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_3_RM3100_HANDLER);
mgmRm3100Handler->setCustomFdir(fdir);
mgmRm3100Handler->setParent(objects::ACS_BOARD_ASS);
#if OBSW_TEST_ACS == 1
mgmRm3100Handler->setStartUpImmediately();
mgmRm3100Handler->setToGoToNormalMode(true);
#endif
#if OBSW_DEBUG_ACS == 1
mgmRm3100Handler->enablePeriodicPrintouts(true, 10);
#endif
// Commented until ACS board V2 in in clean room again
// Gyro 0 Side A
spiCookie = new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
ADIS1650X::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE,
spi::DEFAULT_ADIS16507_SPEED);
auto adisHandler = new GyroADIS1650XHandler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_COM_IF,
spiCookie, ADIS1650X::Type::ADIS16505);
fdir = new AcsBoardFdir(objects::GYRO_0_ADIS_HANDLER);
adisHandler->setCustomFdir(fdir);
adisHandler->setParent(objects::ACS_BOARD_ASS);
static_cast<void>(adisHandler);
#if OBSW_TEST_ACS == 1
adisHandler->setStartUpImmediately();
adisHandler->setToGoToNormalModeImmediately();
#endif
#if OBSW_DEBUG_ACS == 1
adisHandler->enablePeriodicPrintouts(true, 10);
#endif
// Gyro 1 Side A
spiCookie =
new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev, L3GD20H::MAX_BUFFER_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF,
spiCookie, spi::L3G_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::GYRO_1_L3G_HANDLER);
gyroL3gHandler->setCustomFdir(fdir);
gyroL3gHandler->setParent(objects::ACS_BOARD_ASS);
static_cast<void>(gyroL3gHandler);
#if OBSW_TEST_ACS == 1
gyroL3gHandler->setStartUpImmediately();
gyroL3gHandler->setToGoToNormalMode(true);
#endif
#if OBSW_DEBUG_ACS == 1
gyroL3gHandler->enablePeriodicPrintouts(true, 10);
#endif
// Gyro 2 Side B
spiCookie = new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, spiDev,
ADIS1650X::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE,
spi::DEFAULT_ADIS16507_SPEED);
adisHandler = new GyroADIS1650XHandler(objects::GYRO_2_ADIS_HANDLER, objects::SPI_COM_IF,
spiCookie, ADIS1650X::Type::ADIS16505);
fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER);
adisHandler->setCustomFdir(fdir);
adisHandler->setParent(objects::ACS_BOARD_ASS);
#if OBSW_TEST_ACS == 1
adisHandler->setStartUpImmediately();
adisHandler->setToGoToNormalModeImmediately();
#endif
// Gyro 3 Side B
spiCookie =
new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, spiDev, L3GD20H::MAX_BUFFER_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_COM_IF,
spiCookie, spi::L3G_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::GYRO_3_L3G_HANDLER);
gyroL3gHandler->setCustomFdir(fdir);
gyroL3gHandler->setParent(objects::ACS_BOARD_ASS);
#if OBSW_TEST_ACS == 1
gyroL3gHandler->setStartUpImmediately();
gyroL3gHandler->setToGoToNormalMode(true);
#endif
#if OBSW_DEBUG_ACS == 1
gyroL3gHandler->enablePeriodicPrintouts(true, 10);
#endif
bool debugGps = false;
#if OBSW_DEBUG_GPS == 1
debugGps = true;
#endif
resetArgsGnss1.gnss1 = true;
resetArgsGnss1.gpioComIF = gpioComIF;
resetArgsGnss1.waitPeriodMs = 100;
resetArgsGnss0.gnss1 = false;
resetArgsGnss0.gpioComIF = gpioComIF;
resetArgsGnss0.waitPeriodMs = 100;
auto gpsHandler0 =
new GPSHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss0);
AcsBoardHelper acsBoardHelper = AcsBoardHelper(
objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER,
objects::MGM_3_RM3100_HANDLER, objects::GYRO_0_ADIS_HANDLER, objects::GYRO_1_L3G_HANDLER,
objects::GYRO_2_ADIS_HANDLER, objects::GYRO_3_L3G_HANDLER, objects::GPS_CONTROLLER);
auto acsAss = new AcsBoardAssembly(objects::ACS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher,
acsBoardHelper, gpioComIF);
static_cast<void>(acsAss);
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
}
void ObjectFactory::createHeaterComponents() {
using namespace gpio;
GpioCookie* heaterGpiosCookie = new GpioCookie;
GpiodRegularByLineName* gpio = nullptr;
std::stringstream consumer;
consumer << "0x" << std::hex << objects::HEATER_HANDLER;
/* Pin H2-11 on stack connector */
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_0, consumer.str(), Direction::OUT,
Levels::LOW);
heaterGpiosCookie->addGpio(gpioIds::HEATER_0, gpio);
/* Pin H2-12 on stack connector */
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_1, consumer.str(), Direction::OUT,
Levels::LOW);
heaterGpiosCookie->addGpio(gpioIds::HEATER_1, gpio);
/* Pin H2-13 on stack connector */
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_2, consumer.str(), Direction::OUT,
Levels::LOW);
heaterGpiosCookie->addGpio(gpioIds::HEATER_2, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_3, consumer.str(), Direction::OUT,
Levels::LOW);
heaterGpiosCookie->addGpio(gpioIds::HEATER_3, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_4, consumer.str(), Direction::OUT,
Levels::LOW);
heaterGpiosCookie->addGpio(gpioIds::HEATER_4, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_5, consumer.str(), Direction::OUT,
Levels::LOW);
heaterGpiosCookie->addGpio(gpioIds::HEATER_5, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_6, consumer.str(), Direction::OUT,
Levels::LOW);
heaterGpiosCookie->addGpio(gpioIds::HEATER_6, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_7, consumer.str(), Direction::OUT,
Levels::LOW);
heaterGpiosCookie->addGpio(gpioIds::HEATER_7, gpio);
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, heaterGpiosCookie,
objects::PCDU_HANDLER, pcdu::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V);
}
void ObjectFactory::createSolarArrayDeploymentComponents() {
using namespace gpio;
GpioCookie* solarArrayDeplCookie = new GpioCookie;
GpiodRegularByLineName* gpio = nullptr;
std::stringstream consumer;
consumer << "0x" << std::hex << objects::SOLAR_ARRAY_DEPL_HANDLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::SA_DPL_PIN_0, consumer.str(), Direction::OUT,
Levels::LOW);
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA1, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::SA_DPL_PIN_1, consumer.str(), Direction::OUT,
Levels::LOW);
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA2, gpio);
// TODO: Find out burn time. For now set to 1000 ms.
new SolarArrayDeploymentHandler(objects::SOLAR_ARRAY_DEPL_HANDLER, objects::GPIO_IF,
solarArrayDeplCookie, objects::PCDU_HANDLER,
pcdu::Switches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
gpioIds::DEPLSA1, gpioIds::DEPLSA2, 1000);
}
void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) {
UartCookie* syrlinksUartCookie =
new UartCookie(objects::SYRLINKS_HK_HANDLER, q7s::UART_SYRLINKS_DEV, uart::SYRLINKS_BAUD,
syrlinks::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
syrlinksUartCookie->setParityEven();
auto syrlinksFdir = new SyrlinksFdir(objects::SYRLINKS_HK_HANDLER);
auto syrlinksHandler =
new SyrlinksHkHandler(objects::SYRLINKS_HK_HANDLER, objects::UART_COM_IF, syrlinksUartCookie,
pcdu::PDU1_CH1_SYRLINKS_12V, syrlinksFdir);
syrlinksHandler->setPowerSwitcher(pwrSwitcher);
#if OBSW_DEBUG_SYRLINKS == 1
syrlinksHandler->setDebugMode(true);
#endif
}
void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
using namespace gpio;
std::stringstream consumer;
#if OBSW_ADD_PLOC_MPSOC == 1
consumer << "0x" << std::hex << objects::PLOC_MPSOC_HANDLER;
auto gpioConfigMPSoC = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_MPSOC_UART,
consumer.str(), Direction::OUT, Levels::HIGH);
auto mpsocGpioCookie = new GpioCookie;
mpsocGpioCookie->addGpio(gpioIds::ENABLE_MPSOC_UART, gpioConfigMPSoC);
gpioComIF->addGpios(mpsocGpioCookie);
auto mpsocCookie =
new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV, uart::PLOC_MPSOC_BAUD,
mpsoc::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
mpsocCookie->setNoFixedSizeReply();
auto plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER);
new PlocMPSoCHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocCookie,
plocMpsocHelper, Gpio(gpioIds::ENABLE_MPSOC_UART, gpioComIF),
objects::PLOC_SUPERVISOR_HANDLER);
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
#if OBSW_ADD_PLOC_SUPERVISOR == 1
consumer << "0x" << std::hex << objects::PLOC_SUPERVISOR_HANDLER;
auto gpioConfigSupv = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_SUPV_UART, consumer.str(),
Direction::OUT, Levels::HIGH);
auto supvGpioCookie = new GpioCookie;
supvGpioCookie->addGpio(gpioIds::ENABLE_SUPV_UART, gpioConfigSupv);
gpioComIF->addGpios(supvGpioCookie);
auto supervisorCookie = new UartCookie(objects::PLOC_SUPERVISOR_HANDLER,
q7s::UART_PLOC_SUPERVSIOR_DEV, uart::PLOC_SUPERVISOR_BAUD,
supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
supervisorCookie->setNoFixedSizeReply();
new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF,
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
pcdu::PDU1_CH6_PLOC_12V);
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
static_cast<void>(consumer);
}
void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
using namespace gpio;
GpioCookie* gpioCookieRw = new GpioCookie;
GpioCallback* csRw1 =
new GpioCallback("Chip select reaction wheel 1", Direction::OUT, Levels::HIGH,
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
gpioCookieRw->addGpio(gpioIds::CS_RW1, csRw1);
GpioCallback* csRw2 =
new GpioCallback("Chip select reaction wheel 2", Direction::OUT, Levels::HIGH,
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
gpioCookieRw->addGpio(gpioIds::CS_RW2, csRw2);
GpioCallback* csRw3 =
new GpioCallback("Chip select reaction wheel 3", Direction::OUT, Levels::HIGH,
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
gpioCookieRw->addGpio(gpioIds::CS_RW3, csRw3);
GpioCallback* csRw4 =
new GpioCallback("Chip select reaction wheel 4", Direction::OUT, Levels::HIGH,
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
gpioCookieRw->addGpio(gpioIds::CS_RW4, csRw4);
std::stringstream consumer;
GpiodRegularByLineName* gpio = nullptr;
consumer << "0x" << std::hex << objects::RW1;
gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_1, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookieRw->addGpio(gpioIds::EN_RW1, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::RW2;
gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_2, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookieRw->addGpio(gpioIds::EN_RW2, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::RW3;
gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_3, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookieRw->addGpio(gpioIds::EN_RW3, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::RW4;
gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_4, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookieRw->addGpio(gpioIds::EN_RW4, gpio);
gpioComIF->addGpios(gpioCookieRw);
#if OBSW_ADD_RW == 1
auto rw1SpiCookie =
new SpiCookie(addresses::RW1, gpioIds::CS_RW1, q7s::SPI_RW_DEV, RwDefinitions::MAX_REPLY_SIZE,
spi::RW_MODE, spi::RW_SPEED, &rwSpiCallback::spiCallback, nullptr);
auto rw2SpiCookie =
new SpiCookie(addresses::RW2, gpioIds::CS_RW2, q7s::SPI_RW_DEV, RwDefinitions::MAX_REPLY_SIZE,
spi::RW_MODE, spi::RW_SPEED, &rwSpiCallback::spiCallback, nullptr);
auto rw3SpiCookie =
new SpiCookie(addresses::RW3, gpioIds::CS_RW3, q7s::SPI_RW_DEV, RwDefinitions::MAX_REPLY_SIZE,
spi::RW_MODE, spi::RW_SPEED, &rwSpiCallback::spiCallback, nullptr);
auto rw4SpiCookie =
new SpiCookie(addresses::RW4, gpioIds::CS_RW4, q7s::SPI_RW_DEV, RwDefinitions::MAX_REPLY_SIZE,
spi::RW_MODE, spi::RW_SPEED, &rwSpiCallback::spiCallback, nullptr);
auto rwHandler1 =
new RwHandler(objects::RW1, objects::SPI_COM_IF, rw1SpiCookie, gpioComIF, gpioIds::EN_RW1);
rw1SpiCookie->setCallbackArgs(rwHandler1);
#if OBSW_DEBUG_RW == 1
rwHandler1->setStartUpImmediately();
rwHandler1->setDebugMode(true);
#endif
auto rwHandler2 =
new RwHandler(objects::RW2, objects::SPI_COM_IF, rw2SpiCookie, gpioComIF, gpioIds::EN_RW2);
rw2SpiCookie->setCallbackArgs(rwHandler2);
#if OBSW_DEBUG_RW == 1
rwHandler2->setStartUpImmediately();
rwHandler2->setDebugMode(true);
#endif
auto rwHandler3 =
new RwHandler(objects::RW3, objects::SPI_COM_IF, rw3SpiCookie, gpioComIF, gpioIds::EN_RW3);
rw3SpiCookie->setCallbackArgs(rwHandler3);
#if OBSW_DEBUG_RW == 1
rwHandler3->setStartUpImmediately();
rwHandler3->setDebugMode(true);
#endif
auto rwHandler4 =
new RwHandler(objects::RW4, objects::SPI_COM_IF, rw4SpiCookie, gpioComIF, gpioIds::EN_RW4);
rw4SpiCookie->setCallbackArgs(rwHandler4);
#if OBSW_DEBUG_RW == 1
rwHandler4->setStartUpImmediately();
rwHandler4->setDebugMode(true);
#endif
#endif /* OBSW_ADD_RW == 1 */
}
void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
using namespace gpio;
// GPIO definitions of signals connected to the virtual channel interfaces of the PTME IP Core
GpioCookie* gpioCookiePtmeIp = new GpioCookie;
GpiodRegularByLineName* gpio = nullptr;
std::stringstream consumer;
consumer.str("PAPB VC0");
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC0, consumer.str());
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_BUSY, gpio);
consumer.str("PAPB VC0");
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC0, consumer.str());
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_EMPTY, gpio);
consumer.str("PAPB VC 1");
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC1, consumer.str());
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_BUSY, gpio);
consumer.str("");
consumer.str("PAPB VC 1");
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_EMPTY, gpio);
consumer.str("");
consumer.str("PAPB VC 2");
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC2, consumer.str());
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_BUSY, gpio);
consumer.str("");
consumer.str("PAPB VC 2");
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC2, consumer.str());
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_EMPTY, gpio);
consumer.str("");
consumer.str("PAPB VC 3");
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC3, consumer.str());
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_BUSY, gpio);
consumer.str("");
consumer.str("PAPB VC 3");
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC3, consumer.str());
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_EMPTY, gpio);
gpioComIF->addGpios(gpioCookiePtmeIp);
// Creating virtual channel interfaces
VcInterfaceIF* vc0 =
new PapbVcInterface(gpioComIF, gpioIds::VC0_PAPB_BUSY, gpioIds::VC0_PAPB_EMPTY, q7s::UIO_PTME,
q7s::uiomapids::PTME_VC0);
VcInterfaceIF* vc1 =
new PapbVcInterface(gpioComIF, gpioIds::VC1_PAPB_BUSY, gpioIds::VC1_PAPB_EMPTY, q7s::UIO_PTME,
q7s::uiomapids::PTME_VC1);
VcInterfaceIF* vc2 =
new PapbVcInterface(gpioComIF, gpioIds::VC2_PAPB_BUSY, gpioIds::VC2_PAPB_EMPTY, q7s::UIO_PTME,
q7s::uiomapids::PTME_VC2);
VcInterfaceIF* vc3 =
new PapbVcInterface(gpioComIF, gpioIds::VC3_PAPB_BUSY, gpioIds::VC3_PAPB_EMPTY, q7s::UIO_PTME,
q7s::uiomapids::PTME_VC3);
// Creating ptme object and adding virtual channel interfaces
Ptme* ptme = new Ptme(objects::PTME);
ptme->addVcInterface(ccsds::VC0, vc0);
ptme->addVcInterface(ccsds::VC1, vc1);
ptme->addVcInterface(ccsds::VC2, vc2);
ptme->addVcInterface(ccsds::VC3, vc3);
AxiPtmeConfig* axiPtmeConfig =
new AxiPtmeConfig(objects::AXI_PTME_CONFIG, q7s::UIO_PTME, q7s::uiomapids::PTME_CONFIG);
PtmeConfig* ptmeConfig = new PtmeConfig(objects::PTME_CONFIG, axiPtmeConfig);
#if OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT == 1
// Set to high value when not sending via syrlinks
static const uint32_t TRANSMITTER_TIMEOUT = 86400000; // 1 day
#else
static const uint32_t TRANSMITTER_TIMEOUT = 900000; // 15 minutes
#endif
CCSDSHandler* ccsdsHandler = new CCSDSHandler(
objects::CCSDS_HANDLER, objects::PTME, objects::CCSDS_PACKET_DISTRIBUTOR, ptmeConfig,
gpioComIF, gpioIds::RS485_EN_TX_CLOCK, gpioIds::RS485_EN_TX_DATA, TRANSMITTER_TIMEOUT);
VirtualChannel* vc = nullptr;
vc = new VirtualChannel(ccsds::VC0, common::VC0_QUEUE_SIZE, objects::CCSDS_HANDLER);
ccsdsHandler->addVirtualChannel(ccsds::VC0, vc);
vc = new VirtualChannel(ccsds::VC1, common::VC1_QUEUE_SIZE, objects::CCSDS_HANDLER);
ccsdsHandler->addVirtualChannel(ccsds::VC1, vc);
vc = new VirtualChannel(ccsds::VC2, common::VC2_QUEUE_SIZE, objects::CCSDS_HANDLER);
ccsdsHandler->addVirtualChannel(ccsds::VC2, vc);
vc = new VirtualChannel(ccsds::VC3, common::VC3_QUEUE_SIZE, objects::CCSDS_HANDLER);
ccsdsHandler->addVirtualChannel(ccsds::VC3, vc);
GpioCookie* gpioCookiePdec = new GpioCookie;
consumer.str("");
consumer << "0x" << std::hex << objects::PDEC_HANDLER;
// GPIO also low after linux boot (specified by device-tree)
gpio = new GpiodRegularByLineName(q7s::gpioNames::PDEC_RESET, consumer.str(), Direction::OUT,
Levels::LOW);
gpioCookiePdec->addGpio(gpioIds::PDEC_RESET, gpio);
gpioComIF->addGpios(gpioCookiePdec);
new PdecHandler(objects::PDEC_HANDLER, objects::CCSDS_HANDLER, gpioComIF, gpioIds::PDEC_RESET,
q7s::UIO_PDEC_CONFIG_MEMORY, q7s::UIO_PDEC_RAM, q7s::UIO_PDEC_REGISTERS);
GpioCookie* gpioRS485Chip = new GpioCookie;
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_CLOCK, "RS485 Transceiver",
Direction::OUT, Levels::LOW);
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_CLOCK, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_DATA, "RS485 Transceiver",
Direction::OUT, Levels::LOW);
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_DATA, gpio);
// Default configuration enables RX channels (RXEN = LOW)
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_RX_CLOCK, "RS485 Transceiver",
Direction::OUT, Levels::LOW);
gpioRS485Chip->addGpio(gpioIds::RS485_EN_RX_CLOCK, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_RX_DATA, "RS485 Transceiver",
Direction::OUT, Levels::LOW);
gpioRS485Chip->addGpio(gpioIds::RS485_EN_RX_DATA, gpio);
gpioComIF->addGpios(gpioRS485Chip);
}
void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
PowerSwitchIF* pwrSwitcher) {
using namespace gpio;
// Create all GPIO components first
GpioCookie* plPcduGpios = new GpioCookie;
GpiodRegularByLineName* gpio = nullptr;
std::string consumer;
// Switch pins are active high
consumer = "PLPCDU_ENB_VBAT_0";
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_VBAT0, consumer, Direction::OUT,
gpio::Levels::LOW);
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_VBAT0, gpio);
consumer = "PLPCDU_ENB_VBAT_1";
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_VBAT1, consumer, Direction::OUT,
gpio::Levels::LOW);
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_VBAT1, gpio);
consumer = "PLPCDU_ENB_DRO";
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_DRO, consumer, Direction::OUT,
gpio::Levels::LOW);
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_DRO, gpio);
consumer = "PLPCDU_ENB_X8";
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_X8, consumer, Direction::OUT,
gpio::Levels::LOW);
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_X8, gpio);
consumer = "PLPCDU_ENB_TX";
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_TX, consumer, Direction::OUT,
gpio::Levels::LOW);
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_TX, gpio);
consumer = "PLPCDU_ENB_MPA";
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_MPA, consumer, Direction::OUT,
gpio::Levels::LOW);
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_MPA, gpio);
consumer = "PLPCDU_ENB_HPA";
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_HPA, consumer, Direction::OUT,
gpio::Levels::LOW);
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_HPA, gpio);
// Chip select pin is active low
consumer = "PLPCDU_ADC_CS";
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ADC_CS, consumer, Direction::OUT,
gpio::Levels::HIGH);
plPcduGpios->addGpio(gpioIds::PLPCDU_ADC_CS, gpio);
gpioComIF->addGpios(plPcduGpios);
SpiCookie* spiCookie = new SpiCookie(addresses::PLPCDU_ADC, gpioIds::PLPCDU_ADC_CS,
q7s::SPI_DEFAULT_DEV, plpcdu::MAX_ADC_REPLY_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::PL_PCDU_MAX_1227_SPEED);
// Create device handler components
auto plPcduHandler = new PayloadPcduHandler(
objects::PLPCDU_HANDLER, objects::SPI_COM_IF, spiCookie, gpioComIF, SdCardManager::instance(),
pwrSwitcher, pcdu::Switches::PDU2_CH1_PL_PCDU_BATT_0_14V8,
pcdu::Switches::PDU2_CH6_PL_PCDU_BATT_1_14V8, false);
spiCookie->setCallbackMode(PayloadPcduHandler::extConvAsTwoCallback, plPcduHandler);
// plPcduHandler->enablePeriodicPrintout(true, 5);
// static_cast<void>(plPcduHandler);
#if OBSW_TEST_PL_PCDU == 1
plPcduHandler->setStartUpImmediately();
#endif
#if OBSW_DEBUG_PL_PCDU == 1
plPcduHandler->setToGoToNormalModeImmediately(true);
plPcduHandler->enablePeriodicPrintout(true, 10);
#endif
}
void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
new Q7STestTask(objects::TEST_TASK);
#if OBSW_ADD_SPI_TEST_CODE == 1
new SpiTestClass(objects::SPI_TEST, gpioComIF);
#endif
#if OBSW_ADD_I2C_TEST_CODE == 1
new I2cTestClass(objects::I2C_TEST, q7s::I2C_DEFAULT_DEV);
#endif
#if OBSW_ADD_UART_TEST_CODE == 1
new UartTestClass(objects::UART_TEST);
#endif
}
void ObjectFactory::testAcsBrdAss(AcsBoardAssembly* acsAss) {
CommandMessage msg;
ModeMessage::setModeMessage(&msg, ModeMessage::CMD_MODE_COMMAND, DeviceHandlerIF::MODE_NORMAL,
duallane::A_SIDE);
ReturnValue_t result = MessageQueueSenderIF::sendMessage(acsAss->getCommandQueue(), &msg);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Sending mode command failed" << std::endl;
}
createMiscComponents();
}

View File

@ -1,3 +0,0 @@
target_sources(${OBSW_NAME} PRIVATE
fmObjectFactory.cpp
)

View File

@ -0,0 +1,67 @@
#include "OBSWConfig.h"
#include "bsp_q7s/core/CoreController.h"
#include "bsp_q7s/core/ObjectFactory.h"
#include "busConf.h"
#include "commonObjects.h"
#include "devConf.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "linux/ObjectFactory.h"
#include "linux/callbacks/gpioCallbacks.h"
#include "mission/core/GenericFactory.h"
void ObjectFactory::produce(void* args) {
ObjectFactory::setStatics();
HealthTableIF* healthTable = nullptr;
ObjectFactory::produceGenericObjects(&healthTable);
LinuxLibgpioIF* gpioComIF = nullptr;
UartComIF* uartComIF = nullptr;
SpiComIF* spiMainComIF = nullptr;
I2cComIF* i2cComIF = nullptr;
PowerSwitchIF* pwrSwitcher = nullptr;
SpiComIF* spiRwComIF = nullptr;
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF, &spiRwComIF);
createTmpComponents();
new CoreController(objects::CORE_CONTROLLER);
gpioCallbacks::disableAllDecoder(gpioComIF);
createPcduComponents(gpioComIF, &pwrSwitcher);
createRadSensorComponent(gpioComIF);
createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
#if OBSW_ADD_ACS_BOARD == 1
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher);
#endif
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
createSolarArrayDeploymentComponents();
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
#if OBSW_ADD_SYRLINKS == 1
createSyrlinksComponents(pwrSwitcher);
#endif /* OBSW_ADD_SYRLINKS == 1 */
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
createPayloadComponents(gpioComIF);
#if OBSW_ADD_MGT == 1
createImtqComponents(pwrSwitcher);
#endif
createReactionWheelComponents(gpioComIF, pwrSwitcher);
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
createBpxBatteryComponent();
#endif
#if OBSW_ADD_STAR_TRACKER == 1
createStrComponents(pwrSwitcher);
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
#if OBSW_USE_CCSDS_IP_CORE == 1
createCcsdsComponents(gpioComIF);
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
/* Test Task */
#if OBSW_ADD_TEST_CODE == 1
createTestComponents(gpioComIF);
#endif /* OBSW_ADD_TEST_CODE == 1 */
createMiscComponents();
createThermalController();
createAcsController();
}

View File

@ -1,6 +1,2 @@
target_sources(${OBSW_NAME} PRIVATE
FileSystemHandler.cpp
SdCardManager.cpp
scratchApi.cpp
FilesystemHelper.cpp
)
target_sources(${OBSW_NAME} PRIVATE FileSystemHandler.cpp SdCardManager.cpp
scratchApi.cpp FilesystemHelper.cpp)

View File

@ -70,9 +70,8 @@ void FileSystemHandler::fileSystemHandlerLoop() {
void FileSystemHandler::fileSystemCheckup() {
SdCardManager::SdStatePair statusPair;
sdcMan->getSdCardActiveStatus(statusPair);
sd::SdCard preferredSdCard;
sdcMan->getPreferredSdCard(preferredSdCard);
sdcMan->getSdCardsStatus(statusPair);
sd::SdCard preferredSdCard = sdcMan->getPreferredSdCard();
if ((preferredSdCard == sd::SdCard::SLOT_0) and (statusPair.first == sd::SdState::MOUNTED)) {
currentMountPrefix = SdCardManager::SD_0_MOUNT_POINT;
} else if ((preferredSdCard == sd::SdCard::SLOT_1) and
@ -109,11 +108,7 @@ ReturnValue_t FileSystemHandler::initialize() {
<< std::endl;
}
sdcMan = SdCardManager::instance();
sd::SdCard preferredSdCard;
ReturnValue_t result = sdcMan->getPreferredSdCard(preferredSdCard);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
sd::SdCard preferredSdCard = sdcMan->getPreferredSdCard();
if (preferredSdCard == sd::SdCard::SLOT_0) {
currentMountPrefix = SdCardManager::SD_0_MOUNT_POINT;
} else if (preferredSdCard == sd::SdCard::SLOT_1) {

View File

@ -8,8 +8,6 @@
FilesystemHelper::FilesystemHelper() {}
FilesystemHelper::~FilesystemHelper() {}
ReturnValue_t FilesystemHelper::checkPath(std::string path) {
SdCardManager* sdcMan = SdCardManager::instance();
if (sdcMan == nullptr) {

View File

@ -7,7 +7,7 @@
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
/**
* @brief This class implements often used functions concerning the file system management.
* @brief This class implements often used functions related to the file system management.
*
* @author J. Meier
*/
@ -20,11 +20,8 @@ class FilesystemHelper : public HasReturnvaluesIF {
//! [EXPORT] : [COMMENT] Specified file does not exist on filesystem
static const ReturnValue_t FILE_NOT_EXISTS = MAKE_RETURN_CODE(0xA1);
FilesystemHelper();
virtual ~FilesystemHelper();
/**
* @brief In case the path points to a directory on the sd card the function checks if the
* @brief In case the path points to a directory on the sd card, the function checks if the
* appropriate SD card is mounted.
*
* @param path Path to check
@ -39,11 +36,14 @@ class FilesystemHelper : public HasReturnvaluesIF {
/**
* @brief Checks if the file exists on the filesystem.
*
* param file File to check
* @param file File to check
*
* @return RETURN_OK if fiel exists, otherwise return error code.
* @return RETURN_OK if file exists, otherwise return error code.
*/
static ReturnValue_t fileExists(std::string file);
private:
FilesystemHelper();
};
#endif /* BSP_Q7S_MEMORY_FILESYSTEMHELPER_H_ */

View File

@ -16,23 +16,51 @@
#include "linux/utility/utility.h"
#include "scratchApi.h"
SdCardManager* SdCardManager::factoryInstance = nullptr;
SdCardManager* SdCardManager::INSTANCE = nullptr;
SdCardManager::SdCardManager() : SystemObject(objects::SDC_MANAGER), cmdExecutor(256) {
mutex = MutexFactory::instance()->createMutex();
ReturnValue_t result = mutex->lockMutex();
if (result != RETURN_OK) {
sif::error << "SdCardManager::SdCardManager: Mutex lock failed" << std::endl;
}
uint8_t prefSdRaw = 0;
result = scratch::readNumber(scratch::PREFERED_SDC_KEY, prefSdRaw);
result = mutex->unlockMutex();
if (result != RETURN_OK) {
sif::error << "SdCardManager::SdCardManager: Mutex unlock failed" << std::endl;
}
if (result != HasReturnvaluesIF::RETURN_OK) {
if (result == scratch::KEY_NOT_FOUND) {
sif::warning << "CoreController::sdCardInit: "
"Preferred SD card not set. Setting to 0"
<< std::endl;
setPreferredSdCard(sd::SdCard::SLOT_0);
sdInfo.pref = sd::SdCard::SLOT_0;
} else {
// Should not happen.
// TODO: Maybe trigger event?
sif::error << "SdCardManager::SdCardManager: Reading preferred SD card from scratch"
"buffer failed"
<< std::endl;
sdInfo.pref = sd::SdCard::SLOT_0;
}
}
sdInfo.pref = static_cast<sd::SdCard>(prefSdRaw);
}
SdCardManager::~SdCardManager() {}
void SdCardManager::create() {
if (factoryInstance == nullptr) {
factoryInstance = new SdCardManager();
if (INSTANCE == nullptr) {
INSTANCE = new SdCardManager();
}
}
SdCardManager* SdCardManager::instance() {
SdCardManager::create();
return SdCardManager::factoryInstance;
return SdCardManager::INSTANCE;
}
ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCard,
@ -51,7 +79,7 @@ ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCar
if (statusPair == nullptr) {
sdStatusPtr = std::make_unique<SdStatePair>();
statusPair = sdStatusPtr.get();
result = getSdCardActiveStatus(*statusPair);
result = getSdCardsStatus(*statusPair);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
@ -98,7 +126,7 @@ ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCar
ReturnValue_t SdCardManager::switchOffSdCard(sd::SdCard sdCard, bool doUnmountSdCard,
SdStatePair* statusPair) {
std::pair<sd::SdState, sd::SdState> active;
ReturnValue_t result = getSdCardActiveStatus(active);
ReturnValue_t result = getSdCardsStatus(active);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
@ -165,7 +193,7 @@ ReturnValue_t SdCardManager::setSdCardState(sd::SdCard sdCard, bool on) {
return result;
}
ReturnValue_t SdCardManager::getSdCardActiveStatus(SdStatePair& active) {
ReturnValue_t SdCardManager::getSdCardsStatus(SdStatePair& active) {
using namespace std;
MutexGuard mg(mutex);
if (not filesystem::exists(SD_STATE_FILE)) {
@ -273,14 +301,14 @@ ReturnValue_t SdCardManager::sanitizeState(SdStatePair* statusPair, sd::SdCard p
resetNonBlockingState = true;
}
if (prefSdCard == sd::SdCard::NONE) {
result = getPreferredSdCard(prefSdCard);
result = getPreferredSdCard();
if (result != HasReturnvaluesIF::RETURN_OK) {
}
}
if (statusPair == nullptr) {
sdStatusPtr = std::make_unique<SdStatePair>();
statusPair = sdStatusPtr.get();
getSdCardActiveStatus(*statusPair);
getSdCardsStatus(*statusPair);
}
if (statusPair->first == sd::SdState::ON) {
@ -351,20 +379,21 @@ void SdCardManager::processSdStatusLine(std::pair<sd::SdState, sd::SdState>& act
idx++;
}
ReturnValue_t SdCardManager::getPreferredSdCard(sd::SdCard& sdCard) const {
uint8_t prefSdCard = 0;
ReturnValue_t result = scratch::readNumber(scratch::PREFERED_SDC_KEY, prefSdCard);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
sd::SdCard SdCardManager::getPreferredSdCard() const {
MutexGuard mg(mutex);
auto res = mg.getLockResult();
if (res != RETURN_OK) {
sif::error << "SdCardManager::getPreferredSdCard: Lock error" << std::endl;
}
sdCard = static_cast<sd::SdCard>(prefSdCard);
return HasReturnvaluesIF::RETURN_OK;
return sdInfo.pref;
}
ReturnValue_t SdCardManager::setPreferredSdCard(sd::SdCard sdCard) {
MutexGuard mg(mutex);
if (sdCard == sd::SdCard::BOTH) {
return HasReturnvaluesIF::RETURN_FAILED;
}
sdInfo.pref = sdCard;
return scratch::writeNumber(scratch::PREFERED_SDC_KEY, static_cast<uint8_t>(sdCard));
}
@ -383,14 +412,9 @@ ReturnValue_t SdCardManager::updateSdCardStateFile() {
return result;
}
std::string SdCardManager::getCurrentMountPrefix(sd::SdCard prefSdCard) {
if (prefSdCard == sd::SdCard::NONE) {
ReturnValue_t result = getPreferredSdCard(prefSdCard);
if (result != HasReturnvaluesIF::RETURN_OK) {
return SD_0_MOUNT_POINT;
}
}
if (prefSdCard == sd::SdCard::SLOT_0) {
std::string SdCardManager::getCurrentMountPrefix() const {
MutexGuard mg(mutex);
if (sdInfo.active == sd::SdCard::SLOT_0) {
return SD_0_MOUNT_POINT;
} else {
return SD_1_MOUNT_POINT;
@ -443,7 +467,7 @@ void SdCardManager::setPrintCommandOutput(bool print) { this->printCmdOutput = p
bool SdCardManager::isSdCardMounted(sd::SdCard sdCard) {
SdCardManager::SdStatePair active;
ReturnValue_t result = this->getSdCardActiveStatus(active);
ReturnValue_t result = this->getSdCardsStatus(active);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "SdCardManager::isSdCardMounted: Failed to get SD card active state";
@ -466,3 +490,68 @@ bool SdCardManager::isSdCardMounted(sd::SdCard sdCard) {
}
return false;
}
ReturnValue_t SdCardManager::isSdCardMountedReadOnly(sd::SdCard sdcard, bool& readOnly) {
std::ostringstream command;
if (sdcard == sd::SdCard::SLOT_0) {
command << "grep -q '" << SD_0_MOUNT_POINT << " vfat ro,' /proc/mounts";
} else {
command << "grep -q '" << SD_1_MOUNT_POINT << " vfat ro,' /proc/mounts";
}
ReturnValue_t result = cmdExecutor.load(command.str(), true, false);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
result = cmdExecutor.execute();
if (result != HasReturnvaluesIF::RETURN_OK) {
int exitStatus = cmdExecutor.getLastError();
if (exitStatus == 1) {
readOnly = false;
return RETURN_OK;
}
return result;
}
auto& readVec = cmdExecutor.getReadVector();
size_t readLen = strnlen(readVec.data(), readVec.size());
if (readLen == 0) {
readOnly = false;
}
readOnly = true;
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t SdCardManager::remountReadWrite(sd::SdCard sdcard) {
std::ostringstream command;
if (sdcard == sd::SdCard::SLOT_0) {
command << "mount -o remount,rw " << SD_0_DEV_NAME << " " << SD_0_MOUNT_POINT;
} else {
command << "mount -o remount,rw " << SD_1_DEV_NAME << " " << SD_1_MOUNT_POINT;
}
ReturnValue_t result = cmdExecutor.load(command.str(), true, false);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
return cmdExecutor.execute();
}
ReturnValue_t SdCardManager::performFsck(sd::SdCard sdcard, bool printOutput, int& linuxError) {
std::ostringstream command;
if (sdcard == sd::SdCard::SLOT_0) {
command << "fsck -y " << SD_0_DEV_NAME;
} else {
command << "fsck -y " << SD_1_DEV_NAME;
}
ReturnValue_t result = cmdExecutor.load(command.str(), true, printOutput);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
result = cmdExecutor.execute();
if (result != HasReturnvaluesIF::RETURN_OK) {
linuxError = cmdExecutor.getLastError();
}
return result;
}
void SdCardManager::setActiveSdCard(sd::SdCard sdCard) { sdInfo.active = sdCard; }
sd::SdCard SdCardManager::getActiveSdCard() const { return sdInfo.active; }

View File

@ -24,7 +24,7 @@ class MutexIF;
* @brief Manages handling of SD cards like switching them on or off or getting the current
* state
*/
class SdCardManager : public SystemObject, public SdCardMountedIF {
class SdCardManager : public SystemObject, public HasReturnvaluesIF, public SdCardMountedIF {
friend class SdCardAccess;
public:
@ -36,6 +36,12 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
using SdStatePair = std::pair<sd::SdState, sd::SdState>;
struct SdInfo {
sd::SdCard pref = sd::SdCard::NONE;
sd::SdCard other = sd::SdCard::NONE;
sd::SdCard active = sd::SdCard::NONE;
} sdInfo;
static constexpr uint8_t INTERFACE_ID = CLASS_ID::SD_CARD_MANAGER;
static constexpr ReturnValue_t OP_ONGOING = HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 0);
@ -91,7 +97,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
* @param sdCard
* @return
*/
ReturnValue_t getPreferredSdCard(sd::SdCard& sdCard) const override;
sd::SdCard getPreferredSdCard() const override;
/**
* Switch on the specified SD card.
@ -138,7 +144,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
* should call #updateSdCardStateFile again in that case
* - STATUS_FILE_NEXISTS if the status file does not exist
*/
ReturnValue_t getSdCardActiveStatus(SdStatePair& active);
ReturnValue_t getSdCardsStatus(SdStatePair& active);
/**
* Mount the specified SD card. This is necessary to use it.
@ -146,6 +152,20 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
* @return
*/
ReturnValue_t mountSdCard(sd::SdCard sdCard);
/**
* Set the currently active SD card. This does not necessarily mean that the SD card is on or
* mounted
* @param sdCard
*/
void setActiveSdCard(sd::SdCard sdCard) override;
/**
* Get the currently active SD card. This does not necessarily mean that the SD card is on or
* mounted
* @return
*/
sd::SdCard getActiveSdCard() const override;
/**
* Unmount the specified SD card. This is recommended before switching it off. The SD card
* can't be used after it has been unmounted.
@ -173,7 +193,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
* @param prefSdCardPtr
* @return
*/
std::string getCurrentMountPrefix(sd::SdCard prefSdCardPtr = sd::SdCard::NONE) override;
std::string getCurrentMountPrefix() const override;
OpStatus checkCurrentOp(Operations& currentOp);
@ -194,6 +214,12 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
*/
bool isSdCardMounted(sd::SdCard sdCard) override;
ReturnValue_t isSdCardMountedReadOnly(sd::SdCard sdcard, bool& readOnly);
ReturnValue_t remountReadWrite(sd::SdCard sdcard);
ReturnValue_t performFsck(sd::SdCard sdcard, bool printOutput, int& linuxError);
private:
CommandExecutor cmdExecutor;
Operations currentOp = Operations::IDLE;
@ -210,7 +236,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
std::string currentPrefix;
static SdCardManager* factoryInstance;
static SdCardManager* INSTANCE;
};
#endif /* BSP_Q7S_MEMORY_SDCARDACCESSMANAGER_H_ */

View File

@ -76,12 +76,12 @@ ReturnValue_t readToFile(std::string name, std::ifstream& file, std::string& fil
int result = std::system(oss.str().c_str());
if (result != 0) {
if (WEXITSTATUS(result) == 1) {
sif::warning << "scratch::readNumber: Key " << name << " does not exist" << std::endl;
sif::warning << "scratch::readToFile: Key " << name << " does not exist" << std::endl;
// Could not find value
std::remove(filename.c_str());
return KEY_NOT_FOUND;
} else {
utility::handleSystemError(result, "scratch::readNumber");
utility::handleSystemError(result, "scratch::readToFile");
std::remove(filename.c_str());
return HasReturnvaluesIF::RETURN_FAILED;
}
@ -92,7 +92,7 @@ ReturnValue_t readToFile(std::string name, std::ifstream& file, std::string& fil
} // End of anonymous namespace
template <typename T, class = typename std::enable_if<std::is_integral<T>::value>::type>
template <typename T, class>
inline ReturnValue_t writeNumber(std::string key, T num) noexcept {
std::ostringstream oss;
oss << "xsc_scratch write " << key << " " << std::to_string(num);
@ -104,7 +104,7 @@ inline ReturnValue_t writeNumber(std::string key, T num) noexcept {
return HasReturnvaluesIF::RETURN_OK;
}
template <typename T, class = typename std::enable_if<std::is_integral<T>::value>::type>
template <typename T, class>
inline ReturnValue_t readNumber(std::string key, T& num) noexcept {
using namespace std;
ifstream file;

View File

@ -8,14 +8,19 @@
#include "core/InitMission.h"
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/version.h"
#include "q7sConfig.h"
#include "watchdog/definitions.h"
static int OBSW_ALREADY_RUNNING = -2;
#if OBSW_Q7S_EM == 0
static const char* DEV_STRING = "Xiphos Q7S FM";
#else
static const char* DEV_STRING = "Xiphos Q7S EM";
#endif
int obsw::obsw() {
using namespace fsfw;
std::cout << "-- EIVE OBSW --" << std::endl;
std::cout << "-- Compiled for Linux (Xiphos Q7S) --" << std::endl;
std::cout << "-- Compiled for Linux (" << DEV_STRING << ") --" << std::endl;
std::cout << "-- OBSW v" << common::OBSW_VERSION << " | FSFW v" << fsfw::FSFW_VERSION << " --"
<< std::endl;
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;

View File

@ -1,3 +1 @@
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
simple.cpp
)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE simple.cpp)

View File

@ -1,3 +1 @@
target_sources(${OBSW_NAME} PRIVATE
Xadc.cpp
)
target_sources(${OBSW_NAME} PRIVATE Xadc.cpp)

View File

@ -89,13 +89,42 @@ void initmission::initTasks() {
}
pstTasks.push_back(pst);
#if OBSW_ADD_PLOC_MPSOC == 1
PeriodicTaskIF* mpsocHelperTask = factory->createPeriodicTask(
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = mpsocHelperTask->addComponent(objects::PLOC_MPSOC_HELPER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PLOC_MPSOC_HELPER", objects::PLOC_MPSOC_HELPER);
}
pstTasks.push_back(mpsocHelperTask);
#endif /* OBSW_ADD_PLOC_MPSOC == 1*/
#if OBSW_ADD_PLOC_SUPERVISOR == 1
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
"PLOC_SUPV_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
}
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
#if OBSW_USE_CCSDS_IP_CORE == 1
PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask(
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
}
// Minimal distance between two received TCs amounts to 0.6 seconds
// If a command has not been read before the next one arrives, the old command will be
// overwritten by the PDEC.
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
"PDEC_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
}
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
auto taskStarter = [](std::vector<PeriodicTaskIF*>& taskVector, std::string name) {
for (const auto& task : taskVector) {
@ -111,6 +140,16 @@ void initmission::initTasks() {
tmtcDistributor->startTask();
tmtcBridgeTask->startTask();
tmtcPollingTask->startTask();
#if OBSW_USE_CCSDS_IP_CORE == 1
pdecHandlerTask->startTask();
ccsdsHandlerTask->startTask();
#endif /* #if OBSW_USE_CCSDS_IP_CORE == 1 */
#if OBSW_ADD_PLOC_SUPERVISOR == 1
supvHelperTask->startTask();
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
#if OBSW_ADD_PLOC_MPSOC == 1
mpsocHelperTask->startTask();
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
taskStarter(pstTasks, "PST Tasks");
taskStarter(pusTasks, "PUS Tasks");

View File

@ -3,7 +3,7 @@
#include <vector>
#include "fsfw/tasks/Typedef.h"
#include "fsfw/tasks/definitions.h"
class PeriodicTaskIF;
class TaskFactory;

View File

@ -37,7 +37,6 @@
#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0
#define OBSW_SYRLINKS_SIMULATED 1
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1
#define OBSW_ENABLE_PERIODIC_HK 0
#define OBSW_PRINT_CORE_HK 0
#define OBSW_INITIALIZE_SWITCHES 0

View File

@ -1,27 +1,38 @@
#include "ObjectFactory.h"
#include <devConf.h>
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "fsfw_hal/linux/i2c/I2cComIF.h"
#include "fsfw_hal/linux/uart/UartCookie.h"
#include "OBSWConfig.h"
#include "busConf.h"
#include "devConf.h"
#include "ccsdsConfig.h"
#include "devices/addresses.h"
#include "devices/gpioIds.h"
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
#include "fsfw/tmtcpacket/pus/tm.h"
#include "fsfw/tmtcservices/CommandingServiceBase.h"
#include "fsfw/tmtcservices/PusServiceBase.h"
#include "fsfw_hal/linux/i2c/I2cComIF.h"
#include "fsfw_hal/linux/i2c/I2cCookie.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "fsfw_hal/linux/uart/UartCookie.h"
#include "fsfw_hal/common/gpio/GpioCookie.h"
#include "linux/ObjectFactory.h"
#include "linux/devices/ploc/PlocMPSoCHandler.h"
#include "linux/devices/ploc/PlocMPSoCHelper.h"
#include "mission/devices/Tmp1075Handler.h"
#include "linux/devices/ploc/PlocMemoryDumper.h"
#include "linux/devices/ploc/PlocSupervisorHandler.h"
#include "linux/devices/ploc/PlocSupvHelper.h"
#include "linux/obc/AxiPtmeConfig.h"
#include "linux/obc/PapbVcInterface.h"
#include "linux/obc/PdecHandler.h"
#include "linux/obc/Ptme.h"
#include "linux/obc/PtmeConfig.h"
#include "mission/core/GenericFactory.h"
#include "mission/utility/TmFunnel.h"
#include "test/gpio/DummyGpioIF.h"
#include "mission/devices/Tmp1075Handler.h"
#include "mission/tmtc/TmFunnel.h"
#include "mission/tmtc/CCSDSHandler.h"
#include "mission/tmtc/VirtualChannel.h"
#include "objects/systemObjectList.h"
#include "devices/addresses.h"
#include "devices/gpioIds.h"
#include "test/gpio/DummyGpioIF.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
@ -32,7 +43,11 @@ void Factory::setStaticFrameworkObjectIds() {
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
#if OBSW_TM_TO_PTME == 1
TmFunnel::downlinkDestination = objects::CCSDS_HANDLER;
#else
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
#endif
TmFunnel::storageDestination = objects::NO_OBJECT;
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
@ -43,12 +58,14 @@ void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
LinuxLibgpioIF* gpioComIF = new LinuxLibgpioIF(objects::GPIO_IF);;
new UartComIF(objects::UART_COM_IF);
#if OBSW_ADD_PLOC_MPSOC == 1
UartCookie* mpsocUartCookie = new UartCookie(objects::PLOC_MPSOC_HANDLER, te0720_1cfa::MPSOC_UART,
uart::PLOC_MPSOC_BAUD, mpsoc::MAX_REPLY_SIZE);
mpsocUartCookie->setNoFixedSizeReply();
PlocMPSoCHelper* plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER);
new UartComIF(objects::UART_COM_IF);
auto dummyGpioIF = new DummyGpioIF();
PlocMPSoCHandler* plocMPSoCHandler = new PlocMPSoCHandler(
objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocUartCookie, plocMpsocHelper,
@ -56,6 +73,21 @@ void ObjectFactory::produce(void* args) {
plocMPSoCHandler->setStartUpImmediately();
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
#if OBSW_ADD_PLOC_SUPERVISOR == 1
UartCookie* supervisorCookie =
new UartCookie(objects::PLOC_SUPERVISOR_HANDLER, std::string("/dev/ttyPS1"),
uart::PLOC_SUPV_BAUD, supv::MAX_PACKET_SIZE * 20);
supervisorCookie->setNoFixedSizeReply();
auto supvGpioIF = new DummyGpioIF();
auto supvHelper = new PlocSupvHelper(objects::PLOC_SUPERVISOR_HELPER);
new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF,
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, supvGpioIF),
pcdu::PDU1_CH6_PLOC_12V, supvHelper);
#endif
new PlocMemoryDumper(objects::PLOC_MEMORY_DUMPER);
#if OBSW_TEST_LIBGPIOD == 1
#if OBSW_TEST_GPIO_OPEN_BYLABEL == 1
/* Configure MIO0 as input */
@ -86,21 +118,6 @@ void ObjectFactory::produce(void* args) {
new SusHandler(objects::SUS_0, objects::SPI_COM_IF, spiCookieSus, gpioComIF, gpioIds::CS_SUS_0);
#endif
#if OBSW_TEST_CCSDS_BRIDGE == 1
GpioCookie* gpioCookieCcsdsIp = new GpioCookie;
GpiodRegular* papbBusyN =
new GpiodRegular(std::string("gpiochip0"), 0, std::string("PAPBBusy_VC0"));
gpioCookieCcsdsIp->addGpio(gpioIds::PAPB_BUSY_N, papbBusyN);
GpiodRegular* papbEmpty =
new GpiodRegular(std::string("gpiochip0"), 1, std::string("PAPBEmpty_VC0"));
gpioCookieCcsdsIp->addGpio(gpioIds::PAPB_EMPTY, papbEmpty);
gpioComIF->addGpios(gpioCookieCcsdsIp);
new CCSDSIPCoreBridge(objects::CCSDS_IP_CORE_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR,
objects::TM_STORE, objects::TC_STORE, gpioComIF, std::string("/dev/uio0"),
gpioIds::PAPB_BUSY_N, gpioIds::PAPB_EMPTY);
#endif
#if OBSW_TEST_RAD_SENSOR == 1
GpioCookie* gpioCookieRadSensor = new GpioCookie;
GpiodRegular* chipSelectRadSensor = new GpiodRegular(
@ -124,28 +141,19 @@ void ObjectFactory::produce(void* args) {
GpioCookie* gpioCookie = new GpioCookie;
gpioCookie->addGpio(gpioIds::HEATER_0, heaterGpio);
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, gpioCookie, objects::PCDU_HANDLER,
pcduSwitches::TCS_BOARD_8V_HEATER_IN);
pcdu::TCS_BOARD_8V_HEATER_IN);
#endif
#if OBSW_ADD_PLOC_SUPERVISOR == 1
/* Configuration for MIO0 on TE0720-03-1CFA */
UartCookie* plocSupervisorCookie =
new UartCookie(objects::PLOC_SUPERVISOR_HANDLER, std::string("/dev/ttyPS1"),
UartModes::NON_CANONICAL, 115200, PLOC_SPV::MAX_PACKET_SIZE * 20);
plocSupervisorCookie->setNoFixedSizeReply();
PlocSupervisorHandler* plocSupervisor = new PlocSupervisorHandler(
objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF, plocSupervisorCookie);
plocSupervisor->setStartUpImmediately();
#endif
new I2cComIF(objects::I2C_COM_IF);
new I2cComIF(objects::I2C_COM_IF);
I2cCookie* i2cCookieTmp1075tcs1 =
new I2cCookie(addresses::TMP1075_TCS_1, TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
I2cCookie* i2cCookieTmp1075tcs2 =
new I2cCookie(addresses::TMP1075_TCS_2, TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
I2cCookie* i2cCookieTmp1075tcs1 =
new I2cCookie(addresses::TMP1075_TCS_1, TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
I2cCookie* i2cCookieTmp1075tcs2 =
new I2cCookie(addresses::TMP1075_TCS_2, TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
/* Temperature sensors */
new Tmp1075Handler(objects::TMP1075_HANDLER_1, objects::I2C_COM_IF, i2cCookieTmp1075tcs1);
new Tmp1075Handler(objects::TMP1075_HANDLER_2, objects::I2C_COM_IF, i2cCookieTmp1075tcs2);
/* Temperature sensors */
new Tmp1075Handler(objects::TMP1075_HANDLER_1, objects::I2C_COM_IF, i2cCookieTmp1075tcs1);
new Tmp1075Handler(objects::TMP1075_HANDLER_2, objects::I2C_COM_IF, i2cCookieTmp1075tcs2);
static_cast<void>(gpioComIF);
}

View File

@ -1,7 +1,11 @@
#ifndef BSP_LINUX_OBJECTFACTORY_H_
#define BSP_LINUX_OBJECTFACTORY_H_
#include <stdint.h>
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
namespace ObjectFactory {
static const uint32_t TRANSMITTER_TIMEOUT = 86400000; // 1 day
void produce(void* args);
}; // namespace ObjectFactory

View File

@ -3,9 +3,37 @@
namespace te0720_1cfa {
static constexpr char MPSOC_UART[] = "/dev/ttyPS1";
namespace baudrate {
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio0";
static constexpr char UIO_PTME[] = "/dev/uio1";
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio2";
static constexpr char UIO_PDEC_RAM[] = "/dev/uio3";
static constexpr int MAP_ID_PTME_CONFIG = 3;
namespace uiomapids {
static const int PTME_VC0 = 0;
static const int PTME_VC1 = 1;
static const int PTME_VC2 = 2;
static const int PTME_VC3 = 3;
static const int PTME_CONFIG = 4;
} // namespace uiomapids
namespace gpioNames {
static constexpr char PAPB_BUSY_SIGNAL_VC0[] = "papb_busy_signal_vc0";
static constexpr char PAPB_EMPTY_SIGNAL_VC0[] = "papb_empty_signal_vc0";
static constexpr char PAPB_BUSY_SIGNAL_VC1[] = "papb_busy_signal_vc1";
static constexpr char PAPB_EMPTY_SIGNAL_VC1[] = "papb_empty_signal_vc1";
static constexpr char PAPB_BUSY_SIGNAL_VC2[] = "papb_busy_signal_vc2";
static constexpr char PAPB_EMPTY_SIGNAL_VC2[] = "papb_empty_signal_vc2";
static constexpr char PAPB_BUSY_SIGNAL_VC3[] = "papb_busy_signal_vc3";
static constexpr char PAPB_EMPTY_SIGNAL_VC3[] = "papb_empty_signal_vc3";
static constexpr char RS485_EN_TX_CLOCK[] = "tx_clock_enable_ltc2872";
static constexpr char RS485_EN_TX_DATA[] = "tx_data_enable_ltc2872";
static constexpr char RS485_EN_RX_CLOCK[] = "rx_clock_enable_ltc2872";
static constexpr char RS485_EN_RX_DATA[] = "rx_data_enable_ltc2872";
static constexpr char PDEC_RESET[] = "pdec_reset";
}
}
#endif /* BSP_EGSE_BOARDCONFIG_BUSCONF_H_ */

View File

@ -33,6 +33,10 @@ add_compile_options(
set(STRIPPED_OBSW_NAME ${OBSW_BIN_NAME}-stripped)
set(STRIPPED_WATCHDOG_NAME eive-watchdog-stripped)
if(EIVE_CREATE_UNIQUE_OBSW_BIN)
set(UNIQUE_OBSW_BIN_NAME ${OBSW_BIN_NAME}-$ENV{USERNAME})
endif()
add_custom_command(
TARGET ${OBSW_NAME}
POST_BUILD
@ -41,6 +45,16 @@ add_custom_command(
COMMENT "Generating stripped executable ${STRIPPED_OBSW_NAME}.."
)
if(UNIQUE_OBSW_BIN_NAME)
add_custom_command(
TARGET ${OBSW_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/${OBSW_BIN_NAME}
${CMAKE_CURRENT_BINARY_DIR}/${UNIQUE_OBSW_BIN_NAME}
COMMENT "Generating unique EIVE OBSW binary ${UNIQUE_OBSW_BIN_NAME}")
endif()
add_custom_command(
TARGET ${WATCHDOG_NAME}
POST_BUILD

View File

@ -20,7 +20,7 @@ else
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
fi
if [[ -z "${EIVE_Q7S_EM}" ]]; then
if [ ! -z "${EIVE_Q7S_EM}" ]; then
build_defs="EIVE_Q7S_EM=ON"
fi

View File

@ -20,7 +20,7 @@ else
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
fi
if [[ -z "${EIVE_Q7S_EM}" ]]; then
if [ ! -z "${EIVE_Q7S_EM}" ]; then
build_defs="EIVE_Q7S_EM=ON"
fi

View File

@ -20,7 +20,7 @@ else
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
fi
if [[ -z "${EIVE_Q7S_EM}" ]]; then
if [ ! -z "${EIVE_Q7S_EM}" ]; then
build_defs="EIVE_Q7S_EM=ON"
fi

View File

@ -1,7 +1,3 @@
target_include_directories(${OBSW_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(${OBSW_NAME} PRIVATE
commonConfig.cpp
)
target_sources(${OBSW_NAME} PRIVATE commonConfig.cpp)

View File

@ -4,7 +4,7 @@
const char* const SW_NAME = "eive";
#define SW_VERSION 1
#define SW_SUBVERSION 10
#define SW_SUBVERSION 12
#define SW_REVISION 1
#endif /* COMMON_CONFIG_OBSWVERSION_H_ */

View File

@ -2,14 +2,7 @@
#define COMMON_CONFIG_CCSDSCONFIG_H_
namespace ccsds {
enum {
VC0,
VC1,
VC2,
VC3
};
enum { VC0, VC1, VC2, VC3 };
}
#endif /* COMMON_CONFIG_CCSDSCONFIG_H_ */

View File

@ -2,37 +2,40 @@
#define COMMON_CONFIG_COMMONCLASSIDS_H_
#include <fsfw/returnvalues/FwClassIds.h>
#include <cstdint>
namespace CLASS_ID {
enum commonClassIds: uint8_t {
COMMON_CLASS_ID_START = FW_CLASS_ID_COUNT,
PCDU_HANDLER, //PCDU
HEATER_HANDLER, //HEATER
SYRLINKS_HANDLER, //SYRLINKS
IMTQ_HANDLER, //IMTQ
RW_HANDLER, //RWHA
STR_HANDLER, //STRH
DWLPWRON_CMD, //DWLPWRON
MPSOC_TM, //MPTM
PLOC_SUPERVISOR_HANDLER, //PLSV
SUS_HANDLER, //SUSS
CCSDS_IP_CORE_BRIDGE, //IPCI
PTME, //PTME
PLOC_UPDATER, //PLUD
STR_HELPER, //STRHLP
GOM_SPACE_HANDLER, //GOMS
PLOC_MEMORY_DUMPER, //PLMEMDUMP
PDEC_HANDLER, //PDEC
CCSDS_HANDLER, //CCSDS
RATE_SETTER, //RS
ARCSEC_JSON_BASE, //JSONBASE
NVM_PARAM_BASE, //NVMB
FILE_SYSTEM_HELPER, //FSHLP
PLOC_MPSOC_HELPER, // PLMPHLP
SA_DEPL_HANDLER, //SADPL
MPSOC_RETURN_VALUES_IF, //MPSOCRTVIF
COMMON_CLASS_ID_END // [EXPORT] : [END]
enum commonClassIds : uint8_t {
COMMON_CLASS_ID_START = FW_CLASS_ID_COUNT,
PCDU_HANDLER, // PCDU
HEATER_HANDLER, // HEATER
SYRLINKS_HANDLER, // SYRLINKS
IMTQ_HANDLER, // IMTQ
RW_HANDLER, // RWHA
STR_HANDLER, // STRH
DWLPWRON_CMD, // DWLPWRON
MPSOC_TM, // MPTM
PLOC_SUPERVISOR_HANDLER, // PLSV
PLOC_SUPV_HELPER, // PLSPVhLP
SUS_HANDLER, // SUSS
CCSDS_IP_CORE_BRIDGE, // IPCI
PTME, // PTME
PLOC_UPDATER, // PLUD
STR_HELPER, // STRHLP
GOM_SPACE_HANDLER, // GOMS
PLOC_MEMORY_DUMPER, // PLMEMDUMP
PDEC_HANDLER, // PDEC
CCSDS_HANDLER, // CCSDS
RATE_SETTER, // RS
ARCSEC_JSON_BASE, // JSONBASE
NVM_PARAM_BASE, // NVMB
FILE_SYSTEM_HELPER, // FSHLP
PLOC_MPSOC_HELPER, // PLMPHLP
SA_DEPL_HANDLER, // SADPL
MPSOC_RETURN_VALUES_IF, // MPSOCRTVIF
SUPV_RETURN_VALUES_IF, // SPVRTVIF
COMMON_CLASS_ID_END // [EXPORT] : [END]
};
}

View File

@ -1,6 +1,8 @@
#include "commonConfig.h"
#include "tmtc/apid.h"
#include "fsfw/tmtcpacket/SpacePacket.h"
const Version common::OBSW_VERSION { OBSW_VERSION_MAJOR, OBSW_VERSION_MINOR, OBSW_VERSION_REVISION, OBSW_VERSION_CST_GIT_SHA1 };
#include "fsfw/tmtcpacket/SpacePacket.h"
#include "tmtc/apid.h"
const fsfw::Version common::OBSW_VERSION{OBSW_VERSION_MAJOR, OBSW_VERSION_MINOR,
OBSW_VERSION_REVISION, OBSW_VERSION_CST_GIT_SHA1};
const uint16_t common::PUS_PACKET_ID = spacepacket::getTcSpacePacketIdFromApid(apid::EIVE_OBSW);

View File

@ -33,7 +33,10 @@ static constexpr uint8_t OBSW_VERSION_REVISION = @OBSW_VERSION_REVISION@;
// CST: Commits since tag
static const char OBSW_VERSION_CST_GIT_SHA1[] = "@OBSW_VERSION_CST_GIT_SHA1@";
extern const Version OBSW_VERSION;
static constexpr uint32_t OBSW_MAX_SCHEDULED_TCS = @OBSW_MAX_SCHEDULED_TCS@;
extern const fsfw::Version OBSW_VERSION;
extern const uint16_t PUS_PACKET_ID;

View File

@ -3,114 +3,128 @@
#include <cstdint>
#include <fsfw/introspection/ClasslessEnum.h>
namespace objects {
enum commonObjects: uint32_t {
/* First Byte 0x50-0x52 reserved for PUS Services **/
CCSDS_PACKET_DISTRIBUTOR = 0x50000100,
PUS_PACKET_DISTRIBUTOR = 0x50000200,
TMTC_BRIDGE = 0x50000300,
TMTC_POLLING_TASK = 0x50000400,
FILE_SYSTEM_HANDLER = 0x50000500,
SDC_MANAGER = 0x50000550,
PTME = 0x50000600,
PDEC_HANDLER = 0x50000700,
CCSDS_HANDLER = 0x50000800,
FSFW_CLASSLESS_ENUM(commonObjects, uint32_t,
/* First Byte 0x50-0x52 reserved for PUS Services **/
((CCSDS_PACKET_DISTRIBUTOR, 0x50000100, "CCSDS_PACKET_DISTRIBUTOR"))
((PUS_PACKET_DISTRIBUTOR, 0x50000200, "PUS_PACKET_DISTRIBUTOR"))
((TMTC_BRIDGE, 0x50000300, "TMTC_BRIDGE"))
((TMTC_POLLING_TASK, 0x50000400, "TMTC_POLLING_TASK"))
((FILE_SYSTEM_HANDLER, 0x50000500, "FILE_SYSTEM_HANDLER"))
((SDC_MANAGER, 0x50000550, "SDC_MANAGER"))
((PTME, 0x50000600, "PTME"))
((PDEC_HANDLER, 0x50000700, "PDEC_HANDLER"))
((CCSDS_HANDLER, 0x50000800, "CCSDS_HANDLER"))
/* 0x43 ('C') for Controllers */
THERMAL_CONTROLLER = 0x43400001,
ACS_CONTROLLER = 0x43100002,
CORE_CONTROLLER = 0x43000003,
/* 0x43 ('C') for Controllers */
((THERMAL_CONTROLLER, 0x43400001, "THERMAL_CONTROLLER"))
((ACS_CONTROLLER, 0x43000002, "ACS_CONTROLLER"))
((CORE_CONTROLLER, 0x43000003, "CORE_CONTROLLER"))
/* 0x44 ('D') for device handlers */
P60DOCK_HANDLER = 0x44250000,
PDU1_HANDLER = 0x44250001,
PDU2_HANDLER = 0x44250002,
ACU_HANDLER = 0x44250003,
BPX_BATT_HANDLER = 0x44260000,
TMP1075_HANDLER_1 = 0x44420004,
TMP1075_HANDLER_2 = 0x44420005,
MGM_0_LIS3_HANDLER = 0x44120006,
MGM_1_RM3100_HANDLER = 0x44120107,
MGM_2_LIS3_HANDLER = 0x44120208,
MGM_3_RM3100_HANDLER = 0x44120309,
GYRO_0_ADIS_HANDLER = 0x44120010,
GYRO_1_L3G_HANDLER = 0x44120111,
GYRO_2_ADIS_HANDLER = 0x44120212,
GYRO_3_L3G_HANDLER = 0x44120313,
PLPCDU_HANDLER = 0x44300000,
/* 0x44 ('D') for device handlers */
((MGM_0_LIS3_HANDLER, 0x44120006, "MGM_0_LIS3_HANDLER"))
((MGM_1_RM3100_HANDLER, 0x44120107, "MGM_1_RM3100_HANDLER"))
((MGM_2_LIS3_HANDLER, 0x44120208, "MGM_2_LIS3_HANDLER"))
((MGM_3_RM3100_HANDLER, 0x44120309, "MGM_3_RM3100_HANDLER"))
((GYRO_0_ADIS_HANDLER, 0x44120010, "GYRO_0_ADIS_HANDLER"))
((GYRO_1_L3G_HANDLER, 0x44120111, "GYRO_1_L3G_HANDLER"))
((GYRO_2_ADIS_HANDLER, 0x44120212, "GYRO_2_ADIS_HANDLER"))
((GYRO_3_L3G_HANDLER, 0x44120313, "GYRO_3_L3G_HANDLER"))
((RW1, 0x44120047, "RW1"))
((RW2, 0x44120148, "RW2"))
((RW3, 0x44120249, "RW3"))
((RW4, 0x44120350, "RW4"))
((STAR_TRACKER, 0x44130001, "STAR_TRACKER"))
((GPS_CONTROLLER, 0x44130045, "GPS_CONTROLLER"))
IMTQ_HANDLER = 0x44140014,
PLOC_MPSOC_HANDLER = 0x44330015,
PLOC_SUPERVISOR_HANDLER = 0x44330016,
PLOC_SUPERVISOR_HELPER = 0x44330017,
((IMTQ_HANDLER, 0x44140014, "IMTQ_HANDLER"))
((TMP1075_HANDLER_1, 0x44420004, "TMP1075_HANDLER_1"))
((TMP1075_HANDLER_2, 0x44420005, "TMP1075_HANDLER_2"))
((PCDU_HANDLER, 0x442000A1, "PCDU_HANDLER"))
((P60DOCK_HANDLER, 0x44250000, "P60DOCK_HANDLER"))
((PDU1_HANDLER, 0x44250001, "PDU1_HANDLER"))
((PDU2_HANDLER, 0x44250002, "PDU2_HANDLER"))
((ACU_HANDLER, 0x44250003, "ACU_HANDLER"))
((BPX_BATT_HANDLER, 0x44260000, "BPX_BATT_HANDLER"))
((PLPCDU_HANDLER, 0x44300000, "PLPCDU_HANDLER"))
((RAD_SENSOR, 0x443200A5, "RAD_SENSOR"))
((PLOC_UPDATER, 0x44330000, "PLOC_UPDATER"))
((PLOC_MEMORY_DUMPER, 0x44330001, "PLOC_MEMORY_DUMPER"))
((STR_HELPER, 0x44330002, "STR_HELPER"))
((PLOC_MPSOC_HELPER, 0x44330003, "PLOC_MPSOC_HELPER"))
((AXI_PTME_CONFIG, 0x44330004, "AXI_PTME_CONFIG"))
((PTME_CONFIG, 0x44330005, "PTME_CONFIG"))
((PLOC_MPSOC_HANDLER, 0x44330015, "PLOC_MPSOC_HANDLER"))
((PLOC_SUPERVISOR_HANDLER, 0x44330016, "PLOC_SUPERVISOR_HANDLER"))
((PLOC_SUPERVISOR_HELPER, 0x44330017, "PLOC_SUPERVISOR_HELPER"))
((SOLAR_ARRAY_DEPL_HANDLER, 0x444100A2, "SOLAR_ARRAY_DEPL_HANDLER"))
((HEATER_HANDLER, 0x444100A4, "HEATER_HANDLER"))
/**
* Not yet specified which pt1000 will measure which device/location in the satellite.
* Therefore object ids are named according to the IC naming of the RTDs in the schematic.
*/
RTD_0_IC3_PLOC_HEATSPREADER = 0x44420016,
RTD_1_IC4_PLOC_MISSIONBOARD = 0x44420017,
RTD_2_IC5_4K_CAMERA = 0x44420018,
RTD_3_IC6_DAC_HEATSPREADER = 0x44420019,
RTD_4_IC7_STARTRACKER = 0x44420020,
RTD_5_IC8_RW1_MX_MY = 0x44420021,
RTD_6_IC9_DRO = 0x44420022,
RTD_7_IC10_SCEX = 0x44420023,
RTD_8_IC11_X8 = 0x44420024,
RTD_9_IC12_HPA = 0x44420025,
RTD_10_IC13_PL_TX = 0x44420026,
RTD_11_IC14_MPA = 0x44420027,
RTD_12_IC15_ACU = 0x44420028,
RTD_13_IC16_PLPCDU_HEATSPREADER = 0x44420029,
RTD_14_IC17_TCS_BOARD = 0x44420030,
RTD_15_IC18_IMTQ = 0x44420031,
/**
* Not yet specified which pt1000 will measure which device/location in the satellite.
* Therefore object ids are named according to the IC naming of the RTDs in the schematic.
*/
((RTD_0_IC3_PLOC_HEATSPREADER, 0x44420016, "RTD_0_IC3_PLOC_HEATSPREADER"))
((RTD_1_IC4_PLOC_MISSIONBOARD, 0x44420017, "RTD_1_IC4_PLOC_MISSIONBOARD"))
((RTD_2_IC5_4K_CAMERA, 0x44420018, "RTD_2_IC5_4K_CAMERA"))
((RTD_3_IC6_DAC_HEATSPREADER, 0x44420019, "RTD_3_IC6_DAC_HEATSPREADER"))
((RTD_4_IC7_STARTRACKER, 0x44420020, "RTD_4_IC7_STARTRACKER"))
((RTD_5_IC8_RW1_MX_MY, 0x44420021, "RTD_5_IC8_RW1_MX_MY"))
((RTD_6_IC9_DRO, 0x44420022, "RTD_6_IC9_DRO"))
((RTD_7_IC10_SCEX, 0x44420023, "RTD_7_IC10_SCEX"))
((RTD_8_IC11_X8, 0x44420024, "RTD_8_IC11_X8"))
((RTD_9_IC12_HPA, 0x44420025, "RTD_9_IC12_HPA"))
((RTD_10_IC13_PL_TX, 0x44420026, "RTD_10_IC13_PL_TX"))
((RTD_11_IC14_MPA, 0x44420027, "RTD_11_IC14_MPA"))
((RTD_12_IC15_ACU, 0x44420028, "RTD_12_IC15_ACU"))
((RTD_13_IC16_PLPCDU_HEATSPREADER, 0x44420029, "RTD_13_IC16_PLPCDU_HEATSPREADER"))
((RTD_14_IC17_TCS_BOARD, 0x44420030, "RTD_14_IC17_TCS_BOARD"))
((RTD_15_IC18_IMTQ, 0x44420031, "RTD_15_IC18_IMTQ"))
// Name convention for SUS devices
// SUS_<IDX>_<N/R>_LOC_X<F/M/B>Y<F/M/B>Z<F/M/B>_PT_<DIR><F/B>
// LOC: Location
// PT: Pointing
// N/R: Nominal/Redundant
// F/M/B: Forward/Middle/Backwards
SUS_0_N_LOC_XFYFZM_PT_XF = 0x44120032,
SUS_6_R_LOC_XFYBZM_PT_XF = 0x44120038,
// Name convention for SUS devices
// SUS_<IDX>_<N/R>_LOC_X<F/M/B>Y<F/M/B>Z<F/M/B>_PT_<DIR><F/B>
// LOC: Location
// PT: Pointing
// N/R: Nominal/Redundant
// F/M/B: Forward/Middle/Backwards
((SUS_0_N_LOC_XFYFZM_PT_XF, 0x44120032, "SUS_0_N_LOC_XFYFZM_PT_XF"))
((SUS_6_R_LOC_XFYBZM_PT_XF, 0x44120038, "SUS_6_R_LOC_XFYBZM_PT_XF"))
SUS_1_N_LOC_XBYFZM_PT_XB = 0x44120033,
SUS_7_R_LOC_XBYBZM_PT_XB = 0x44120039,
((SUS_1_N_LOC_XBYFZM_PT_XB, 0x44120033, "SUS_1_N_LOC_XBYFZM_PT_XB"))
((SUS_7_R_LOC_XBYBZM_PT_XB, 0x44120039, "SUS_7_R_LOC_XBYBZM_PT_XB"))
SUS_2_N_LOC_XFYBZB_PT_YB = 0x44120034,
SUS_8_R_LOC_XBYBZB_PT_YB = 0x44120040,
((SUS_2_N_LOC_XFYBZB_PT_YB, 0x44120034, "SUS_2_N_LOC_XFYBZB_PT_YB"))
((SUS_8_R_LOC_XBYBZB_PT_YB, 0x44120040, "SUS_8_R_LOC_XBYBZB_PT_YB"))
SUS_3_N_LOC_XFYBZF_PT_YF = 0x44120035,
SUS_9_R_LOC_XBYBZB_PT_YF = 0x44120041,
((SUS_3_N_LOC_XFYBZF_PT_YF, 0x44120035, "SUS_3_N_LOC_XFYBZF_PT_YF"))
((SUS_9_R_LOC_XBYBZB_PT_YF, 0x44120041, "SUS_9_R_LOC_XBYBZB_PT_YF"))
SUS_4_N_LOC_XMYFZF_PT_ZF = 0x44120036,
SUS_10_N_LOC_XMYBZF_PT_ZF = 0x44120042,
((SUS_4_N_LOC_XMYFZF_PT_ZF, 0x44120036, "SUS_4_N_LOC_XMYFZF_PT_ZF"))
((SUS_10_N_LOC_XMYBZF_PT_ZF, 0x44120042, "SUS_10_N_LOC_XMYBZF_PT_ZF"))
SUS_5_N_LOC_XFYMZB_PT_ZB = 0x44120037,
SUS_11_R_LOC_XBYMZB_PT_ZB = 0x44120043,
((SUS_5_N_LOC_XFYMZB_PT_ZB, 0x44120037, "SUS_5_N_LOC_XFYMZB_PT_ZB"))
((SUS_11_R_LOC_XBYMZB_PT_ZB, 0x44120043, "SUS_11_R_LOC_XBYMZB_PT_ZB"))
GPS_CONTROLLER = 0x44130045,
((SYRLINKS_HK_HANDLER, 0x445300A3, "SYRLINKS_HK_HANDLER"))
RW1 = 0x44120047,
RW2 = 0x44120148,
RW3 = 0x44120249,
RW4 = 0x44120350,
// 0x60 for other stuff
((HEATER_0_PLOC_PROC_BRD, 0x60000000, "HEATER_0_PLOC_PROC_BRD"))
((HEATER_1_PCDU_BRD, 0x60000001, "HEATER_1_PCDU_BRD"))
((HEATER_2_ACS_BRD, 0x60000002, "HEATER_2_ACS_BRD"))
((HEATER_3_OBC_BRD, 0x60000003, "HEATER_3_OBC_BRD"))
((HEATER_4_CAMERA, 0x60000004, "HEATER_4_CAMERA"))
((HEATER_5_STR, 0x60000005, "HEATER_5_STR"))
((HEATER_6_DRO, 0x60000006, "HEATER_6_DRO"))
((HEATER_7_HPA, 0x60000007, "HEATER_7_HPA"))
STAR_TRACKER = 0x44130001,
PLOC_UPDATER = 0x44330000,
PLOC_MEMORY_DUMPER = 0x44330001,
STR_HELPER = 0x44330002,
PLOC_MPSOC_HELPER = 0x44330003,
AXI_PTME_CONFIG = 44330004,
PTME_CONFIG = 44330005,
// 0x73 ('s') for assemblies and system/subsystem components
ACS_BOARD_ASS = 0x73000001,
SUS_BOARD_ASS = 0x73000002,
TCS_BOARD_ASS = 0x73000003
};
// 0x73 ('s') for assemblies and system/subsystem components
((ACS_BOARD_ASS, 0x73000001, "ACS_BOARD_ASS"))
((SUS_BOARD_ASS, 0x73000002, "SUS_BOARD_ASS"))
((TCS_BOARD_ASS, 0x73000003, "TCS_BOARD_ASS"))
((RW_ASS, 0x73000004, "RW_ASS"))
)
}
#endif /* COMMON_CONFIG_COMMONOBJECTS_H_ */

View File

@ -4,36 +4,36 @@
#include <fsfw/events/fwSubsystemIdRanges.h>
namespace SUBSYSTEM_ID {
enum: uint8_t {
COMMON_SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE,
ACS_SUBSYSTEM = 112,
PCDU_HANDLER = 113,
HEATER_HANDLER = 114,
SA_DEPL_HANDLER = 115,
PLOC_MPSOC_HANDLER = 116,
IMTQ_HANDLER = 117,
RW_HANDLER = 118,
STR_HANDLER = 119,
PLOC_SUPERVISOR_HANDLER = 120,
FILE_SYSTEM = 121,
PLOC_UPDATER = 122,
PLOC_MEMORY_DUMPER = 123,
PDEC_HANDLER = 124,
STR_HELPER = 125,
PLOC_MPSOC_HELPER = 126,
PL_PCDU_HANDLER = 127,
ACS_BOARD_ASS = 128,
SUS_BOARD_ASS = 129,
TCS_BOARD_ASS = 130,
GPS_HANDLER = 131,
P60_DOCK_HANDLER = 132,
PDU1_HANDLER = 133,
PDU2_HANDLER = 134,
ACU_HANDLER = 135,
SYRLINKS = 136,
COMMON_SUBSYSTEM_ID_END
enum : uint8_t {
COMMON_SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE,
ACS_SUBSYSTEM = 112,
PCDU_HANDLER = 113,
HEATER_HANDLER = 114,
SA_DEPL_HANDLER = 115,
PLOC_MPSOC_HANDLER = 116,
IMTQ_HANDLER = 117,
RW_HANDLER = 118,
STR_HANDLER = 119,
PLOC_SUPERVISOR_HANDLER = 120,
FILE_SYSTEM = 121,
PLOC_UPDATER = 122,
PLOC_MEMORY_DUMPER = 123,
PDEC_HANDLER = 124,
STR_HELPER = 125,
PLOC_MPSOC_HELPER = 126,
PL_PCDU_HANDLER = 127,
ACS_BOARD_ASS = 128,
SUS_BOARD_ASS = 129,
TCS_BOARD_ASS = 130,
GPS_HANDLER = 131,
P60_DOCK_HANDLER = 132,
PDU1_HANDLER = 133,
PDU2_HANDLER = 134,
ACU_HANDLER = 135,
PLOC_SUPV_HELPER = 136,
SYRLINKS = 137,
COMMON_SUBSYSTEM_ID_END
};
}
#endif /* COMMON_CONFIG_COMMONSUBSYSTEMIDS_H_ */

View File

@ -2,8 +2,10 @@
#define COMMON_CONFIG_DEVCONF_H_
#include <cstdint>
#include <fsfw_hal/linux/spi/spiDefinitions.h>
#include <fsfw_hal/linux/uart/UartCookie.h>
#include "fsfw/timemanager/clockDefinitions.h"
#include "fsfw_hal/linux/spi/spiDefinitions.h"
#include "fsfw_hal/linux/uart/UartCookie.h"
/**
* SPI configuration will be contained here to let the device handlers remain independent
@ -31,6 +33,7 @@ static constexpr spi::SpiModes DEFAULT_L3G_MODE = spi::SpiModes::MODE_3;
static const uint32_t SUS_MAX1227_SPI_FREQ = 976'000;
static constexpr spi::SpiModes SUS_MAX_1227_MODE = spi::SpiModes::MODE_3;
static constexpr dur_millis_t RAD_SENSOR_CS_TIMEOUT = 120;
static constexpr uint32_t DEFAULT_MAX_1227_SPEED = 976'000;
static constexpr spi::SpiModes DEFAULT_MAX_1227_MODE = spi::SpiModes::MODE_3;
@ -42,10 +45,11 @@ static constexpr spi::SpiModes DEFAULT_ADIS16507_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t RW_SPEED = 300'000;
static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0;
static constexpr dur_millis_t RTD_CS_TIMEOUT = 50;
static constexpr uint32_t RTD_SPEED = 2'000'000;
static constexpr spi::SpiModes RTD_MODE = spi::SpiModes::MODE_3;
}
} // namespace spi
namespace uart {
@ -53,9 +57,9 @@ static constexpr size_t HYPERION_GPS_REPLY_MAX_BUFFER = 1024;
static constexpr UartBaudRate SYRLINKS_BAUD = UartBaudRate::RATE_38400;
static constexpr UartBaudRate GNSS_BAUD = UartBaudRate::RATE_9600;
static constexpr UartBaudRate PLOC_MPSOC_BAUD = UartBaudRate::RATE_115200;
static constexpr UartBaudRate PLOC_SUPERVISOR_BAUD = UartBaudRate::RATE_115200;
static constexpr UartBaudRate PLOC_SUPV_BAUD = UartBaudRate::RATE_115200;
static constexpr UartBaudRate STAR_TRACKER_BAUD = UartBaudRate::RATE_921600;
}
} // namespace uart
#endif /* COMMON_CONFIG_DEVCONF_H_ */

View File

@ -3,18 +3,18 @@
#include <cstdint>
namespace heaterSwitches {
enum switcherList: uint8_t {
HEATER_0,
HEATER_1,
HEATER_2,
HEATER_3,
HEATER_4,
HEATER_5,
HEATER_6,
HEATER_7,
NUMBER_OF_SWITCHES
};
namespace heater {
enum Switchers : uint8_t {
HEATER_0_OBC_BRD,
HEATER_1_PLOC_PROC_BRD,
HEATER_2_ACS_BRD,
HEATER_3_PCDU_PDU,
HEATER_4_CAMERA,
HEATER_5_STR,
HEATER_6_DRO,
HEATER_7_HPA,
NUMBER_OF_SWITCHES
};
}
#endif /* FSFWCONFIG_DEVICES_HEATERSWITCHERLIST_H_ */

View File

@ -19,7 +19,6 @@ static constexpr uint8_t LIVE_TM = 0;
static constexpr uint32_t MAX_PATH_SIZE = 100;
static constexpr uint32_t MAX_FILENAME_SIZE = 50;
}
} // namespace config
#endif /* COMMON_CONFIG_DEFINITIONS_H_ */

View File

@ -12,8 +12,7 @@
* APID is a 11 bit number
*/
namespace apid {
static const uint16_t EIVE_OBSW = 0x65;
static const uint16_t EIVE_OBSW = 0x65;
}
#endif /* FSFWCONFIG_TMTC_APID_H_ */

View File

@ -1,5 +1,5 @@
#ifndef CONFIG_TMTC_PUSIDS_HPP_
#define CONFIG_TMTC_PUSIDS_HPP_
#ifndef COMMON_CONFIG_TMTC_PUSIDS_H_
#define COMMON_CONFIG_TMTC_PUSIDS_H_
namespace pus {
enum Ids {
@ -11,6 +11,7 @@ enum Ids {
PUS_SERVICE_6 = 6,
PUS_SERVICE_8 = 8,
PUS_SERVICE_9 = 9,
PUS_SERVICE_11 = 11,
PUS_SERVICE_17 = 17,
PUS_SERVICE_19 = 19,
PUS_SERVICE_20 = 20,
@ -20,4 +21,4 @@ enum Ids {
};
};
#endif /* CONFIG_TMTC_PUSIDS_HPP_ */
#endif /* COMMON_CONFIG_TMTC_PUSIDS_H_ */

42
dummies/AcuDummy.cpp Normal file
View File

@ -0,0 +1,42 @@
#include "AcuDummy.h"
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
AcuDummy::AcuDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie) {}
AcuDummy::~AcuDummy() {}
void AcuDummy::doStartUp() {}
void AcuDummy::doShutDown() {}
ReturnValue_t AcuDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
ReturnValue_t AcuDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t AcuDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData, size_t commandDataLen) {
return RETURN_OK;
}
ReturnValue_t AcuDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
size_t *foundLen) {
return RETURN_OK;
}
ReturnValue_t AcuDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
return RETURN_OK;
}
void AcuDummy::fillCommandAndReplyMap() {}
uint32_t AcuDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t AcuDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(P60System::pool::ACU_TEMPERATURES, new PoolEntry<float>(3));
return HasReturnvaluesIF::RETURN_OK;
}

33
dummies/AcuDummy.h Normal file
View File

@ -0,0 +1,33 @@
#ifndef DUMMIES_ACUDUMMY_H_
#define DUMMIES_ACUDUMMY_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
class AcuDummy : public DeviceHandlerBase {
public:
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
static const DeviceCommandId_t PERIODIC_REPLY = 2;
static const uint8_t SIMPLE_COMMAND_DATA = 1;
static const uint8_t PERIODIC_REPLY_DATA = 2;
AcuDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
virtual ~AcuDummy();
protected:
void doStartUp() override;
void doShutDown() override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override;
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData,
size_t commandDataLen) override;
ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
size_t *foundLen) override;
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
void fillCommandAndReplyMap() override;
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
};
#endif /* DUMMIES_ACUDUMMY_H_ */

55
dummies/BpxDummy.cpp Normal file
View File

@ -0,0 +1,55 @@
#include "BpxDummy.h"
#include <mission/devices/devicedefinitions/BpxBatteryDefinitions.h>
BpxDummy::BpxDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie) {}
BpxDummy::~BpxDummy() {}
void BpxDummy::doStartUp() {}
void BpxDummy::doShutDown() {}
ReturnValue_t BpxDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
ReturnValue_t BpxDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t BpxDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData, size_t commandDataLen) {
return RETURN_OK;
}
ReturnValue_t BpxDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
size_t *foundLen) {
return RETURN_OK;
}
ReturnValue_t BpxDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
return RETURN_OK;
}
void BpxDummy::fillCommandAndReplyMap() {}
uint32_t BpxDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t BpxDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(BpxBattery::BATT_TEMP_1, &battTemp1);
localDataPoolMap.emplace(BpxBattery::BATT_TEMP_2, &battTemp2);
localDataPoolMap.emplace(BpxBattery::BATT_TEMP_3, &battTemp3);
localDataPoolMap.emplace(BpxBattery::BATT_TEMP_4, &battTemp4);
localDataPoolMap.emplace(BpxBattery::CHARGE_CURRENT, &chargeCurrent);
localDataPoolMap.emplace(BpxBattery::DISCHARGE_CURRENT, &dischargeCurrent);
localDataPoolMap.emplace(BpxBattery::HEATER_CURRENT, &heaterCurrent);
localDataPoolMap.emplace(BpxBattery::BATT_VOLTAGE, &battVolt);
localDataPoolMap.emplace(BpxBattery::REBOOT_COUNTER, &rebootCounter);
localDataPoolMap.emplace(BpxBattery::BOOTCAUSE, &bootCause);
localDataPoolMap.emplace(BpxBattery::BATTERY_HEATER_MODE, &battheatMode);
localDataPoolMap.emplace(BpxBattery::BATTHEAT_LOW_LIMIT, &battheatLow);
localDataPoolMap.emplace(BpxBattery::BATTHEAT_HIGH_LIMIT, &battheatHigh);
return HasReturnvaluesIF::RETURN_OK;
}

48
dummies/BpxDummy.h Normal file
View File

@ -0,0 +1,48 @@
#ifndef DUMMIES_BPXDUMMY_H_
#define DUMMIES_BPXDUMMY_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
class BpxDummy : public DeviceHandlerBase {
public:
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
static const DeviceCommandId_t PERIODIC_REPLY = 2;
static const uint8_t SIMPLE_COMMAND_DATA = 1;
static const uint8_t PERIODIC_REPLY_DATA = 2;
BpxDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
virtual ~BpxDummy();
protected:
void doStartUp() override;
void doShutDown() override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override;
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData,
size_t commandDataLen) override;
ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
size_t *foundLen) override;
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
void fillCommandAndReplyMap() override;
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
private:
PoolEntry<uint16_t> chargeCurrent = PoolEntry<uint16_t>({0});
PoolEntry<uint16_t> dischargeCurrent = PoolEntry<uint16_t>({0});
PoolEntry<uint16_t> heaterCurrent = PoolEntry<uint16_t>({0});
PoolEntry<uint16_t> battVolt = PoolEntry<uint16_t>({0});
PoolEntry<int16_t> battTemp1 = PoolEntry<int16_t>({0});
PoolEntry<int16_t> battTemp2 = PoolEntry<int16_t>({0});
PoolEntry<int16_t> battTemp3 = PoolEntry<int16_t>({0});
PoolEntry<int16_t> battTemp4 = PoolEntry<int16_t>({0});
PoolEntry<uint32_t> rebootCounter = PoolEntry<uint32_t>({0});
PoolEntry<uint8_t> bootCause = PoolEntry<uint8_t>({0});
PoolEntry<uint8_t> battheatMode = PoolEntry<uint8_t>({0});
PoolEntry<int8_t> battheatLow = PoolEntry<int8_t>({0});
PoolEntry<int8_t> battheatHigh = PoolEntry<int8_t>({0});
};
#endif /* DUMMIES_BPXDUMMY_H_ */

19
dummies/CMakeLists.txt Normal file
View File

@ -0,0 +1,19 @@
target_sources(
${LIB_DUMMIES}
PUBLIC TemperatureSensorsDummy.cpp
SusDummy.cpp
BpxDummy.cpp
ComIFDummy.cpp
ComCookieDummy.cpp
RwDummy.cpp
StarTrackerDummy.cpp
SyrlinksDummy.cpp
ImtqDummy.cpp
AcuDummy.cpp
PduDummy.cpp
P60DockDummy.cpp
GyroAdisDummy.cpp
GyroL3GD20Dummy.cpp
MgmLIS3MDLDummy.cpp
PlPcduDummy.cpp
CoreControllerDummy.cpp)

View File

@ -0,0 +1,5 @@
#include "ComCookieDummy.h"
ComCookieDummy::ComCookieDummy() {}
ComCookieDummy::~ComCookieDummy() {}

12
dummies/ComCookieDummy.h Normal file
View File

@ -0,0 +1,12 @@
#ifndef TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COMCOOKIEDUMMY_H_
#define TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COMCOOKIEDUMMY_H_
#include "fsfw/devicehandlers/CookieIF.h"
class ComCookieDummy : public CookieIF {
public:
ComCookieDummy();
virtual ~ComCookieDummy();
};
#endif /* TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COMCOOKIEDUMMY_H_ */

21
dummies/ComIFDummy.cpp Normal file
View File

@ -0,0 +1,21 @@
#include "ComIFDummy.h"
ComIFDummy::ComIFDummy(object_id_t objectId) : SystemObject(objectId) {}
ComIFDummy::~ComIFDummy() {}
ReturnValue_t ComIFDummy::initializeInterface(CookieIF *cookie) { return RETURN_OK; }
ReturnValue_t ComIFDummy::sendMessage(CookieIF *cookie, const uint8_t *sendData, size_t sendLen) {
return RETURN_OK;
}
ReturnValue_t ComIFDummy::getSendSuccess(CookieIF *cookie) { return RETURN_OK; }
ReturnValue_t ComIFDummy::requestReceiveMessage(CookieIF *cookie, size_t requestLen) {
return RETURN_OK;
}
ReturnValue_t ComIFDummy::readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) {
return RETURN_OK;
}

26
dummies/ComIFDummy.h Normal file
View File

@ -0,0 +1,26 @@
#ifndef DUMMIES_COMIFDUMMY_H_
#define DUMMIES_COMIFDUMMY_H_
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
#include <fsfw/objectmanager/SystemObject.h>
/**
* @brief The ComIFMock supports the simulation of various device communication error cases
* like incomplete or wrong replies and can be used to test the
* DeviceHandlerBase.
*/
class ComIFDummy : public DeviceCommunicationIF, public SystemObject {
public:
ComIFDummy(object_id_t objectId);
virtual ~ComIFDummy();
virtual ReturnValue_t initializeInterface(CookieIF *cookie) override;
virtual ReturnValue_t sendMessage(CookieIF *cookie, const uint8_t *sendData,
size_t sendLen) override;
virtual ReturnValue_t getSendSuccess(CookieIF *cookie) override;
virtual ReturnValue_t requestReceiveMessage(CookieIF *cookie, size_t requestLen) override;
virtual ReturnValue_t readReceivedMessage(CookieIF *cookie, uint8_t **buffer,
size_t *size) override;
};
#endif /* DUMMIES_COMIFDUMMY_H_ */

View File

@ -0,0 +1,55 @@
#include "CoreControllerDummy.h"
#include <bsp_q7s/core/CoreDefinitions.h>
#include <objects/systemObjectList.h>
#include <cmath>
#include <cstdlib>
CoreControllerDummy::CoreControllerDummy(object_id_t objectId)
: ExtendedControllerBase(objectId, objects::NO_OBJECT) {}
ReturnValue_t CoreControllerDummy::initialize() {
static bool done = false;
if (not done) {
done = true;
ReturnValue_t result = ExtendedControllerBase::initialize();
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
}
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t CoreControllerDummy::handleCommandMessage(CommandMessage* message) {
return RETURN_FAILED;
}
void CoreControllerDummy::performControlOperation() { return; }
ReturnValue_t CoreControllerDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) {
localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry<float>({0}));
return HasReturnvaluesIF::RETURN_OK;
}
LocalPoolDataSetBase* CoreControllerDummy::getDataSetHandle(sid_t sid) {
switch (sid.ownerSetId) {
default:
return nullptr;
}
}
ReturnValue_t CoreControllerDummy::checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t* msToReachTheMode) {
if (submode != SUBMODE_NONE) {
return INVALID_SUBMODE;
}
if ((mode != MODE_OFF) && (mode != MODE_ON) && (mode != MODE_NORMAL)) {
return INVALID_MODE;
}
return RETURN_OK;
}

View File

@ -0,0 +1,21 @@
#pragma once
#include <fsfw/controller/ExtendedControllerBase.h>
#include <mission/devices/devicedefinitions/SusDefinitions.h>
class CoreControllerDummy : public ExtendedControllerBase {
public:
CoreControllerDummy(object_id_t objectId);
ReturnValue_t initialize() override;
protected:
virtual ReturnValue_t handleCommandMessage(CommandMessage* message) override;
virtual void performControlOperation() override;
virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override;
virtual LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
virtual ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t* msToReachTheMode) override;
};

45
dummies/GyroAdisDummy.cpp Normal file
View File

@ -0,0 +1,45 @@
#include "GyroAdisDummy.h"
#include "mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h"
GyroAdisDummy::GyroAdisDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie) {}
GyroAdisDummy::~GyroAdisDummy() {}
void GyroAdisDummy::doStartUp() {}
void GyroAdisDummy::doShutDown() {}
ReturnValue_t GyroAdisDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t GyroAdisDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t GyroAdisDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData,
size_t commandDataLen) {
return RETURN_OK;
}
ReturnValue_t GyroAdisDummy::scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) {
return RETURN_OK;
}
ReturnValue_t GyroAdisDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
return RETURN_OK;
}
void GyroAdisDummy::fillCommandAndReplyMap() {}
uint32_t GyroAdisDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t GyroAdisDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(ADIS1650X::TEMPERATURE, new PoolEntry<float>({0.0}));
return HasReturnvaluesIF::RETURN_OK;
}

33
dummies/GyroAdisDummy.h Normal file
View File

@ -0,0 +1,33 @@
#ifndef DUMMIES_GYROADISDUMMY_H_
#define DUMMIES_GYROADISDUMMY_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
class GyroAdisDummy : public DeviceHandlerBase {
public:
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
static const DeviceCommandId_t PERIODIC_REPLY = 2;
static const uint8_t SIMPLE_COMMAND_DATA = 1;
static const uint8_t PERIODIC_REPLY_DATA = 2;
GyroAdisDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
virtual ~GyroAdisDummy();
protected:
void doStartUp() override;
void doShutDown() override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override;
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData,
size_t commandDataLen) override;
ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
size_t *foundLen) override;
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
void fillCommandAndReplyMap() override;
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
};
#endif /* DUMMIES_GYROADISDUMMY_H_ */

View File

@ -0,0 +1,48 @@
#include "GyroL3GD20Dummy.h"
#include "fsfw_hal/devicehandlers/devicedefinitions/GyroL3GD20Definitions.h"
GyroL3GD20Dummy::GyroL3GD20Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie) {}
GyroL3GD20Dummy::~GyroL3GD20Dummy() {}
void GyroL3GD20Dummy::doStartUp() {}
void GyroL3GD20Dummy::doShutDown() {}
ReturnValue_t GyroL3GD20Dummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t GyroL3GD20Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t GyroL3GD20Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData,
size_t commandDataLen) {
return RETURN_OK;
}
ReturnValue_t GyroL3GD20Dummy::scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) {
return RETURN_OK;
}
ReturnValue_t GyroL3GD20Dummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
return RETURN_OK;
}
void GyroL3GD20Dummy::fillCommandAndReplyMap() {}
uint32_t GyroL3GD20Dummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t GyroL3GD20Dummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_X, new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Y, new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Z, new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(L3GD20H::TEMPERATURE, new PoolEntry<float>({0.0}));
return HasReturnvaluesIF::RETURN_OK;
}

33
dummies/GyroL3GD20Dummy.h Normal file
View File

@ -0,0 +1,33 @@
#ifndef DUMMIES_GYROL3GD20DUMMY_H_
#define DUMMIES_GYROL3GD20DUMMY_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
class GyroL3GD20Dummy : public DeviceHandlerBase {
public:
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
static const DeviceCommandId_t PERIODIC_REPLY = 2;
static const uint8_t SIMPLE_COMMAND_DATA = 1;
static const uint8_t PERIODIC_REPLY_DATA = 2;
GyroL3GD20Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
virtual ~GyroL3GD20Dummy();
protected:
void doStartUp() override;
void doShutDown() override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override;
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData,
size_t commandDataLen) override;
ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
size_t *foundLen) override;
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
void fillCommandAndReplyMap() override;
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
};
#endif /* DUMMIES_GYROL3GD20DUMMY_H_ */

43
dummies/ImtqDummy.cpp Normal file
View File

@ -0,0 +1,43 @@
#include "ImtqDummy.h"
#include <mission/devices/devicedefinitions/IMTQHandlerDefinitions.h>
ImtqDummy::ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie) {}
ImtqDummy::~ImtqDummy() {}
void ImtqDummy::doStartUp() {}
void ImtqDummy::doShutDown() {}
ReturnValue_t ImtqDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
ReturnValue_t ImtqDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t ImtqDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData,
size_t commandDataLen) {
return RETURN_OK;
}
ReturnValue_t ImtqDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
size_t *foundLen) {
return RETURN_OK;
}
ReturnValue_t ImtqDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
return RETURN_OK;
}
void ImtqDummy::fillCommandAndReplyMap() {}
uint32_t ImtqDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry<int16_t>({0}));
return HasReturnvaluesIF::RETURN_OK;
}

33
dummies/ImtqDummy.h Normal file
View File

@ -0,0 +1,33 @@
#ifndef DUMMIES_IMTQDUMMY_H_
#define DUMMIES_IMTQDUMMY_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
class ImtqDummy : public DeviceHandlerBase {
public:
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
static const DeviceCommandId_t PERIODIC_REPLY = 2;
static const uint8_t SIMPLE_COMMAND_DATA = 1;
static const uint8_t PERIODIC_REPLY_DATA = 2;
ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
virtual ~ImtqDummy();
protected:
void doStartUp() override;
void doShutDown() override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override;
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData,
size_t commandDataLen) override;
ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
size_t *foundLen) override;
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
void fillCommandAndReplyMap() override;
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
};
#endif /* DUMMIES_IMTQDUMMY_H_ */

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