Compare commits
1062 Commits
Author | SHA1 | Date | |
---|---|---|---|
b273729b10 | |||
67024ec933 | |||
3a20748ff6 | |||
516898b7b2 | |||
bd4e05c944 | |||
72ffa365d4 | |||
52f5b088bf | |||
73498ac9af | |||
1f18904810 | |||
239410e2dc | |||
dc89350ac7 | |||
5a642b7d2f
|
|||
6b9aa8eb7b | |||
3ee2e72652
|
|||
91106feb82 | |||
7a68188140 | |||
d88ffb1734
|
|||
c2b415bdd6
|
|||
facfad3367
|
|||
d95ecc3678
|
|||
966faf51b5
|
|||
5c9d7a43ab
|
|||
4465170747
|
|||
5420e322f7
|
|||
6040cd2d1e
|
|||
4e7b774d32
|
|||
7f36455857
|
|||
07df6eb95f | |||
88e8268c26 | |||
20bc31449a | |||
2901ebc15c
|
|||
e992f933ec | |||
a95ab49690 | |||
b261779ebf | |||
db5e7a535e | |||
4a8e111a18 | |||
f79acca1d6 | |||
4a9b6bc0c4 | |||
4dad1df13b | |||
f67d72a8dd | |||
da79f24b33 | |||
b2b7900720 | |||
de4562dd2f | |||
fb9303a8de | |||
9b2b087d08 | |||
1c27ba7261 | |||
3a59cd301b | |||
4c66d8fb5f | |||
b634543c5a | |||
ced812052d | |||
a0d559a5fd | |||
c7e554aebc | |||
e8bd3f447d | |||
d1086bc9aa | |||
98a2338dcb | |||
880b8620ba | |||
788fbb72f0 | |||
afcc0cc21d | |||
db3a4955c2 | |||
d0a9460676 | |||
add083135e | |||
3ae7dab8c7 | |||
0c394ad34d | |||
4de1932c8a | |||
1c74d39faf | |||
f40348904c | |||
2d4a3c0ee2 | |||
295da50bc7 | |||
3f9bf8e173 | |||
4893af07ae | |||
af8b4d5bc8 | |||
2ae89769af | |||
4ed7689956 | |||
7ceb81f68d | |||
6fa53e1869 | |||
54328ff357 | |||
c43d9a5a9a | |||
277a6ad33c | |||
b655c03564 | |||
49e15de08a | |||
6ef8c62aca | |||
695a663a15 | |||
94cf42fbeb | |||
fe1e236466 | |||
861ad9e62d | |||
5e4032032f | |||
3a137762f3 | |||
92a0752e18 | |||
6ed2fcd904 | |||
2c17aff124 | |||
3ee9a914cc | |||
7a119bab6e | |||
147c39d539 | |||
dcf01d822b | |||
a660d1d30a | |||
0732218249 | |||
4b0062e3b2 | |||
b2a666d432 | |||
7cc13d2024 | |||
0872fad7dc
|
|||
a87a01d072 | |||
73d7f0a1e5 | |||
c3679f044c | |||
68f84e71ff | |||
f2f33f5049 | |||
3314d07942 | |||
4155aa8776 | |||
9c0744ae02 | |||
86d22affe2 | |||
df4205c71e | |||
e130d45f0b | |||
9544516cc4 | |||
3dbc01bd8a | |||
51a3a2f5cf | |||
cada6e0440 | |||
3dd7530c3d | |||
931bb5ee28 | |||
d85a5975c0 | |||
456ee156c3 | |||
40eae48a1a | |||
8da5f4dd44 | |||
4bd3cf4d52 | |||
07ca95205d | |||
b56f2b4b0e | |||
05738d1e25 | |||
12bc9268f7
|
|||
a05a8ffb50
|
|||
cf875f7883 | |||
4bef1bd567 | |||
885fddd45f | |||
fab4cdd0dc | |||
693e11bcb2 | |||
9196b8b0ed | |||
65815e4646 | |||
57ecfadf43 | |||
71d417710e | |||
a66b503e57 | |||
88f3d92dd8 | |||
26199e7317 | |||
620dc60342 | |||
38305e723f | |||
cb879ea97f | |||
f58f4c302c | |||
fdf3657cf6 | |||
c5b2b5c56c | |||
55d6edcd66
|
|||
20e920cde2
|
|||
3fdd1feb94
|
|||
a4391c0515
|
|||
1acb7d2679 | |||
ef40391c09 | |||
407901d990
|
|||
7132b0c53f
|
|||
df13fc2e80
|
|||
8adbbf50b2 | |||
962c792679 | |||
c44d8e6437 | |||
4146050807
|
|||
bd2f1bf7f2 | |||
020daf9a77 | |||
e3ae6260ad
|
|||
45b9e88915
|
|||
cf48a18733
|
|||
9e787a7e44
|
|||
9cd38a33d4
|
|||
9740435d65 | |||
b2535662e6 | |||
1cf318fca1 | |||
171d4976c3
|
|||
e13fee75d0
|
|||
8e1af9cfba
|
|||
cd6b7d90be
|
|||
3bdbc67e0d
|
|||
fe1cc9444d
|
|||
019d1a7b0d
|
|||
1453b2abdc
|
|||
fe70d2e047 | |||
900cb060e4 | |||
bd7f28152a
|
|||
9ec3eca10a | |||
4212fbef02 | |||
6c1dfafb2e
|
|||
18ba3a711a
|
|||
c1f8512b01
|
|||
c14bbe4a93 | |||
0e171997d7 | |||
e08a2b76b9 | |||
6ef593d8f3
|
|||
08e7a8cf97
|
|||
d90ccd62f8
|
|||
cab20a8c77 | |||
6fdd9da2a0 | |||
410fd1c425 | |||
deb154770d | |||
dcf3b1b1fe | |||
06c5344d8a | |||
26ed774806 | |||
06b381d965 | |||
4bcfb8f5a2 | |||
b8064c4a39 | |||
5ca96b2dd3 | |||
9aec8960b9 | |||
de35764ede | |||
376c359d6e | |||
a110bf32aa | |||
f4c9a4bda2 | |||
7fc934b9df | |||
7dbe69ef49 | |||
72b5567f73 | |||
6a2d5b8161 | |||
5058b8905d | |||
7d1b99c3f4 | |||
8bfacbd5ef | |||
8052734028 | |||
b7eb693295 | |||
aec383b974 | |||
caa2800a7a | |||
e96163f2a5 | |||
d4b44962f5 | |||
58dee642a6 | |||
a5f9bb3177 | |||
939eeb09ec | |||
a1fec93b25 | |||
3be495fc30 | |||
73981006a2 | |||
5a60558354 | |||
6915f0e003 | |||
a58f51ee91 | |||
099eb488ae | |||
c64ea7f7e6 | |||
487b6bf690 | |||
bd15d7b0e2 | |||
f8d9925785 | |||
4aca7a91e3 | |||
0fe7b256ec | |||
c6664c5cbf | |||
3750f1ac57 | |||
bfa0a0707c | |||
ffe419e1ab | |||
7b38ee3ecc | |||
f93e299296 | |||
004a283163 | |||
a85b0a4a76 | |||
998110dea4 | |||
5c79d5e1f7 | |||
442b1c94a6 | |||
8113a71c79 | |||
cc60847bd0 | |||
0b06bc4c8b | |||
9711bb6300 | |||
68e4d9be07 | |||
ec8e8533d6 | |||
170cb4d99c | |||
f4523c8396 | |||
23625b2496 | |||
df69515bd4 | |||
ddcdc38310 | |||
9921522ce0 | |||
0aa617d440 | |||
1f4880ddec | |||
6aa856563e | |||
ebf5609680 | |||
5abcb31e22 | |||
d400a71626 | |||
7811a4cc6b | |||
b135e2f6a1 | |||
c5640c9fca | |||
fe34f69abe | |||
899b19f34f | |||
faeece7210 | |||
ada77ed53b | |||
f3cc406495 | |||
71eca867ea | |||
9c78362ac5 | |||
a7c6cd017d | |||
335394b863 | |||
de18ebfbe0 | |||
93cf6bab01 | |||
5afe22bc92 | |||
2ff1c0d9d5 | |||
a6787538f2 | |||
db79e34d3b | |||
016e9dd2df | |||
d22f948af4 | |||
351ca1154b | |||
e1aff4c641
|
|||
8d041c6753
|
|||
276501c504
|
|||
65223ad3c7 | |||
075c750e4a | |||
04f5011e0f | |||
832140935f | |||
86bc6c4e0e | |||
31e24e297f | |||
4dacca6df1 | |||
ce9d00a42a | |||
6e4d4cea95 | |||
3641dc3bfa | |||
b899bad0a8 | |||
9e0989915c | |||
758f2b9d7a | |||
46dd662145 | |||
8f4bba6fd1 | |||
a38f5c78ae | |||
dc36513efa | |||
ee0646caf1 | |||
a831ec7bda | |||
efa9c42345 | |||
a0b1ac3d06 | |||
30bb2da570 | |||
c45f267e94 | |||
13fdaf731c | |||
d7a35d9818 | |||
6cf488d0a6 | |||
15139d6944 | |||
266abad3b3 | |||
042b8fb3c3 | |||
303df55a12 | |||
50327fb614 | |||
7bd2fce86f | |||
28beb006b2 | |||
7222475985 | |||
f5a7fd2ffe | |||
6bfb0d4fb0 | |||
7ac2271eab | |||
8efbdf8279 | |||
631a1aec42 | |||
7eeece6934 | |||
04571bbd7a | |||
32a4aa48d9 | |||
62ae7ff482 | |||
5390e947ca | |||
9ff154cedc | |||
4763ec84fa | |||
e4fc6e3d2a | |||
2543cdf5b7 | |||
72b5c7d053 | |||
d23082283d | |||
cd514e8125 | |||
ea9f72b9c4 | |||
148a876fc9 | |||
9804898d05 | |||
e04f349e77 | |||
8cc4431e22 | |||
22dcf10207 | |||
fa4a40da6e | |||
a814746c53 | |||
ed74367f01 | |||
3f37c52f67 | |||
a0e305fe1f
|
|||
d28bc3f74d
|
|||
b9afeb9c19
|
|||
7f115303ae
|
|||
e03df2ebca
|
|||
f9e8dc6e60 | |||
0179c04472 | |||
c3b6b0a7ee | |||
90b7f069dc | |||
4ba9ebf58f | |||
8b467ec69e | |||
468fa01650 | |||
b39e448ab5
|
|||
8ed3bdc95c | |||
04b9ed4504 | |||
ab6a0c3e4d | |||
97a7087827 | |||
a615ed2d21 | |||
3d7d01d6ab | |||
78972cd173 | |||
c8ed7fe20e | |||
5ce0a60184 | |||
fabc6da562 | |||
17df79b0d6 | |||
178a2183a2 | |||
ae6b5b491b | |||
f099cd7688 | |||
9fde16c912 | |||
770697d5d0 | |||
af77d083fa | |||
9b1ab3eb75 | |||
edf792c4fe
|
|||
a718d182fc
|
|||
714e2d07e5
|
|||
4887dc9e6b
|
|||
3dc096c42b
|
|||
ac73e6d2c3
|
|||
edda42cb61
|
|||
9887359e31
|
|||
1f9c9e2407
|
|||
07d9ab0dd9
|
|||
a3b119fda6
|
|||
86241a0052
|
|||
9715612e46
|
|||
90d289f56e
|
|||
9391949369
|
|||
2b999e7fa7
|
|||
699fc9a861
|
|||
66c9a5eea3
|
|||
af20a36634
|
|||
ba060be0d6
|
|||
a2217b0e64 | |||
f71a363385 | |||
42152ab711 | |||
1820dae3d4
|
|||
c9121c5214 | |||
f079818c42 | |||
29eb0e736f
|
|||
412aaf93bd | |||
0156533385
|
|||
cbf3315e16
|
|||
7e6c25901b
|
|||
50d5180076 | |||
92fd1548cb | |||
dbdcf0b0d6 | |||
bacc46a8dc | |||
0fb07fd3d5 | |||
98a858876a | |||
d4fc95ed9f | |||
2e00e10e09 | |||
4a3af32a65 | |||
66ca156ab3 | |||
d67414e829 | |||
0fd18204bf | |||
f225d9a7c1 | |||
9b5fac828b | |||
07dd84ff1e | |||
d5a6feb347 | |||
5728d916ef | |||
e762cc5fb3 | |||
119b1c8eb9 | |||
f72c797f53 | |||
71ef1edb68 | |||
98ef38f3eb | |||
827419ef34 | |||
5b4261104e | |||
ff175170aa | |||
e4431d20c4 | |||
119afe6148 | |||
ff47fafdc2 | |||
0a109e552d | |||
fa13703394 | |||
09ece30304 | |||
c3604085c2 | |||
1274993428 | |||
a7ccfae04e | |||
2c9da6a1e4 | |||
2b36195dac | |||
758ed22b08 | |||
30fba0456b | |||
98e69b9a6a | |||
531f87cd76 | |||
3a0db9c9ad | |||
c8d1ce40ba | |||
32d2ad8f1d | |||
b34767c870 | |||
97567736fb | |||
621a6fd401 | |||
04b6c7006e | |||
8a65aca7b8 | |||
e3dc39a028 | |||
8bb97f5f44 | |||
83a373859d | |||
52acb3373e | |||
ad32eee70a | |||
db3dc80756 | |||
65c59352e9 | |||
722a4208d4 | |||
db63757c0c | |||
5a9da1a99c | |||
a71be232ac | |||
4e428e6353 | |||
6705ede2fc | |||
0ff7e0f97a | |||
e04313b9f3 | |||
1166c66c8c | |||
e78d458f06 | |||
4f6f12217c | |||
ef039c47b8 | |||
d4b7411de1 | |||
2e6a93c479 | |||
f3a651602b | |||
6c00404ca7 | |||
1412dd4fb6 | |||
1602d5d318 | |||
1870bf6405 | |||
51b0d897a1 | |||
670c753a75 | |||
26e48f2f46 | |||
a352f25029 | |||
141438bd24 | |||
f5e20db03f | |||
1cbb7d0af8 | |||
09ffcc8804 | |||
fb062bb4e8 | |||
2f58ca8534 | |||
5747f73dfe | |||
67c0a3b03e | |||
490790bd0c | |||
7dfc7dc8c1 | |||
aa63bd1fa5 | |||
b7383294c9 | |||
e31a95d1c4 | |||
3e9933c7ee | |||
ee3ef042cd | |||
05b0efe851 | |||
8ade378a69 | |||
045d149946 | |||
a75f9553be | |||
f271242d66 | |||
1756b5edcc | |||
9c1fc44c60 | |||
f46a705900 | |||
9183d18acc | |||
befa84a74b | |||
432b400835 | |||
0eb6b7cccb | |||
74ee291983 | |||
a146c34140 | |||
61ced11766 | |||
468fb096c9 | |||
4a2dd19a73 | |||
2658cabc9d | |||
dc83061f80 | |||
00da51b6a2 | |||
f846a18b33 | |||
ab588b4844 | |||
d12dca183d | |||
701ecbd182 | |||
bdd2b23ec3 | |||
d70245b56a | |||
9097a3f3c7 | |||
e05d9d4b2a | |||
07572ab3a0 | |||
304aabc336 | |||
07e8f95a31 | |||
babea226ab | |||
8c24a7310d | |||
8f5982fd72 | |||
611a2c0b45 | |||
61e6b09704 | |||
a9a0266a84 | |||
b7e6315be7 | |||
740275f57a | |||
58dd53def8 | |||
ddbe30f832 | |||
680d496b28 | |||
9c163419b2 | |||
f4fedd20c9 | |||
016fab105e | |||
767a0eda30 | |||
f2c71d962a | |||
7bf880a29f | |||
0185691dba | |||
9997aa5470 | |||
c1ccfe66eb | |||
ae9f43c707 | |||
143002de48 | |||
d439aedee7 | |||
b8d010cd39 | |||
22370e3e1e | |||
b98f91f6c1 | |||
b47bda8ed1 | |||
078a04b317 | |||
d24a983985 | |||
b964b03b2d | |||
f0d55f9e5b | |||
aa54dbbd10 | |||
1a62a13d97 | |||
500b3b6fc6 | |||
fa746f910d | |||
602c635967 | |||
84db92f75e | |||
4de71062af | |||
a4c8319cec | |||
379fd6046e | |||
aa800c4524 | |||
7f1fe3a2d8 | |||
e023220be4 | |||
8cf9dd9136 | |||
62d18826f1 | |||
41f762c6ff | |||
644a768778 | |||
756ea6d90d | |||
2d19d94d09 | |||
09a2ba7843 | |||
716f2b2832 | |||
6934721a42 | |||
fc8a8ce5a9 | |||
5e53795cbe | |||
2f2d1c7c7a | |||
f7be454dae | |||
ca30fed4c3 | |||
54f742bf19 | |||
4bfd675073 | |||
36420a6855 | |||
b0a2b5886f | |||
33d60ccf7f | |||
c8472f222c | |||
e68ac9cc2d | |||
a306b2a0af | |||
f112c28391 | |||
4693407b68 | |||
4e6b3ec9ed | |||
38b9a9b34e | |||
7c67648b8e | |||
9b1d4de9c5 | |||
998f93e3fa | |||
b5e1e0c31b | |||
9a65a9f20b | |||
b2a52b0bfc | |||
46862825ec | |||
dc1e51891e | |||
213dba1e75 | |||
4e686b4ad0 | |||
1e521f0575 | |||
53cccc3c13 | |||
a7c227f8ea | |||
bc6531f7a5 | |||
e17b8d2ec4 | |||
f645b97ba3 | |||
e79e13416e | |||
33773179a7 | |||
c5b26eade4 | |||
28eaf8461a | |||
6f67bd500b | |||
af354bd9fb | |||
aa746276ae | |||
3e3ac9f5be | |||
ae66820b52 | |||
93013d18ff | |||
7f3f99c6aa | |||
600d0c580d | |||
2722e471ef | |||
d8089489c4 | |||
cebe6e1423 | |||
906aedc911 | |||
97df53554e | |||
a81e939e70 | |||
b5f4b6cf7b | |||
f14677ec4e | |||
29dc684455 | |||
3ff8c6a481 | |||
f7bc052070 | |||
9861772c38 | |||
d4080fe5cb | |||
6b976f1046 | |||
673826b131 | |||
ae729337a2 | |||
a09cc86336 | |||
8620bd0283 | |||
ea606ce217 | |||
99305846f8 | |||
dd211cdf54 | |||
2262a15e35 | |||
94431cfdb8 | |||
41ec6dc0f2 | |||
836ce9a6cd | |||
ae80eac9a2 | |||
e063a7148a | |||
2808079444 | |||
3ba81d19a7 | |||
0e6f222ef1 | |||
90ca65f9a9 | |||
f4c156479a | |||
d9e38d97ee | |||
67e94e1ee7 | |||
b20e38a2bc | |||
d71031f2e4 | |||
98d1da428a | |||
df7236cfee | |||
c9cc1d4cfe | |||
128bd7d41a | |||
061cd0468c | |||
2bb0f530fe | |||
b3f5e74609 | |||
ff28b628a4 | |||
5925de94e7 | |||
7c36660000 | |||
ae8f80bb54 | |||
776a53b243 | |||
8ad68aca3a | |||
b1bd7e0215 | |||
d42b6798e0 | |||
fa94c67e99 | |||
4e9a074e82 | |||
b82f19ea50 | |||
271830422a | |||
7869289abc | |||
0a84eab0ef | |||
b816b386cf | |||
8d9755c17f | |||
d552b51c0d | |||
52620f3dda | |||
d7eaceb0fc | |||
e01fe19d53 | |||
af1d0759e1 | |||
af9f346698 | |||
b6ba2f291a | |||
c66799b24f | |||
18be21a310 | |||
abef9da9f9 | |||
4afddad503 | |||
cc39acd436 | |||
2df556c5be | |||
aa43912279 | |||
ece053e5c3 | |||
1c0fbace4d | |||
2fb7ac7b4b | |||
c89e332843 | |||
10f552f56a | |||
310f8f5f3c | |||
584b6e3038 | |||
a81b24b67f | |||
6b671cfa65 | |||
3408624056 | |||
146767b04f | |||
f4951385fd | |||
f259face36 | |||
8482416ac5 | |||
a419589a7f | |||
ebcd0cdfa1 | |||
9960fc8ce7 | |||
353b9bd322 | |||
014ac8b8c2 | |||
cd8bbaf1f9 | |||
d98873c9a6 | |||
aacd4dc088 | |||
d5d43e8d44 | |||
55dd4b28ee | |||
f9ed42f8a5 | |||
e9fc0c453d | |||
ca44b541b1 | |||
2968856d71 | |||
e4530544c2 | |||
103800e40c | |||
aa78d744b4 | |||
54c29e893d | |||
b9d0e4bdd9 | |||
cdcadf3c18 | |||
5243f304af | |||
a8d19b0ff9 | |||
5bdb7414bf | |||
77b8c6eb3e | |||
db669c44f6 | |||
bfb91f1baa | |||
3c33d01089 | |||
6156cc0b88 | |||
bd8389e0c9 | |||
58aef99bbc | |||
9020014245 | |||
e523c2fe25 | |||
3bd434bbc3 | |||
4acf66a020 | |||
2af1735cfd | |||
13844bce65 | |||
d7dc3f34c7 | |||
086dbcc19e | |||
7a53ada4b4 | |||
c5e18957f5 | |||
64b4db98ba | |||
3a236a1a3b | |||
19006e79b1 | |||
44325ee176 | |||
397e23f1da | |||
3d48f4d046 | |||
0d7fe0ff74 | |||
543d147b37 | |||
34dde2640e | |||
205a672680 | |||
57b01a5d2c | |||
4624d5a2a6 | |||
518f9d73f6 | |||
d8ec121131 | |||
3e54bc9c3f | |||
65dd0f313b | |||
4ca45f348c | |||
34a0288987 | |||
f031c46cb5 | |||
dbf627cc12 | |||
b06db0a0fc | |||
0a68b50ad7 | |||
b11ed219a2 | |||
67082a6559 | |||
39b2a3420c | |||
36d5f8fd31 | |||
cdba7985ea | |||
38b7593900 | |||
78cc0fc52d | |||
4ed112d019 | |||
7549a24f6f | |||
ce7da9f513 | |||
d53fdf9078 | |||
67988dad64 | |||
56c5838d15 | |||
2950876ce4 | |||
a875bf55b8 | |||
a28ba4ec66 | |||
c65b402361 | |||
f5e47c6114 | |||
600921e3a0 | |||
3c38410643 | |||
2e0a685507 | |||
0ade2ae0ee | |||
b050047d9a | |||
65c231e92d | |||
5e93282662 | |||
7a7d0e650f | |||
4ca8c38c98 | |||
0cabe3a9ea | |||
845548ed25 | |||
858c6c301e | |||
9825a8583f | |||
babc4f80a8 | |||
3299260653 | |||
a0e531445a | |||
5e854668b5 | |||
52c69f05e6 | |||
5dd2638241 | |||
c835b31e7f | |||
57b41701ce | |||
69bbe4ea39 | |||
f2a2c73984 | |||
85cf95d6bb | |||
08d83c158a | |||
b0e65867ee | |||
106cb1ab35 | |||
a06d90daad | |||
3cc48a4cea | |||
04178b8831 | |||
28882cc359 | |||
c9bd922711 | |||
94c736d143 | |||
c4516f53b8 | |||
f39981deca | |||
fd8317acd7 | |||
7df3308717 | |||
a76074acf5 | |||
697dcab345 | |||
104a8cab33 | |||
8d4b980c32 | |||
677457bbe7 | |||
908927ed9f | |||
4a287344f4 | |||
ae0413f7f6 | |||
01081cbb29 | |||
1d82977ca2 | |||
bc7bdfe1fe | |||
38a0c14940 | |||
3941770378 | |||
e10359077c | |||
8d1db69e0d | |||
8a2137d5d3 | |||
e47ba65550 | |||
143fb44037 | |||
18994f5e65 | |||
39a3b4aa6f | |||
2b18ab1504 | |||
83e0627548 | |||
152a3c20cf | |||
9e8880c2c5 | |||
ed8623259e | |||
69a3cb20be | |||
01b98ca091 | |||
0cd246182d | |||
9270165bf8 | |||
9aedc36e4d | |||
f5588e9c62 | |||
afbab6d3f2 | |||
6d0bd88cd9 | |||
23af9685d6 | |||
a26d71f745 | |||
8404ce237b | |||
1610bdecf9 | |||
53c88f85d5 | |||
ac514d9c19 | |||
e6f0695e1e | |||
6b37d292c6 | |||
e3677f89fe | |||
5267bfcd82 | |||
99eae0df51 | |||
73e2508025 | |||
1b2dd12e61 | |||
8585114041 | |||
c4f62842ab | |||
800ab7e87f | |||
11d9871c0a | |||
958abadd65 | |||
fba856a9a9 | |||
bc582abcb3 | |||
ba7a2c3ece | |||
a8a0299b46 | |||
f4b47a24c0 | |||
e9c5bfe324 | |||
5dcafa1de0 | |||
7522eac9eb | |||
847e3bb51d | |||
020dfa8278 | |||
389b77a092 | |||
a31f8c934a | |||
685a4caace | |||
9360dad028 | |||
8eac0b5ebd | |||
703eaaa9aa | |||
cab55c79dc | |||
62952b89b1 | |||
b205fb5269 | |||
959f37f25a | |||
789b0ff7ae | |||
601318d7eb | |||
87d622c82c | |||
fc43627abb | |||
0878f3882a | |||
6a8ddf96b8 | |||
6a2f569fc3 | |||
d2f11b1860 | |||
cf8dc9ed7d | |||
f65cf23391 | |||
b4c6965d9e | |||
78d39a3760 | |||
b58fc90879 | |||
2386944ed8 | |||
409631fb0a | |||
13b8f9b1ec | |||
d0f641abe0 | |||
9b5fc8995c | |||
23a4b08709 | |||
d1775a52aa | |||
ff6ad60eed | |||
95d220c304 | |||
65989261b0 | |||
e365e03c2a | |||
da36160f6e | |||
3f8603967c | |||
013692cc41 | |||
2f9de8c36e | |||
fcf3437410 | |||
f51656a813 | |||
bb7a616283 | |||
028f94a2f7 | |||
62ba7a1f80 | |||
9d42bb87d9 | |||
6c8eeeab31 | |||
f16d92c1b1 | |||
55a22c840c | |||
caa7c20adf | |||
6ee3fe2eef | |||
76ea3f7979 | |||
3871c8b8de | |||
e0f94039b4 | |||
a1380a6e3a | |||
795486ae6c | |||
4b1221ab99 | |||
f6f4db525c | |||
a6e24485e2 | |||
74a38dc76b | |||
5f6f85a778 | |||
6426142039 | |||
1541376701 | |||
27370fcd44 | |||
770fee0097 | |||
5903b3ef60 | |||
0bf4527e94 | |||
f695115102 | |||
a72805d137 | |||
b7c17fdf0f | |||
def7eca2f2 | |||
520b41c53b | |||
28d7dcf177 | |||
36d7852c1d | |||
5c97020087 | |||
861bee8083 | |||
3e7901f060 | |||
0301c18af2 | |||
f71972609c | |||
96bd188e57 | |||
90db9785ea | |||
506c8a3fa6 | |||
150595b7f7 | |||
07f482a98b | |||
c759e118fa | |||
330e26b2ba | |||
41215c9ae9 | |||
dce6323090 | |||
906413e800 | |||
ad72301ea0 | |||
44d0f1c533 | |||
9d8dfdfd4f | |||
e6813efb88 | |||
8597e04eaf | |||
d6331aab0b | |||
56642a11f7 | |||
f6a0954315 | |||
9c8fc84053 | |||
d00cfc420c | |||
2153294e6f | |||
0fdc79df5e | |||
0e5a3a2f6c | |||
b81618344e | |||
d85ddcdbff | |||
092e9fa508 | |||
ba9cf5d79d | |||
4871479ed5 | |||
eb46841237 | |||
d44142ac26 | |||
f7be8ea63c | |||
3c6eb265c7 | |||
b1d2f73b01 | |||
eda1f7e212 | |||
56a4378a63 | |||
a16671762d | |||
350ed59033 | |||
096253a9a3 | |||
11e5866f31 | |||
9b8092fb09 | |||
f546df50a1 | |||
8201a4140a | |||
364342855d | |||
c688a51838 | |||
715a69db89 | |||
dc44af5b29 | |||
27f29eda40 | |||
50a62b9243 | |||
da7c450e06 | |||
a92fa31cb5 | |||
d273621419 | |||
64ec76bfb7 | |||
69525b6fd1 | |||
c1d8eda2c7 | |||
8b11302028 | |||
c1b4a1c164 | |||
58212d7081 | |||
a6e6ee053d | |||
e82777479b | |||
a51a680396 | |||
d3bf70243b | |||
4392598a67 | |||
26a9dce0a0 | |||
9d1d62aee0 | |||
bf2d97bd60 | |||
721a01409e | |||
a0d6552781 | |||
c709b2a526 | |||
5793d73ff6 | |||
c63b13fc40 | |||
224a3af6f8 | |||
131c508cae | |||
7a62624687 | |||
337717d271 | |||
9c77703ada | |||
718d067b40 | |||
37b540fd48 | |||
88db78fed9 | |||
5f3bd5c754 | |||
63275df3f0 | |||
d6f537da5f | |||
9a7779cffb | |||
0fa1bab94d | |||
29179bde0c | |||
b9a6425078 | |||
e13636167f | |||
9b849d10e9 | |||
77b7433caf |
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -10,9 +10,6 @@
|
||||
[submodule "thirdparty/lwgps"]
|
||||
path = thirdparty/lwgps
|
||||
url = https://github.com/rmspacefish/lwgps.git
|
||||
[submodule "thirdparty/arcsec_star_tracker"]
|
||||
path = thirdparty/arcsec_star_tracker
|
||||
url = https://egit.irs.uni-stuttgart.de/eive/arcsec_star_tracker.git
|
||||
[submodule "thirdparty/json"]
|
||||
path = thirdparty/json
|
||||
url = https://github.com/nlohmann/json.git
|
||||
@ -22,3 +19,6 @@
|
||||
[submodule "thirdparty/gomspace-sw"]
|
||||
path = thirdparty/gomspace-sw
|
||||
url = https://egit.irs.uni-stuttgart.de/eive/gomspace-sw.git
|
||||
[submodule "thirdparty/sagittactl"]
|
||||
path = thirdparty/sagittactl
|
||||
url = https://egit.irs.uni-stuttgart.de/eive/sagittactl.git
|
||||
|
1
.idea/cmake.xml
generated
1
.idea/cmake.xml
generated
@ -2,7 +2,6 @@
|
||||
<project version="4">
|
||||
<component name="CMakeSharedSettings">
|
||||
<configurations>
|
||||
<configuration PROFILE_NAME="Debug" ENABLED="true" CONFIG_NAME="Debug" NO_GENERATOR="true" />
|
||||
<configuration PROFILE_NAME="Debug Q7S" ENABLED="true" CONFIG_NAME="Debug" TOOLCHAIN_NAME="Q7S" GENERATION_OPTIONS="-DTGT_BSP="arm/q7s"" NO_GENERATOR="true">
|
||||
<ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||
<envs>
|
||||
|
496
CHANGELOG.md
496
CHANGELOG.md
@ -16,10 +16,502 @@ will consitute of a breaking change warranting a new major release:
|
||||
|
||||
# [unreleased]
|
||||
|
||||
# [v6.0.0] to be released
|
||||
|
||||
- Important bugfixes for PTME. See `q7s-package` CHANGELOG.
|
||||
|
||||
# [v5.1.0] to be released
|
||||
|
||||
# [v5.0.0] 2023-06-26
|
||||
|
||||
v3.3.1 and all following version will now be moved to v5.0.0 with the additional changes listed
|
||||
here. This was done because the firmware update (v4.0.0) is not working right now and it is not
|
||||
known when and how it will be fixed. Because of that, all updates to make the SW work with the new
|
||||
firmware, which are limited to a few files will be moved to a dev branch so regular development
|
||||
compatible to the old firmware can continue.
|
||||
|
||||
TLDR: This version is compatible to the old firmware and some changes which only work with the new
|
||||
firmware have been reverted.
|
||||
|
||||
## Changed
|
||||
|
||||
- Added `sync` syscall in graceful shutdown handler
|
||||
- Graceful shutdown is now performed by the reboot watchdog
|
||||
- There is now a separate file for the total reboot counter. The reboot watchdog has its own local
|
||||
counters to determine whether a reboot is necessary.
|
||||
|
||||
# [v4.0.1] 2023-06-24
|
||||
|
||||
## Fixed
|
||||
|
||||
- `PusLiveDemux` packet demultiplexing bugfix where the demultiplexing did not work when there was
|
||||
only one destination available.
|
||||
|
||||
# [v4.0.0] 2023-06-22
|
||||
|
||||
- `eive-tmtc` version v5.0.0
|
||||
- `q7s-package` version v3.1.1
|
||||
|
||||
## Fixed
|
||||
|
||||
- Important bugfixes for PTME. See `q7s-package` CHANGELOG.
|
||||
- TCS fixes: Set temperature values to invalid value for MAX31865 RTD handler, SUS handler
|
||||
and STR handler. Also set dataset to invakid for RTD handler.
|
||||
- Fixed H parameter in SUS converter from 1 mm to 2.5 mm.
|
||||
|
||||
## Changed
|
||||
|
||||
- Removed PTME busy/ready signals. Those were not used anyway because register reads are used now.
|
||||
- APB bus access busy checking is not done anymore as this is performed by the bus itself now.
|
||||
- Core controller will now announce version and image information event in addition to reboot
|
||||
event in the `inititalize` function.
|
||||
- Core controller will now try to request and announce the firmware version in addition to the
|
||||
OBSW version as well.
|
||||
- Added core controller action to read reboot mechansm information
|
||||
- GNSS reset pin will now only be asserted for 5 ms instead of 100 ms.
|
||||
|
||||
## Added
|
||||
|
||||
- Added PL I2C reset pin. It is not used/connected for now but could be used for FDIR procedures to
|
||||
restore the PL I2C.
|
||||
- Core controller now announces firmware version as well when requesting a version info event
|
||||
|
||||
# [v3.3.1] 2023-06-22
|
||||
|
||||
## Fixed
|
||||
|
||||
- `PusLiveDemux` packet demultiplexing bugfix where the demultiplexing did not work when there was
|
||||
only one destination available.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed H parameter in SUS converter from 1 mm to 2.5 mm.
|
||||
|
||||
# [v3.3.0] 2023-06-21
|
||||
|
||||
Like v3.2.0 but without the custom FM changes related to VC0.
|
||||
|
||||
# [v3.2.0] 2023-06-21
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fix sun vector calculation
|
||||
- SUS total vector was not reset to being a zero vector during eclipse due to a wrong memcpy
|
||||
length.
|
||||
|
||||
## Changed
|
||||
|
||||
- Reverted all changes related to VC0 handling to avoid FM bug possibly related to FPGA bug.
|
||||
|
||||
# [v3.1.1] 2023-06-14
|
||||
|
||||
## Fixed
|
||||
|
||||
- TMP1075 bugfix where negative temperatures could not be measured because of a two's-complement
|
||||
conversion bug.
|
||||
|
||||
# [v3.1.0] 2023-06-14
|
||||
|
||||
- `eive-tmtc` version v4.1.0
|
||||
|
||||
## Fixed
|
||||
|
||||
- TCS heater switch enumeration naming was old/wrong and was not updated in sync with the object ID
|
||||
update. This lead to the TCS controller commanding the wrong heaters.
|
||||
|
||||
## Changed
|
||||
|
||||
- Increase number of allowed parallel HK commands to 16
|
||||
|
||||
## Added
|
||||
|
||||
- Added `CONFIG_SET`, `MAN_HEATER_ON` and `MAN_HEATER_OFF` support for the BPX battery handler
|
||||
|
||||
# [v3.0.0] 2023-06-11
|
||||
|
||||
- `eive-tmtc` version v4.0.0
|
||||
|
||||
## Changed
|
||||
|
||||
- Adapt EM configuration to include all GomSpace PCDU devices except the ACU. For the ACU
|
||||
(which broke), a dummy will still be used.
|
||||
- Event Manager queue depth is configurable now.
|
||||
- Do not construct and schedule broken TMP1075 device anymore.
|
||||
- Do not track payload modes in system mode tables.
|
||||
- ACS modes derived from system modes.
|
||||
- The CMake build generator will now search for the cross-compiler binaries in the environmental
|
||||
variable named `CROSS_COMPILE_BIN_PATH` first when setting up the build system. This prevents
|
||||
CMake from selecting wrong cross-compilers if multiple cross-compilers with the same name are used
|
||||
on the same system.
|
||||
- Add ACS board for EM by default now.
|
||||
- Add support for MPSoC HK packet.
|
||||
- Add support for MPSoC Flash Directory Content Report.
|
||||
- Dynamically enable and disable HK packets for MPSoC on `ON` and `OFF` commands.
|
||||
- Add support for MPSoC Flash Directory Content Report.
|
||||
- Larger allowed path and file sizes for STR and PLOC MPSoC modules.
|
||||
- More robust MPSoC flash read and write command data handling.
|
||||
- Increase frequency of payload handlers from 0.8 seconds to 0.5 seconds.
|
||||
- Disable missed deadlines per default. Not useful in orbit, and triggers all the time on the EM
|
||||
build after a number of subsequent runs, without any apparent reason (deadlines are not actually
|
||||
missed, thread usage displayed is nominal)
|
||||
- TM store dumpes will not be cancelled anymore if the transmitter is off. The dump can be cancelled
|
||||
with an OFF command, and the PTME is perfectly capable of dumping without the transmitter being
|
||||
on.
|
||||
- Transmitter state is not taken into account anymore for writing into the PTME. The PTME should
|
||||
be perfectly capable of generating a valid CADU, even when the transmitter is not ON for any
|
||||
reason.
|
||||
- OFF mode is ignores in TM store for determining whether a store will be written. The modes will
|
||||
only be used to cancel a transfer.
|
||||
- Handling of multiple RWs in the ACS Controller is improved and can be changed by parameter
|
||||
commands.
|
||||
- The Directory Listing direct dumper now has a state machine to stagger the directory listing dump.
|
||||
This is required because very large dumps will overload the queue capacities in the framework.
|
||||
- The PUS Service 8 now has larger queue sizes to handle more action replies. The PUS Service 1
|
||||
also has a larger queue size to handle a lot of step replies now.
|
||||
- Moved PDU `vcc` and `vbat` variable from auxiliary dataset to core dataset.
|
||||
- Tweak TCP/IP configuration: Only the TCP server will be included on the EM. For the FM, no
|
||||
TCP/IP servers will be included by default.
|
||||
|
||||
## Added
|
||||
|
||||
- Add the remaining system modes.
|
||||
- PLOC MPSoC flash read command working.
|
||||
- BPX battery handler is added for EM by default.
|
||||
- ACU dummy HK sets
|
||||
- IMTQ HK sets
|
||||
- IMTQ dummy now handles power switch
|
||||
- Added some new ACS parameters
|
||||
- Enabled decimation filter for the ADIS GYRs
|
||||
- Enabled second low-pass filter for L3GD20H GYRs
|
||||
|
||||
## Fixed
|
||||
|
||||
- CFDP low level protocol bugfix. Requires `fsfw` update and `tmtc` update.
|
||||
- Compile fix if SCEX is compiled for the EM.
|
||||
- Set up Rad Sensor chip select even for EM to avoid SPI bus issues.
|
||||
- Correct ADIS Gyroscope type configuration for the EM, where the 16507 type is used instead of the
|
||||
16505 type.
|
||||
- Host build is working again. Added reduced live TM helper which schedules the PUS and CFDP
|
||||
funnel.
|
||||
- PLOC Supervisor handler now has a power switcher assigned to make PLOC power switching work
|
||||
without an additional PCDU power switch command.
|
||||
- The PLOC Supervisor handler now waits for the replies to the `SET_TIME` command to verify working
|
||||
communication.
|
||||
- The PLOC MPSoC now waits 10 cycles before going to on. These wait cycles are necessary because
|
||||
the MPSoC is not ready to process commands without this additional boot time.
|
||||
- Fixed correction for `GPS Altitude` in case the sensor data is out of the expected bonds.
|
||||
- PLOC MPSoC special communication is now scheduled, which allows flash read and flash write
|
||||
commands to work.
|
||||
- Fixed the MPSoC flash write command.
|
||||
- Added missing ACS parameter.
|
||||
- HK TM store: The HK store dump success event was triggered for cancelled HK dumps.
|
||||
- When a PUS parsing error occured while parsing a TM store file, the dump completion procedure
|
||||
was always executed.
|
||||
- Some smaller logic fixes in the TM store base class
|
||||
- Fixed usage of C `abs` instead of C++ `std::abs`, which results in MTQ commands not being
|
||||
scaled correctly between 1Am² and 0.2Am².
|
||||
- TCS Heater Handler: Always trigger mode event if a heater goes `OFF` or `ON`. This event might
|
||||
soon replace the `HEATER_WENT_ON` and `HEATER_WENT_OFF` events.
|
||||
- Prevent spam of TCS controller heater unavailability event if all heaters are in external control.
|
||||
- TCS heater switch info set contained invalid values because of a faulty `memcpy` in the TCS
|
||||
controller. There is not crash risk but the heater states were invalid.
|
||||
- STR datasets were not set to invalid on shutdown.
|
||||
- Fixed usage of quaternion valid flag, which does not actually represent the validity of the
|
||||
quaternion.
|
||||
- Various fixes for the pointing modes of the `ACS Controller`. All modes should work now as
|
||||
intended.
|
||||
- The variance for the ADIS GYRs now represents the used `-3` version and not the `-1` version
|
||||
- CFDP funnel did not route packets to live channel VC0
|
||||
|
||||
# [v2.0.5] 2023-05-11
|
||||
|
||||
- The dual lane assembly transition failed handler started new transitions towards the current mode
|
||||
instead of the target mode. This means that if the dual lane assembly never reached the initial
|
||||
submode (e.g. mode normal and submode dual side), it will transition back to the current mode,
|
||||
which miht be `MODE_OFF`. Furthermore, this can lead to invalid internal states, so the subsequent
|
||||
recovery handling becomes stuck in the custom recovery sequence when swichting power back on.
|
||||
- The dual lane custom recovery handling was adapted to always perform proper power switch handling
|
||||
irrespective of current or target modes.
|
||||
|
||||
# [v2.0.4] 2023-04-19
|
||||
|
||||
## Fixed
|
||||
|
||||
- The dual lane assembly datasets were not marked invalid properly on OFF transitions.
|
||||
|
||||
# [v2.0.3] 2023-04-17
|
||||
|
||||
- eive-tmtc: v3.1.1
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed shadowing within the `SafeCtrl`, which prevented actuator commands to be calculated during
|
||||
eclipse phase.
|
||||
- EM build idle mode fixes for RW dummy.
|
||||
|
||||
## Added
|
||||
|
||||
- Add `MGT_OVERHEATING` event and fallback to system SAFE mode if the MGT is overheating for
|
||||
whatever reason.
|
||||
|
||||
## Changed
|
||||
|
||||
- Low-pass filters can no longer be executed if no actual data is available.
|
||||
|
||||
# [v2.0.2] 2023-04-16
|
||||
|
||||
- Bump patch version to 2.
|
||||
|
||||
# [v2.0.1] 2023-04-16
|
||||
|
||||
- eive-tmtc: v3.1.0
|
||||
|
||||
# [v2.0.0] 2023-04-16
|
||||
|
||||
This is the version which will fly on the satellite for the initial launch phase.
|
||||
|
||||
- q7s-package: v2.5.0
|
||||
- eive-tmtc: v3.0.0
|
||||
- `wire` library is now on version v10.7 as well.
|
||||
|
||||
## Added
|
||||
|
||||
- Added `mv`, `cp` and `rm` action helpers for the core controller for common filesystem operations.
|
||||
- Extended directory listing helpers. There is now a directory listing helper which dumps the
|
||||
directory listing as an action data reply immediately. For smaller directory listings, this
|
||||
allows a listing without requiring a separate file downlink (which also has not been implemented
|
||||
yet)
|
||||
|
||||
## Changed
|
||||
|
||||
- The directory listing action commands now allow compressing of either the target output file
|
||||
for the directory listing into file action command, or compression in the helper which dumps
|
||||
the directory listing directly.
|
||||
|
||||
# [v1.45.0] 2023-04-14
|
||||
|
||||
- q7s-package: v2.5.0
|
||||
- eive-tmtc: v3.0.0
|
||||
- STR firmware was updated to v10.7. `wire` library still needs to be updated.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Small fix for `install-obsw-yocto.sh` script
|
||||
- Bugfix for STR firmware update procedure where the last remaining
|
||||
bytes were not written properly.
|
||||
- Bugfix for STR where an invalid reply was received for special requests
|
||||
like firmware updates.
|
||||
- Bugfix for shell command executors in command controller which lead to a crash.
|
||||
- Important bugfix for STR solution set. Missing STR mode u8 parameter.
|
||||
- Fix for STR image download.
|
||||
- Possible fix for STR image upload.
|
||||
- Fixed regression where the reply result for ACS board and SUS board devices was set to FAILED
|
||||
even when going to OFF mode. In that case, it has to be set to OK so the device handler can
|
||||
complete the OFF transition.
|
||||
|
||||
## Changed
|
||||
|
||||
- STR `wire` library updated to v10.3. Submodule renamed to `sagittactl`.
|
||||
- Custom FDIR for TMP1075 sensors. The device handlers reject `NEEDS_RECOVERY` health commands
|
||||
anyway, so it does not really make sense to use the default FDIR.
|
||||
- Reject `NEEDS_RECOVERY` health commands for the heater health devices.
|
||||
- Adapted some queue sizes so that EM startup works without queue errors
|
||||
- Event Manager: 120 -> 160
|
||||
- UDP TMTC Bridge: 50 -> 120
|
||||
- TCP TMTC Bridge: 50 -> 120
|
||||
- Service 5: 120 -> 160, number of events handled in one cycle increased to 80
|
||||
- EM: PCDU dummy is not a device handler anymore, but a custom power switcher object. This avoids
|
||||
some issues where the event manager could not send an event message to the PCDU dummy because
|
||||
the FDIR event queue was too small.
|
||||
|
||||
## Added
|
||||
|
||||
- Add a way for the MAX31865 RTD handlers to recognize faulty/broken/off sensor devices.
|
||||
- Add parameter interface for core controller
|
||||
- Allow setting the preferred SD card via the new parameter interface of the core controller
|
||||
with domain ID 0 and unque ID 0.
|
||||
- Added action commands to reset the PDEC. Also added autonomous reset handling for the PDEC,
|
||||
because there is no way so send TCs with a faulty PDEC.
|
||||
- Added `I2C_REBOOT` and `PDEC_REBOOT` events for EIVE system component to ensure ground gets
|
||||
informed.
|
||||
|
||||
## ACS
|
||||
|
||||
- Commanding from ACS Controller is now enabled.
|
||||
- Safe Controller was reverted to FLP Design. This also introduces safe mode strategies.
|
||||
They contain what the controller does and which data it uses. The controller will
|
||||
automatically based on the available data decide on which strategy to use. If a strategy
|
||||
is undesirable (e.g. the MEKF should not be used) this can be handeld via setting parameters.
|
||||
|
||||
# [v1.44.1] 2023-04-12
|
||||
|
||||
- eive-tmtc: v2.22.1
|
||||
|
||||
## Fixed
|
||||
|
||||
- Bugfixes and improvements for SDC state machine. Internal state was not updated correctly due
|
||||
to a regression, so commanding the SDC state machine externally lead to confusing results.
|
||||
- Heater states array in TCS controller was too small.
|
||||
- Fixed a bug in persistent TM store, where the active file was not reset of SD card switches.
|
||||
SD card switch from 0 to 1 and vice-versa works without errors from persistent TM stores now.
|
||||
- Add a way for the SUS polling to detect broken or off devices by checking the retrieved
|
||||
temperature for the all-ones value (0x0fff).
|
||||
- Better reply result handling for the ACS board devices.
|
||||
- ADIS1650X initial timeout handling now performed in device handler.
|
||||
- The RW assembly and TCS board assembly now perform proper power switch handling for their
|
||||
recovery handling.
|
||||
|
||||
## Changed
|
||||
|
||||
- Added additional logic for SDC state machine so that the SD cards are marked unusable when
|
||||
the active SD card is switched or there is a transition from hot redundant to cold redundant mode.
|
||||
This gives other tasks some time to register the SD cards being unusable, and therefore provides
|
||||
a way for them to perform any re-initialization tasks necessary after SD card switches.
|
||||
- TCS controller now only has an OFF mode and an ON mode
|
||||
- The TCS controller pauses operations related to the TCS board assembly (reading sensors and
|
||||
the primary control loop) while a TCS board recovery is on-going.
|
||||
- Allow specifying custom OBSW update filename. This allowed keeping a cleaner file structure
|
||||
where each update has a name including the version
|
||||
- The files extracted during an update process are deleted after the update was performed to keep
|
||||
the update directory cleaner.
|
||||
|
||||
## Added
|
||||
|
||||
- TCS controller: SUBMODE_NO_HEATER_CTRL (1) added for ON mode. If this submode is
|
||||
commanded, all heaters will be switched off and then no further heater
|
||||
commanding will be done.
|
||||
- Fixed a bug in persistent TM store, where the active file was not reset of SD card switches.
|
||||
SD card switch from 0 to 1 and vice-versa works without errors from persistent TM stores now.
|
||||
|
||||
# [v1.44.0] 2023-04-07
|
||||
|
||||
- eive-tmtc: v2.22.0
|
||||
|
||||
## Added
|
||||
|
||||
- Special I2C recovery handling. If the I2C bus is unavailable for whatever reason, the EIVE
|
||||
system component will power-cycle all I2C devices by first going to the OFF/BOOT mode, then
|
||||
power-cycling the 3V3 stack and rebooting the battery, and finally going back to safe mode.
|
||||
If this does not restore the bus, a full reboot will be performed. This special sequence can
|
||||
be commanded as well.
|
||||
|
||||
## Fixed
|
||||
|
||||
- RW Assembly: Correctly transition back to off when more than 1 devices is OFF. Also do this
|
||||
when this was due to two devices being marked faulty.
|
||||
- RW dummy and STR dummy components: Set/Update modes correctly.
|
||||
- RW handlers: Bugfix for TM set retrieval and special request handling in general where the CRC
|
||||
check always failed for special request. Also removed an unnecessary delay for special requests.
|
||||
- RW handlers: Polling is now disabled for RWs which are off.
|
||||
|
||||
## Changed
|
||||
|
||||
- RW shutdown now waits for the speed to be near 0 or for a OFF transition countdown to be expired
|
||||
before going to off.
|
||||
|
||||
# [v1.43.2] 2023-04-05
|
||||
|
||||
## Changed
|
||||
|
||||
- Adapted HK data rates to new table for LEOP SAFE mode.
|
||||
- GPS controller HK is now generated periodically as well.
|
||||
- Better mode combination checks for assembly components. This includes:
|
||||
- IMTQ assembly
|
||||
- Syrlinks assembly
|
||||
- Dual Lane Assembly
|
||||
- RWs are no longer commanded by the ACS Controller during safe mode. Instead the RW speed command
|
||||
is set to 0 as part or the `doShutDown` of the RW handler.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Dual lane assemblies: Fix handling when health states are overwritten. Also add better handling
|
||||
when some devices are permanent faulty and some are only faulty. In that case, only the faulty
|
||||
devices will be restored.
|
||||
- ACS dual lane assembly: Gyro 3 helper mode was assigned to the Gyro 2 mode.
|
||||
|
||||
# [v1.43.1] 2023-04-04
|
||||
|
||||
## Fixed
|
||||
|
||||
- Generic HK handling: Bug where HKs were generated a lot more often than required. This is the case
|
||||
if a device handler `PERFORM_OPERATION` step is performed more than once per PST cycle.
|
||||
- Syrlinks now goes to `_MODE_TO_ON` when finishing the `doStartUp` transition.
|
||||
|
||||
## Changed
|
||||
|
||||
- Doubled GS PST interval instead of scheduling everything twice.
|
||||
- Syrlinks now only has one `PERFORM_OPERATION` step, but still has two communication steps.
|
||||
- PCDU components only allow setting `NEEDS_RECOVERY`, `HEALTHY` and `EXTERNAL_CONTROL` health
|
||||
states now. TMP sensor components only allow `HEALTHY` , `EXTERNAL_CONTROL`, `FAULTY` and
|
||||
`PERMANENT_FAULTY`.
|
||||
- TCS controller now does a sanity check on the temperature values: Values below -80 C or above
|
||||
160 C are ignored.
|
||||
|
||||
# [v1.43.0] 2023-04-04
|
||||
|
||||
- q7s-package: v2.4.0
|
||||
- eive-tmtc: v2.21.0
|
||||
|
||||
## Added
|
||||
|
||||
- Version of thermal controller which performs basic control tasks.
|
||||
- PCDU handler can now command switch of the 3V3 stack (switch ID 19)
|
||||
- Set STR dev to OFF in assembly when it is faulty.
|
||||
- STR: Reset data link layer and flush RX for regular commands and before performing special
|
||||
commands to ensure consistent start state
|
||||
|
||||
## Fixed
|
||||
|
||||
- PTME was not reset after configuration changes.
|
||||
- GPS health devices: ACS board assembly not reacts to health changes.
|
||||
- STR COM helper: Reset reply size after returning a reply
|
||||
|
||||
## Changed
|
||||
|
||||
- Poll threshold configuration of the PTME IP core is now configurable via a parameter command
|
||||
and is set to 0b010 (4 polls) instead of 0b001 (1 poll) per default.
|
||||
- EIVE system fallback and COM system fallback: Perform general subsystem handling first, then
|
||||
event reception, and finally any new transition handling.
|
||||
- IMTQ MGM integration time lowered to 6 ms. This relaxes scheduling requirements a bit.
|
||||
- PCDU handler switcher HK set now has additional 3V3 switcher state HK.
|
||||
|
||||
# [v1.42.0] 2023-04-01
|
||||
|
||||
- eive-tmtc: v2.20.1
|
||||
- q7s-package: v2.3.0
|
||||
|
||||
## Changed
|
||||
|
||||
- SCEX filename updates. Also use T as the file ID / date separator between date and time.
|
||||
- COM TM store and dump handling: Introduce modes for all 4 TM VC/store tasks. The OFF mode can be
|
||||
used to disable ongoing dumps or to prevent writes to the PTME VC. This allows cleaner reset
|
||||
handling of the PTME. All 4 VC/store tasks were attached to the COM mode tree and are commanded
|
||||
as part of the COM sequence as well to ensure consistent state with the CCSDS IP core handler.
|
||||
- Added `PTME_LOCKED` boolean lock which is used to lock the PTME so it is not used by the VC tasks
|
||||
anymore. This lock will be controlled by the CCSDS IP core handler and is locked when the PTME
|
||||
needs to be reset. Examples for this are datarate changes.
|
||||
- Simulate real PCDU in PCDU dummy by remembering commandes switch change and triggering appropriate
|
||||
events. Switch feedback is still immediate.
|
||||
- GomSpace devices are polled with a doubled frequency. This speeds up power switch commanding.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Bugfix for side lane transitions of the dual lane assemblies, which only worked when the
|
||||
assembly was directly commanded.
|
||||
- Syrlinks Handler: Bugfix so transition command is only sent once.
|
||||
- SCEX file name bug: Create file name time stamp with `strftime` similarly to how it's done
|
||||
for the persistent TM store.
|
||||
|
||||
## Added
|
||||
|
||||
- Added GPS0 and GPS1 health device which are used by the ACS board assembly when deciding whether
|
||||
to change to the other side or to go to dual side directly. Setting the health devices to faulty
|
||||
should also trigger a side switch or a switch to dual mode.
|
||||
|
||||
# [v1.41.0] 2023-03-28
|
||||
|
||||
eive-tmtc: v2.20.0
|
||||
q7s-package: v2.2.0
|
||||
- eive-tmtc: v2.20.0
|
||||
- q7s-package: v2.2.0
|
||||
|
||||
## Fixed
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
# ##############################################################################
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
set(OBSW_VERSION_MAJOR 1)
|
||||
set(OBSW_VERSION_MINOR 41)
|
||||
set(OBSW_VERSION_MAJOR 5)
|
||||
set(OBSW_VERSION_MINOR 0)
|
||||
set(OBSW_VERSION_REVISION 0)
|
||||
|
||||
# set(CMAKE_VERBOSE TRUE)
|
||||
@ -79,12 +79,19 @@ else()
|
||||
set(INIT_VAL 1)
|
||||
set(OBSW_STAR_TRACKER_GROUND_CONFIG 0)
|
||||
endif()
|
||||
|
||||
set(OBSW_ADD_TMTC_TCP_SERVER
|
||||
${OBSW_Q7S_EM}
|
||||
CACHE STRING "Add TCP TMTC Server")
|
||||
set(OBSW_ADD_TMTC_UDP_SERVER
|
||||
0
|
||||
CACHE STRING "Add UDP TMTC Server")
|
||||
set(OBSW_ADD_MGT
|
||||
${INIT_VAL}
|
||||
CACHE STRING "Add MGT module")
|
||||
set(OBSW_ADD_BPX_BATTERY_HANDLER
|
||||
${INIT_VAL}
|
||||
CACHE STRING "Add MGT module")
|
||||
1
|
||||
CACHE STRING "Add BPX battery module")
|
||||
set(OBSW_ADD_STAR_TRACKER
|
||||
${INIT_VAL}
|
||||
CACHE STRING "Add Startracker module")
|
||||
@ -94,6 +101,9 @@ set(OBSW_ADD_SUN_SENSORS
|
||||
set(OBSW_ADD_SUS_BOARD_ASS
|
||||
${INIT_VAL}
|
||||
CACHE STRING "Add sun sensor board assembly")
|
||||
set(OBSW_ADD_THERMAL_TEMP_INSERTER
|
||||
${OBSW_Q7S_EM}
|
||||
CACHE STRING "Add thermal sensor temperature inserter")
|
||||
set(OBSW_ADD_ACS_BOARD
|
||||
${INIT_VAL}
|
||||
CACHE STRING "Add ACS board module")
|
||||
@ -113,7 +123,7 @@ set(OBSW_ADD_TCS_CTRL
|
||||
1
|
||||
CACHE STRING "Add TCS controllers")
|
||||
set(OBSW_ADD_HEATERS
|
||||
${INIT_VAL}
|
||||
1
|
||||
CACHE STRING "Add TCS heaters")
|
||||
set(OBSW_ADD_PLOC_SUPERVISOR
|
||||
${INIT_VAL}
|
||||
@ -143,8 +153,11 @@ set(OBSW_ADD_TMP_DEVICES
|
||||
${INIT_VAL}
|
||||
CACHE STRING "Add TMP devices")
|
||||
set(OBSW_ADD_GOMSPACE_PCDU
|
||||
${INIT_VAL}
|
||||
1
|
||||
CACHE STRING "Add GomSpace PCDU modules")
|
||||
set(OBSW_ADD_GOMSPACE_ACU
|
||||
${INIT_VAL}
|
||||
CACHE STRING "Add GomSpace ACU submodule")
|
||||
set(OBSW_ADD_RW
|
||||
${INIT_VAL}
|
||||
CACHE STRING "Add RW modules")
|
||||
@ -220,7 +233,7 @@ set(LIB_EIVE_MISSION_PATH mission)
|
||||
set(LIB_ETL_PATH ${THIRD_PARTY_FOLDER}/etl)
|
||||
set(LIB_CATCH2_PATH ${THIRD_PARTY_FOLDER}/Catch2)
|
||||
set(LIB_LWGPS_PATH ${THIRD_PARTY_FOLDER}/lwgps)
|
||||
set(LIB_ARCSEC_PATH ${THIRD_PARTY_FOLDER}/arcsec_star_tracker)
|
||||
set(LIB_ARCSEC_PATH ${THIRD_PARTY_FOLDER}/sagittactl)
|
||||
set(LIB_JSON_PATH ${THIRD_PARTY_FOLDER}/json)
|
||||
|
||||
set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF)
|
||||
@ -486,7 +499,8 @@ endif()
|
||||
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_FSFW_NAME}
|
||||
${LIB_OS_NAME})
|
||||
|
||||
target_link_libraries(${LIB_DUMMIES} PUBLIC ${LIB_FSFW_NAME} ${LIB_JSON_NAME})
|
||||
target_link_libraries(${LIB_DUMMIES} PUBLIC ${LIB_EIVE_MISSION}
|
||||
${LIB_FSFW_NAME} ${LIB_JSON_NAME})
|
||||
|
||||
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_EIVE_MISSION} ${LIB_DUMMIES})
|
||||
|
||||
|
18
README.md
18
README.md
@ -99,11 +99,21 @@ When using Windows, run theses steps in MSYS2.
|
||||
git submodule update --init
|
||||
```
|
||||
|
||||
3. Ensure that the cross-compiler is working with `arm-linux-gnueabihf-gcc --version` and that
|
||||
3. Create two system variables to pass the system root path and the cross-compiler path to the
|
||||
build system. You only need to do this once when setting up the build system.
|
||||
Example for Unix:
|
||||
|
||||
```sh
|
||||
export CROSS_COMPILE_BIN_PATH=<absolutePathToCrossCompilerBinPath>
|
||||
export ZYNQ_7020_SYSROOT=<absolutePathToSysroot>
|
||||
```
|
||||
|
||||
4. Ensure that the cross-compiler is working with
|
||||
`${CROSS_COMPILE_BIN_PATH}/arm-linux-gnueabihf-gcc --version` and that
|
||||
the sysroot environmental variables have been set like specified in the
|
||||
[root filesystem chapter](#sysroot).
|
||||
|
||||
4. Run the CMake configuration to create the build system in a `build-Debug-Q7S` folder.
|
||||
5. Run the CMake configuration to create the build system in a `build-Debug-Q7S` folder.
|
||||
Add `-G "MinGW Makefiles` in MinGW64 on Windows.
|
||||
|
||||
```sh
|
||||
@ -112,7 +122,7 @@ When using Windows, run theses steps in MSYS2.
|
||||
cmake --build . -j
|
||||
```
|
||||
|
||||
You can also use provided shell scripts to perform these commands.
|
||||
Please note that you can also use provided shell scripts to perform these commands.
|
||||
```sh
|
||||
cp scripts/q7s-env.sh ..
|
||||
cp scripts/q7s-env-em.sh ..
|
||||
@ -144,7 +154,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
|
||||
6. Build the software with
|
||||
|
||||
```sh
|
||||
cd cmake-build-debug-q7s
|
||||
|
6
automation/Jenkinsfile
vendored
6
automation/Jenkinsfile
vendored
@ -22,7 +22,7 @@ pipeline {
|
||||
steps {
|
||||
dir(BUILDDIR_Q7S) {
|
||||
sh 'cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug ..'
|
||||
sh 'cmake --build . -j6'
|
||||
sh 'cmake --build . -j8'
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -30,7 +30,7 @@ pipeline {
|
||||
steps {
|
||||
dir(BUILDDIR_Q7S_EM) {
|
||||
sh 'cmake -DTGT_BSP="arm/q7s" -DEIVE_Q7S_EM=ON -DCMAKE_BUILD_TYPE=Debug ..'
|
||||
sh 'cmake --build . -j6'
|
||||
sh 'cmake --build . -j8'
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -38,7 +38,7 @@ pipeline {
|
||||
steps {
|
||||
dir(BUILDDIR_LINUX) {
|
||||
sh 'cmake ..'
|
||||
sh 'cmake --build . -j6'
|
||||
sh 'cmake --build . -j8'
|
||||
sh './eive-unittest'
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "../mission/utility/DummySdCardManager.h"
|
||||
#include "OBSWConfig.h"
|
||||
#include "fsfw/platform.h"
|
||||
#include "fsfw/power/PowerSwitchIF.h"
|
||||
#include "fsfw_tests/integration/task/TestTask.h"
|
||||
|
||||
#if OBSW_ADD_TMTC_UDP_SERVER == 1
|
||||
@ -29,7 +30,7 @@
|
||||
#include <dummies/AcuDummy.h>
|
||||
#include <dummies/CoreControllerDummy.h>
|
||||
|
||||
#include "dummies/helpers.h"
|
||||
#include "dummies/helperFactory.h"
|
||||
|
||||
#ifdef PLATFORM_UNIX
|
||||
#include <fsfw_hal/linux/serial/SerialComIF.h>
|
||||
@ -38,7 +39,7 @@
|
||||
#include "devices/gpioIds.h"
|
||||
#include "fsfw_hal/linux/gpio/Gpio.h"
|
||||
#include "linux/payload/PlocMpsocHandler.h"
|
||||
#include "linux/payload/PlocMpsocHelper.h"
|
||||
#include "linux/payload/PlocMpsocSpecialComHelper.h"
|
||||
#include "linux/payload/PlocSupervisorHandler.h"
|
||||
#include "linux/payload/PlocSupvUartMan.h"
|
||||
#include "test/gpio/DummyGpioIF.h"
|
||||
@ -61,12 +62,23 @@ void ObjectFactory::produce(void* args) {
|
||||
StorageManagerIF* tmStore;
|
||||
StorageManagerIF* ipcStore;
|
||||
PersistentTmStores persistentStores;
|
||||
bool enableHkSets = false;
|
||||
#if OBSW_ENABLE_PERIODIC_HK == 1
|
||||
enableHkSets = true;
|
||||
#endif
|
||||
auto sdcMan = new DummySdCardManager("/tmp");
|
||||
ObjectFactory::produceGenericObjects(nullptr, &pusFunnel, &cfdpFunnel, *sdcMan, &ipcStore,
|
||||
&tmStore, persistentStores);
|
||||
&tmStore, persistentStores, 120);
|
||||
|
||||
new TmFunnelHandler(objects::LIVE_TM_TASK, *pusFunnel, *cfdpFunnel);
|
||||
auto* dummyGpioIF = new DummyGpioIF();
|
||||
auto* dummySwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
|
||||
std::vector<ReturnValue_t> switcherList;
|
||||
auto initVal = PowerSwitchIF::SWITCH_OFF;
|
||||
for (unsigned i = 0; i < 18; i++) {
|
||||
switcherList.emplace_back(initVal);
|
||||
}
|
||||
dummySwitcher->setInitialSwitcherList(switcherList);
|
||||
#ifdef PLATFORM_UNIX
|
||||
new SerialComIF(objects::UART_COM_IF);
|
||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||
@ -74,8 +86,8 @@ void ObjectFactory::produce(void* args) {
|
||||
auto mpsocCookie = new UartCookie(objects::PLOC_MPSOC_HANDLER, mpscoDev, 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,
|
||||
auto plocMpsocHelper = new PlocMpsocSpecialComHelper(objects::PLOC_MPSOC_HELPER);
|
||||
new PlocMpsocHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocCookie,
|
||||
plocMpsocHelper, Gpio(gpioIds::ENABLE_MPSOC_UART, dummyGpioIF),
|
||||
objects::PLOC_SUPERVISOR_HANDLER);
|
||||
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
|
||||
@ -93,7 +105,7 @@ void ObjectFactory::produce(void* args) {
|
||||
#endif
|
||||
|
||||
dummy::DummyCfg cfg;
|
||||
dummy::createDummies(cfg, *dummySwitcher, dummyGpioIF);
|
||||
dummy::createDummies(cfg, *dummySwitcher, dummyGpioIF, enableHkSets);
|
||||
|
||||
HeaterHandler* heaterHandler = nullptr;
|
||||
// new ThermalController(objects::THERMAL_CONTROLLER);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 283 translations.
|
||||
* @brief Auto-generated event translation file. Contains 296 translations.
|
||||
* @details
|
||||
* Generated on: 2023-03-28 22:20:01
|
||||
* Generated on: 2023-06-21 19:01:02
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -97,6 +97,7 @@ const char *SAFE_RATE_RECOVERY_STRING = "SAFE_RATE_RECOVERY";
|
||||
const char *MULTIPLE_RW_INVALID_STRING = "MULTIPLE_RW_INVALID";
|
||||
const char *MEKF_INVALID_INFO_STRING = "MEKF_INVALID_INFO";
|
||||
const char *MEKF_RECOVERY_STRING = "MEKF_RECOVERY";
|
||||
const char *MEKF_AUTOMATIC_RESET_STRING = "MEKF_AUTOMATIC_RESET";
|
||||
const char *MEKF_INVALID_MODE_VIOLATION_STRING = "MEKF_INVALID_MODE_VIOLATION";
|
||||
const char *SAFE_MODE_CONTROLLER_FAILURE_STRING = "SAFE_MODE_CONTROLLER_FAILURE";
|
||||
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
|
||||
@ -160,8 +161,11 @@ const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC";
|
||||
const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS";
|
||||
const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC";
|
||||
const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC";
|
||||
const char *PDEC_TRYING_RESET_WITH_INIT_STRING = "PDEC_TRYING_RESET_WITH_INIT";
|
||||
const char *PDEC_TRYING_RESET_NO_INIT_STRING = "PDEC_TRYING_RESET_NO_INIT";
|
||||
const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
|
||||
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED";
|
||||
const char *PDEC_INIT_FAILED_STRING = "PDEC_INIT_FAILED";
|
||||
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
|
||||
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
|
||||
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
|
||||
@ -193,6 +197,10 @@ const char *MPSOC_EXE_INVALID_APID_STRING = "MPSOC_EXE_INVALID_APID";
|
||||
const char *MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING = "MPSOC_HELPER_SEQ_CNT_MISMATCH";
|
||||
const char *MPSOC_TM_SIZE_ERROR_STRING = "MPSOC_TM_SIZE_ERROR";
|
||||
const char *MPSOC_TM_CRC_MISSMATCH_STRING = "MPSOC_TM_CRC_MISSMATCH";
|
||||
const char *MPSOC_FLASH_READ_PACKET_ERROR_STRING = "MPSOC_FLASH_READ_PACKET_ERROR";
|
||||
const char *MPSOC_FLASH_READ_FAILED_STRING = "MPSOC_FLASH_READ_FAILED";
|
||||
const char *MPSOC_FLASH_READ_SUCCESSFUL_STRING = "MPSOC_FLASH_READ_SUCCESSFUL";
|
||||
const char *MPSOC_READ_TIMEOUT_STRING = "MPSOC_READ_TIMEOUT";
|
||||
const char *TRANSITION_BACK_TO_OFF_STRING = "TRANSITION_BACK_TO_OFF";
|
||||
const char *NEG_V_OUT_OF_BOUNDS_STRING = "NEG_V_OUT_OF_BOUNDS";
|
||||
const char *U_DRO_OUT_OF_BOUNDS_STRING = "U_DRO_OUT_OF_BOUNDS";
|
||||
@ -209,11 +217,11 @@ const char *TRANSITION_OTHER_SIDE_FAILED_STRING = "TRANSITION_OTHER_SIDE_FAILED"
|
||||
const char *NOT_ENOUGH_DEVICES_DUAL_MODE_STRING = "NOT_ENOUGH_DEVICES_DUAL_MODE";
|
||||
const char *POWER_STATE_MACHINE_TIMEOUT_STRING = "POWER_STATE_MACHINE_TIMEOUT";
|
||||
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_STRING = "SIDE_SWITCH_TRANSITION_NOT_ALLOWED";
|
||||
const char *DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY_STRING = "DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY";
|
||||
const char *TRANSITION_OTHER_SIDE_FAILED_12900_STRING = "TRANSITION_OTHER_SIDE_FAILED_12900";
|
||||
const char *NOT_ENOUGH_DEVICES_DUAL_MODE_12901_STRING = "NOT_ENOUGH_DEVICES_DUAL_MODE_12901";
|
||||
const char *POWER_STATE_MACHINE_TIMEOUT_12902_STRING = "POWER_STATE_MACHINE_TIMEOUT_12902";
|
||||
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903_STRING =
|
||||
"SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903";
|
||||
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903_STRING = "SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903";
|
||||
const char *CHILDREN_LOST_MODE_STRING = "CHILDREN_LOST_MODE";
|
||||
const char *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE";
|
||||
const char *CANT_GET_FIX_STRING = "CANT_GET_FIX";
|
||||
@ -266,14 +274,18 @@ const char *VERSION_INFO_STRING = "VERSION_INFO";
|
||||
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
||||
const char *REBOOT_COUNTER_STRING = "REBOOT_COUNTER";
|
||||
const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
||||
const char *I2C_UNAVAILABLE_REBOOT_STRING = "I2C_UNAVAILABLE_REBOOT";
|
||||
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
||||
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
||||
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
||||
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
|
||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||
const char *PLOC_OVERHEATING_STRING = "PLOC_OVERHEATING";
|
||||
const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
|
||||
const char *HPA_OVERHEATING_STRING = "HPA_OVERHEATING";
|
||||
const char *PLPCDU_OVERHEATING_STRING = "PLPCDU_OVERHEATING";
|
||||
const char *CAMERA_OVERHEATING_STRING = "CAMERA_OVERHEATING";
|
||||
const char *PCDU_SYSTEM_OVERHEATING_STRING = "PCDU_SYSTEM_OVERHEATING";
|
||||
const char *HEATER_NOT_OFF_FOR_OFF_MODE_STRING = "HEATER_NOT_OFF_FOR_OFF_MODE";
|
||||
const char *MGT_OVERHEATING_STRING = "MGT_OVERHEATING";
|
||||
const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED";
|
||||
const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON";
|
||||
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
|
||||
@ -477,8 +489,10 @@ const char *translateEvents(Event event) {
|
||||
case (11204):
|
||||
return MEKF_RECOVERY_STRING;
|
||||
case (11205):
|
||||
return MEKF_INVALID_MODE_VIOLATION_STRING;
|
||||
return MEKF_AUTOMATIC_RESET_STRING;
|
||||
case (11206):
|
||||
return MEKF_INVALID_MODE_VIOLATION_STRING;
|
||||
case (11207):
|
||||
return SAFE_MODE_CONTROLLER_FAILURE_STRING;
|
||||
case (11300):
|
||||
return SWITCH_CMD_SENT_STRING;
|
||||
@ -603,9 +617,15 @@ const char *translateEvents(Event event) {
|
||||
case (12409):
|
||||
return WRITE_SYSCALL_ERROR_PDEC_STRING;
|
||||
case (12410):
|
||||
return PDEC_RESET_FAILED_STRING;
|
||||
return PDEC_TRYING_RESET_WITH_INIT_STRING;
|
||||
case (12411):
|
||||
return PDEC_TRYING_RESET_NO_INIT_STRING;
|
||||
case (12412):
|
||||
return PDEC_RESET_FAILED_STRING;
|
||||
case (12413):
|
||||
return OPEN_IRQ_FILE_FAILED_STRING;
|
||||
case (12414):
|
||||
return PDEC_INIT_FAILED_STRING;
|
||||
case (12500):
|
||||
return IMAGE_UPLOAD_FAILED_STRING;
|
||||
case (12501):
|
||||
@ -668,6 +688,14 @@ const char *translateEvents(Event event) {
|
||||
return MPSOC_TM_SIZE_ERROR_STRING;
|
||||
case (12613):
|
||||
return MPSOC_TM_CRC_MISSMATCH_STRING;
|
||||
case (12614):
|
||||
return MPSOC_FLASH_READ_PACKET_ERROR_STRING;
|
||||
case (12615):
|
||||
return MPSOC_FLASH_READ_FAILED_STRING;
|
||||
case (12616):
|
||||
return MPSOC_FLASH_READ_SUCCESSFUL_STRING;
|
||||
case (12617):
|
||||
return MPSOC_READ_TIMEOUT_STRING;
|
||||
case (12700):
|
||||
return TRANSITION_BACK_TO_OFF_STRING;
|
||||
case (12701):
|
||||
@ -700,6 +728,8 @@ const char *translateEvents(Event event) {
|
||||
return POWER_STATE_MACHINE_TIMEOUT_STRING;
|
||||
case (12803):
|
||||
return SIDE_SWITCH_TRANSITION_NOT_ALLOWED_STRING;
|
||||
case (12804):
|
||||
return DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY_STRING;
|
||||
case (12900):
|
||||
return TRANSITION_OTHER_SIDE_FAILED_12900_STRING;
|
||||
case (12901):
|
||||
@ -813,21 +843,29 @@ const char *translateEvents(Event event) {
|
||||
case (14008):
|
||||
return INDIVIDUAL_BOOT_COUNTS_STRING;
|
||||
case (14010):
|
||||
return I2C_UNAVAILABLE_REBOOT_STRING;
|
||||
return TRYING_I2C_RECOVERY_STRING;
|
||||
case (14011):
|
||||
return I2C_REBOOT_STRING;
|
||||
case (14012):
|
||||
return PDEC_REBOOT_STRING;
|
||||
case (14013):
|
||||
return FIRMWARE_INFO_STRING;
|
||||
case (14100):
|
||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||
case (14101):
|
||||
return NO_HEALTHY_HEATER_AVAILABLE_STRING;
|
||||
case (14102):
|
||||
return SYRLINKS_OVERHEATING_STRING;
|
||||
case (14103):
|
||||
return PLOC_OVERHEATING_STRING;
|
||||
case (14104):
|
||||
return OBC_OVERHEATING_STRING;
|
||||
case (14105):
|
||||
return HPA_OVERHEATING_STRING;
|
||||
return CAMERA_OVERHEATING_STRING;
|
||||
case (14106):
|
||||
return PLPCDU_OVERHEATING_STRING;
|
||||
return PCDU_SYSTEM_OVERHEATING_STRING;
|
||||
case (14107):
|
||||
return HEATER_NOT_OFF_FOR_OFF_MODE_STRING;
|
||||
case (14108):
|
||||
return MGT_OVERHEATING_STRING;
|
||||
case (14201):
|
||||
return TX_TIMER_EXPIRED_STRING;
|
||||
case (14202):
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 169 translations.
|
||||
* Generated on: 2023-03-28 22:20:01
|
||||
* Contains 171 translations.
|
||||
* Generated on: 2023-06-21 19:01:02
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
@ -38,6 +38,8 @@ const char *GYRO_3_L3G_HANDLER_STRING = "GYRO_3_L3G_HANDLER";
|
||||
const char *RW4_STRING = "RW4";
|
||||
const char *STAR_TRACKER_STRING = "STAR_TRACKER";
|
||||
const char *GPS_CONTROLLER_STRING = "GPS_CONTROLLER";
|
||||
const char *GPS_0_HEALTH_DEV_STRING = "GPS_0_HEALTH_DEV";
|
||||
const char *GPS_1_HEALTH_DEV_STRING = "GPS_1_HEALTH_DEV";
|
||||
const char *IMTQ_POLLING_STRING = "IMTQ_POLLING";
|
||||
const char *IMTQ_HANDLER_STRING = "IMTQ_HANDLER";
|
||||
const char *PCDU_HANDLER_STRING = "PCDU_HANDLER";
|
||||
@ -242,6 +244,10 @@ const char *translateObject(object_id_t object) {
|
||||
return STAR_TRACKER_STRING;
|
||||
case 0x44130045:
|
||||
return GPS_CONTROLLER_STRING;
|
||||
case 0x44130046:
|
||||
return GPS_0_HEALTH_DEV_STRING;
|
||||
case 0x44130047:
|
||||
return GPS_1_HEALTH_DEV_STRING;
|
||||
case 0x44140013:
|
||||
return IMTQ_POLLING_STRING;
|
||||
case 0x44140014:
|
||||
|
@ -59,19 +59,15 @@ void scheduling::initTasks() {
|
||||
"DIST", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||
ReturnValue_t result = tmtcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "adding CCSDS distributor failed" << std::endl;
|
||||
sif::error << "Adding CCSDS distributor failed" << std::endl;
|
||||
}
|
||||
result = tmtcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "adding PUS distributor failed" << std::endl;
|
||||
}
|
||||
result = tmtcDistributor->addComponent(objects::TM_FUNNEL);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "adding TM funnel failed" << std::endl;
|
||||
sif::error << "Adding PUS distributor failed" << std::endl;
|
||||
}
|
||||
result = tmtcDistributor->addComponent(objects::CFDP_DISTRIBUTOR);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "adding CFDP distributor failed" << std::endl;
|
||||
sif::error << "Adding CFDP distributor failed" << std::endl;
|
||||
}
|
||||
result = tmtcDistributor->addComponent(objects::UDP_TMTC_SERVER);
|
||||
if (result != returnvalue::OK) {
|
||||
@ -95,6 +91,13 @@ void scheduling::initTasks() {
|
||||
sif::error << "Add component UDP Polling failed" << std::endl;
|
||||
}
|
||||
|
||||
PeriodicTaskIF* liveTmTask = factory->createPeriodicTask(
|
||||
"LIVE_TM", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, nullptr, &RR_SCHEDULING);
|
||||
result = liveTmTask->addComponent(objects::LIVE_TM_TASK);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("LIVE_TM", objects::LIVE_TM_TASK);
|
||||
}
|
||||
|
||||
PeriodicTaskIF* pusHighPrio = factory->createPeriodicTask(
|
||||
"PUS_HIGH_PRIO", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
||||
@ -149,13 +152,16 @@ void scheduling::initTasks() {
|
||||
"THERMAL_CTL_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||
result = thermalTask->addComponent(objects::CORE_CONTROLLER);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER);
|
||||
scheduling::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
|
||||
}
|
||||
|
||||
result = thermalTask->addComponent(objects::THERMAL_CONTROLLER);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
|
||||
}
|
||||
result = thermalTask->addComponent(objects::HEATER_HANDLER);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("HEATER_HANDLER", objects::HEATER_HANDLER);
|
||||
}
|
||||
|
||||
FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask(
|
||||
"DUMMY_PST", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
||||
@ -193,7 +199,8 @@ void scheduling::initTasks() {
|
||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||
|
||||
PeriodicTaskIF* dummyTask = factory->createPeriodicTask(
|
||||
"DUMMY_TASK", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||
"DUMMY_TASK", 35, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||
dummyTask->addComponent(objects::THERMAL_TEMP_INSERTER);
|
||||
scheduling::scheduleTmpTempSensors(dummyTask);
|
||||
scheduling::scheduleRtdSensors(dummyTask);
|
||||
dummyTask->addComponent(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
||||
@ -213,6 +220,7 @@ void scheduling::initTasks() {
|
||||
tmtcDistributor->startTask();
|
||||
udpPollingTask->startTask();
|
||||
tcpPollingTask->startTask();
|
||||
liveTmTask->startTask();
|
||||
|
||||
pusHighPrio->startTask();
|
||||
pusMedPrio->startTask();
|
||||
|
@ -22,6 +22,9 @@
|
||||
#define OBSW_COMMAND_SAFE_MODE_AT_STARTUP 1
|
||||
|
||||
#define OBSW_ADD_GOMSPACE_PCDU @OBSW_ADD_GOMSPACE_PCDU@
|
||||
// This define is necessary because the EM setup has the P60 dock module, but no ACU on the P60
|
||||
// module because it broke.
|
||||
#define OBSW_ADD_GOMSPACE_ACU @OBSW_ADD_GOMSPACE_ACU@
|
||||
#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@
|
||||
@ -43,6 +46,9 @@
|
||||
#define OBSW_ADD_PL_PCDU @OBSW_ADD_PL_PCDU@
|
||||
#define OBSW_ADD_SYRLINKS @OBSW_ADD_SYRLINKS@
|
||||
#define OBSW_ADD_CCSDS_IP_CORES @OBSW_ADD_CCSDS_IP_CORES@
|
||||
// Only relevant for EM for TCS tests.
|
||||
#define OBSW_ADD_THERMAL_TEMP_INSERTER @OBSW_ADD_THERMAL_TEMP_INSERTER@
|
||||
|
||||
// Set to 1 if all telemetry should be sent to the PTME IP Core
|
||||
#define OBSW_TM_TO_PTME @OBSW_TM_TO_PTME@
|
||||
// Set to 1 if telecommands are received via the PDEC IP Core
|
||||
@ -61,12 +67,12 @@
|
||||
// because UDP packets are not allowed in the VPN
|
||||
// This will cause the OBSW to initialize the TMTC bridge responsible for exchanging data with the
|
||||
// CCSDS IP Cores.
|
||||
#define OBSW_ADD_TMTC_TCP_SERVER 1
|
||||
#define OBSW_ADD_TMTC_UDP_SERVER 1
|
||||
#define OBSW_ADD_TMTC_TCP_SERVER @OBSW_ADD_TMTC_TCP_SERVER@
|
||||
#define OBSW_ADD_TMTC_UDP_SERVER @OBSW_ADD_TMTC_UDP_SERVER@
|
||||
|
||||
// Can be used to switch device to NORMAL mode immediately
|
||||
#define OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP 0
|
||||
#define OBSW_PRINT_MISSED_DEADLINES 1
|
||||
#define OBSW_PRINT_MISSED_DEADLINES 0
|
||||
|
||||
#define OBSW_MPSOC_JTAG_BOOT 0
|
||||
#define OBSW_STAR_TRACKER_GROUND_CONFIG @OBSW_STAR_TRACKER_GROUND_CONFIG@
|
||||
|
@ -23,6 +23,7 @@ static constexpr char UART_SCEX_DEV[] = "/dev/scex";
|
||||
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio_pdec_regs";
|
||||
static constexpr char UIO_PTME[] = "/dev/uio_ptme";
|
||||
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio_pdec_cfg_mem";
|
||||
static constexpr char UIO_SYS_ROM[] = "/dev/uio_sys_rom";
|
||||
static constexpr char UIO_PDEC_RAM[] = "/dev/uio_pdec_ram";
|
||||
static constexpr char UIO_PDEC_IRQ[] = "/dev/uio_pdec_irq";
|
||||
static constexpr int MAP_ID_PTME_CONFIG = 3;
|
||||
@ -57,6 +58,7 @@ static constexpr char GYRO_0_ENABLE[] = "enable_gyro_0";
|
||||
static constexpr char GYRO_2_ENABLE[] = "enable_gyro_2";
|
||||
static constexpr char GNSS_SELECT[] = "gnss_mux_select";
|
||||
static constexpr char GNSS_MUX_SELECT[] = "gnss_mux_select";
|
||||
static constexpr char PL_I2C_ARESETN[] = "pl_i2c_aresetn";
|
||||
|
||||
static constexpr char HEATER_0[] = "heater0";
|
||||
static constexpr char HEATER_1[] = "heater1";
|
||||
@ -82,6 +84,7 @@ static constexpr char EN_RW_4[] = "enable_rw_4";
|
||||
|
||||
static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select";
|
||||
static constexpr char ENABLE_RADFET[] = "enable_radfet";
|
||||
|
||||
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";
|
||||
@ -90,6 +93,7 @@ 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 PTME_RESETN[] = "ptme_resetn";
|
||||
|
||||
static constexpr char RS485_EN_TX_CLOCK[] = "tx_clock_enable_ltc2872";
|
||||
|
@ -252,7 +252,7 @@ ReturnValue_t openSpi(const std::string& devname, int flags, GpioIF* gpioIF, gpi
|
||||
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;
|
||||
return spi::OPENING_FILE_FAILED;
|
||||
}
|
||||
|
||||
// Pull SPI CS low. For now, no support for active high given
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,9 @@
|
||||
#include <fsfw/container/DynamicFIFO.h>
|
||||
#include <fsfw/container/SimpleRingBuffer.h>
|
||||
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
||||
#include <fsfw/parameters/ParameterHelper.h>
|
||||
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
|
||||
#include <fsfw_hal/linux/uio/UioMapper.h>
|
||||
#include <libxiphos.h>
|
||||
#include <mission/acs/archive/GPSDefinitions.h>
|
||||
#include <mission/utility/trace.h>
|
||||
@ -16,18 +19,12 @@
|
||||
#include "bsp_q7s/fs/SdCardManager.h"
|
||||
#include "events/subsystemIdRanges.h"
|
||||
#include "fsfw/controller/ExtendedControllerBase.h"
|
||||
#include "mission/sysDefs.h"
|
||||
|
||||
class Timer;
|
||||
class SdCardManager;
|
||||
|
||||
namespace xsc {
|
||||
|
||||
enum Chip : int { CHIP_0, CHIP_1, NO_CHIP, SELF_CHIP, ALL_CHIP };
|
||||
enum Copy : int { COPY_0, COPY_1, NO_COPY, SELF_COPY, ALL_COPY };
|
||||
|
||||
} // namespace xsc
|
||||
|
||||
struct RebootFile {
|
||||
struct RebootWatchdogFile {
|
||||
static constexpr uint8_t DEFAULT_MAX_BOOT_CNT = 10;
|
||||
|
||||
bool enabled = true;
|
||||
@ -48,8 +45,97 @@ struct RebootFile {
|
||||
xsc::Copy mechanismNextCopy = xsc::Copy::NO_COPY;
|
||||
};
|
||||
|
||||
class CoreController : public ExtendedControllerBase {
|
||||
class RebootWatchdogPacket : public SerialLinkedListAdapter<SerializeIF> {
|
||||
public:
|
||||
RebootWatchdogPacket(RebootWatchdogFile& rf) {
|
||||
enabled = rf.enabled;
|
||||
maxCount = rf.maxCount;
|
||||
img00Count = rf.img00Cnt;
|
||||
img01Count = rf.img01Cnt;
|
||||
img10Count = rf.img10Cnt;
|
||||
img11Count = rf.img11Cnt;
|
||||
img00Lock = rf.img00Lock;
|
||||
img01Lock = rf.img01Lock;
|
||||
img10Lock = rf.img10Lock;
|
||||
img11Lock = rf.img11Lock;
|
||||
lastChip = static_cast<uint8_t>(rf.lastChip);
|
||||
lastCopy = static_cast<uint8_t>(rf.lastCopy);
|
||||
nextChip = static_cast<uint8_t>(rf.mechanismNextChip);
|
||||
nextCopy = static_cast<uint8_t>(rf.mechanismNextCopy);
|
||||
setLinks();
|
||||
}
|
||||
|
||||
private:
|
||||
void setLinks() {
|
||||
setStart(&enabled);
|
||||
enabled.setNext(&maxCount);
|
||||
maxCount.setNext(&img00Count);
|
||||
img00Count.setNext(&img01Count);
|
||||
img01Count.setNext(&img10Count);
|
||||
img10Count.setNext(&img11Count);
|
||||
img11Count.setNext(&img00Lock);
|
||||
img00Lock.setNext(&img01Lock);
|
||||
img01Lock.setNext(&img10Lock);
|
||||
img10Lock.setNext(&img11Lock);
|
||||
img11Lock.setNext(&lastChip);
|
||||
lastChip.setNext(&lastCopy);
|
||||
lastCopy.setNext(&nextChip);
|
||||
nextChip.setNext(&nextCopy);
|
||||
setLast(&nextCopy);
|
||||
}
|
||||
|
||||
SerializeElement<uint8_t> enabled = false;
|
||||
SerializeElement<uint32_t> maxCount = 0;
|
||||
SerializeElement<uint32_t> img00Count = 0;
|
||||
SerializeElement<uint32_t> img01Count = 0;
|
||||
SerializeElement<uint32_t> img10Count = 0;
|
||||
SerializeElement<uint32_t> img11Count = 0;
|
||||
SerializeElement<uint8_t> img00Lock = false;
|
||||
SerializeElement<uint8_t> img01Lock = false;
|
||||
SerializeElement<uint8_t> img10Lock = false;
|
||||
SerializeElement<uint8_t> img11Lock = false;
|
||||
SerializeElement<uint8_t> lastChip = 0;
|
||||
SerializeElement<uint8_t> lastCopy = 0;
|
||||
SerializeElement<uint8_t> nextChip = 0;
|
||||
SerializeElement<uint8_t> nextCopy = 0;
|
||||
};
|
||||
|
||||
struct RebootCountersFile {
|
||||
// 16 bit values so all boot counters fit into one event.
|
||||
uint16_t img00Cnt = 0;
|
||||
uint16_t img01Cnt = 0;
|
||||
uint16_t img10Cnt = 0;
|
||||
uint16_t img11Cnt = 0;
|
||||
};
|
||||
|
||||
class RebootCountersPacket : public SerialLinkedListAdapter<SerializeIF> {
|
||||
RebootCountersPacket(RebootCountersFile& rf) {
|
||||
img00Count = rf.img00Cnt;
|
||||
img01Count = rf.img01Cnt;
|
||||
img10Count = rf.img10Cnt;
|
||||
img11Count = rf.img11Cnt;
|
||||
setLinks();
|
||||
}
|
||||
|
||||
private:
|
||||
void setLinks() {
|
||||
setStart(&img00Count);
|
||||
img00Count.setNext(&img01Count);
|
||||
img01Count.setNext(&img10Count);
|
||||
img10Count.setNext(&img11Count);
|
||||
setLast(&img11Count);
|
||||
}
|
||||
|
||||
SerializeElement<uint16_t> img00Count = 0;
|
||||
SerializeElement<uint16_t> img01Count = 0;
|
||||
SerializeElement<uint16_t> img10Count = 0;
|
||||
SerializeElement<uint16_t> img11Count = 0;
|
||||
};
|
||||
|
||||
class CoreController : public ExtendedControllerBase, public ReceivesParameterMessagesIF {
|
||||
public:
|
||||
enum ParamId : uint8_t { PREF_SD = 0, NUM_IDS };
|
||||
|
||||
static xsc::Chip CURRENT_CHIP;
|
||||
static xsc::Copy CURRENT_COPY;
|
||||
|
||||
@ -57,85 +143,28 @@ class CoreController : public ExtendedControllerBase {
|
||||
static constexpr char CHIP_STATE_FILE[] = "/tmp/chip_prot_status.txt";
|
||||
static constexpr char CURR_COPY_FILE[] = "/tmp/curr_copy.txt";
|
||||
|
||||
static constexpr char CONF_FOLDER[] = "conf";
|
||||
|
||||
static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
||||
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
||||
static constexpr char TIME_FILE_NAME[] = "time_backup.txt";
|
||||
|
||||
const std::string VERSION_FILE =
|
||||
"/" + std::string(CONF_FOLDER) + "/" + std::string(VERSION_FILE_NAME);
|
||||
const std::string REBOOT_FILE =
|
||||
"/" + std::string(CONF_FOLDER) + "/" + std::string(REBOOT_FILE_NAME);
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::VERSION_FILE_NAME);
|
||||
const std::string LEGACY_REBOOT_WATCHDOG_FILE =
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" +
|
||||
std::string(core::LEGACY_REBOOT_WATCHDOG_FILE_NAME);
|
||||
const std::string REBOOT_WATCHDOG_FILE =
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::REBOOT_WATCHDOG_FILE_NAME);
|
||||
const std::string BACKUP_TIME_FILE =
|
||||
"/" + std::string(CONF_FOLDER) + "/" + std::string(TIME_FILE_NAME);
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::TIME_FILE_NAME);
|
||||
const std::string REBOOT_COUNTERS_FILE =
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::REBOOT_COUNTER_FILE_NAME);
|
||||
|
||||
static constexpr char CHIP_0_COPY_0_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi0-nom-rootfs";
|
||||
static constexpr char CHIP_0_COPY_1_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi0-gold-rootfs";
|
||||
static constexpr char CHIP_1_COPY_0_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi1-nom-rootfs";
|
||||
static constexpr char CHIP_1_COPY_1_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi1-gold-rootfs";
|
||||
static constexpr char LIST_DIR_DUMP_WORK_FILE[] = "/tmp/dir_listing.tmp";
|
||||
|
||||
static constexpr dur_millis_t INIT_SD_CARD_CHECK_TIMEOUT = 5000;
|
||||
static constexpr dur_millis_t DEFAULT_SD_CARD_CHECK_TIMEOUT = 60000;
|
||||
|
||||
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
|
||||
static constexpr ActionId_t ANNOUNCE_VERSION = 1;
|
||||
static constexpr ActionId_t ANNOUNCE_CURRENT_IMAGE = 2;
|
||||
static constexpr ActionId_t ANNOUNCE_BOOT_COUNTS = 3;
|
||||
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 OBSW_UPDATE_FROM_SD_0 = 10;
|
||||
static constexpr ActionId_t OBSW_UPDATE_FROM_SD_1 = 11;
|
||||
static constexpr ActionId_t OBSW_UPDATE_FROM_TMP = 12;
|
||||
|
||||
static constexpr ActionId_t SWITCH_TO_SD_0 = 16;
|
||||
static constexpr ActionId_t SWITCH_TO_SD_1 = 17;
|
||||
static constexpr ActionId_t SWITCH_TO_BOTH_SD_CARDS = 18;
|
||||
|
||||
//! Reboot using the xsc_boot_copy command
|
||||
static constexpr ActionId_t XSC_REBOOT_OBC = 32;
|
||||
static constexpr ActionId_t MOUNT_OTHER_COPY = 33;
|
||||
//! Reboot using the reboot command
|
||||
static constexpr ActionId_t REBOOT_OBC = 34;
|
||||
|
||||
static constexpr ActionId_t EXECUTE_SHELL_CMD = 40;
|
||||
|
||||
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 occurred. Can also be a systemd reboot.
|
||||
//! P1: Current Chip, P2: Current Copy
|
||||
static constexpr Event REBOOT_SW = event::makeEvent(SUBSYSTEM_ID, 1, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] The reboot mechanism was triggered.
|
||||
//! P1: First 16 bits: Last Chip, Last 16 bits: Last Copy,
|
||||
//! P2: Each byte is the respective reboot count for the slots
|
||||
static constexpr Event REBOOT_MECHANISM_TRIGGERED =
|
||||
event::makeEvent(SUBSYSTEM_ID, 2, severity::MEDIUM);
|
||||
//! Trying to find a way how to determine that the reboot came from ProASIC3 or PCDU..
|
||||
static constexpr Event REBOOT_HW = event::makeEvent(SUBSYSTEM_ID, 3, severity::MEDIUM);
|
||||
//! [EXPORT] : [COMMENT] No SD card was active. Core controller will attempt to re-initialize
|
||||
//! a SD card.
|
||||
static constexpr Event NO_SD_CARD_ACTIVE = event::makeEvent(SUBSYSTEM_ID, 4, severity::HIGH);
|
||||
//! [EXPORT] : [COMMENT]
|
||||
//! P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash
|
||||
//! P2: First four letters of Git SHA is the last byte of P1 is set.
|
||||
static constexpr Event VERSION_INFO = event::makeEvent(SUBSYSTEM_ID, 5, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] P1: Current Chip, P2: Current Copy
|
||||
static constexpr Event CURRENT_IMAGE_INFO = event::makeEvent(SUBSYSTEM_ID, 6, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] Total reboot counter, which is the sum of the boot count of all
|
||||
//! individual images.
|
||||
static constexpr Event REBOOT_COUNTER = event::makeEvent(SUBSYSTEM_ID, 7, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] Get the boot count of the individual images.
|
||||
//! P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1.
|
||||
//! P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.
|
||||
static constexpr Event INDIVIDUAL_BOOT_COUNTS = event::makeEvent(SUBSYSTEM_ID, 8, severity::INFO);
|
||||
static constexpr Event I2C_UNAVAILABLE_REBOOT =
|
||||
event::makeEvent(SUBSYSTEM_ID, 10, severity::MEDIUM);
|
||||
|
||||
CoreController(object_id_t objectId, const std::atomic_uint16_t& i2cErrors, bool enableHkSet);
|
||||
CoreController(object_id_t objectId, bool enableHkSet);
|
||||
virtual ~CoreController();
|
||||
|
||||
ReturnValue_t initialize() override;
|
||||
@ -186,8 +215,8 @@ class CoreController : public ExtendedControllerBase {
|
||||
enum class SdStates {
|
||||
NONE,
|
||||
START,
|
||||
GET_INFO,
|
||||
SET_STATE_SELF,
|
||||
UPDATE_SD_INFO_START,
|
||||
SKIP_TWO_CYCLES_IF_SD_LOCKED,
|
||||
MOUNT_SELF,
|
||||
// Determine operations for other SD card, depending on redundancy configuration
|
||||
DETERMINE_OTHER,
|
||||
@ -197,7 +226,7 @@ class CoreController : public ExtendedControllerBase {
|
||||
// Skip period because the shell command used to generate the info file sometimes is
|
||||
// missing the last performed operation if executed too early
|
||||
SKIP_CYCLE_BEFORE_INFO_UPDATE,
|
||||
UPDATE_INFO,
|
||||
UPDATE_SD_INFO_END,
|
||||
// SD initialization done
|
||||
IDLE
|
||||
};
|
||||
@ -206,26 +235,34 @@ class CoreController : public ExtendedControllerBase {
|
||||
|
||||
static constexpr bool BLOCKING_SD_INIT = false;
|
||||
|
||||
uint32_t* mappedSysRomAddr = nullptr;
|
||||
SdCardManager* sdcMan = nullptr;
|
||||
MessageQueueIF* eventQueue = nullptr;
|
||||
|
||||
uint8_t prefSdRaw = sd::SdCard::SLOT_0;
|
||||
SdStates sdFsmState = SdStates::START;
|
||||
SdStates fsmStateAfterDelay = SdStates::IDLE;
|
||||
enum SdCfgMode { PASSIVE, COLD_REDUNDANT, HOT_REDUNDANT };
|
||||
|
||||
struct SdFsmParams {
|
||||
SdCfgMode cfgMode = SdCfgMode::COLD_REDUNDANT;
|
||||
sd::SdCard active = sd::SdCard::NONE;
|
||||
sd::SdCard other = sd::SdCard::NONE;
|
||||
sd::SdState activeState = sd::SdState::OFF;
|
||||
sd::SdState otherState = sd::SdState::OFF;
|
||||
std::string activeChar = "0";
|
||||
std::string otherChar = "1";
|
||||
sd::SdState activeState = sd::SdState::OFF;
|
||||
sd::SdState otherState = sd::SdState::OFF;
|
||||
std::pair<bool, bool> mountSwitch = {true, true};
|
||||
// Used to track whether a command was executed
|
||||
bool commandExecuted = true;
|
||||
// This flag denotes that the SD card usage is locked. This is relevant if SD cards go off
|
||||
// to leave appliation using the SD cards some time to detect the SD card is not usable anymore.
|
||||
// This is relevant if the active SD card is being switched. The SD card will also be locked
|
||||
// when going from hot-redundant mode to cold-redundant mode.
|
||||
bool lockSdCardUsage = false;
|
||||
bool commandPending = true;
|
||||
bool initFinished = false;
|
||||
SdCardManager::SdStatePair currentState;
|
||||
uint16_t cycleCount = 0;
|
||||
uint16_t skippedCyclesCount = 0;
|
||||
} sdInfo;
|
||||
|
||||
struct SdCommanding {
|
||||
@ -234,7 +271,22 @@ class CoreController : public ExtendedControllerBase {
|
||||
DeviceCommandId_t actionId;
|
||||
} sdCommandingInfo;
|
||||
|
||||
RebootFile rebootFile = {};
|
||||
struct DirListingDumpContext {
|
||||
bool active;
|
||||
bool firstDump;
|
||||
size_t dumpedBytes;
|
||||
size_t totalFileSize;
|
||||
size_t listingDataOffset;
|
||||
size_t maxDumpLen;
|
||||
uint32_t segmentIdx;
|
||||
MessageQueueId_t commander = MessageQueueIF::NO_QUEUE;
|
||||
DeviceCommandId_t actionId;
|
||||
};
|
||||
std::array<uint8_t, 1024> dirListingBuf{};
|
||||
DirListingDumpContext dumpContext{};
|
||||
|
||||
RebootWatchdogFile rebootWatchdogFile = {};
|
||||
RebootCountersFile rebootCountersFile = {};
|
||||
|
||||
CommandExecutor cmdExecutor;
|
||||
SimpleRingBuffer cmdReplyBuf;
|
||||
@ -266,12 +318,17 @@ class CoreController : public ExtendedControllerBase {
|
||||
PoolEntry<float> plVoltageEntry = PoolEntry<float>(0.0);
|
||||
|
||||
core::HkSet hkSet;
|
||||
const std::atomic_uint16_t& i2cErrors;
|
||||
|
||||
ParameterHelper paramHelper;
|
||||
|
||||
#if OBSW_SD_CARD_MUST_BE_ON == 1
|
||||
bool remountAttemptFlag = true;
|
||||
#endif
|
||||
|
||||
MessageQueueId_t getCommandQueue() const override;
|
||||
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueIdentifier,
|
||||
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
|
||||
uint16_t startAtIndex) override;
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) override;
|
||||
|
||||
@ -290,7 +347,7 @@ class CoreController : public ExtendedControllerBase {
|
||||
void initPrint();
|
||||
|
||||
ReturnValue_t sdStateMachine();
|
||||
void updateSdInfoOther();
|
||||
void updateInternalSdInfo();
|
||||
ReturnValue_t sdCardSetup(sd::SdCard sdCard, sd::SdState targetState, std::string sdChar,
|
||||
bool printOutput = true);
|
||||
ReturnValue_t executeSwUpdate(SwUpdateSources sourceDir, const uint8_t* data, size_t size);
|
||||
@ -299,10 +356,18 @@ class CoreController : public ExtendedControllerBase {
|
||||
void currentStateSetter(sd::SdCard sdCard, sd::SdState newState);
|
||||
void executeNextExternalSdCommand();
|
||||
void checkExternalSdCommandStatus();
|
||||
void performRebootFileHandling(bool recreateFile);
|
||||
void performRebootWatchdogHandling(bool recreateFile);
|
||||
void performRebootCountersHandling(bool recreateFile);
|
||||
|
||||
ReturnValue_t actionListDirectoryIntoFile(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||
const uint8_t* data, size_t size);
|
||||
ReturnValue_t actionListDirectoryDumpDirectly(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||
const uint8_t* data, size_t size);
|
||||
ReturnValue_t performGracefulShutdown(xsc::Chip targetChip, xsc::Copy targetCopy);
|
||||
|
||||
ReturnValue_t actionListDirectoryCommonCommandCreator(const uint8_t* data, size_t size,
|
||||
std::ostringstream& oss);
|
||||
|
||||
ReturnValue_t actionXscReboot(const uint8_t* data, size_t size);
|
||||
ReturnValue_t actionReboot(const uint8_t* data, size_t size);
|
||||
|
||||
@ -312,14 +377,19 @@ class CoreController : public ExtendedControllerBase {
|
||||
int handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect,
|
||||
bool& protOperationPerformed, bool selfChip, bool selfCopy,
|
||||
bool allChips, bool allCopies, uint8_t arrIdx);
|
||||
void determineAndExecuteReboot(RebootFile& rf, bool& needsReboot, xsc::Chip& tgtChip,
|
||||
xsc::Copy& tgtCopy);
|
||||
void resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||
void rebootWatchdogAlgorithm(RebootWatchdogFile& rf, bool& needsReboot, xsc::Chip& tgtChip,
|
||||
xsc::Copy& tgtCopy);
|
||||
void resetRebootWatchdogCounters(xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||
void setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||
bool parseRebootFile(std::string path, RebootFile& file);
|
||||
void rewriteRebootFile(RebootFile file);
|
||||
bool parseRebootWatchdogFile(std::string path, RebootWatchdogFile& file);
|
||||
bool parseRebootCountersFile(std::string path, RebootCountersFile& file);
|
||||
void rewriteRebootWatchdogFile(RebootWatchdogFile file);
|
||||
void rewriteRebootCountersFile(RebootCountersFile file);
|
||||
void announceBootCounts();
|
||||
void announceVersionInfo();
|
||||
void announceCurrentImageInfo();
|
||||
void readHkData();
|
||||
void dirListingDumpHandler();
|
||||
bool isNumber(const std::string& s);
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include "ObjectFactory.h"
|
||||
|
||||
#include <fsfw/devicehandlers/HealthDevice.h>
|
||||
#include <fsfw/subsystem/Subsystem.h>
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
#include <linux/acs/AcsBoardPolling.h>
|
||||
#include <linux/acs/GpsHyperionLinuxController.h>
|
||||
#include <linux/acs/ImtqPollingTask.h>
|
||||
@ -9,25 +11,26 @@
|
||||
#include <linux/com/SyrlinksComHandler.h>
|
||||
#include <linux/payload/PlocMemoryDumper.h>
|
||||
#include <linux/payload/PlocMpsocHandler.h>
|
||||
#include <linux/payload/PlocMpsocHelper.h>
|
||||
#include <linux/payload/PlocMpsocSpecialComHelper.h>
|
||||
#include <linux/payload/PlocSupervisorHandler.h>
|
||||
#include <linux/payload/ScexUartReader.h>
|
||||
#include <linux/payload/plocMpscoDefs.h>
|
||||
#include <linux/payload/plocMpsocHelpers.h>
|
||||
#include <linux/power/CspComIF.h>
|
||||
#include <mission/acs/GyrL3gCustomHandler.h>
|
||||
#include <mission/acs/MgmLis3CustomHandler.h>
|
||||
#include <mission/acs/MgmRm3100CustomHandler.h>
|
||||
#include <mission/acs/str/StarTrackerHandler.h>
|
||||
#include <mission/acs/str/strHelpers.h>
|
||||
#include <mission/com/LiveTmTask.h>
|
||||
#include <mission/com/PersistentLogTmStoreTask.h>
|
||||
#include <mission/com/PersistentSingleTmStoreTask.h>
|
||||
#include <mission/power/CspCookie.h>
|
||||
#include <mission/system/acs/ImtqAssembly.h>
|
||||
#include <mission/system/fdir/StrFdir.h>
|
||||
#include <mission/system/acs/StrAssembly.h>
|
||||
#include <mission/system/acs/StrFdir.h>
|
||||
#include <mission/system/com/SyrlinksAssembly.h>
|
||||
#include <mission/system/objects/CamSwitcher.h>
|
||||
#include <mission/system/objects/StrAssembly.h>
|
||||
#include <mission/system/objects/SyrlinksAssembly.h>
|
||||
#include <mission/tmtc/LiveTmTask.h>
|
||||
#include <mission/tmtc/PersistentLogTmStoreTask.h>
|
||||
#include <mission/tmtc/PersistentSingleTmStoreTask.h>
|
||||
#include <mission/system/tcs/TmpDevFdir.h>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "bsp_q7s/boardtest/Q7STestTask.h"
|
||||
@ -61,17 +64,15 @@
|
||||
#include "mission/system/acs/acsModeTree.h"
|
||||
#include "mission/system/com/SyrlinksFdir.h"
|
||||
#include "mission/system/com/comModeTree.h"
|
||||
#include "mission/system/fdir/GomspacePowerFdir.h"
|
||||
#include "mission/system/fdir/RtdFdir.h"
|
||||
#include "mission/system/objects/TcsBoardAssembly.h"
|
||||
#include "mission/system/power/GomspacePowerFdir.h"
|
||||
#include "mission/system/tcs/RtdFdir.h"
|
||||
#include "mission/system/tcs/TcsBoardAssembly.h"
|
||||
#include "mission/system/tcs/tcsModeTree.h"
|
||||
#include "mission/system/tree/payloadModeTree.h"
|
||||
#include "mission/system/tree/tcsModeTree.h"
|
||||
#include "mission/tmtc/tmFilters.h"
|
||||
#include "mission/utility/GlobalConfigHandler.h"
|
||||
#include "tmtc/pusIds.h"
|
||||
|
||||
using gpio::Direction;
|
||||
using gpio::Levels;
|
||||
#if OBSW_TEST_LIBGPIOD == 1
|
||||
#include "linux/boardtest/LibgpiodTest.h"
|
||||
#endif
|
||||
@ -80,6 +81,7 @@ using gpio::Levels;
|
||||
#include <mission/acs/ImtqHandler.h>
|
||||
#include <mission/acs/rwHelpers.h>
|
||||
#include <mission/com/SyrlinksHandler.h>
|
||||
#include <mission/com/VirtualChannelWithQueue.h>
|
||||
#include <mission/payload/PayloadPcduHandler.h>
|
||||
#include <mission/payload/RadiationSensorHandler.h>
|
||||
#include <mission/payload/payloadPcduDefinitions.h>
|
||||
@ -95,7 +97,6 @@ using gpio::Levels;
|
||||
#include <mission/tcs/Max31865Definitions.h>
|
||||
#include <mission/tcs/Max31865PT1000Handler.h>
|
||||
#include <mission/tcs/Tmp1075Handler.h>
|
||||
#include <mission/tmtc/VirtualChannelWithQueue.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
@ -122,8 +123,12 @@ using gpio::Levels;
|
||||
#include "mission/system/acs/AcsBoardAssembly.h"
|
||||
#include "mission/tmtc/TmFunnelHandler.h"
|
||||
|
||||
using gpio::Direction;
|
||||
using gpio::Levels;
|
||||
|
||||
ResetArgs RESET_ARGS_GNSS;
|
||||
std::atomic_bool LINK_STATE = CcsdsIpCoreHandler::LINK_DOWN;
|
||||
std::atomic_bool PTME_LOCKED = false;
|
||||
std::atomic_uint16_t I2C_FATAL_ERRORS = 0;
|
||||
|
||||
void Factory::setStaticFrameworkObjectIds() {
|
||||
@ -162,6 +167,7 @@ void ObjectFactory::createTmpComponents() {
|
||||
new I2cCookie(tmpDevIds[idx].second, TMP1075::MAX_REPLY_LENGTH, q7s::I2C_PS_EIVE));
|
||||
auto* tmpDevHandler =
|
||||
new Tmp1075Handler(tmpDevIds[idx].first, objects::I2C_COM_IF, tmpDevCookies[idx]);
|
||||
tmpDevHandler->setCustomFdir(new TmpDevFdir(tmpDevIds[idx].first));
|
||||
tmpDevHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
||||
// TODO: Remove this after TCS subsystem was added
|
||||
// These devices are connected to the 3V3 stack and should be powered permanently. Therefore,
|
||||
@ -184,7 +190,6 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF,
|
||||
*i2cComIF = new I2cComIF(objects::I2C_COM_IF);
|
||||
*uartComIF = new SerialComIF(objects::UART_COM_IF);
|
||||
*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);
|
||||
}
|
||||
|
||||
void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher,
|
||||
@ -192,7 +197,6 @@ void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchI
|
||||
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_SIZE, addresses::P60DOCK, 500);
|
||||
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU1, 500);
|
||||
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU2, 500);
|
||||
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_SIZE, addresses::ACU, 500);
|
||||
|
||||
auto p60Fdir = new GomspacePowerFdir(objects::P60DOCK_HANDLER);
|
||||
P60DockHandler* p60dockhandler = new P60DockHandler(objects::P60DOCK_HANDLER, objects::CSP_COM_IF,
|
||||
@ -206,9 +210,12 @@ void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchI
|
||||
Pdu2Handler* pdu2handler = new Pdu2Handler(objects::PDU2_HANDLER, objects::CSP_COM_IF,
|
||||
pdu2CspCookie, pdu2Fdir, enableHkSets);
|
||||
|
||||
#if OBSW_ADD_GOMSPACE_ACU == 1
|
||||
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_SIZE, addresses::ACU, 500);
|
||||
auto acuFdir = new GomspacePowerFdir(objects::ACU_HANDLER);
|
||||
ACUHandler* acuhandler = new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF, acuCspCookie,
|
||||
acuFdir, enableHkSets);
|
||||
#endif
|
||||
auto pcduHandler = new PcduHandler(objects::PCDU_HANDLER, 50);
|
||||
|
||||
/**
|
||||
@ -218,7 +225,9 @@ void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchI
|
||||
p60dockhandler->setModeNormal();
|
||||
pdu1handler->setModeNormal();
|
||||
pdu2handler->setModeNormal();
|
||||
#if OBSW_ADD_GOMSPACE_ACU == 1
|
||||
acuhandler->setModeNormal();
|
||||
#endif
|
||||
if (pwrSwitcher != nullptr) {
|
||||
*pwrSwitcher = pcduHandler;
|
||||
}
|
||||
@ -232,20 +241,7 @@ void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchI
|
||||
|
||||
ReturnValue_t ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF,
|
||||
Stack5VHandler& stackHandler) {
|
||||
using namespace gpio;
|
||||
if (gpioComIF == nullptr) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
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);
|
||||
gpioChecker(gpioComIF->addGpios(gpioCookieRadSensor), "RAD sensor");
|
||||
createRadSensorChipSelect(gpioComIF);
|
||||
|
||||
SpiCookie* spiCookieRadSensor =
|
||||
new SpiCookie(addresses::RAD_SENSOR, gpioIds::CS_RAD_SENSOR, RAD_SENSOR::READ_SIZE,
|
||||
@ -358,7 +354,8 @@ void ObjectFactory::createAcsBoardGpios(GpioCookie& cookie) {
|
||||
}
|
||||
|
||||
void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF,
|
||||
SerialComIF* uartComIF, PowerSwitchIF& pwrSwitcher) {
|
||||
SerialComIF* uartComIF, PowerSwitchIF& pwrSwitcher,
|
||||
bool enableHkSets, adis1650x::Type adisType) {
|
||||
using namespace gpio;
|
||||
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
||||
createAcsBoardGpios(*gpioCookieAcsBoard);
|
||||
@ -444,9 +441,8 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF*
|
||||
new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, adis1650x::MAXIMUM_REPLY_SIZE,
|
||||
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||
auto adisHandler =
|
||||
new GyrAdis1650XHandler(objects::GYRO_0_ADIS_HANDLER, objects::ACS_BOARD_POLLING_TASK,
|
||||
spiCookie, adis1650x::Type::ADIS16505);
|
||||
auto adisHandler = new GyrAdis1650XHandler(objects::GYRO_0_ADIS_HANDLER,
|
||||
objects::ACS_BOARD_POLLING_TASK, spiCookie, adisType);
|
||||
fdir = new AcsBoardFdir(objects::GYRO_0_ADIS_HANDLER);
|
||||
adisHandler->setCustomFdir(fdir);
|
||||
assemblyChildren[4] = adisHandler;
|
||||
@ -479,9 +475,8 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF*
|
||||
new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, adis1650x::MAXIMUM_REPLY_SIZE,
|
||||
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
|
||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||
adisHandler =
|
||||
new GyrAdis1650XHandler(objects::GYRO_2_ADIS_HANDLER, objects::ACS_BOARD_POLLING_TASK,
|
||||
spiCookie, adis1650x::Type::ADIS16505);
|
||||
adisHandler = new GyrAdis1650XHandler(objects::GYRO_2_ADIS_HANDLER,
|
||||
objects::ACS_BOARD_POLLING_TASK, spiCookie, adisType);
|
||||
fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER);
|
||||
adisHandler->setCustomFdir(fdir);
|
||||
assemblyChildren[6] = adisHandler;
|
||||
@ -511,9 +506,9 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF*
|
||||
debugGps = true;
|
||||
#endif
|
||||
RESET_ARGS_GNSS.gpioComIF = gpioComIF;
|
||||
RESET_ARGS_GNSS.waitPeriodMs = 100;
|
||||
auto gpsCtrl =
|
||||
new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
|
||||
RESET_ARGS_GNSS.waitPeriodMs = 5;
|
||||
auto gpsCtrl = new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT,
|
||||
enableHkSets, debugGps);
|
||||
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
|
||||
|
||||
ObjectFactory::createAcsBoardAssy(pwrSwitcher, assemblyChildren, gpsCtrl, gpioComIF);
|
||||
@ -588,7 +583,7 @@ void ObjectFactory::createSolarArrayDeploymentComponents(PowerSwitchIF& pwrSwitc
|
||||
}
|
||||
|
||||
new SolarArrayDeploymentHandler(objects::SOLAR_ARRAY_DEPL_HANDLER, gpioIF, pwrSwitcher,
|
||||
pcdu::Switches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
|
||||
power::Switches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
|
||||
gpioIds::DEPLSA1, gpioIds::DEPLSA2, *SdCardManager::instance());
|
||||
}
|
||||
|
||||
@ -604,7 +599,7 @@ void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) {
|
||||
auto syrlinksFdir = new SyrlinksFdir(objects::SYRLINKS_HANDLER);
|
||||
auto syrlinksHandler =
|
||||
new SyrlinksHandler(objects::SYRLINKS_HANDLER, objects::SYRLINKS_COM_HANDLER,
|
||||
syrlinksUartCookie, pcdu::PDU1_CH1_SYRLINKS_12V, syrlinksFdir);
|
||||
syrlinksUartCookie, power::PDU1_CH1_SYRLINKS_12V, syrlinksFdir);
|
||||
syrlinksHandler->setPowerSwitcher(pwrSwitcher);
|
||||
syrlinksHandler->connectModeTreeParent(*syrlinksAssy);
|
||||
#if OBSW_DEBUG_SYRLINKS == 1
|
||||
@ -616,7 +611,7 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
|
||||
using namespace gpio;
|
||||
std::stringstream consumer;
|
||||
auto* camSwitcher =
|
||||
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, pcdu::PDU2_CH8_PAYLOAD_CAMERA);
|
||||
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, power::PDU2_CH8_PAYLOAD_CAMERA);
|
||||
camSwitcher->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||
consumer << "0x" << std::hex << objects::PLOC_MPSOC_HANDLER;
|
||||
@ -629,8 +624,8 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
|
||||
new SerialCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV,
|
||||
serial::PLOC_MPSOC_BAUD, mpsoc::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
|
||||
mpsocCookie->setNoFixedSizeReply();
|
||||
auto plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER);
|
||||
auto* mpsocHandler = new PlocMPSoCHandler(
|
||||
auto plocMpsocHelper = new PlocMpsocSpecialComHelper(objects::PLOC_MPSOC_HELPER);
|
||||
auto* mpsocHandler = new PlocMpsocHandler(
|
||||
objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocCookie, plocMpsocHelper,
|
||||
Gpio(gpioIds::ENABLE_MPSOC_UART, gpioComIF), objects::PLOC_SUPERVISOR_HANDLER);
|
||||
mpsocHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||
@ -649,7 +644,8 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
|
||||
auto supvHelper = new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER);
|
||||
auto* supvHandler = new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie,
|
||||
Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
|
||||
pcdu::PDU1_CH6_PLOC_12V, *supvHelper);
|
||||
power::PDU1_CH6_PLOC_12V, *supvHelper);
|
||||
supvHandler->setPowerSwitcher(&pwrSwitch);
|
||||
supvHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||
static_cast<void>(consumer);
|
||||
@ -726,7 +722,7 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF,
|
||||
rws[idx] = rwHandler;
|
||||
}
|
||||
|
||||
createRwAssy(*pwrSwitcher, pcdu::Switches::PDU2_CH2_RW_5V, rws, rwIds);
|
||||
createRwAssy(*pwrSwitcher, power::Switches::PDU2_CH2_RW_5V, rws, rwIds);
|
||||
#endif /* OBSW_ADD_RW == 1 */
|
||||
}
|
||||
|
||||
@ -751,10 +747,8 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
||||
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_BUSY, gpio);
|
||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC3, "PAPB VC3");
|
||||
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_EMPTY, gpio);
|
||||
// Initialise to low and then pull high to do a PTME reset, which puts the PTME in reset
|
||||
// state. It will be put out of reset in the CCSDS handler initialize function.
|
||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PTME_RESETN, "PTME RESETN",
|
||||
gpio::Direction::OUT, gpio::Levels::LOW);
|
||||
gpio::Direction::OUT, gpio::Levels::HIGH);
|
||||
gpioCookiePtmeIp->addGpio(gpioIds::PTME_RESETN, gpio);
|
||||
gpioChecker(args.gpioComIF.addGpios(gpioCookiePtmeIp), "PTME PAPB VCs");
|
||||
|
||||
@ -771,6 +765,7 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
||||
VirtualChannelIF* vc3 =
|
||||
new PapbVcInterface(&args.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);
|
||||
@ -788,34 +783,42 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
||||
|
||||
*args.ipCoreHandler =
|
||||
new CcsdsIpCoreHandler(objects::CCSDS_HANDLER, objects::CCSDS_PACKET_DISTRIBUTOR, *ptmeConfig,
|
||||
LINK_STATE, &args.gpioComIF, gpios);
|
||||
LINK_STATE, &args.gpioComIF, gpios, PTME_LOCKED);
|
||||
// This VC will receive all live TM
|
||||
auto* vcWithQueue =
|
||||
new VirtualChannelWithQueue(objects::PTME_VC0_LIVE_TM, ccsds::VC0, "PTME VC0 LIVE TM", *ptme,
|
||||
LINK_STATE, args.tmStore, 500);
|
||||
args.liveDestination = vcWithQueue;
|
||||
new LiveTmTask(objects::LIVE_TM_TASK, args.pusFunnel, args.cfdpFunnel, *vcWithQueue);
|
||||
auto* liveTask = new LiveTmTask(objects::LIVE_TM_TASK, args.pusFunnel, args.cfdpFunnel,
|
||||
*vcWithQueue, PTME_LOCKED);
|
||||
liveTask->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
||||
|
||||
// Set up log store.
|
||||
auto* vc = new VirtualChannel(objects::PTME_VC1_LOG_TM, ccsds::VC1, "PTME VC1 LOG TM", *ptme,
|
||||
LINK_STATE);
|
||||
LogStores logStores(args.stores);
|
||||
// Core task which handles the LOG store and takes care of dumping it as TM using a VC directly
|
||||
new PersistentLogTmStoreTask(objects::LOG_STORE_AND_TM_TASK, args.ipcStore, logStores, *vc,
|
||||
*SdCardManager::instance());
|
||||
auto* logStore =
|
||||
new PersistentLogTmStoreTask(objects::LOG_STORE_AND_TM_TASK, args.ipcStore, logStores, *vc,
|
||||
*SdCardManager::instance(), PTME_LOCKED);
|
||||
logStore->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
||||
|
||||
vc = new VirtualChannel(objects::PTME_VC2_HK_TM, ccsds::VC2, "PTME VC2 HK TM", *ptme, LINK_STATE);
|
||||
// Core task which handles the HK store and takes care of dumping it as TM using a VC directly
|
||||
new PersistentSingleTmStoreTask(objects::HK_STORE_AND_TM_TASK, args.ipcStore,
|
||||
*args.stores.hkStore, *vc, persTmStore::DUMP_HK_STORE_DONE,
|
||||
persTmStore::DUMP_HK_STORE_DONE, *SdCardManager::instance());
|
||||
auto* hkStore = new PersistentSingleTmStoreTask(
|
||||
objects::HK_STORE_AND_TM_TASK, args.ipcStore, *args.stores.hkStore, *vc,
|
||||
persTmStore::DUMP_HK_STORE_DONE, persTmStore::DUMP_HK_CANCELLED, *SdCardManager::instance(),
|
||||
PTME_LOCKED);
|
||||
hkStore->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
||||
|
||||
vc = new VirtualChannel(objects::PTME_VC3_CFDP_TM, ccsds::VC3, "PTME VC3 CFDP TM", *ptme,
|
||||
LINK_STATE);
|
||||
// Core task which handles the CFDP store and takes care of dumping it as TM using a VC directly
|
||||
new PersistentSingleTmStoreTask(objects::CFDP_STORE_AND_TM_TASK, args.ipcStore,
|
||||
*args.stores.cfdpStore, *vc, persTmStore::DUMP_CFDP_STORE_DONE,
|
||||
persTmStore::DUMP_CFDP_CANCELLED, *SdCardManager::instance());
|
||||
auto* cfdpTask = new PersistentSingleTmStoreTask(
|
||||
objects::CFDP_STORE_AND_TM_TASK, args.ipcStore, *args.stores.cfdpStore, *vc,
|
||||
persTmStore::DUMP_CFDP_STORE_DONE, persTmStore::DUMP_CFDP_CANCELLED,
|
||||
*SdCardManager::instance(), PTME_LOCKED);
|
||||
cfdpTask->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
||||
|
||||
ReturnValue_t result = (*args.ipCoreHandler)->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
||||
if (result != returnvalue::OK) {
|
||||
@ -958,7 +961,7 @@ void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
|
||||
auto strFdir = new StrFdir(objects::STAR_TRACKER);
|
||||
auto starTracker =
|
||||
new StarTrackerHandler(objects::STAR_TRACKER, objects::STR_COM_IF, starTrackerCookie,
|
||||
paramJsonFile, strComIF, pcdu::PDU1_CH2_STAR_TRACKER_5V);
|
||||
paramJsonFile, strComIF, power::PDU1_CH2_STAR_TRACKER_5V);
|
||||
starTracker->setPowerSwitcher(pwrSwitcher);
|
||||
starTracker->connectModeTreeParent(*strAssy);
|
||||
starTracker->setCustomFdir(strFdir);
|
||||
@ -971,7 +974,7 @@ void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enable
|
||||
new ImtqPollingTask(objects::IMTQ_POLLING, I2C_FATAL_ERRORS);
|
||||
I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, imtq::MAX_REPLY_SIZE, q7s::I2C_PL_EIVE);
|
||||
auto imtqHandler = new ImtqHandler(objects::IMTQ_HANDLER, objects::IMTQ_POLLING, imtqI2cCookie,
|
||||
pcdu::Switches::PDU1_CH3_MGT_5V, enableHkSets);
|
||||
power::Switches::PDU1_CH3_MGT_5V, enableHkSets);
|
||||
imtqHandler->enableThermalModule(ThermalStateCfg());
|
||||
imtqHandler->setPowerSwitcher(pwrSwitcher);
|
||||
imtqHandler->connectModeTreeParent(*imtqAssy);
|
||||
@ -1007,3 +1010,38 @@ void ObjectFactory::testAcsBrdAss(AcsBoardAssembly* acsAss) {
|
||||
sif::warning << "Sending mode command failed" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectFactory::createRadSensorChipSelect(LinuxLibgpioIF* gpioIF) {
|
||||
using namespace gpio;
|
||||
if (gpioIF == nullptr) {
|
||||
return;
|
||||
}
|
||||
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);
|
||||
gpioChecker(gpioIF->addGpios(gpioCookieRadSensor), "RAD sensor");
|
||||
}
|
||||
|
||||
void ObjectFactory::createPlI2cResetGpio(LinuxLibgpioIF* gpioIF) {
|
||||
using namespace gpio;
|
||||
if (common::OBSW_VERSION_MAJOR >= 6 or common::OBSW_VERSION_MAJOR == 4) {
|
||||
if (gpioIF == nullptr) {
|
||||
return;
|
||||
}
|
||||
GpioCookie* gpioI2cResetnCookie = new GpioCookie;
|
||||
GpiodRegularByLineName* gpioI2cResetn = new GpiodRegularByLineName(
|
||||
q7s::gpioNames::PL_I2C_ARESETN, "PL_I2C_ARESETN", Direction::OUT, Levels::HIGH);
|
||||
gpioI2cResetnCookie->addGpio(gpioIds::PL_I2C_ARESETN, gpioI2cResetn);
|
||||
gpioChecker(gpioIF->addGpios(gpioI2cResetnCookie), "PL I2C ARESETN");
|
||||
// Reset I2C explicitely again.
|
||||
gpioIF->pullLow(gpioIds::PL_I2C_ARESETN);
|
||||
TaskFactory::delayTask(1);
|
||||
gpioIF->pullHigh(gpioIds::PL_I2C_ARESETN);
|
||||
}
|
||||
}
|
||||
|
@ -3,12 +3,13 @@
|
||||
|
||||
#include <fsfw/returnvalues/returnvalue.h>
|
||||
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
||||
#include <mission/acs/gyroAdisHelpers.h>
|
||||
#include <mission/com/CcsdsIpCoreHandler.h>
|
||||
#include <mission/com/PersistentLogTmStoreTask.h>
|
||||
#include <mission/genericFactory.h>
|
||||
#include <mission/system/objects/Stack5VHandler.h>
|
||||
#include <mission/tcs/HeaterHandler.h>
|
||||
#include <mission/tmtc/CfdpTmFunnel.h>
|
||||
#include <mission/tmtc/PersistentLogTmStoreTask.h>
|
||||
#include <mission/tmtc/PusTmFunnel.h>
|
||||
|
||||
#include <atomic>
|
||||
@ -23,7 +24,7 @@ class HealthTableIF;
|
||||
class AcsBoardAssembly;
|
||||
class GpioIF;
|
||||
|
||||
extern std::atomic_uint16_t I2C_FATAL_ERRORS;
|
||||
extern std::atomic_bool PTME_LOCKED;
|
||||
|
||||
namespace ObjectFactory {
|
||||
|
||||
@ -58,10 +59,12 @@ void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher
|
||||
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||
PowerSwitchIF* pwrSwitcher, Stack5VHandler& stackHandler);
|
||||
void createTmpComponents();
|
||||
void createRadSensorChipSelect(LinuxLibgpioIF* gpioIF);
|
||||
ReturnValue_t createRadSensorComponent(LinuxLibgpioIF* gpioComIF, Stack5VHandler& handler);
|
||||
void createAcsBoardGpios(GpioCookie& cookie);
|
||||
void createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF, SerialComIF* uartComIF,
|
||||
PowerSwitchIF& pwrSwitcher);
|
||||
PowerSwitchIF& pwrSwitcher, bool enableHkSets,
|
||||
adis1650x::Type adisType);
|
||||
void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable,
|
||||
HeaterHandler*& heaterHandler);
|
||||
void createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enableHkSets);
|
||||
@ -75,6 +78,7 @@ ReturnValue_t createCcsdsComponents(CcsdsComponentArgs& args);
|
||||
void createMiscComponents();
|
||||
|
||||
void createTestComponents(LinuxLibgpioIF* gpioComIF);
|
||||
void createPlI2cResetGpio(LinuxLibgpioIF* gpioComIF);
|
||||
|
||||
void testAcsBrdAss(AcsBoardAssembly* assAss);
|
||||
|
||||
|
@ -237,7 +237,7 @@ void scheduling::initTasks() {
|
||||
|
||||
#if OBSW_ADD_RW == 1
|
||||
PeriodicTaskIF* rwPolling =
|
||||
factory->createPeriodicTask("RW_POLLING_TASK", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2,
|
||||
factory->createPeriodicTask("RW_POLLING_TASK", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2,
|
||||
0.4, missedDeadlineFunc, &RR_SCHEDULING);
|
||||
result = rwPolling->addComponent(objects::RW_POLLING_TASK);
|
||||
if (result != returnvalue::OK) {
|
||||
@ -291,9 +291,20 @@ void scheduling::initTasks() {
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("STR_ASSY", objects::STR_ASSY);
|
||||
}
|
||||
result = acsSysTask->addComponent(objects::GPS_0_HEALTH_DEV);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("GPS_0_HEALTH_DEV", objects::GPS_0_HEALTH_DEV);
|
||||
}
|
||||
result = acsSysTask->addComponent(objects::GPS_1_HEALTH_DEV);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("GPS_1_HEALTH_DEV", objects::GPS_1_HEALTH_DEV);
|
||||
}
|
||||
|
||||
PeriodicTaskIF* tcsSystemTask = factory->createPeriodicTask(
|
||||
"TCS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc, &RR_SCHEDULING);
|
||||
#if OBSW_ADD_THERMAL_TEMP_INSERTER == 1
|
||||
tcsSystemTask->addComponent(objects::THERMAL_TEMP_INSERTER);
|
||||
#endif
|
||||
scheduling::scheduleRtdSensors(tcsSystemTask);
|
||||
result = tcsSystemTask->addComponent(objects::TCS_SUBSYSTEM);
|
||||
if (result != returnvalue::OK) {
|
||||
@ -309,12 +320,10 @@ void scheduling::initTasks() {
|
||||
scheduling::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
|
||||
}
|
||||
#endif
|
||||
#if OBSW_ADD_HEATERS == 1
|
||||
result = tcsSystemTask->addComponent(objects::HEATER_HANDLER);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("HEATER_HANDLER", objects::HEATER_HANDLER);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_SYRLINKS == 1
|
||||
PeriodicTaskIF* syrlinksCom = factory->createPeriodicTask(
|
||||
@ -336,7 +345,6 @@ void scheduling::initTasks() {
|
||||
}
|
||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||
|
||||
// TODO: Use regular scheduler for this task
|
||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||
PeriodicTaskIF* mpsocHelperTask = factory->createPeriodicTask(
|
||||
"PLOC_MPSOC_HELPER", 0, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||
@ -357,7 +365,7 @@ void scheduling::initTasks() {
|
||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
|
||||
|
||||
PeriodicTaskIF* plTask = factory->createPeriodicTask(
|
||||
"PL_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc, &RR_SCHEDULING);
|
||||
"PL_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc, &RR_SCHEDULING);
|
||||
plTask->addComponent(objects::CAM_SWITCHER);
|
||||
scheduling::addMpsocSupvHandlers(plTask);
|
||||
scheduling::scheduleScexDev(plTask);
|
||||
@ -463,6 +471,9 @@ void scheduling::initTasks() {
|
||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||
supvHelperTask->startTask();
|
||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||
mpsocHelperTask->startTask();
|
||||
#endif
|
||||
plTask->startTask();
|
||||
|
||||
#if OBSW_ADD_TEST_CODE == 1
|
||||
@ -530,7 +541,7 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
|
||||
|
||||
FixedTimeslotTaskIF* gomSpacePstTask =
|
||||
factory.createFixedTimeslotTask("GS_PST_TASK", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4,
|
||||
0.5, missedDeadlineFunc, &RR_SCHEDULING);
|
||||
0.25, missedDeadlineFunc, &RR_SCHEDULING);
|
||||
result = pst::pstGompaceCan(gomSpacePstTask);
|
||||
if (result != returnvalue::OK) {
|
||||
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <fsfw/power/DummyPowerSwitcher.h>
|
||||
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||
#include <mission/power/gsDefs.h>
|
||||
#include <mission/system/tree/system.h>
|
||||
#include <mission/system/systemTree.h>
|
||||
#include <mission/utility/DummySdCardManager.h>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
@ -13,7 +13,7 @@
|
||||
#include "bsp_q7s/core/ObjectFactory.h"
|
||||
#include "busConf.h"
|
||||
#include "devConf.h"
|
||||
#include "dummies/helpers.h"
|
||||
#include "dummies/helperFactory.h"
|
||||
#include "eive/objects.h"
|
||||
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
||||
#include "linux/ObjectFactory.h"
|
||||
@ -36,7 +36,8 @@ void ObjectFactory::produce(void* args) {
|
||||
|
||||
PersistentTmStores stores;
|
||||
ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel,
|
||||
*SdCardManager::instance(), &ipcStore, &tmStore, stores);
|
||||
*SdCardManager::instance(), &ipcStore, &tmStore, stores,
|
||||
200);
|
||||
|
||||
LinuxLibgpioIF* gpioComIF = nullptr;
|
||||
SerialComIF* uartComIF = nullptr;
|
||||
@ -46,16 +47,26 @@ void ObjectFactory::produce(void* args) {
|
||||
/* Adding gpios for chip select decoding to the gpioComIf */
|
||||
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||
createPlI2cResetGpio(gpioComIF);
|
||||
|
||||
// Hardware is usually not connected to EM, so we need to create dummies which replace lower
|
||||
// level components.
|
||||
dummy::DummyCfg dummyCfg;
|
||||
dummyCfg.addCoreCtrlCfg = false;
|
||||
dummyCfg.addCamSwitcherDummy = false;
|
||||
#if OBSW_ADD_SYRLINKS == 1
|
||||
dummyCfg.addSyrlinksDummies = false;
|
||||
#endif
|
||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1 || OBSW_ADD_PLOC_MPSOC == 1
|
||||
dummyCfg.addPlocDummies = false;
|
||||
#endif
|
||||
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
||||
dummyCfg.addPowerDummies = false;
|
||||
// The ACU broke.
|
||||
dummyCfg.addOnlyAcuDummy = true;
|
||||
#endif
|
||||
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
|
||||
dummyCfg.addBpxBattDummy = false;
|
||||
#endif
|
||||
#if OBSW_ADD_ACS_BOARD == 1
|
||||
dummyCfg.addAcsBoardDummies = false;
|
||||
@ -63,33 +74,21 @@ void ObjectFactory::produce(void* args) {
|
||||
|
||||
PowerSwitchIF* pwrSwitcher = nullptr;
|
||||
#if OBSW_ADD_GOMSPACE_PCDU == 0
|
||||
auto* comCookieDummy = new ComCookieDummy();
|
||||
pwrSwitcher = new PcduHandlerDummy(objects::PCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
pwrSwitcher = new PcduHandlerDummy(objects::PCDU_HANDLER);
|
||||
#else
|
||||
createPcduComponents(gpioComIF, &pwrSwitcher, enableHkSets);
|
||||
#endif
|
||||
satsystem::EIVE_SYSTEM.setI2cRecoveryParams(pwrSwitcher);
|
||||
|
||||
dummy::createDummies(dummyCfg, *pwrSwitcher, gpioComIF);
|
||||
dummy::createDummies(dummyCfg, *pwrSwitcher, gpioComIF, enableHkSets);
|
||||
|
||||
new CoreController(objects::CORE_CONTROLLER, I2C_FATAL_ERRORS, enableHkSets);
|
||||
|
||||
// Regular FM code, does not work for EM if the hardware is not connected
|
||||
// createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||
// createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
||||
// createSyrlinksComponents(pwrSwitcher);
|
||||
// createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
|
||||
// createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
|
||||
// createTmpComponents();
|
||||
// createSolarArrayDeploymentComponents();
|
||||
// createPayloadComponents(gpioComIF);
|
||||
// createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
|
||||
|
||||
// TODO: Careful! Switching this on somehow messes with the communication with the ProASIC
|
||||
// and will cause xsc_boot_copy commands to always boot to 0 0
|
||||
// createRadSensorComponent(gpioComIF);
|
||||
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
||||
|
||||
#if OBSW_ADD_ACS_BOARD == 1
|
||||
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher);
|
||||
// Still initialize chip select to avoid SPI bus issues.
|
||||
createRadSensorChipSelect(gpioComIF);
|
||||
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher, true,
|
||||
adis1650x::Type::ADIS16507);
|
||||
#else
|
||||
// Still add all GPIOs for EM.
|
||||
GpioCookie* acsBoardGpios = new GpioCookie();
|
||||
@ -117,6 +116,8 @@ void ObjectFactory::produce(void* args) {
|
||||
createStrComponents(pwrSwitcher);
|
||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||
|
||||
createPayloadComponents(gpioComIF, *pwrSwitcher);
|
||||
|
||||
#if OBSW_ADD_CCSDS_IP_CORES == 1
|
||||
CcsdsIpCoreHandler* ipCoreHandler = nullptr;
|
||||
CcsdsComponentArgs ccsdsArgs(*gpioComIF, *ipcStore, *tmStore, stores, *pusFunnel, *cfdpFunnel,
|
||||
@ -125,6 +126,7 @@ void ObjectFactory::produce(void* args) {
|
||||
#if OBSW_TM_TO_PTME == 1
|
||||
if (ccsdsArgs.liveDestination != nullptr) {
|
||||
pusFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0);
|
||||
cfdpFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0);
|
||||
}
|
||||
#endif
|
||||
#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */
|
||||
@ -134,11 +136,11 @@ void ObjectFactory::produce(void* args) {
|
||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||
#if OBSW_ADD_SCEX_DEVICE == 1
|
||||
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false,
|
||||
pcdu::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
|
||||
power::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
|
||||
#endif
|
||||
createAcsController(true, enableHkSets);
|
||||
HeaterHandler* heaterHandler = nullptr;
|
||||
ObjectFactory::createGenericHeaterComponents(*gpioComIF, *pwrSwitcher, heaterHandler);
|
||||
HeaterHandler* heaterHandler;
|
||||
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
|
||||
createThermalController(*heaterHandler);
|
||||
satsystem::init();
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
#include <bsp_q7s/callbacks/q7sGpioCallbacks.h>
|
||||
#include <devices/gpioIds.h>
|
||||
#include <fsfw/storagemanager/LocalPool.h>
|
||||
#include <fsfw/storagemanager/PoolManager.h>
|
||||
#include <mission/power/gsDefs.h>
|
||||
#include <mission/system/EiveSystem.h>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "bsp_q7s/core/CoreController.h"
|
||||
@ -13,7 +15,7 @@
|
||||
#include "linux/ObjectFactory.h"
|
||||
#include "linux/callbacks/gpioCallbacks.h"
|
||||
#include "mission/genericFactory.h"
|
||||
#include "mission/system/tree/system.h"
|
||||
#include "mission/system/systemTree.h"
|
||||
#include "mission/tmtc/tmFilters.h"
|
||||
|
||||
void ObjectFactory::produce(void* args) {
|
||||
@ -31,7 +33,8 @@ void ObjectFactory::produce(void* args) {
|
||||
|
||||
PersistentTmStores stores;
|
||||
ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel,
|
||||
*SdCardManager::instance(), &ipcStore, &tmStore, stores);
|
||||
*SdCardManager::instance(), &ipcStore, &tmStore, stores,
|
||||
200);
|
||||
|
||||
LinuxLibgpioIF* gpioComIF = nullptr;
|
||||
SerialComIF* uartComIF = nullptr;
|
||||
@ -42,9 +45,12 @@ void ObjectFactory::produce(void* args) {
|
||||
/* Adding gpios for chip select decoding to the gpioComIf */
|
||||
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||
createPlI2cResetGpio(gpioComIF);
|
||||
|
||||
new CoreController(objects::CORE_CONTROLLER, I2C_FATAL_ERRORS, enableHkSets);
|
||||
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
||||
createPcduComponents(gpioComIF, &pwrSwitcher, enableHkSets);
|
||||
satsystem::EIVE_SYSTEM.setI2cRecoveryParams(pwrSwitcher);
|
||||
|
||||
auto* stackHandler = new Stack5VHandler(*pwrSwitcher);
|
||||
|
||||
#if OBSW_ADD_RAD_SENSORS == 1
|
||||
@ -55,7 +61,8 @@ void ObjectFactory::produce(void* args) {
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_ACS_BOARD == 1
|
||||
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher);
|
||||
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher, true,
|
||||
adis1650x::Type::ADIS16505);
|
||||
#endif
|
||||
HeaterHandler* heaterHandler;
|
||||
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
|
||||
@ -91,13 +98,14 @@ void ObjectFactory::produce(void* args) {
|
||||
#if OBSW_TM_TO_PTME == 1
|
||||
if (ccsdsArgs.liveDestination != nullptr) {
|
||||
pusFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0);
|
||||
cfdpFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0);
|
||||
}
|
||||
#endif
|
||||
#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */
|
||||
|
||||
#if OBSW_ADD_SCEX_DEVICE == 1
|
||||
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false,
|
||||
pcdu::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
|
||||
power::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
|
||||
#endif
|
||||
/* Test Task */
|
||||
#if OBSW_ADD_TEST_CODE == 1
|
||||
|
@ -309,32 +309,6 @@ void SdCardManager::resetState() {
|
||||
currentOp = Operations::IDLE;
|
||||
}
|
||||
|
||||
ReturnValue_t SdCardManager::updateSdStatePair() {
|
||||
using namespace std;
|
||||
|
||||
std::error_code e;
|
||||
if (not filesystem::exists(SD_STATE_FILE, e)) {
|
||||
return STATUS_FILE_NEXISTS;
|
||||
}
|
||||
|
||||
// Now the file should exist in any case. Still check whether it exists.
|
||||
fstream sdStatus(SD_STATE_FILE);
|
||||
if (not sdStatus.good()) {
|
||||
return STATUS_FILE_NEXISTS;
|
||||
}
|
||||
string line;
|
||||
uint8_t idx = 0;
|
||||
sd::SdCard currentSd = sd::SdCard::SLOT_0;
|
||||
// Process status file line by line
|
||||
while (std::getline(sdStatus, line)) {
|
||||
processSdStatusLine(line, idx, currentSd);
|
||||
}
|
||||
if (sdStates.first != sd::SdState::MOUNTED && sdStates.second != sd::SdState::MOUNTED) {
|
||||
sdCardActive = false;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void SdCardManager::processSdStatusLine(std::string& line, uint8_t& idx, sd::SdCard& currentSd) {
|
||||
using namespace std;
|
||||
istringstream iss(line);
|
||||
@ -407,6 +381,7 @@ ReturnValue_t SdCardManager::setPreferredSdCard(sd::SdCard sdCard) {
|
||||
}
|
||||
|
||||
ReturnValue_t SdCardManager::updateSdCardStateFile() {
|
||||
using namespace std;
|
||||
if (cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING) {
|
||||
return CommandExecutor::COMMAND_PENDING;
|
||||
}
|
||||
@ -414,10 +389,31 @@ ReturnValue_t SdCardManager::updateSdCardStateFile() {
|
||||
std::string updateCmd = "q7hw sd info all > " + std::string(SD_STATE_FILE);
|
||||
cmdExecutor.load(updateCmd, true, printCmdOutput);
|
||||
ReturnValue_t result = cmdExecutor.execute();
|
||||
if (blocking and result != returnvalue::OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::mountSdCard");
|
||||
}
|
||||
return result;
|
||||
|
||||
std::error_code e;
|
||||
if (not filesystem::exists(SD_STATE_FILE, e)) {
|
||||
return STATUS_FILE_NEXISTS;
|
||||
}
|
||||
|
||||
// Now the file should exist in any case. Still check whether it exists.
|
||||
fstream sdStatus(SD_STATE_FILE);
|
||||
if (not sdStatus.good()) {
|
||||
return STATUS_FILE_NEXISTS;
|
||||
}
|
||||
string line;
|
||||
uint8_t idx = 0;
|
||||
sd::SdCard currentSd = sd::SdCard::SLOT_0;
|
||||
// Process status file line by line
|
||||
while (std::getline(sdStatus, line)) {
|
||||
processSdStatusLine(line, idx, currentSd);
|
||||
}
|
||||
if (sdStates.first != sd::SdState::MOUNTED && sdStates.second != sd::SdState::MOUNTED) {
|
||||
sdCardActive = false;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
const char* SdCardManager::getCurrentMountPrefix() const {
|
||||
@ -585,3 +581,8 @@ void SdCardManager::markUnusable() {
|
||||
MutexGuard mg(defaultLock, LOCK_TYPE, OTHER_TIMEOUT, LOCK_CTX);
|
||||
markedUnusable = true;
|
||||
}
|
||||
|
||||
void SdCardManager::markUsable() {
|
||||
MutexGuard mg(defaultLock, LOCK_TYPE, OTHER_TIMEOUT, LOCK_CTX);
|
||||
markedUnusable = false;
|
||||
}
|
||||
|
@ -117,16 +117,6 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
|
||||
ReturnValue_t switchOffSdCard(sd::SdCard sdCard, bool doUnmountSdCard = true,
|
||||
SdStatePair* statusPair = nullptr);
|
||||
|
||||
/**
|
||||
* Update the state file or creates one if it does not exist. You need to call this
|
||||
* function before calling #sdCardActive
|
||||
* @return
|
||||
* - returnvalue::OK if the state file was updated successfully
|
||||
* - CommandExecutor::COMMAND_PENDING: Non-blocking command is pending
|
||||
* - returnvalue::FAILED: blocking command failed
|
||||
*/
|
||||
ReturnValue_t updateSdCardStateFile();
|
||||
|
||||
/**
|
||||
* Get the state of the SD cards. If the state file does not exist, this function will
|
||||
* take care of updating it. If it does not, the function will use the state file to get
|
||||
@ -215,6 +205,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
|
||||
ReturnValue_t performFsck(sd::SdCard sdcard, bool printOutput, int& linuxError);
|
||||
|
||||
void markUnusable();
|
||||
void markUsable();
|
||||
|
||||
private:
|
||||
CommandExecutor cmdExecutor;
|
||||
@ -234,7 +225,15 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
|
||||
|
||||
SdCardManager();
|
||||
|
||||
ReturnValue_t updateSdStatePair();
|
||||
/**
|
||||
* Update the state file or creates one if it does not exist. You need to call this
|
||||
* function before calling #sdCardActive
|
||||
* @return
|
||||
* - returnvalue::OK if the state file was updated successfully
|
||||
* - CommandExecutor::COMMAND_PENDING: Non-blocking command is pending
|
||||
* - returnvalue::FAILED: blocking command failed
|
||||
*/
|
||||
ReturnValue_t updateSdCardStateFile();
|
||||
|
||||
ReturnValue_t setSdCardState(sd::SdCard sdCard, bool on);
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "fsfw/version.h"
|
||||
#include "mission/acs/defs.h"
|
||||
#include "mission/com/defs.h"
|
||||
#include "mission/system/tree/system.h"
|
||||
#include "mission/system/systemTree.h"
|
||||
#include "q7sConfig.h"
|
||||
#include "watchdog/definitions.h"
|
||||
|
||||
|
@ -40,8 +40,8 @@ set(CROSS_COMPILE_OBJCOPY "${CROSS_COMPILE}-objcopy")
|
||||
set(CROSS_COMPILE_SIZE "${CROSS_COMPILE}-size")
|
||||
|
||||
# At the very least, cross compile gcc and g++ have to be set!
|
||||
find_program (CMAKE_C_COMPILER ${CROSS_COMPILE_CC} REQUIRED)
|
||||
find_program (CMAKE_CXX_COMPILER ${CROSS_COMPILE_CXX} REQUIRED)
|
||||
find_program (CMAKE_C_COMPILER ${CROSS_COMPILE_CC} HINTS $ENV{CROSS_COMPILE_BIN_PATH} REQUIRED)
|
||||
find_program (CMAKE_CXX_COMPILER ${CROSS_COMPILE_CXX} HINTS $ENV{CROSS_COMPILE_BIN_PATH} REQUIRED)
|
||||
# Useful utilities, not strictly necessary
|
||||
find_program(CMAKE_SIZE ${CROSS_COMPILE_SIZE})
|
||||
find_program(CMAKE_OBJCOPY ${CROSS_COMPILE_OBJCOPY})
|
||||
|
@ -77,6 +77,8 @@ enum gpioId_t {
|
||||
CS_RAD_SENSOR,
|
||||
ENABLE_RADFET,
|
||||
|
||||
PL_I2C_ARESETN,
|
||||
|
||||
PAPB_BUSY_N,
|
||||
PAPB_EMPTY,
|
||||
|
||||
@ -93,7 +95,6 @@ enum gpioId_t {
|
||||
EN_RW_CS,
|
||||
|
||||
SPI_MUX,
|
||||
|
||||
VC0_PAPB_EMPTY,
|
||||
VC0_PAPB_BUSY,
|
||||
VC1_PAPB_EMPTY,
|
||||
|
@ -1,20 +0,0 @@
|
||||
#ifndef FSFWCONFIG_DEVICES_HEATERSWITCHERLIST_H_
|
||||
#define FSFWCONFIG_DEVICES_HEATERSWITCHERLIST_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
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_S_BAND,
|
||||
NUMBER_OF_SWITCHES
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* FSFWCONFIG_DEVICES_HEATERSWITCHERLIST_H_ */
|
@ -15,6 +15,9 @@ static constexpr char OBSW_VERSION_FILE_NAME[] = "obsw_version.txt";
|
||||
static constexpr char OBSW_PATH[] = "/usr/bin/eive-obsw";
|
||||
static constexpr char OBSW_VERSION_FILE_PATH[] = "/usr/share/eive-obsw/obsw_version.txt";
|
||||
|
||||
// ISO8601 timestamp.
|
||||
static constexpr char FILE_DATE_FORMAT[] = "%FT%H%M%SZ";
|
||||
|
||||
static constexpr uint16_t EIVE_PUS_APID = 0x65;
|
||||
static constexpr uint16_t EIVE_CFDP_APID = 0x66;
|
||||
static constexpr uint16_t EIVE_LOCAL_CFDP_ENTITY_ID = EIVE_CFDP_APID;
|
||||
@ -31,8 +34,8 @@ static constexpr uint32_t STR_IMG_HELPER_QUEUE_SIZE = 50;
|
||||
static constexpr uint8_t LIVE_TM = 0;
|
||||
|
||||
/* Limits for filename and path checks */
|
||||
static constexpr uint32_t MAX_PATH_SIZE = 100;
|
||||
static constexpr uint32_t MAX_FILENAME_SIZE = 50;
|
||||
static constexpr uint32_t MAX_PATH_SIZE = 200;
|
||||
static constexpr uint32_t MAX_FILENAME_SIZE = 100;
|
||||
|
||||
static constexpr uint32_t SA_DEPL_INIT_BUFFER_SECS = 120;
|
||||
// Burn time for autonomous deployment
|
||||
@ -55,7 +58,9 @@ static constexpr uint32_t CFDP_STORE_QUEUE_SIZE = 300;
|
||||
|
||||
static constexpr uint32_t MAX_PUS_FUNNEL_QUEUE_DEPTH = 100;
|
||||
static constexpr uint32_t MAX_CFDP_FUNNEL_QUEUE_DEPTH = 80;
|
||||
static constexpr uint32_t VERIFICATION_SERVICE_QUEUE_DEPTH = 120;
|
||||
static constexpr uint32_t HK_SERVICE_QUEUE_DEPTH = 60;
|
||||
static constexpr uint32_t ACTION_SERVICE_QUEUE_DEPTH = 60;
|
||||
|
||||
static constexpr uint32_t MAX_STORED_CMDS_UDP = 150;
|
||||
static constexpr uint32_t MAX_STORED_CMDS_TCP = 180;
|
||||
|
@ -43,6 +43,8 @@ enum commonObjects : uint32_t {
|
||||
RW4 = 0x44120350,
|
||||
STAR_TRACKER = 0x44130001,
|
||||
GPS_CONTROLLER = 0x44130045,
|
||||
GPS_0_HEALTH_DEV = 0x44130046,
|
||||
GPS_1_HEALTH_DEV = 0x44130047,
|
||||
|
||||
IMTQ_POLLING = 0x44140013,
|
||||
IMTQ_HANDLER = 0x44140014,
|
||||
|
@ -37,9 +37,6 @@ enum commonClassIds : uint8_t {
|
||||
SUPV_RETURN_VALUES_IF, // SPVRTVIF
|
||||
ACS_CTRL, // ACSCTRL
|
||||
ACS_MEKF, // ACSMEKF
|
||||
ACS_SAFE, // ACSSAF
|
||||
ACS_PTG, // ACSPTG
|
||||
ACS_DETUMBLE, // ACSDTB
|
||||
SD_CARD_MANAGER, // SDMA
|
||||
LOCAL_PARAM_HANDLER, // LPH
|
||||
PERSISTENT_TM_STORE, // PTM
|
||||
|
@ -2,8 +2,11 @@
|
||||
|
||||
#include <mission/power/gsDefs.h>
|
||||
|
||||
AcuDummy::AcuDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||
AcuDummy::AcuDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie, bool enableHkSets)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie),
|
||||
coreHk(this),
|
||||
auxHk(this),
|
||||
enableHkSets(enableHkSets) {}
|
||||
|
||||
AcuDummy::~AcuDummy() {}
|
||||
|
||||
@ -37,7 +40,49 @@ uint32_t AcuDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return
|
||||
|
||||
ReturnValue_t AcuDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) {
|
||||
using namespace ACU;
|
||||
localDataPoolMap.emplace(pool::ACU_CURRENT_IN_CHANNELS, new PoolEntry<int16_t>(6));
|
||||
localDataPoolMap.emplace(pool::ACU_VOLTAGE_IN_CHANNELS, new PoolEntry<uint16_t>(6));
|
||||
|
||||
localDataPoolMap.emplace(pool::ACU_VCC, new PoolEntry<uint16_t>({0}));
|
||||
localDataPoolMap.emplace(pool::ACU_VBAT, new PoolEntry<uint16_t>({0}));
|
||||
|
||||
localDataPoolMap.emplace(ACU::pool::ACU_TEMPERATURES,
|
||||
new PoolEntry<float>({10.0, 10.0, 10.0}, true));
|
||||
|
||||
localDataPoolMap.emplace(pool::ACU_MPPT_MODE, new PoolEntry<uint8_t>({0}));
|
||||
|
||||
localDataPoolMap.emplace(pool::ACU_VBOOST_IN_CHANNELS, new PoolEntry<uint16_t>(6));
|
||||
localDataPoolMap.emplace(pool::ACU_POWER_IN_CHANNELS, new PoolEntry<uint16_t>(6));
|
||||
|
||||
localDataPoolMap.emplace(pool::ACU_DAC_ENABLES, new PoolEntry<uint8_t>(3));
|
||||
localDataPoolMap.emplace(pool::ACU_DAC_RAW_CHANNELS, new PoolEntry<uint16_t>(6));
|
||||
|
||||
localDataPoolMap.emplace(pool::ACU_BOOTCAUSE, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(pool::ACU_BOOTCNT, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(pool::ACU_UPTIME, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(pool::ACU_RESET_CAUSE, new PoolEntry<uint16_t>({0}));
|
||||
localDataPoolMap.emplace(pool::ACU_MPPT_TIME, new PoolEntry<uint16_t>({0}));
|
||||
localDataPoolMap.emplace(pool::ACU_MPPT_PERIOD, new PoolEntry<uint16_t>({0}));
|
||||
|
||||
localDataPoolMap.emplace(pool::ACU_DEVICES, new PoolEntry<uint8_t>(8));
|
||||
localDataPoolMap.emplace(pool::ACU_DEVICES_STATUS, new PoolEntry<uint8_t>(8));
|
||||
|
||||
localDataPoolMap.emplace(pool::ACU_WDT_CNT_GND, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(pool::ACU_WDT_GND_LEFT, new PoolEntry<uint32_t>({0}));
|
||||
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), enableHkSets, 30.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(auxHk.getSid(), enableHkSets, 6000.0));
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
LocalPoolDataSetBase *AcuDummy::getDataSetHandle(sid_t sid) {
|
||||
if (sid == coreHk.getSid()) {
|
||||
return &coreHk;
|
||||
} else if (sid == auxHk.getSid()) {
|
||||
return &auxHk;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define DUMMIES_ACUDUMMY_H_
|
||||
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
#include <mission/power/gsDefs.h>
|
||||
|
||||
class AcuDummy : public DeviceHandlerBase {
|
||||
public:
|
||||
@ -11,10 +12,14 @@ class AcuDummy : public DeviceHandlerBase {
|
||||
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);
|
||||
AcuDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie, bool enableHkSets);
|
||||
virtual ~AcuDummy();
|
||||
|
||||
protected:
|
||||
ACU::CoreHk coreHk;
|
||||
ACU::AuxHk auxHk;
|
||||
bool enableHkSets;
|
||||
|
||||
void doStartUp() override;
|
||||
void doShutDown() override;
|
||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||
@ -28,6 +33,7 @@ class AcuDummy : public DeviceHandlerBase {
|
||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) override;
|
||||
LocalPoolDataSetBase *getDataSetHandle(sid_t sid) override;
|
||||
};
|
||||
|
||||
#endif /* DUMMIES_ACUDUMMY_H_ */
|
||||
|
@ -37,19 +37,19 @@ uint32_t BpxDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return
|
||||
|
||||
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(bpxBat::BATT_TEMP_1, &battTemp1);
|
||||
localDataPoolMap.emplace(bpxBat::BATT_TEMP_2, &battTemp2);
|
||||
localDataPoolMap.emplace(bpxBat::BATT_TEMP_3, &battTemp3);
|
||||
localDataPoolMap.emplace(bpxBat::BATT_TEMP_4, &battTemp4);
|
||||
localDataPoolMap.emplace(bpxBat::CHARGE_CURRENT, &chargeCurrent);
|
||||
localDataPoolMap.emplace(bpxBat::DISCHARGE_CURRENT, &dischargeCurrent);
|
||||
localDataPoolMap.emplace(bpxBat::HEATER_CURRENT, &heaterCurrent);
|
||||
localDataPoolMap.emplace(bpxBat::BATT_VOLTAGE, &battVolt);
|
||||
localDataPoolMap.emplace(bpxBat::REBOOT_COUNTER, &rebootCounter);
|
||||
localDataPoolMap.emplace(bpxBat::BOOTCAUSE, &bootCause);
|
||||
|
||||
localDataPoolMap.emplace(BpxBattery::BATTERY_HEATER_MODE, &battheatMode);
|
||||
localDataPoolMap.emplace(BpxBattery::BATTHEAT_LOW_LIMIT, &battheatLow);
|
||||
localDataPoolMap.emplace(BpxBattery::BATTHEAT_HIGH_LIMIT, &battheatHigh);
|
||||
localDataPoolMap.emplace(bpxBat::BATTERY_HEATER_MODE, &battheatMode);
|
||||
localDataPoolMap.emplace(bpxBat::BATTHEAT_LOW_LIMIT, &battheatLow);
|
||||
localDataPoolMap.emplace(bpxBat::BATTHEAT_HIGH_LIMIT, &battheatHigh);
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -26,6 +26,6 @@ target_sources(
|
||||
CoreControllerDummy.cpp
|
||||
PlocMpsocDummy.cpp
|
||||
PlocSupervisorDummy.cpp
|
||||
helpers.cpp
|
||||
helperFactory.cpp
|
||||
MgmRm3100Dummy.cpp
|
||||
Tmp1075Dummy.cpp)
|
||||
|
@ -46,7 +46,7 @@ ReturnValue_t GyroAdisDummy::initializeLocalDataPool(localpool::DataPool &localD
|
||||
localDataPoolMap.emplace(adis1650x::ACCELERATION_X, new PoolEntry<double>({0.0}));
|
||||
localDataPoolMap.emplace(adis1650x::ACCELERATION_Y, new PoolEntry<double>({0.0}));
|
||||
localDataPoolMap.emplace(adis1650x::ACCELERATION_Z, new PoolEntry<double>({0.0}));
|
||||
localDataPoolMap.emplace(adis1650x::TEMPERATURE, new PoolEntry<float>({0.0}));
|
||||
localDataPoolMap.emplace(adis1650x::TEMPERATURE, new PoolEntry<float>({10.0}, true));
|
||||
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -2,15 +2,34 @@
|
||||
|
||||
#include <mission/acs/imtqHelpers.h>
|
||||
|
||||
ImtqDummy::ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||
ImtqDummy::ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie,
|
||||
power::Switch_t pwrSwitcher, bool enableHkSets)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie),
|
||||
enableHkSets(enableHkSets),
|
||||
statusSet(this),
|
||||
dipoleSet(*this),
|
||||
rawMtmNoTorque(this),
|
||||
hkDatasetNoTorque(this),
|
||||
rawMtmWithTorque(this),
|
||||
hkDatasetWithTorque(this),
|
||||
calMtmMeasurementSet(this),
|
||||
switcher(pwrSwitcher) {}
|
||||
|
||||
ImtqDummy::~ImtqDummy() = default;
|
||||
|
||||
void ImtqDummy::doStartUp() { setMode(MODE_NORMAL); }
|
||||
void ImtqDummy::doStartUp() { setMode(MODE_ON); }
|
||||
|
||||
void ImtqDummy::doShutDown() { setMode(_MODE_POWER_DOWN); }
|
||||
|
||||
ReturnValue_t ImtqDummy::getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) {
|
||||
if (switcher != power::NO_SWITCH) {
|
||||
*numberOfSwitches = 1;
|
||||
*switches = &switcher;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
return DeviceHandlerBase::NO_SWITCH;
|
||||
}
|
||||
|
||||
ReturnValue_t ImtqDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
|
||||
|
||||
ReturnValue_t ImtqDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
||||
@ -43,5 +62,59 @@ ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataP
|
||||
localDataPoolMap.emplace(imtq::ACTUATION_CAL_STATUS, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(imtq::MTM_RAW, new PoolEntry<float>({0.12, 0.76, -0.45}, true));
|
||||
localDataPoolMap.emplace(imtq::ACTUATION_RAW_STATUS, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(imtq::DIPOLES_ID, new PoolEntry<int16_t>({0, 0, 0}));
|
||||
localDataPoolMap.emplace(imtq::CURRENT_TORQUE_DURATION, new PoolEntry<uint16_t>({0}));
|
||||
|
||||
// ENG HK No Torque
|
||||
localDataPoolMap.emplace(imtq::DIGITAL_VOLTAGE_MV, new PoolEntry<uint16_t>({0}));
|
||||
localDataPoolMap.emplace(imtq::ANALOG_VOLTAGE_MV, new PoolEntry<uint16_t>({0}));
|
||||
localDataPoolMap.emplace(imtq::DIGITAL_CURRENT, new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(imtq::ANALOG_CURRENT, new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(imtq::COIL_CURRENTS, &coilCurrentsMilliampsNoTorque);
|
||||
localDataPoolMap.emplace(imtq::COIL_TEMPERATURES, &coilTempsNoTorque);
|
||||
localDataPoolMap.emplace(imtq::MCU_TEMPERATURE, new PoolEntry<int16_t>({0}));
|
||||
|
||||
// ENG HK With Torque
|
||||
localDataPoolMap.emplace(imtq::DIGITAL_VOLTAGE_MV_WT, new PoolEntry<uint16_t>({0}));
|
||||
localDataPoolMap.emplace(imtq::ANALOG_VOLTAGE_MV_WT, new PoolEntry<uint16_t>({0}));
|
||||
localDataPoolMap.emplace(imtq::DIGITAL_CURRENT_WT, new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(imtq::ANALOG_CURRENT_WT, new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(imtq::COIL_CURRENTS_WT, &coilCurrentsMilliampsWithTorque);
|
||||
localDataPoolMap.emplace(imtq::COIL_TEMPERATURES_WT, &coilTempsWithTorque);
|
||||
localDataPoolMap.emplace(imtq::MCU_TEMPERATURE_WT, new PoolEntry<int16_t>({0}));
|
||||
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(hkDatasetNoTorque.getSid(), enableHkSets, 30.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(hkDatasetWithTorque.getSid(), enableHkSets, 30.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(rawMtmNoTorque.getSid(), false, 10.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(rawMtmWithTorque.getSid(), false, 10.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(calMtmMeasurementSet.getSid(), false, 10.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(statusSet.getSid(), false, 10.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(dipoleSet.getSid(), false, 10.0));
|
||||
return DeviceHandlerBase::initializeLocalDataPool(localDataPoolMap, poolManager);
|
||||
}
|
||||
|
||||
LocalPoolDataSetBase *ImtqDummy::getDataSetHandle(sid_t sid) {
|
||||
if (sid == hkDatasetNoTorque.getSid()) {
|
||||
return &hkDatasetNoTorque;
|
||||
} else if (sid == dipoleSet.getSid()) {
|
||||
return &dipoleSet;
|
||||
} else if (sid == statusSet.getSid()) {
|
||||
return &statusSet;
|
||||
} else if (sid == hkDatasetWithTorque.getSid()) {
|
||||
return &hkDatasetWithTorque;
|
||||
} else if (sid == rawMtmWithTorque.getSid()) {
|
||||
return &rawMtmWithTorque;
|
||||
} else if (sid == calMtmMeasurementSet.getSid()) {
|
||||
return &calMtmMeasurementSet;
|
||||
} else if (sid == rawMtmNoTorque.getSid()) {
|
||||
return &rawMtmNoTorque;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
|
||||
#include "mission/acs/imtqHelpers.h"
|
||||
|
||||
class ImtqDummy : public DeviceHandlerBase {
|
||||
public:
|
||||
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
|
||||
@ -11,10 +13,44 @@ class ImtqDummy : public DeviceHandlerBase {
|
||||
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);
|
||||
ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie,
|
||||
power::Switch_t pwrSwitcher, bool enableHkSets);
|
||||
~ImtqDummy() override;
|
||||
|
||||
protected:
|
||||
bool enableHkSets;
|
||||
|
||||
imtq::StatusDataset statusSet;
|
||||
imtq::DipoleActuationSet dipoleSet;
|
||||
imtq::RawMtmMeasurementNoTorque rawMtmNoTorque;
|
||||
imtq::HkDatasetNoTorque hkDatasetNoTorque;
|
||||
|
||||
imtq::RawMtmMeasurementWithTorque rawMtmWithTorque;
|
||||
imtq::HkDatasetWithTorque hkDatasetWithTorque;
|
||||
|
||||
imtq::CalibratedMtmMeasurementSet calMtmMeasurementSet;
|
||||
|
||||
PoolEntry<uint8_t> statusMode = PoolEntry<uint8_t>({0});
|
||||
PoolEntry<uint8_t> statusError = PoolEntry<uint8_t>({0});
|
||||
PoolEntry<uint8_t> statusConfig = PoolEntry<uint8_t>({0});
|
||||
PoolEntry<uint32_t> statusUptime = PoolEntry<uint32_t>({0});
|
||||
|
||||
PoolEntry<int32_t> mgmCalEntry = PoolEntry<int32_t>(3);
|
||||
PoolEntry<int16_t> dipolesPoolEntry = PoolEntry<int16_t>({0, 0, 0}, false);
|
||||
PoolEntry<uint16_t> torqueDurationEntry = PoolEntry<uint16_t>({0}, false);
|
||||
PoolEntry<float> coilCurrentsMilliampsNoTorque = PoolEntry<float>(3);
|
||||
PoolEntry<float> coilCurrentsMilliampsWithTorque = PoolEntry<float>(3);
|
||||
PoolEntry<int16_t> coilTempsNoTorque = PoolEntry<int16_t>(3);
|
||||
PoolEntry<int16_t> coilTempsWithTorque = PoolEntry<int16_t>(3);
|
||||
PoolEntry<float> mtmRawNoTorque = PoolEntry<float>(3);
|
||||
PoolEntry<uint8_t> actStatusNoTorque = PoolEntry<uint8_t>(1);
|
||||
PoolEntry<float> mtmRawWithTorque = PoolEntry<float>(3);
|
||||
PoolEntry<uint8_t> actStatusWithTorque = PoolEntry<uint8_t>(1);
|
||||
|
||||
power::Switch_t switcher = power::NO_SWITCH;
|
||||
|
||||
ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) override;
|
||||
|
||||
void doStartUp() override;
|
||||
void doShutDown() override;
|
||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||
@ -28,6 +64,7 @@ class ImtqDummy : public DeviceHandlerBase {
|
||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) override;
|
||||
LocalPoolDataSetBase *getDataSetHandle(sid_t sid) override;
|
||||
};
|
||||
|
||||
#endif /* DUMMIES_IMTQDUMMY_H_ */
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "Max31865Dummy.h"
|
||||
|
||||
#include "fsfw/datapool/PoolReadGuard.h"
|
||||
|
||||
using namespace returnvalue;
|
||||
|
||||
Max31865Dummy::Max31865Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||
@ -28,15 +30,20 @@ ReturnValue_t Max31865Dummy::initializeLocalDataPool(localpool::DataPool &localD
|
||||
LocalDataPoolManager &poolManager) {
|
||||
using namespace MAX31865;
|
||||
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::RTD_VALUE), new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::TEMPERATURE_C), new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::TEMPERATURE_C),
|
||||
new PoolEntry<float>({10.0}, true));
|
||||
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::LAST_FAULT_BYTE),
|
||||
new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::FAULT_BYTE), new PoolEntry<uint8_t>({0}));
|
||||
return OK;
|
||||
}
|
||||
|
||||
void Max31865Dummy::setTemperature(float temperature) {
|
||||
set.temperatureCelcius.value = temperature;
|
||||
void Max31865Dummy::setTemperature(float temperature, bool valid) {
|
||||
PoolReadGuard pg(&set);
|
||||
if (pg.getReadResult() == returnvalue::OK) {
|
||||
set.temperatureCelcius.value = temperature;
|
||||
set.setValidity(valid, true);
|
||||
}
|
||||
}
|
||||
|
||||
LocalPoolDataSetBase *Max31865Dummy::getDataSetHandle(sid_t sid) { return &set; }
|
||||
|
@ -10,7 +10,7 @@ class Max31865Dummy : public DeviceHandlerBase {
|
||||
Max31865Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
|
||||
Max31865Dummy(object_id_t objectId, CookieIF *comCookie);
|
||||
|
||||
void setTemperature(float temperature);
|
||||
void setTemperature(float temperature, bool setValid);
|
||||
|
||||
private:
|
||||
MAX31865::PrimarySet set;
|
||||
|
@ -40,7 +40,7 @@ uint32_t MgmLIS3MDLDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
|
||||
|
||||
ReturnValue_t MgmLIS3MDLDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) {
|
||||
localDataPoolMap.emplace(mgmLis3::TEMPERATURE_CELCIUS, new PoolEntry<float>({0.0}));
|
||||
localDataPoolMap.emplace(mgmLis3::TEMPERATURE_CELCIUS, new PoolEntry<float>({10.0}, true));
|
||||
localDataPoolMap.emplace(mgmLis3::FIELD_STRENGTHS,
|
||||
new PoolEntry<float>({1.02, 0.56, -0.78}, true));
|
||||
return returnvalue::OK;
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <mission/power/gsDefs.h>
|
||||
|
||||
#include "fsfw/datapool/PoolReadGuard.h"
|
||||
|
||||
P60DockDummy::P60DockDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
|
||||
#include "mission/power/gsDefs.h"
|
||||
|
||||
class P60DockDummy : public DeviceHandlerBase {
|
||||
public:
|
||||
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
|
||||
@ -15,6 +17,8 @@ class P60DockDummy : public DeviceHandlerBase {
|
||||
virtual ~P60DockDummy();
|
||||
|
||||
protected:
|
||||
lp_var_t<float> temp1 = lp_var_t<float>(this, P60Dock::pool::P60DOCK_TEMPERATURE_1);
|
||||
lp_var_t<float> temp2 = lp_var_t<float>(this, P60Dock::pool::P60DOCK_TEMPERATURE_2);
|
||||
void doStartUp() override;
|
||||
void doShutDown() override;
|
||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||
|
@ -1,49 +1,35 @@
|
||||
#include "PcduHandlerDummy.h"
|
||||
|
||||
#include <fsfw/ipc/QueueFactory.h>
|
||||
#include <mission/power/gsDefs.h>
|
||||
|
||||
PcduHandlerDummy::PcduHandlerDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie), dummySwitcher(objectId, 18, 18, false) {}
|
||||
#include "mission/power/defs.h"
|
||||
|
||||
PcduHandlerDummy::PcduHandlerDummy(object_id_t objectId)
|
||||
: SystemObject(objectId), manager(this, nullptr), dummySwitcher(objectId, 18, 18, false) {
|
||||
switcherLock = MutexFactory::instance()->createMutex();
|
||||
queue = QueueFactory::instance()->createMessageQueue(20);
|
||||
}
|
||||
|
||||
PcduHandlerDummy::~PcduHandlerDummy() {}
|
||||
|
||||
void PcduHandlerDummy::doStartUp() { setMode(MODE_NORMAL); }
|
||||
|
||||
void PcduHandlerDummy::doShutDown() { setMode(MODE_OFF); }
|
||||
|
||||
ReturnValue_t PcduHandlerDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||
return NOTHING_TO_SEND;
|
||||
}
|
||||
|
||||
ReturnValue_t PcduHandlerDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
||||
return NOTHING_TO_SEND;
|
||||
}
|
||||
|
||||
ReturnValue_t PcduHandlerDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||
const uint8_t *commandData,
|
||||
size_t commandDataLen) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PcduHandlerDummy::scanForReply(const uint8_t *start, size_t len,
|
||||
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PcduHandlerDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void PcduHandlerDummy::fillCommandAndReplyMap() {}
|
||||
|
||||
uint32_t PcduHandlerDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
|
||||
|
||||
ReturnValue_t PcduHandlerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) {
|
||||
ReturnValue_t PcduHandlerDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PcduHandlerDummy::sendSwitchCommand(power::Switch_t switchNr, ReturnValue_t onOff) {
|
||||
if (onOff == SWITCH_ON) {
|
||||
triggerEvent(power::SWITCH_CMD_SENT, true, switchNr);
|
||||
} else {
|
||||
triggerEvent(power::SWITCH_CMD_SENT, false, switchNr);
|
||||
}
|
||||
{
|
||||
MutexGuard mg(switcherLock);
|
||||
// To simulate a real PCDU, remember the switch change to trigger a SWITCH_HAS_CHANGED event
|
||||
// at a later stage.
|
||||
switchChangeArray[switchNr] = true;
|
||||
}
|
||||
return dummySwitcher.sendSwitchCommand(switchNr, onOff);
|
||||
}
|
||||
|
||||
@ -60,3 +46,37 @@ ReturnValue_t PcduHandlerDummy::getFuseState(uint8_t fuseNr) const {
|
||||
}
|
||||
|
||||
uint32_t PcduHandlerDummy::getSwitchDelayMs(void) const { return dummySwitcher.getSwitchDelayMs(); }
|
||||
|
||||
ReturnValue_t PcduHandlerDummy::performOperation(uint8_t opCode) {
|
||||
// TODO: Handle HK messages in queue.
|
||||
SwitcherBoolArray switcherChangeCopy{};
|
||||
{
|
||||
MutexGuard mg(switcherLock);
|
||||
std::memcpy(switcherChangeCopy.data(), switchChangeArray.data(), switchChangeArray.size());
|
||||
}
|
||||
for (uint8_t idx = 0; idx < switcherChangeCopy.size(); idx++) {
|
||||
if (switcherChangeCopy[idx]) {
|
||||
if (dummySwitcher.getSwitchState(idx) == PowerSwitchIF::SWITCH_ON) {
|
||||
triggerEvent(power::SWITCH_HAS_CHANGED, true, idx);
|
||||
} else {
|
||||
triggerEvent(power::SWITCH_HAS_CHANGED, false, idx);
|
||||
}
|
||||
MutexGuard mg(switcherLock);
|
||||
switchChangeArray[idx] = false;
|
||||
}
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
object_id_t PcduHandlerDummy::getObjectId() const { return SystemObject::getObjectId(); }
|
||||
|
||||
MessageQueueId_t PcduHandlerDummy::getCommandQueue() const { return queue->getId(); }
|
||||
|
||||
dur_millis_t PcduHandlerDummy::getPeriodicOperationFrequency() const {
|
||||
// TODO: dummy value. Retrieve from intiitalize after task creation..
|
||||
return 400;
|
||||
}
|
||||
|
||||
LocalDataPoolManager* PcduHandlerDummy::getHkManagerHandle() { return &manager; }
|
||||
|
||||
LocalPoolDataSetBase* PcduHandlerDummy::getDataSetHandle(sid_t sid) { return nullptr; }
|
||||
|
@ -3,7 +3,10 @@
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
#include <fsfw/power/DummyPowerSwitcher.h>
|
||||
|
||||
class PcduHandlerDummy : public DeviceHandlerBase, public PowerSwitchIF {
|
||||
class PcduHandlerDummy : public PowerSwitchIF,
|
||||
public HasLocalDataPoolIF,
|
||||
public SystemObject,
|
||||
public ExecutableObjectIF {
|
||||
public:
|
||||
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
|
||||
static const DeviceCommandId_t PERIODIC_REPLY = 2;
|
||||
@ -11,29 +14,49 @@ class PcduHandlerDummy : public DeviceHandlerBase, public PowerSwitchIF {
|
||||
static const uint8_t SIMPLE_COMMAND_DATA = 1;
|
||||
static const uint8_t PERIODIC_REPLY_DATA = 2;
|
||||
|
||||
PcduHandlerDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
|
||||
PcduHandlerDummy(object_id_t objectId);
|
||||
virtual ~PcduHandlerDummy();
|
||||
|
||||
protected:
|
||||
MessageQueueIF* queue;
|
||||
LocalDataPoolManager manager;
|
||||
MutexIF* switcherLock;
|
||||
DummyPowerSwitcher dummySwitcher;
|
||||
using SwitcherBoolArray = std::array<bool, 18>;
|
||||
|
||||
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;
|
||||
ReturnValue_t performOperation(uint8_t opCode) override;
|
||||
SwitcherBoolArray switchChangeArray{};
|
||||
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) override;
|
||||
|
||||
ReturnValue_t sendSwitchCommand(power::Switch_t switchNr, ReturnValue_t onOff) override;
|
||||
ReturnValue_t sendFuseOnCommand(uint8_t fuseNr) override;
|
||||
ReturnValue_t getSwitchState(power::Switch_t switchNr) const override;
|
||||
ReturnValue_t getFuseState(uint8_t fuseNr) const override;
|
||||
uint32_t getSwitchDelayMs(void) const override;
|
||||
|
||||
object_id_t getObjectId() const override;
|
||||
|
||||
/** Command queue for housekeeping messages. */
|
||||
MessageQueueId_t getCommandQueue() const override;
|
||||
|
||||
dur_millis_t getPeriodicOperationFrequency() const override;
|
||||
|
||||
/**
|
||||
* Every class implementing this interface should have a local data pool manager. This
|
||||
* function will return a reference to the manager.
|
||||
* @return
|
||||
*/
|
||||
LocalDataPoolManager* getHkManagerHandle() override;
|
||||
|
||||
/**
|
||||
* This function is used by the pool manager to get a valid dataset
|
||||
* from a SID. This function is protected to prevent users from
|
||||
* using raw data set pointers which could not be thread-safe. Users
|
||||
* should use the #ProvidesDataPoolSubscriptionIF.
|
||||
* @param sid Corresponding structure ID
|
||||
* @return
|
||||
*/
|
||||
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||||
};
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
|
||||
#include "mission/power/defs.h"
|
||||
|
||||
class PlocMpsocDummy : public DeviceHandlerBase {
|
||||
public:
|
||||
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
|
||||
|
@ -1,8 +1,10 @@
|
||||
#include "PlocSupervisorDummy.h"
|
||||
|
||||
PlocSupervisorDummy::PlocSupervisorDummy(object_id_t objectId, object_id_t comif,
|
||||
CookieIF *comCookie)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||
CookieIF *comCookie, PowerSwitchIF &pwrSwitcher)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie) {
|
||||
setPowerSwitcher(&pwrSwitcher);
|
||||
}
|
||||
|
||||
PlocSupervisorDummy::~PlocSupervisorDummy() {}
|
||||
|
||||
@ -42,3 +44,10 @@ ReturnValue_t PlocSupervisorDummy::initializeLocalDataPool(localpool::DataPool &
|
||||
LocalDataPoolManager &poolManager) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocSupervisorDummy::getSwitches(const uint8_t **switches,
|
||||
uint8_t *numberOfSwitches) {
|
||||
*numberOfSwitches = 1;
|
||||
*switches = reinterpret_cast<const uint8_t *>(&switchId);
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
#include <mission/power/defs.h>
|
||||
|
||||
class PlocSupervisorDummy : public DeviceHandlerBase {
|
||||
public:
|
||||
@ -10,10 +11,13 @@ class PlocSupervisorDummy : public DeviceHandlerBase {
|
||||
static const uint8_t SIMPLE_COMMAND_DATA = 1;
|
||||
static const uint8_t PERIODIC_REPLY_DATA = 2;
|
||||
|
||||
PlocSupervisorDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
|
||||
PlocSupervisorDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie,
|
||||
PowerSwitchIF &pwrSwitcher);
|
||||
virtual ~PlocSupervisorDummy();
|
||||
|
||||
protected:
|
||||
const power::Switches switchId = power::Switches::PDU1_CH6_PLOC_12V;
|
||||
|
||||
void doStartUp() override;
|
||||
void doShutDown() override;
|
||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||
@ -27,4 +31,5 @@ class PlocSupervisorDummy : public DeviceHandlerBase {
|
||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) override;
|
||||
ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) override;
|
||||
};
|
||||
|
@ -3,13 +3,24 @@
|
||||
#include <mission/acs/rwHelpers.h>
|
||||
|
||||
RwDummy::RwDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||
: DeviceHandlerBase(objectId, comif, comCookie),
|
||||
|
||||
statusSet(this),
|
||||
lastResetStatusSet(this),
|
||||
tmDataset(this),
|
||||
rwSpeedActuationSet(*this) {}
|
||||
|
||||
RwDummy::~RwDummy() {}
|
||||
|
||||
void RwDummy::doStartUp() {}
|
||||
void RwDummy::doStartUp() {
|
||||
statusSet.setReportingEnabled(true);
|
||||
setMode(MODE_ON);
|
||||
}
|
||||
|
||||
void RwDummy::doShutDown() {}
|
||||
void RwDummy::doShutDown() {
|
||||
statusSet.setReportingEnabled(false);
|
||||
setMode(MODE_OFF);
|
||||
}
|
||||
|
||||
ReturnValue_t RwDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
|
||||
|
||||
@ -37,6 +48,9 @@ uint32_t RwDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return
|
||||
|
||||
ReturnValue_t RwDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) {
|
||||
localDataPoolMap.emplace(rws::RW_SPEED, &rwSpeed);
|
||||
localDataPoolMap.emplace(rws::RAMP_TIME, &rampTime);
|
||||
|
||||
localDataPoolMap.emplace(rws::TEMPERATURE_C, new PoolEntry<int32_t>({0}));
|
||||
|
||||
localDataPoolMap.emplace(rws::CURR_SPEED, new PoolEntry<int32_t>({0}));
|
||||
@ -71,5 +85,11 @@ ReturnValue_t RwDummy::initializeLocalDataPool(localpool::DataPool &localDataPoo
|
||||
localDataPoolMap.emplace(rws::SPI_BYTES_READ, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(rws::SPI_REG_OVERRUN_ERRORS, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(rws::SPI_TOTAL_ERRORS, new PoolEntry<uint32_t>({0}));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(statusSet.getSid(), false, 12.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(tmDataset.getSid(), false, 30.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(lastResetStatusSet.getSid(), false, 30.0));
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define DUMMIES_RWDUMMY_H_
|
||||
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
#include <mission/acs/rwHelpers.h>
|
||||
|
||||
class RwDummy : public DeviceHandlerBase {
|
||||
public:
|
||||
@ -15,6 +16,14 @@ class RwDummy : public DeviceHandlerBase {
|
||||
virtual ~RwDummy();
|
||||
|
||||
protected:
|
||||
rws::StatusSet statusSet;
|
||||
rws::LastResetSatus lastResetStatusSet;
|
||||
rws::TmDataset tmDataset;
|
||||
rws::RwSpeedActuationSet rwSpeedActuationSet;
|
||||
|
||||
PoolEntry<int32_t> rwSpeed = PoolEntry<int32_t>({0});
|
||||
PoolEntry<uint16_t> rampTime = PoolEntry<uint16_t>({10});
|
||||
|
||||
void doStartUp() override;
|
||||
void doShutDown() override;
|
||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||
|
@ -7,9 +7,9 @@ StarTrackerDummy::StarTrackerDummy(object_id_t objectId, object_id_t comif, Cook
|
||||
|
||||
StarTrackerDummy::~StarTrackerDummy() {}
|
||||
|
||||
void StarTrackerDummy::doStartUp() {}
|
||||
void StarTrackerDummy::doStartUp() { setMode(MODE_ON); }
|
||||
|
||||
void StarTrackerDummy::doShutDown() {}
|
||||
void StarTrackerDummy::doShutDown() { setMode(_MODE_POWER_DOWN); }
|
||||
|
||||
ReturnValue_t StarTrackerDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||
return NOTHING_TO_SEND;
|
||||
@ -40,7 +40,7 @@ uint32_t StarTrackerDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo)
|
||||
|
||||
ReturnValue_t StarTrackerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) {
|
||||
localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry<float>({10.0}, true));
|
||||
|
||||
localDataPoolMap.emplace(startracker::TICKS_SOLUTION_SET, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(startracker::TIME_SOLUTION_SET, new PoolEntry<uint64_t>({0}));
|
||||
@ -64,6 +64,7 @@ ReturnValue_t StarTrackerDummy::initializeLocalDataPool(localpool::DataPool &loc
|
||||
localDataPoolMap.emplace(startracker::LISA_NR_CLOSE, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(startracker::TRUST_WORTHY, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(startracker::STABLE_COUNT, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(startracker::STR_MODE, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(startracker::SOLUTION_STRATEGY, new PoolEntry<uint8_t>({0}));
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ uint32_t SyrlinksDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { r
|
||||
|
||||
ReturnValue_t SyrlinksDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) {
|
||||
localDataPoolMap.emplace(syrlinks::TEMP_BASEBAND_BOARD, new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(syrlinks::TEMP_POWER_AMPLIFIER, new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(syrlinks::TEMP_BASEBAND_BOARD, new PoolEntry<float>({10}, true));
|
||||
localDataPoolMap.emplace(syrlinks::TEMP_POWER_AMPLIFIER, new PoolEntry<float>({10}, true));
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "TemperatureSensorInserter.h"
|
||||
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
#include <objects/systemObjectList.h>
|
||||
|
||||
#include <cmath>
|
||||
@ -9,32 +10,104 @@
|
||||
TemperatureSensorInserter::TemperatureSensorInserter(object_id_t objectId,
|
||||
Max31865DummyMap tempSensorDummies_,
|
||||
Tmp1075DummyMap tempTmpSensorDummies_)
|
||||
: SystemObject(objects::THERMAL_TEMP_INSERTER),
|
||||
: SystemObject(objectId),
|
||||
max31865DummyMap(std::move(tempSensorDummies_)),
|
||||
tmp1075DummyMap(std::move(tempTmpSensorDummies_)) {}
|
||||
|
||||
ReturnValue_t TemperatureSensorInserter::initialize() {
|
||||
if (performTest) {
|
||||
if (testCase == TestCase::COOL_SYRLINKS) {
|
||||
}
|
||||
}
|
||||
testCase = TestCase::NONE;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) {
|
||||
/*
|
||||
ReturnValue_t result = max31865PlocHeatspreaderSet.read();
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "Failed to read temperature from MAX31865 dataset" << std::endl;
|
||||
// TODO: deviceSensors
|
||||
if (not tempsWereInitialized) {
|
||||
for (auto& rtdDummy : max31865DummyMap) {
|
||||
rtdDummy.second->setTemperature(10, true);
|
||||
}
|
||||
for (auto& tmpDummy : tmp1075DummyMap) {
|
||||
tmpDummy.second->setTemperature(10, true);
|
||||
}
|
||||
tempsWereInitialized = true;
|
||||
}
|
||||
max31865PlocHeatspreaderSet.rtdValue = value - 5;
|
||||
max31865PlocHeatspreaderSet.temperatureCelcius = value;
|
||||
if ((iteration % 100) < 20) {
|
||||
max31865PlocHeatspreaderSet.setValidity(false, true);
|
||||
} else {
|
||||
max31865PlocHeatspreaderSet.setValidity(true, true);
|
||||
|
||||
switch (testCase) {
|
||||
case (TestCase::NONE): {
|
||||
break;
|
||||
}
|
||||
case (TestCase::COLD_SYRLINKS): {
|
||||
// TODO: How do I insert this?
|
||||
// Does not work on EM, where a real syrlinks device is connected.
|
||||
if (cycles == 15) {
|
||||
lp_var_t<float> tempSyrlinksBasebandBoard =
|
||||
lp_var_t<float>(objects::SYRLINKS_HANDLER, syrlinks::TEMP_BASEBAND_BOARD);
|
||||
PoolReadGuard pg(&tempSyrlinksBasebandBoard);
|
||||
tempSyrlinksBasebandBoard.value = -50;
|
||||
}
|
||||
if (cycles == 30) {
|
||||
lp_var_t<float> tempSyrlinksBasebandBoard =
|
||||
lp_var_t<float>(objects::SYRLINKS_HANDLER, syrlinks::TEMP_BASEBAND_BOARD);
|
||||
PoolReadGuard pg(&tempSyrlinksBasebandBoard);
|
||||
tempSyrlinksBasebandBoard.value = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (TestCase::COLD_HPA): {
|
||||
if (cycles == 15) {
|
||||
sif::debug << "Setting cold HPA temperature" << std::endl;
|
||||
max31865DummyMap[objects::RTD_9_IC12_HPA]->setTemperature(-60, true);
|
||||
}
|
||||
if (cycles == 30) {
|
||||
sif::debug << "Setting HPA temperature back to normal" << std::endl;
|
||||
max31865DummyMap[objects::RTD_9_IC12_HPA]->setTemperature(0, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (TestCase::COLD_MGT): {
|
||||
if (cycles == 15) {
|
||||
sif::debug << "Setting cold MGT temperature" << std::endl;
|
||||
max31865DummyMap[objects::RTD_15_IC18_IMTQ]->setTemperature(-60, true);
|
||||
}
|
||||
if (cycles == 30) {
|
||||
sif::debug << "Setting MGT temperature back to normal" << std::endl;
|
||||
max31865DummyMap[objects::RTD_15_IC18_IMTQ]->setTemperature(0, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (TestCase::COLD_STR):
|
||||
case (TestCase::COLD_STR_CONSECUTIVE): {
|
||||
if (cycles == 15) {
|
||||
sif::debug << "Setting cold STR temperature" << std::endl;
|
||||
max31865DummyMap[objects::RTD_4_IC7_STARTRACKER]->setTemperature(-40, true);
|
||||
}
|
||||
if (cycles == 30) {
|
||||
sif::debug << "Setting STR temperature back to normal" << std::endl;
|
||||
max31865DummyMap[objects::RTD_4_IC7_STARTRACKER]->setTemperature(0, true);
|
||||
}
|
||||
if (testCase == TestCase::COLD_STR_CONSECUTIVE) {
|
||||
if (cycles == 45) {
|
||||
sif::debug << "Setting cold STR temperature again" << std::endl;
|
||||
max31865DummyMap[objects::RTD_4_IC7_STARTRACKER]->setTemperature(-40, true);
|
||||
}
|
||||
if (cycles == 60) {
|
||||
sif::debug << "Setting STR temperature back to normal again" << std::endl;
|
||||
max31865DummyMap[objects::RTD_4_IC7_STARTRACKER]->setTemperature(0, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (TestCase::COLD_CAMERA): {
|
||||
if (cycles == 15) {
|
||||
sif::debug << "Setting cold CAM temperature" << std::endl;
|
||||
max31865DummyMap[objects::RTD_2_IC5_4K_CAMERA]->setTemperature(-40, true);
|
||||
}
|
||||
if (cycles == 30) {
|
||||
sif::debug << "Setting CAM temperature back to normal" << std::endl;
|
||||
max31865DummyMap[objects::RTD_2_IC5_4K_CAMERA]->setTemperature(0, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
max31865PlocHeatspreaderSet.commit();
|
||||
*/
|
||||
cycles++;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
ReturnValue_t TemperatureSensorInserter::initializeAfterTaskCreation() { return returnvalue::OK; }
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <fsfw/controller/ExtendedControllerBase.h>
|
||||
#include <mission/com/syrlinksDefs.h>
|
||||
#include <mission/tcs/Max31865Definitions.h>
|
||||
|
||||
#include "Max31865Dummy.h"
|
||||
@ -14,6 +15,7 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject
|
||||
Tmp1075DummyMap tempTmpSensorDummies_);
|
||||
|
||||
ReturnValue_t initialize() override;
|
||||
ReturnValue_t initializeAfterTaskCreation() override;
|
||||
|
||||
protected:
|
||||
ReturnValue_t performOperation(uint8_t opCode) override;
|
||||
@ -21,9 +23,19 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject
|
||||
private:
|
||||
Max31865DummyMap max31865DummyMap;
|
||||
Tmp1075DummyMap tmp1075DummyMap;
|
||||
enum TestCase { NONE = 0, COOL_SYRLINKS = 1 };
|
||||
|
||||
enum TestCase {
|
||||
NONE = 0,
|
||||
COLD_SYRLINKS = 1,
|
||||
COLD_HPA = 2,
|
||||
COLD_MGT = 3,
|
||||
COLD_STR = 4,
|
||||
COLD_STR_CONSECUTIVE = 5,
|
||||
COLD_CAMERA = 6,
|
||||
};
|
||||
int iteration = 0;
|
||||
bool performTest = false;
|
||||
uint32_t cycles = 0;
|
||||
bool tempsWereInitialized = false;
|
||||
TestCase testCase = TestCase::NONE;
|
||||
|
||||
// void noise();
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "Tmp1075Dummy.h"
|
||||
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
#include <mission/tcs/Tmp1075Definitions.h>
|
||||
|
||||
using namespace returnvalue;
|
||||
@ -26,11 +27,16 @@ ReturnValue_t Tmp1075Dummy::scanForReply(const uint8_t *start, size_t len,
|
||||
ReturnValue_t Tmp1075Dummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||
return 0;
|
||||
}
|
||||
void Tmp1075Dummy::setTemperature(float temperature, bool valid) {
|
||||
PoolReadGuard pg(&set);
|
||||
set.temperatureCelcius.value = temperature;
|
||||
set.setValidity(valid, true);
|
||||
}
|
||||
void Tmp1075Dummy::fillCommandAndReplyMap() {}
|
||||
uint32_t Tmp1075Dummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 1000; }
|
||||
ReturnValue_t Tmp1075Dummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) {
|
||||
localDataPoolMap.emplace(TMP1075::TEMPERATURE_C_TMP1075, new PoolEntry<float>({0.0}));
|
||||
localDataPoolMap.emplace(TMP1075::TEMPERATURE_C_TMP1075, new PoolEntry<float>({10.0}, true));
|
||||
return OK;
|
||||
}
|
||||
LocalPoolDataSetBase *Tmp1075Dummy::getDataSetHandle(sid_t sid) { return &set; }
|
||||
|
@ -8,6 +8,7 @@
|
||||
class Tmp1075Dummy : public DeviceHandlerBase {
|
||||
public:
|
||||
Tmp1075Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
|
||||
void setTemperature(float temperature, bool setValid);
|
||||
|
||||
private:
|
||||
TMP1075::Tmp1075Dataset set;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "helpers.h"
|
||||
#include "helperFactory.h"
|
||||
|
||||
#include <dummies/AcuDummy.h>
|
||||
#include <dummies/BpxDummy.h>
|
||||
@ -24,12 +24,13 @@
|
||||
#include <dummies/StarTrackerDummy.h>
|
||||
#include <dummies/SusDummy.h>
|
||||
#include <dummies/SyrlinksDummy.h>
|
||||
#include <fsfw/devicehandlers/HealthDevice.h>
|
||||
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||
#include <mission/power/gsDefs.h>
|
||||
#include <mission/system/acs/ImtqAssembly.h>
|
||||
#include <mission/system/acs/StrAssembly.h>
|
||||
#include <mission/system/objects/CamSwitcher.h>
|
||||
#include <mission/system/objects/StrAssembly.h>
|
||||
#include <mission/system/objects/TcsBoardAssembly.h>
|
||||
#include <mission/system/tcs/TcsBoardAssembly.h>
|
||||
|
||||
#include "TemperatureSensorInserter.h"
|
||||
#include "dummies/Max31865Dummy.h"
|
||||
@ -37,13 +38,17 @@
|
||||
#include "mission/genericFactory.h"
|
||||
#include "mission/system/acs/acsModeTree.h"
|
||||
#include "mission/system/com/comModeTree.h"
|
||||
#include "mission/system/tcs/tcsModeTree.h"
|
||||
#include "mission/system/tree/payloadModeTree.h"
|
||||
#include "mission/system/tree/tcsModeTree.h"
|
||||
#include "mission/tcs/defs.h"
|
||||
|
||||
void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpioIF) {
|
||||
void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpioIF,
|
||||
bool enableHkSets) {
|
||||
new ComIFDummy(objects::DUMMY_COM_IF);
|
||||
auto* comCookieDummy = new ComCookieDummy();
|
||||
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
if (cfg.addBpxBattDummy) {
|
||||
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
}
|
||||
if (cfg.addCoreCtrlCfg) {
|
||||
new CoreControllerDummy(objects::CORE_CONTROLLER);
|
||||
}
|
||||
@ -56,7 +61,7 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
|
||||
rws[1] = new RwDummy(objects::RW2, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
rws[2] = new RwDummy(objects::RW3, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
rws[3] = new RwDummy(objects::RW4, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
ObjectFactory::createRwAssy(pwrSwitcher, pcdu::Switches::PDU2_CH2_RW_5V, rws, rwIds);
|
||||
ObjectFactory::createRwAssy(pwrSwitcher, power::Switches::PDU2_CH2_RW_5V, rws, rwIds);
|
||||
new SaDeplDummy(objects::SOLAR_ARRAY_DEPL_HANDLER);
|
||||
auto* strAssy = new StrAssembly(objects::STR_ASSY);
|
||||
strAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
||||
@ -70,11 +75,15 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
|
||||
}
|
||||
auto* imtqAssy = new ImtqAssembly(objects::IMTQ_ASSY);
|
||||
imtqAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
||||
auto* imtqDummy = new ImtqDummy(objects::IMTQ_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
auto* imtqDummy = new ImtqDummy(objects::IMTQ_HANDLER, objects::DUMMY_COM_IF, comCookieDummy,
|
||||
power::Switches::PDU1_CH3_MGT_5V, enableHkSets);
|
||||
imtqDummy->enableThermalModule(ThermalStateCfg());
|
||||
imtqDummy->setPowerSwitcher(&pwrSwitcher);
|
||||
imtqDummy->connectModeTreeParent(*imtqAssy);
|
||||
if (cfg.addPowerDummies) {
|
||||
new AcuDummy(objects::ACU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
if (cfg.addOnlyAcuDummy) {
|
||||
new AcuDummy(objects::ACU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy, enableHkSets);
|
||||
} else if (cfg.addPowerDummies) {
|
||||
new AcuDummy(objects::ACU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy, enableHkSets);
|
||||
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);
|
||||
@ -192,16 +201,19 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
|
||||
tmpSensorDummies.emplace(
|
||||
objects::TMP1075_HANDLER_PLPCDU_0,
|
||||
new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_0, objects::DUMMY_COM_IF, comCookieDummy));
|
||||
tmpSensorDummies.emplace(
|
||||
objects::TMP1075_HANDLER_PLPCDU_1,
|
||||
new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_1, objects::DUMMY_COM_IF, comCookieDummy));
|
||||
// damaged.
|
||||
// tmpSensorDummies.emplace(
|
||||
// objects::TMP1075_HANDLER_PLPCDU_1,
|
||||
// new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_1, objects::DUMMY_COM_IF,
|
||||
// comCookieDummy));
|
||||
tmpSensorDummies.emplace(
|
||||
objects::TMP1075_HANDLER_IF_BOARD,
|
||||
new Tmp1075Dummy(objects::TMP1075_HANDLER_IF_BOARD, objects::DUMMY_COM_IF, comCookieDummy));
|
||||
|
||||
new TemperatureSensorInserter(objects::THERMAL_TEMP_INSERTER, rtdSensorDummies,
|
||||
tmpSensorDummies);
|
||||
TcsBoardAssembly* tcsBoardAssy = ObjectFactory::createTcsBoardAssy(pwrSwitcher);
|
||||
TcsBoardAssembly* tcsBoardAssy =
|
||||
ObjectFactory::createTcsBoardAssy(pwrSwitcher, tcs::TCS_BOARD_SHORTLY_UNAVAILABLE);
|
||||
for (auto& rtd : rtdSensorDummies) {
|
||||
rtd.second->connectModeTreeParent(*tcsBoardAssy);
|
||||
}
|
||||
@ -209,9 +221,11 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
|
||||
tmp.second->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
||||
}
|
||||
}
|
||||
auto* camSwitcher =
|
||||
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitcher, pcdu::Switches::PDU2_CH8_PAYLOAD_CAMERA);
|
||||
camSwitcher->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||
if (cfg.addCamSwitcherDummy) {
|
||||
auto* camSwitcher = new CamSwitcher(objects::CAM_SWITCHER, pwrSwitcher,
|
||||
power::Switches::PDU2_CH8_PAYLOAD_CAMERA);
|
||||
camSwitcher->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||
}
|
||||
auto* scexDummy = new ScexDummy(objects::SCEX, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
scexDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||
auto* plPcduDummy =
|
||||
@ -221,8 +235,8 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
|
||||
auto* plocMpsocDummy =
|
||||
new PlocMpsocDummy(objects::PLOC_MPSOC_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
plocMpsocDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||
auto* plocSupervisorDummy = new PlocSupervisorDummy(objects::PLOC_SUPERVISOR_HANDLER,
|
||||
objects::DUMMY_COM_IF, comCookieDummy);
|
||||
auto* plocSupervisorDummy = new PlocSupervisorDummy(
|
||||
objects::PLOC_SUPERVISOR_HANDLER, objects::DUMMY_COM_IF, comCookieDummy, pwrSwitcher);
|
||||
plocSupervisorDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||
}
|
||||
}
|
@ -6,17 +6,22 @@ class GpioIF;
|
||||
|
||||
namespace dummy {
|
||||
|
||||
// Default values targeted towards EM.
|
||||
struct DummyCfg {
|
||||
bool addCoreCtrlCfg = true;
|
||||
// Special variant because the ACU broke. Overrides addPowerDummies, only ACU dummy will be added.
|
||||
bool addOnlyAcuDummy = false;
|
||||
bool addPowerDummies = true;
|
||||
bool addBpxBattDummy = true;
|
||||
bool addSyrlinksDummies = true;
|
||||
bool addAcsBoardDummies = true;
|
||||
bool addSusDummies = true;
|
||||
bool addTempSensorDummies = true;
|
||||
bool addRtdComIFDummy = true;
|
||||
bool addPlocDummies = true;
|
||||
bool addCamSwitcherDummy = false;
|
||||
};
|
||||
|
||||
void createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch, GpioIF* gpioIF);
|
||||
void createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch, GpioIF* gpioIF, bool enableHkSets);
|
||||
|
||||
} // namespace dummy
|
2
fsfw
2
fsfw
Submodule fsfw updated: 4f632e2c68...0f76cdb3ba
@ -86,13 +86,14 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
10802;0x2a32;SERIALIZATION_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
10803;0x2a33;FILESTORE_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
10804;0x2a34;FILENAME_TOO_LARGE_ERROR;LOW;P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;No description;mission/acs/defs.h
|
||||
11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;No description;mission/acs/defs.h
|
||||
11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;No description;mission/acs/defs.h
|
||||
11203;0x2bc3;MEKF_INVALID_INFO;INFO;No description;mission/acs/defs.h
|
||||
11204;0x2bc4;MEKF_RECOVERY;INFO;No description;mission/acs/defs.h
|
||||
11205;0x2bc5;MEKF_INVALID_MODE_VIOLATION;HIGH;No description;mission/acs/defs.h
|
||||
11206;0x2bc6;SAFE_MODE_CONTROLLER_FAILURE;HIGH;No description;mission/acs/defs.h
|
||||
11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;The limits for the rotation in safe mode were violated.;mission/acs/defs.h
|
||||
11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;The system has recovered from a safe rate rotation violation.;mission/acs/defs.h
|
||||
11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;Multiple RWs are invalid, uncommandable and therefore higher ACS modes cannot be maintained.;mission/acs/defs.h
|
||||
11203;0x2bc3;MEKF_INVALID_INFO;INFO;MEKF was not able to compute a solution. P1: MEKF state on exit;mission/acs/defs.h
|
||||
11204;0x2bc4;MEKF_RECOVERY;INFO;MEKF is able to compute a solution again.;mission/acs/defs.h
|
||||
11205;0x2bc5;MEKF_AUTOMATIC_RESET;INFO;MEKF performed an automatic reset after detection of nonfinite values.;mission/acs/defs.h
|
||||
11206;0x2bc6;MEKF_INVALID_MODE_VIOLATION;HIGH;MEKF was not able to compute a solution during any pointing ACS mode for a prolonged time.;mission/acs/defs.h
|
||||
11207;0x2bc7;SAFE_MODE_CONTROLLER_FAILURE;HIGH;The ACS safe mode controller was not able to compute a solution and has failed. P1: Missing information about magnetic field, P2: Missing information about rotational rate;mission/acs/defs.h
|
||||
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/power/defs.h
|
||||
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/power/defs.h
|
||||
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;No description;mission/power/defs.h
|
||||
@ -101,8 +102,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
11401;0x2c89;GPIO_PULL_LOW_FAILED;LOW;No description;mission/tcs/HeaterHandler.h
|
||||
11402;0x2c8a;HEATER_WENT_ON;INFO;No description;mission/tcs/HeaterHandler.h
|
||||
11403;0x2c8b;HEATER_WENT_OFF;INFO;No description;mission/tcs/HeaterHandler.h
|
||||
11404;0x2c8c;SWITCH_ALREADY_ON;LOW;No description;mission/tcs/HeaterHandler.h
|
||||
11405;0x2c8d;SWITCH_ALREADY_OFF;LOW;No description;mission/tcs/HeaterHandler.h
|
||||
11404;0x2c8c;SWITCH_ALREADY_ON;INFO;No description;mission/tcs/HeaterHandler.h
|
||||
11405;0x2c8d;SWITCH_ALREADY_OFF;INFO;No description;mission/tcs/HeaterHandler.h
|
||||
11406;0x2c8e;MAIN_SWITCH_TIMEOUT;MEDIUM;No description;mission/tcs/HeaterHandler.h
|
||||
11407;0x2c8f;FAULTY_HEATER_WAS_ON;LOW;No description;mission/tcs/HeaterHandler.h
|
||||
11500;0x2cec;BURN_PHASE_START;INFO;P1: Burn duration in milliseconds, P2: Dry run flag;mission/SolarArrayDeploymentHandler.h
|
||||
@ -145,17 +146,20 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/payload/PlocMemoryDumper.h
|
||||
12301;0x300d;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux/payload/PlocMemoryDumper.h
|
||||
12302;0x300e;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux/payload/PlocMemoryDumper.h
|
||||
12401;0x3071;INVALID_TC_FRAME;HIGH;No description;linux/ipcore/PdecHandler.h
|
||||
12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/ipcore/PdecHandler.h
|
||||
12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/ipcore/PdecHandler.h
|
||||
12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/ipcore/PdecHandler.h
|
||||
12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/ipcore/PdecHandler.h
|
||||
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/PdecHandler.h
|
||||
12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/PdecHandler.h
|
||||
12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h
|
||||
12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;HIGH;No description;linux/ipcore/PdecHandler.h
|
||||
12410;0x307a;PDEC_RESET_FAILED;HIGH;Failed to pull PDEC reset to low;linux/ipcore/PdecHandler.h
|
||||
12411;0x307b;OPEN_IRQ_FILE_FAILED;HIGH;Failed to open the IRQ uio file;linux/ipcore/PdecHandler.h
|
||||
12401;0x3071;INVALID_TC_FRAME;HIGH;No description;linux/ipcore/pdec.h
|
||||
12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/ipcore/pdec.h
|
||||
12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/ipcore/pdec.h
|
||||
12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/ipcore/pdec.h
|
||||
12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/ipcore/pdec.h
|
||||
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/pdec.h
|
||||
12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/pdec.h
|
||||
12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/pdec.h
|
||||
12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;HIGH;No description;linux/ipcore/pdec.h
|
||||
12410;0x307a;PDEC_TRYING_RESET_WITH_INIT;LOW;Trying a PDEC reset with complete re-initialization;linux/ipcore/pdec.h
|
||||
12411;0x307b;PDEC_TRYING_RESET_NO_INIT;LOW;Trying a PDEC reset without re-initialization.;linux/ipcore/pdec.h
|
||||
12412;0x307c;PDEC_RESET_FAILED;HIGH;Failed to pull PDEC reset to low;linux/ipcore/pdec.h
|
||||
12413;0x307d;OPEN_IRQ_FILE_FAILED;HIGH;Failed to open the IRQ uio file;linux/ipcore/pdec.h
|
||||
12414;0x307e;PDEC_INIT_FAILED;HIGH;PDEC initialization failed. This might also be due to the persistent confiuration never becoming available, for example due to SD card issues.;linux/ipcore/pdec.h
|
||||
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/acs/StrComHandler.h
|
||||
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/acs/StrComHandler.h
|
||||
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/acs/StrComHandler.h
|
||||
@ -173,20 +177,24 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
12515;0x30e3;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;linux/acs/StrComHandler.h
|
||||
12516;0x30e4;STR_HELPER_SENDING_PACKET_FAILED;LOW;No description;linux/acs/StrComHandler.h
|
||||
12517;0x30e5;STR_HELPER_REQUESTING_MSG_FAILED;LOW;No description;linux/acs/StrComHandler.h
|
||||
12600;0x3138;MPSOC_FLASH_WRITE_FAILED;LOW;Flash write fails;linux/payload/PlocMpsocHelper.h
|
||||
12601;0x3139;MPSOC_FLASH_WRITE_SUCCESSFUL;LOW;Flash write successful;linux/payload/PlocMpsocHelper.h
|
||||
12602;0x313a;MPSOC_SENDING_COMMAND_FAILED;LOW;No description;linux/payload/PlocMpsocHelper.h
|
||||
12603;0x313b;MPSOC_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of MPSoC helper;linux/payload/PlocMpsocHelper.h
|
||||
12604;0x313c;MPSOC_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of MPSoC helper;linux/payload/PlocMpsocHelper.h
|
||||
12605;0x313d;MPSOC_MISSING_ACK;LOW;Did not receive acknowledgment report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/payload/PlocMpsocHelper.h
|
||||
12606;0x313e;MPSOC_MISSING_EXE;LOW;Did not receive execution report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/payload/PlocMpsocHelper.h
|
||||
12607;0x313f;MPSOC_ACK_FAILURE_REPORT;LOW;Received acknowledgment failure report P1: Internal state of MPSoC;linux/payload/PlocMpsocHelper.h
|
||||
12608;0x3140;MPSOC_EXE_FAILURE_REPORT;LOW;Received execution failure report P1: Internal state of MPSoC;linux/payload/PlocMpsocHelper.h
|
||||
12609;0x3141;MPSOC_ACK_INVALID_APID;LOW;Expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/payload/PlocMpsocHelper.h
|
||||
12610;0x3142;MPSOC_EXE_INVALID_APID;LOW;Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/payload/PlocMpsocHelper.h
|
||||
12611;0x3143;MPSOC_HELPER_SEQ_CNT_MISMATCH;LOW;Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count;linux/payload/PlocMpsocHelper.h
|
||||
12612;0x3144;MPSOC_TM_SIZE_ERROR;LOW;No description;linux/payload/PlocMpsocHelper.h
|
||||
12613;0x3145;MPSOC_TM_CRC_MISSMATCH;LOW;No description;linux/payload/PlocMpsocHelper.h
|
||||
12600;0x3138;MPSOC_FLASH_WRITE_FAILED;LOW;Flash write fails;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12601;0x3139;MPSOC_FLASH_WRITE_SUCCESSFUL;INFO;Flash write successful;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12602;0x313a;MPSOC_SENDING_COMMAND_FAILED;LOW;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12603;0x313b;MPSOC_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of MPSoC helper;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12604;0x313c;MPSOC_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of MPSoC helper;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12605;0x313d;MPSOC_MISSING_ACK;LOW;Did not receive acknowledgment report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12606;0x313e;MPSOC_MISSING_EXE;LOW;Did not receive execution report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12607;0x313f;MPSOC_ACK_FAILURE_REPORT;LOW;Received acknowledgment failure report P1: Internal state of MPSoC;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12608;0x3140;MPSOC_EXE_FAILURE_REPORT;LOW;Received execution failure report P1: Internal state of MPSoC;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12609;0x3141;MPSOC_ACK_INVALID_APID;LOW;Expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12610;0x3142;MPSOC_EXE_INVALID_APID;LOW;Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12611;0x3143;MPSOC_HELPER_SEQ_CNT_MISMATCH;LOW;Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12612;0x3144;MPSOC_TM_SIZE_ERROR;LOW;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12613;0x3145;MPSOC_TM_CRC_MISSMATCH;LOW;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12614;0x3146;MPSOC_FLASH_READ_PACKET_ERROR;LOW;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12615;0x3147;MPSOC_FLASH_READ_FAILED;LOW;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12616;0x3148;MPSOC_FLASH_READ_SUCCESSFUL;INFO;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12617;0x3149;MPSOC_READ_TIMEOUT;LOW;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12700;0x319c;TRANSITION_BACK_TO_OFF;MEDIUM;Could not transition properly and went back to ALL OFF;mission/payload/PayloadPcduHandler.h
|
||||
12701;0x319d;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/payload/PayloadPcduHandler.h
|
||||
12702;0x319e;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/payload/PayloadPcduHandler.h
|
||||
@ -203,11 +211,12 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
12801;0x3201;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;No description;mission/system/acs/AcsBoardAssembly.h
|
||||
12802;0x3202;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/AcsBoardAssembly.h
|
||||
12803;0x3203;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/AcsBoardAssembly.h
|
||||
12804;0x3204;DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY;MEDIUM;This is triggered when the assembly would have normally switched the board side, but the GPS device of the other side was marked faulty. P1: Current submode.;mission/system/acs/AcsBoardAssembly.h
|
||||
12900;0x3264;TRANSITION_OTHER_SIDE_FAILED;HIGH;No description;mission/system/acs/SusAssembly.h
|
||||
12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;No description;mission/system/acs/SusAssembly.h
|
||||
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/SusAssembly.h
|
||||
12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/SusAssembly.h
|
||||
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/objects/TcsBoardAssembly.h
|
||||
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/tcs/TcsBoardAssembly.h
|
||||
13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission/acs/archive/GPSDefinitions.h
|
||||
13101;0x332d;CANT_GET_FIX;LOW;Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on.;mission/acs/archive/GPSDefinitions.h
|
||||
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/power/P60DockHandler.h
|
||||
@ -250,23 +259,27 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
13903;0x364f;INSERT_CONFIGFILEVALUE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
|
||||
13904;0x3650;WRITE_CONFIGFILE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
|
||||
13905;0x3651;READ_CONFIGFILE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
|
||||
14000;0x36b0;ALLOC_FAILURE;MEDIUM;No description;bsp_q7s/core/CoreController.h
|
||||
14001;0x36b1;REBOOT_SW;LOW; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||
14002;0x36b2;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
||||
14003;0x36b3;REBOOT_HW;MEDIUM;No description;bsp_q7s/core/CoreController.h
|
||||
14004;0x36b4;NO_SD_CARD_ACTIVE;HIGH;No SD card was active. Core controller will attempt to re-initialize a SD card.;bsp_q7s/core/CoreController.h
|
||||
14005;0x36b5;VERSION_INFO;INFO;P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;bsp_q7s/core/CoreController.h
|
||||
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||
14007;0x36b7;REBOOT_COUNTER;INFO;Total reboot counter, which is the sum of the boot count of all individual images.;bsp_q7s/core/CoreController.h
|
||||
14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;bsp_q7s/core/CoreController.h
|
||||
14010;0x36ba;I2C_UNAVAILABLE_REBOOT;MEDIUM;No description;bsp_q7s/core/CoreController.h
|
||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14103;0x3717;PLOC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14104;0x3718;OBC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14105;0x3719;HPA_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14106;0x371a;PLPCDU_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14000;0x36b0;ALLOC_FAILURE;MEDIUM;No description;mission/sysDefs.h
|
||||
14001;0x36b1;REBOOT_SW;LOW; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;mission/sysDefs.h
|
||||
14002;0x36b2;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;mission/sysDefs.h
|
||||
14003;0x36b3;REBOOT_HW;MEDIUM;No description;mission/sysDefs.h
|
||||
14004;0x36b4;NO_SD_CARD_ACTIVE;HIGH;No SD card was active. Core controller will attempt to re-initialize a SD card.;mission/sysDefs.h
|
||||
14005;0x36b5;VERSION_INFO;INFO;P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h
|
||||
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;mission/sysDefs.h
|
||||
14007;0x36b7;REBOOT_COUNTER;INFO;Total reboot counter, which is the sum of the boot count of all individual images.;mission/sysDefs.h
|
||||
14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;mission/sysDefs.h
|
||||
14010;0x36ba;TRYING_I2C_RECOVERY;HIGH;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
|
||||
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
|
||||
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
|
||||
14013;0x36bd;FIRMWARE_INFO;INFO;Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h
|
||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||
14104;0x3718;OBC_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||
14105;0x3719;CAMERA_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||
14106;0x371a;PCDU_SYSTEM_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||
14107;0x371b;HEATER_NOT_OFF_FOR_OFF_MODE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||
14108;0x371c;MGT_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||
14201;0x3779;TX_TIMER_EXPIRED;INFO;The transmit timer to protect the Syrlinks expired P1: The current timer value;mission/system/com/ComSubsystem.h
|
||||
14202;0x377a;BIT_LOCK_TX_ON;INFO;Transmitter will be turned on due to detection of bitlock;mission/system/com/ComSubsystem.h
|
||||
14300;0x37dc;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/persistentTmStoreDefs.h
|
||||
|
|
@ -30,6 +30,8 @@
|
||||
0x44120350;RW4
|
||||
0x44130001;STAR_TRACKER
|
||||
0x44130045;GPS_CONTROLLER
|
||||
0x44130046;GPS_0_HEALTH_DEV
|
||||
0x44130047;GPS_1_HEALTH_DEV
|
||||
0x44140013;IMTQ_POLLING
|
||||
0x44140014;IMTQ_HANDLER
|
||||
0x442000A1;PCDU_HANDLER
|
||||
|
|
@ -371,8 +371,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x3e03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3f01;DLEE_NoPacketFound;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x3f02;DLEE_PossiblePacketLoss;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x3f01;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x3f02;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
@ -402,9 +402,12 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4406;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h
|
||||
0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h
|
||||
0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h
|
||||
0x4503;HSPI_Timeout;No description;3;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h
|
||||
0x4504;HSPI_Busy;No description;4;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h
|
||||
0x4505;HSPI_GenericError;No description;5;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h
|
||||
0x4601;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4602;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4603;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
@ -440,7 +443,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x5106;IMTQ_InternalProcessingError;No description;6;IMTQ_HANDLER;mission/acs/imtqHelpers.h
|
||||
0x5107;IMTQ_RejectedWithoutReason;No description;7;IMTQ_HANDLER;mission/acs/imtqHelpers.h
|
||||
0x5108;IMTQ_CmdErrUnknown;No description;8;IMTQ_HANDLER;mission/acs/imtqHelpers.h
|
||||
0x51a7;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;167;IMTQ_HANDLER;mission/acs/imtqHelpers.h
|
||||
0x5109;IMTQ_StartupCfgError;No description;9;IMTQ_HANDLER;mission/acs/imtqHelpers.h
|
||||
0x510a;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;10;IMTQ_HANDLER;mission/acs/imtqHelpers.h
|
||||
0x52b0;RWHA_SpiWriteFailure;No description;176;RW_HANDLER;mission/acs/rwHelpers.h
|
||||
0x52b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/acs/rwHelpers.h
|
||||
0x52b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/acs/rwHelpers.h
|
||||
@ -496,7 +500,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x66a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h
|
||||
0x66a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h
|
||||
0x66a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h
|
||||
0x6900;ACSCTRL_FileDeletionFailed;No description;0;ACS_CTRL;mission/controller/AcsController.h
|
||||
0x6900;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;0;ACS_CTRL;mission/controller/AcsController.h
|
||||
0x6a02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
@ -505,9 +509,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x6a07;ACSMEKF_MekfNotFinite;No description;7;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a08;ACSMEKF_MekfInitialized;No description;8;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a09;ACSMEKF_MekfRunning;No description;9;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6b01;ACSSAF_SafectrlMekfInputInvalid;No description;1;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h
|
||||
0x6c01;ACSPTG_PtgctrlMekfInputInvalid;No description;1;ACS_PTG;mission/controller/acs/control/PtgCtrl.h
|
||||
0x6d01;ACSDTB_DetumbleNoSensordata;No description;1;ACS_DETUMBLE;mission/controller/acs/control/Detumble.h
|
||||
0x7000;PTM_DumpDone;No description;0;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h
|
||||
0x7001;PTM_BusyDumping;No description;1;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h
|
||||
0x7100;TMS_IsBusy;No description;0;TM_SINK;mission/tmtc/DirectTmSinkIF.h
|
||||
0x6d00;PTM_DumpDone;No description;0;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h
|
||||
0x6d01;PTM_BusyDumping;No description;1;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h
|
||||
0x6e00;TMS_IsBusy;No description;0;TM_SINK;mission/tmtc/DirectTmSinkIF.h
|
||||
|
|
@ -86,13 +86,14 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
10802;0x2a32;SERIALIZATION_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
10803;0x2a33;FILESTORE_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
10804;0x2a34;FILENAME_TOO_LARGE_ERROR;LOW;P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;No description;mission/acs/defs.h
|
||||
11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;No description;mission/acs/defs.h
|
||||
11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;No description;mission/acs/defs.h
|
||||
11203;0x2bc3;MEKF_INVALID_INFO;INFO;No description;mission/acs/defs.h
|
||||
11204;0x2bc4;MEKF_RECOVERY;INFO;No description;mission/acs/defs.h
|
||||
11205;0x2bc5;MEKF_INVALID_MODE_VIOLATION;HIGH;No description;mission/acs/defs.h
|
||||
11206;0x2bc6;SAFE_MODE_CONTROLLER_FAILURE;HIGH;No description;mission/acs/defs.h
|
||||
11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;The limits for the rotation in safe mode were violated.;mission/acs/defs.h
|
||||
11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;The system has recovered from a safe rate rotation violation.;mission/acs/defs.h
|
||||
11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;Multiple RWs are invalid, uncommandable and therefore higher ACS modes cannot be maintained.;mission/acs/defs.h
|
||||
11203;0x2bc3;MEKF_INVALID_INFO;INFO;MEKF was not able to compute a solution. P1: MEKF state on exit;mission/acs/defs.h
|
||||
11204;0x2bc4;MEKF_RECOVERY;INFO;MEKF is able to compute a solution again.;mission/acs/defs.h
|
||||
11205;0x2bc5;MEKF_AUTOMATIC_RESET;INFO;MEKF performed an automatic reset after detection of nonfinite values.;mission/acs/defs.h
|
||||
11206;0x2bc6;MEKF_INVALID_MODE_VIOLATION;HIGH;MEKF was not able to compute a solution during any pointing ACS mode for a prolonged time.;mission/acs/defs.h
|
||||
11207;0x2bc7;SAFE_MODE_CONTROLLER_FAILURE;HIGH;The ACS safe mode controller was not able to compute a solution and has failed. P1: Missing information about magnetic field, P2: Missing information about rotational rate;mission/acs/defs.h
|
||||
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/power/defs.h
|
||||
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/power/defs.h
|
||||
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;No description;mission/power/defs.h
|
||||
@ -101,8 +102,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
11401;0x2c89;GPIO_PULL_LOW_FAILED;LOW;No description;mission/tcs/HeaterHandler.h
|
||||
11402;0x2c8a;HEATER_WENT_ON;INFO;No description;mission/tcs/HeaterHandler.h
|
||||
11403;0x2c8b;HEATER_WENT_OFF;INFO;No description;mission/tcs/HeaterHandler.h
|
||||
11404;0x2c8c;SWITCH_ALREADY_ON;LOW;No description;mission/tcs/HeaterHandler.h
|
||||
11405;0x2c8d;SWITCH_ALREADY_OFF;LOW;No description;mission/tcs/HeaterHandler.h
|
||||
11404;0x2c8c;SWITCH_ALREADY_ON;INFO;No description;mission/tcs/HeaterHandler.h
|
||||
11405;0x2c8d;SWITCH_ALREADY_OFF;INFO;No description;mission/tcs/HeaterHandler.h
|
||||
11406;0x2c8e;MAIN_SWITCH_TIMEOUT;MEDIUM;No description;mission/tcs/HeaterHandler.h
|
||||
11407;0x2c8f;FAULTY_HEATER_WAS_ON;LOW;No description;mission/tcs/HeaterHandler.h
|
||||
11500;0x2cec;BURN_PHASE_START;INFO;P1: Burn duration in milliseconds, P2: Dry run flag;mission/SolarArrayDeploymentHandler.h
|
||||
@ -145,17 +146,20 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/payload/PlocMemoryDumper.h
|
||||
12301;0x300d;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux/payload/PlocMemoryDumper.h
|
||||
12302;0x300e;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux/payload/PlocMemoryDumper.h
|
||||
12401;0x3071;INVALID_TC_FRAME;HIGH;No description;linux/ipcore/PdecHandler.h
|
||||
12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/ipcore/PdecHandler.h
|
||||
12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/ipcore/PdecHandler.h
|
||||
12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/ipcore/PdecHandler.h
|
||||
12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/ipcore/PdecHandler.h
|
||||
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/PdecHandler.h
|
||||
12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/PdecHandler.h
|
||||
12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h
|
||||
12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;HIGH;No description;linux/ipcore/PdecHandler.h
|
||||
12410;0x307a;PDEC_RESET_FAILED;HIGH;Failed to pull PDEC reset to low;linux/ipcore/PdecHandler.h
|
||||
12411;0x307b;OPEN_IRQ_FILE_FAILED;HIGH;Failed to open the IRQ uio file;linux/ipcore/PdecHandler.h
|
||||
12401;0x3071;INVALID_TC_FRAME;HIGH;No description;linux/ipcore/pdec.h
|
||||
12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/ipcore/pdec.h
|
||||
12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/ipcore/pdec.h
|
||||
12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/ipcore/pdec.h
|
||||
12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/ipcore/pdec.h
|
||||
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/pdec.h
|
||||
12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/pdec.h
|
||||
12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/pdec.h
|
||||
12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;HIGH;No description;linux/ipcore/pdec.h
|
||||
12410;0x307a;PDEC_TRYING_RESET_WITH_INIT;LOW;Trying a PDEC reset with complete re-initialization;linux/ipcore/pdec.h
|
||||
12411;0x307b;PDEC_TRYING_RESET_NO_INIT;LOW;Trying a PDEC reset without re-initialization.;linux/ipcore/pdec.h
|
||||
12412;0x307c;PDEC_RESET_FAILED;HIGH;Failed to pull PDEC reset to low;linux/ipcore/pdec.h
|
||||
12413;0x307d;OPEN_IRQ_FILE_FAILED;HIGH;Failed to open the IRQ uio file;linux/ipcore/pdec.h
|
||||
12414;0x307e;PDEC_INIT_FAILED;HIGH;PDEC initialization failed. This might also be due to the persistent confiuration never becoming available, for example due to SD card issues.;linux/ipcore/pdec.h
|
||||
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/acs/StrComHandler.h
|
||||
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/acs/StrComHandler.h
|
||||
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/acs/StrComHandler.h
|
||||
@ -173,20 +177,24 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
12515;0x30e3;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;linux/acs/StrComHandler.h
|
||||
12516;0x30e4;STR_HELPER_SENDING_PACKET_FAILED;LOW;No description;linux/acs/StrComHandler.h
|
||||
12517;0x30e5;STR_HELPER_REQUESTING_MSG_FAILED;LOW;No description;linux/acs/StrComHandler.h
|
||||
12600;0x3138;MPSOC_FLASH_WRITE_FAILED;LOW;Flash write fails;linux/payload/PlocMpsocHelper.h
|
||||
12601;0x3139;MPSOC_FLASH_WRITE_SUCCESSFUL;LOW;Flash write successful;linux/payload/PlocMpsocHelper.h
|
||||
12602;0x313a;MPSOC_SENDING_COMMAND_FAILED;LOW;No description;linux/payload/PlocMpsocHelper.h
|
||||
12603;0x313b;MPSOC_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of MPSoC helper;linux/payload/PlocMpsocHelper.h
|
||||
12604;0x313c;MPSOC_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of MPSoC helper;linux/payload/PlocMpsocHelper.h
|
||||
12605;0x313d;MPSOC_MISSING_ACK;LOW;Did not receive acknowledgment report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/payload/PlocMpsocHelper.h
|
||||
12606;0x313e;MPSOC_MISSING_EXE;LOW;Did not receive execution report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/payload/PlocMpsocHelper.h
|
||||
12607;0x313f;MPSOC_ACK_FAILURE_REPORT;LOW;Received acknowledgment failure report P1: Internal state of MPSoC;linux/payload/PlocMpsocHelper.h
|
||||
12608;0x3140;MPSOC_EXE_FAILURE_REPORT;LOW;Received execution failure report P1: Internal state of MPSoC;linux/payload/PlocMpsocHelper.h
|
||||
12609;0x3141;MPSOC_ACK_INVALID_APID;LOW;Expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/payload/PlocMpsocHelper.h
|
||||
12610;0x3142;MPSOC_EXE_INVALID_APID;LOW;Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/payload/PlocMpsocHelper.h
|
||||
12611;0x3143;MPSOC_HELPER_SEQ_CNT_MISMATCH;LOW;Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count;linux/payload/PlocMpsocHelper.h
|
||||
12612;0x3144;MPSOC_TM_SIZE_ERROR;LOW;No description;linux/payload/PlocMpsocHelper.h
|
||||
12613;0x3145;MPSOC_TM_CRC_MISSMATCH;LOW;No description;linux/payload/PlocMpsocHelper.h
|
||||
12600;0x3138;MPSOC_FLASH_WRITE_FAILED;LOW;Flash write fails;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12601;0x3139;MPSOC_FLASH_WRITE_SUCCESSFUL;INFO;Flash write successful;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12602;0x313a;MPSOC_SENDING_COMMAND_FAILED;LOW;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12603;0x313b;MPSOC_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of MPSoC helper;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12604;0x313c;MPSOC_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of MPSoC helper;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12605;0x313d;MPSOC_MISSING_ACK;LOW;Did not receive acknowledgment report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12606;0x313e;MPSOC_MISSING_EXE;LOW;Did not receive execution report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12607;0x313f;MPSOC_ACK_FAILURE_REPORT;LOW;Received acknowledgment failure report P1: Internal state of MPSoC;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12608;0x3140;MPSOC_EXE_FAILURE_REPORT;LOW;Received execution failure report P1: Internal state of MPSoC;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12609;0x3141;MPSOC_ACK_INVALID_APID;LOW;Expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12610;0x3142;MPSOC_EXE_INVALID_APID;LOW;Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12611;0x3143;MPSOC_HELPER_SEQ_CNT_MISMATCH;LOW;Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12612;0x3144;MPSOC_TM_SIZE_ERROR;LOW;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12613;0x3145;MPSOC_TM_CRC_MISSMATCH;LOW;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12614;0x3146;MPSOC_FLASH_READ_PACKET_ERROR;LOW;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12615;0x3147;MPSOC_FLASH_READ_FAILED;LOW;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12616;0x3148;MPSOC_FLASH_READ_SUCCESSFUL;INFO;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12617;0x3149;MPSOC_READ_TIMEOUT;LOW;No description;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
12700;0x319c;TRANSITION_BACK_TO_OFF;MEDIUM;Could not transition properly and went back to ALL OFF;mission/payload/PayloadPcduHandler.h
|
||||
12701;0x319d;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/payload/PayloadPcduHandler.h
|
||||
12702;0x319e;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/payload/PayloadPcduHandler.h
|
||||
@ -203,11 +211,12 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
12801;0x3201;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;No description;mission/system/acs/AcsBoardAssembly.h
|
||||
12802;0x3202;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/AcsBoardAssembly.h
|
||||
12803;0x3203;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/AcsBoardAssembly.h
|
||||
12804;0x3204;DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY;MEDIUM;This is triggered when the assembly would have normally switched the board side, but the GPS device of the other side was marked faulty. P1: Current submode.;mission/system/acs/AcsBoardAssembly.h
|
||||
12900;0x3264;TRANSITION_OTHER_SIDE_FAILED;HIGH;No description;mission/system/acs/SusAssembly.h
|
||||
12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;No description;mission/system/acs/SusAssembly.h
|
||||
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/SusAssembly.h
|
||||
12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/SusAssembly.h
|
||||
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/objects/TcsBoardAssembly.h
|
||||
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/tcs/TcsBoardAssembly.h
|
||||
13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission/acs/archive/GPSDefinitions.h
|
||||
13101;0x332d;CANT_GET_FIX;LOW;Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on.;mission/acs/archive/GPSDefinitions.h
|
||||
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/power/P60DockHandler.h
|
||||
@ -250,23 +259,27 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
13903;0x364f;INSERT_CONFIGFILEVALUE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
|
||||
13904;0x3650;WRITE_CONFIGFILE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
|
||||
13905;0x3651;READ_CONFIGFILE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
|
||||
14000;0x36b0;ALLOC_FAILURE;MEDIUM;No description;bsp_q7s/core/CoreController.h
|
||||
14001;0x36b1;REBOOT_SW;LOW; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||
14002;0x36b2;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
||||
14003;0x36b3;REBOOT_HW;MEDIUM;No description;bsp_q7s/core/CoreController.h
|
||||
14004;0x36b4;NO_SD_CARD_ACTIVE;HIGH;No SD card was active. Core controller will attempt to re-initialize a SD card.;bsp_q7s/core/CoreController.h
|
||||
14005;0x36b5;VERSION_INFO;INFO;P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;bsp_q7s/core/CoreController.h
|
||||
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||
14007;0x36b7;REBOOT_COUNTER;INFO;Total reboot counter, which is the sum of the boot count of all individual images.;bsp_q7s/core/CoreController.h
|
||||
14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;bsp_q7s/core/CoreController.h
|
||||
14010;0x36ba;I2C_UNAVAILABLE_REBOOT;MEDIUM;No description;bsp_q7s/core/CoreController.h
|
||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14103;0x3717;PLOC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14104;0x3718;OBC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14105;0x3719;HPA_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14106;0x371a;PLPCDU_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14000;0x36b0;ALLOC_FAILURE;MEDIUM;No description;mission/sysDefs.h
|
||||
14001;0x36b1;REBOOT_SW;LOW; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;mission/sysDefs.h
|
||||
14002;0x36b2;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;mission/sysDefs.h
|
||||
14003;0x36b3;REBOOT_HW;MEDIUM;No description;mission/sysDefs.h
|
||||
14004;0x36b4;NO_SD_CARD_ACTIVE;HIGH;No SD card was active. Core controller will attempt to re-initialize a SD card.;mission/sysDefs.h
|
||||
14005;0x36b5;VERSION_INFO;INFO;P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h
|
||||
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;mission/sysDefs.h
|
||||
14007;0x36b7;REBOOT_COUNTER;INFO;Total reboot counter, which is the sum of the boot count of all individual images.;mission/sysDefs.h
|
||||
14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;mission/sysDefs.h
|
||||
14010;0x36ba;TRYING_I2C_RECOVERY;HIGH;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
|
||||
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
|
||||
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
|
||||
14013;0x36bd;FIRMWARE_INFO;INFO;Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h
|
||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||
14104;0x3718;OBC_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||
14105;0x3719;CAMERA_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||
14106;0x371a;PCDU_SYSTEM_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||
14107;0x371b;HEATER_NOT_OFF_FOR_OFF_MODE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||
14108;0x371c;MGT_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||
14201;0x3779;TX_TIMER_EXPIRED;INFO;The transmit timer to protect the Syrlinks expired P1: The current timer value;mission/system/com/ComSubsystem.h
|
||||
14202;0x377a;BIT_LOCK_TX_ON;INFO;Transmitter will be turned on due to detection of bitlock;mission/system/com/ComSubsystem.h
|
||||
14300;0x37dc;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/persistentTmStoreDefs.h
|
||||
|
|
@ -29,6 +29,8 @@
|
||||
0x44120350;RW4
|
||||
0x44130001;STAR_TRACKER
|
||||
0x44130045;GPS_CONTROLLER
|
||||
0x44130046;GPS_0_HEALTH_DEV
|
||||
0x44130047;GPS_1_HEALTH_DEV
|
||||
0x44140013;IMTQ_POLLING
|
||||
0x44140014;IMTQ_HANDLER
|
||||
0x442000A1;PCDU_HANDLER
|
||||
|
|
@ -371,8 +371,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x3e03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3f01;DLEE_NoPacketFound;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x3f02;DLEE_PossiblePacketLoss;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x3f01;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x3f02;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
@ -402,9 +402,12 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4406;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h
|
||||
0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h
|
||||
0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h
|
||||
0x4503;HSPI_Timeout;No description;3;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h
|
||||
0x4504;HSPI_Busy;No description;4;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h
|
||||
0x4505;HSPI_GenericError;No description;5;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h
|
||||
0x4601;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4602;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4603;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
@ -440,7 +443,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x5106;IMTQ_InternalProcessingError;No description;6;IMTQ_HANDLER;mission/acs/imtqHelpers.h
|
||||
0x5107;IMTQ_RejectedWithoutReason;No description;7;IMTQ_HANDLER;mission/acs/imtqHelpers.h
|
||||
0x5108;IMTQ_CmdErrUnknown;No description;8;IMTQ_HANDLER;mission/acs/imtqHelpers.h
|
||||
0x51a7;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;167;IMTQ_HANDLER;mission/acs/imtqHelpers.h
|
||||
0x5109;IMTQ_StartupCfgError;No description;9;IMTQ_HANDLER;mission/acs/imtqHelpers.h
|
||||
0x510a;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;10;IMTQ_HANDLER;mission/acs/imtqHelpers.h
|
||||
0x52b0;RWHA_SpiWriteFailure;No description;176;RW_HANDLER;mission/acs/rwHelpers.h
|
||||
0x52b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/acs/rwHelpers.h
|
||||
0x52b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/acs/rwHelpers.h
|
||||
@ -474,8 +478,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x53b6;STRH_StartrackerAlreadyBooted;Star tracker is already in firmware mode;182;STR_HANDLER;mission/acs/str/StarTrackerHandler.h
|
||||
0x53b7;STRH_StartrackerNotRunningFirmware;Star tracker must be in firmware mode to run this command;183;STR_HANDLER;mission/acs/str/StarTrackerHandler.h
|
||||
0x53b8;STRH_StartrackerNotRunningBootloader;Star tracker must be in bootloader mode to run this command;184;STR_HANDLER;mission/acs/str/StarTrackerHandler.h
|
||||
0x54e0;DWLPWRON_InvalidMode;Received command has invalid JESD mode (valid modes are 0 - 5);224;DWLPWRON_CMD;linux/payload/plocMpscoDefs.h
|
||||
0x54e1;DWLPWRON_InvalidLaneRate;Received command has invalid lane rate (valid lane rate are 0 - 9);225;DWLPWRON_CMD;linux/payload/plocMpscoDefs.h
|
||||
0x54e0;DWLPWRON_InvalidMode;Received command has invalid JESD mode (valid modes are 0 - 5);224;DWLPWRON_CMD;linux/payload/plocMpsocHelpers.h
|
||||
0x54e1;DWLPWRON_InvalidLaneRate;Received command has invalid lane rate (valid lane rate are 0 - 9);225;DWLPWRON_CMD;linux/payload/plocMpsocHelpers.h
|
||||
0x5700;PLSPVhLP_RequestDone;No description;0;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h
|
||||
0x5701;PLSPVhLP_NoPacketFound;No description;1;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h
|
||||
0x5702;PLSPVhLP_DecodeBufTooSmall;No description;2;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h
|
||||
@ -492,8 +496,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x58a3;SUSS_ExecutionFailed;Command execution failed;163;SUS_HANDLER;mission/acs/RwHandler.h
|
||||
0x58a4;SUSS_CrcError;Reaction wheel reply has invalid crc;164;SUS_HANDLER;mission/acs/RwHandler.h
|
||||
0x58a5;SUSS_ValueNotRead;No description;165;SUS_HANDLER;mission/acs/RwHandler.h
|
||||
0x5900;IPCI_NoReplyAvailable;No description;0;CCSDS_IP_CORE_BRIDGE;linux/acs/ImtqPollingTask.h
|
||||
0x5901;IPCI_NoPacketFound;No description;1;CCSDS_IP_CORE_BRIDGE;linux/com/SyrlinksComHandler.h
|
||||
0x59a0;IPCI_PapbBusy;No description;160;CCSDS_IP_CORE_BRIDGE;linux/ipcore/PapbVcInterface.h
|
||||
0x5aa0;PTME_UnknownVcId;No description;160;PTME;linux/ipcore/Ptme.h
|
||||
0x5c01;STRHLP_SdNotMounted;SD card specified in path string not mounted;1;STR_HELPER;linux/acs/StrComHandler.h
|
||||
@ -515,21 +517,21 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x5d05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h
|
||||
0x5ea0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;160;PLOC_MEMORY_DUMPER;linux/payload/PlocMemoryDumper.h
|
||||
0x5ea1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;161;PLOC_MEMORY_DUMPER;linux/payload/PlocMemoryDumper.h
|
||||
0x5fa0;PDEC_AbandonedCltuRetval;No description;160;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fa1;PDEC_FrameDirtyRetval;No description;161;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fa2;PDEC_FrameIllegalMultipleReasons;No description;162;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fa3;PDEC_AdDiscardedLockoutRetval;No description;163;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fa4;PDEC_AdDiscardedWaitRetval;No description;164;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fa5;PDEC_AdDiscardedNsVs;No description;165;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fa6;PDEC_NoReportRetval;No description;166;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fa7;PDEC_ErrorVersionNumberRetval;No description;167;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fa8;PDEC_IllegalCombinationRetval;No description;168;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fa9;PDEC_InvalidScIdRetval;No description;169;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5faa;PDEC_InvalidVcIdMsbRetval;No description;170;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fab;PDEC_InvalidVcIdLsbRetval;No description;171;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fac;PDEC_NsNotZeroRetval;No description;172;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fae;PDEC_InvalidBcCc;No description;174;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fb0;PDEC_CommandNotImplemented;Received action message with unknown action id;176;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
0x5fa0;PDEC_AbandonedCltuRetval;No description;160;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fa1;PDEC_FrameDirtyRetval;No description;161;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fa2;PDEC_FrameIllegalMultipleReasons;No description;162;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fa3;PDEC_AdDiscardedLockoutRetval;No description;163;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fa4;PDEC_AdDiscardedWaitRetval;No description;164;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fa5;PDEC_AdDiscardedNsVs;No description;165;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fa6;PDEC_NoReportRetval;No description;166;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fa7;PDEC_ErrorVersionNumberRetval;No description;167;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fa8;PDEC_IllegalCombinationRetval;No description;168;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fa9;PDEC_InvalidScIdRetval;No description;169;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5faa;PDEC_InvalidVcIdMsbRetval;No description;170;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fab;PDEC_InvalidVcIdLsbRetval;No description;171;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fac;PDEC_NsNotZeroRetval;No description;172;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fae;PDEC_InvalidBcCc;No description;174;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x5fb0;PDEC_CommandNotImplemented;Received action message with unknown action id;176;PDEC_HANDLER;linux/ipcore/pdec.h
|
||||
0x60a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/com/CcsdsIpCoreHandler.h
|
||||
0x61a0;RS_RateNotSupported;The commanded rate is not supported by the current FPGA design;160;RATE_SETTER;linux/ipcore/PtmeConfig.h
|
||||
0x61a1;RS_BadBitRate;Bad bitrate has been commanded (e.g. 0);161;RATE_SETTER;linux/ipcore/PtmeConfig.h
|
||||
@ -541,8 +543,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NvmParameterBase.h
|
||||
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||
0x6502;PLMPHLP_InvalidCrc;No description;2;PLOC_MPSOC_HELPER;linux/payload/ScexHelper.h
|
||||
0x65a0;PLMPHLP_FileClosedAccidentally;File accidentally close;160;PLOC_MPSOC_HELPER;linux/payload/PlocMpsocHelper.h
|
||||
0x65a0;PLMPHLP_FileWriteError;File error occured for file transfers from OBC to the MPSoC.;160;PLOC_MPSOC_HELPER;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
0x65a1;PLMPHLP_FileReadError;File error occured for file transfers from MPSoC to OBC.;161;PLOC_MPSOC_HELPER;linux/payload/PlocMpsocSpecialComHelper.h
|
||||
0x66a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h
|
||||
0x66a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h
|
||||
0x66a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h
|
||||
@ -582,7 +584,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x68b5;SPVRTVIF_SupvHelperExecuting;Supervisor helper task ist currently executing a command (wait until helper tas has finished or interrupt by sending the terminate command);181;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h
|
||||
0x68c0;SPVRTVIF_BufTooSmall;No description;192;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h
|
||||
0x68c1;SPVRTVIF_NoReplyTimeout;No description;193;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h
|
||||
0x6900;ACSCTRL_FileDeletionFailed;No description;0;ACS_CTRL;mission/controller/AcsController.h
|
||||
0x6900;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;0;ACS_CTRL;mission/controller/AcsController.h
|
||||
0x6a02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
@ -591,21 +593,18 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x6a07;ACSMEKF_MekfNotFinite;No description;7;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a08;ACSMEKF_MekfInitialized;No description;8;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a09;ACSMEKF_MekfRunning;No description;9;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6b01;ACSSAF_SafectrlMekfInputInvalid;No description;1;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h
|
||||
0x6c01;ACSPTG_PtgctrlMekfInputInvalid;No description;1;ACS_PTG;mission/controller/acs/control/PtgCtrl.h
|
||||
0x6d01;ACSDTB_DetumbleNoSensordata;No description;1;ACS_DETUMBLE;mission/controller/acs/control/Detumble.h
|
||||
0x6e00;SDMA_OpOngoing;No description;0;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6e01;SDMA_AlreadyOn;No description;1;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6e02;SDMA_AlreadyMounted;No description;2;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6e03;SDMA_AlreadyOff;No description;3;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6e0a;SDMA_StatusFileNexists;No description;10;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6e0b;SDMA_StatusFileFormatInvalid;No description;11;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6e0c;SDMA_MountError;No description;12;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6e0d;SDMA_UnmountError;No description;13;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6e0e;SDMA_SystemCallError;No description;14;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6e0f;SDMA_PopenCallError;No description;15;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6f00;LPH_SdNotReady;No description;0;LOCAL_PARAM_HANDLER;bsp_q7s/memory/LocalParameterHandler.h
|
||||
0x7000;PTM_DumpDone;No description;0;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h
|
||||
0x7001;PTM_BusyDumping;No description;1;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h
|
||||
0x7100;TMS_IsBusy;No description;0;TM_SINK;mission/tmtc/DirectTmSinkIF.h
|
||||
0x7300;SCBU_KeyNotFound;No description;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
||||
0x6b00;SDMA_OpOngoing;No description;0;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6b01;SDMA_AlreadyOn;No description;1;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6b02;SDMA_AlreadyMounted;No description;2;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6b03;SDMA_AlreadyOff;No description;3;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6b0a;SDMA_StatusFileNexists;No description;10;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6b0b;SDMA_StatusFileFormatInvalid;No description;11;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6b0c;SDMA_MountError;No description;12;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6b0d;SDMA_UnmountError;No description;13;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6b0e;SDMA_SystemCallError;No description;14;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6b0f;SDMA_PopenCallError;No description;15;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6c00;LPH_SdNotReady;No description;0;LOCAL_PARAM_HANDLER;bsp_q7s/memory/LocalParameterHandler.h
|
||||
0x6d00;PTM_DumpDone;No description;0;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h
|
||||
0x6d01;PTM_BusyDumping;No description;1;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h
|
||||
0x6e00;TMS_IsBusy;No description;0;TM_SINK;mission/tmtc/DirectTmSinkIF.h
|
||||
0x7000;SCBU_KeyNotFound;No description;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
||||
|
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 283 translations.
|
||||
* @brief Auto-generated event translation file. Contains 296 translations.
|
||||
* @details
|
||||
* Generated on: 2023-03-28 22:20:01
|
||||
* Generated on: 2023-06-21 19:01:02
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -97,6 +97,7 @@ const char *SAFE_RATE_RECOVERY_STRING = "SAFE_RATE_RECOVERY";
|
||||
const char *MULTIPLE_RW_INVALID_STRING = "MULTIPLE_RW_INVALID";
|
||||
const char *MEKF_INVALID_INFO_STRING = "MEKF_INVALID_INFO";
|
||||
const char *MEKF_RECOVERY_STRING = "MEKF_RECOVERY";
|
||||
const char *MEKF_AUTOMATIC_RESET_STRING = "MEKF_AUTOMATIC_RESET";
|
||||
const char *MEKF_INVALID_MODE_VIOLATION_STRING = "MEKF_INVALID_MODE_VIOLATION";
|
||||
const char *SAFE_MODE_CONTROLLER_FAILURE_STRING = "SAFE_MODE_CONTROLLER_FAILURE";
|
||||
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
|
||||
@ -160,8 +161,11 @@ const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC";
|
||||
const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS";
|
||||
const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC";
|
||||
const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC";
|
||||
const char *PDEC_TRYING_RESET_WITH_INIT_STRING = "PDEC_TRYING_RESET_WITH_INIT";
|
||||
const char *PDEC_TRYING_RESET_NO_INIT_STRING = "PDEC_TRYING_RESET_NO_INIT";
|
||||
const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
|
||||
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED";
|
||||
const char *PDEC_INIT_FAILED_STRING = "PDEC_INIT_FAILED";
|
||||
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
|
||||
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
|
||||
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
|
||||
@ -193,6 +197,10 @@ const char *MPSOC_EXE_INVALID_APID_STRING = "MPSOC_EXE_INVALID_APID";
|
||||
const char *MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING = "MPSOC_HELPER_SEQ_CNT_MISMATCH";
|
||||
const char *MPSOC_TM_SIZE_ERROR_STRING = "MPSOC_TM_SIZE_ERROR";
|
||||
const char *MPSOC_TM_CRC_MISSMATCH_STRING = "MPSOC_TM_CRC_MISSMATCH";
|
||||
const char *MPSOC_FLASH_READ_PACKET_ERROR_STRING = "MPSOC_FLASH_READ_PACKET_ERROR";
|
||||
const char *MPSOC_FLASH_READ_FAILED_STRING = "MPSOC_FLASH_READ_FAILED";
|
||||
const char *MPSOC_FLASH_READ_SUCCESSFUL_STRING = "MPSOC_FLASH_READ_SUCCESSFUL";
|
||||
const char *MPSOC_READ_TIMEOUT_STRING = "MPSOC_READ_TIMEOUT";
|
||||
const char *TRANSITION_BACK_TO_OFF_STRING = "TRANSITION_BACK_TO_OFF";
|
||||
const char *NEG_V_OUT_OF_BOUNDS_STRING = "NEG_V_OUT_OF_BOUNDS";
|
||||
const char *U_DRO_OUT_OF_BOUNDS_STRING = "U_DRO_OUT_OF_BOUNDS";
|
||||
@ -209,6 +217,7 @@ const char *TRANSITION_OTHER_SIDE_FAILED_STRING = "TRANSITION_OTHER_SIDE_FAILED"
|
||||
const char *NOT_ENOUGH_DEVICES_DUAL_MODE_STRING = "NOT_ENOUGH_DEVICES_DUAL_MODE";
|
||||
const char *POWER_STATE_MACHINE_TIMEOUT_STRING = "POWER_STATE_MACHINE_TIMEOUT";
|
||||
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_STRING = "SIDE_SWITCH_TRANSITION_NOT_ALLOWED";
|
||||
const char *DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY_STRING = "DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY";
|
||||
const char *TRANSITION_OTHER_SIDE_FAILED_12900_STRING = "TRANSITION_OTHER_SIDE_FAILED_12900";
|
||||
const char *NOT_ENOUGH_DEVICES_DUAL_MODE_12901_STRING = "NOT_ENOUGH_DEVICES_DUAL_MODE_12901";
|
||||
const char *POWER_STATE_MACHINE_TIMEOUT_12902_STRING = "POWER_STATE_MACHINE_TIMEOUT_12902";
|
||||
@ -265,14 +274,18 @@ const char *VERSION_INFO_STRING = "VERSION_INFO";
|
||||
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
||||
const char *REBOOT_COUNTER_STRING = "REBOOT_COUNTER";
|
||||
const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
||||
const char *I2C_UNAVAILABLE_REBOOT_STRING = "I2C_UNAVAILABLE_REBOOT";
|
||||
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
||||
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
||||
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
||||
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
|
||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||
const char *PLOC_OVERHEATING_STRING = "PLOC_OVERHEATING";
|
||||
const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
|
||||
const char *HPA_OVERHEATING_STRING = "HPA_OVERHEATING";
|
||||
const char *PLPCDU_OVERHEATING_STRING = "PLPCDU_OVERHEATING";
|
||||
const char *CAMERA_OVERHEATING_STRING = "CAMERA_OVERHEATING";
|
||||
const char *PCDU_SYSTEM_OVERHEATING_STRING = "PCDU_SYSTEM_OVERHEATING";
|
||||
const char *HEATER_NOT_OFF_FOR_OFF_MODE_STRING = "HEATER_NOT_OFF_FOR_OFF_MODE";
|
||||
const char *MGT_OVERHEATING_STRING = "MGT_OVERHEATING";
|
||||
const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED";
|
||||
const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON";
|
||||
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
|
||||
@ -476,8 +489,10 @@ const char *translateEvents(Event event) {
|
||||
case (11204):
|
||||
return MEKF_RECOVERY_STRING;
|
||||
case (11205):
|
||||
return MEKF_INVALID_MODE_VIOLATION_STRING;
|
||||
return MEKF_AUTOMATIC_RESET_STRING;
|
||||
case (11206):
|
||||
return MEKF_INVALID_MODE_VIOLATION_STRING;
|
||||
case (11207):
|
||||
return SAFE_MODE_CONTROLLER_FAILURE_STRING;
|
||||
case (11300):
|
||||
return SWITCH_CMD_SENT_STRING;
|
||||
@ -602,9 +617,15 @@ const char *translateEvents(Event event) {
|
||||
case (12409):
|
||||
return WRITE_SYSCALL_ERROR_PDEC_STRING;
|
||||
case (12410):
|
||||
return PDEC_RESET_FAILED_STRING;
|
||||
return PDEC_TRYING_RESET_WITH_INIT_STRING;
|
||||
case (12411):
|
||||
return PDEC_TRYING_RESET_NO_INIT_STRING;
|
||||
case (12412):
|
||||
return PDEC_RESET_FAILED_STRING;
|
||||
case (12413):
|
||||
return OPEN_IRQ_FILE_FAILED_STRING;
|
||||
case (12414):
|
||||
return PDEC_INIT_FAILED_STRING;
|
||||
case (12500):
|
||||
return IMAGE_UPLOAD_FAILED_STRING;
|
||||
case (12501):
|
||||
@ -667,6 +688,14 @@ const char *translateEvents(Event event) {
|
||||
return MPSOC_TM_SIZE_ERROR_STRING;
|
||||
case (12613):
|
||||
return MPSOC_TM_CRC_MISSMATCH_STRING;
|
||||
case (12614):
|
||||
return MPSOC_FLASH_READ_PACKET_ERROR_STRING;
|
||||
case (12615):
|
||||
return MPSOC_FLASH_READ_FAILED_STRING;
|
||||
case (12616):
|
||||
return MPSOC_FLASH_READ_SUCCESSFUL_STRING;
|
||||
case (12617):
|
||||
return MPSOC_READ_TIMEOUT_STRING;
|
||||
case (12700):
|
||||
return TRANSITION_BACK_TO_OFF_STRING;
|
||||
case (12701):
|
||||
@ -699,6 +728,8 @@ const char *translateEvents(Event event) {
|
||||
return POWER_STATE_MACHINE_TIMEOUT_STRING;
|
||||
case (12803):
|
||||
return SIDE_SWITCH_TRANSITION_NOT_ALLOWED_STRING;
|
||||
case (12804):
|
||||
return DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY_STRING;
|
||||
case (12900):
|
||||
return TRANSITION_OTHER_SIDE_FAILED_12900_STRING;
|
||||
case (12901):
|
||||
@ -812,21 +843,29 @@ const char *translateEvents(Event event) {
|
||||
case (14008):
|
||||
return INDIVIDUAL_BOOT_COUNTS_STRING;
|
||||
case (14010):
|
||||
return I2C_UNAVAILABLE_REBOOT_STRING;
|
||||
return TRYING_I2C_RECOVERY_STRING;
|
||||
case (14011):
|
||||
return I2C_REBOOT_STRING;
|
||||
case (14012):
|
||||
return PDEC_REBOOT_STRING;
|
||||
case (14013):
|
||||
return FIRMWARE_INFO_STRING;
|
||||
case (14100):
|
||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||
case (14101):
|
||||
return NO_HEALTHY_HEATER_AVAILABLE_STRING;
|
||||
case (14102):
|
||||
return SYRLINKS_OVERHEATING_STRING;
|
||||
case (14103):
|
||||
return PLOC_OVERHEATING_STRING;
|
||||
case (14104):
|
||||
return OBC_OVERHEATING_STRING;
|
||||
case (14105):
|
||||
return HPA_OVERHEATING_STRING;
|
||||
return CAMERA_OVERHEATING_STRING;
|
||||
case (14106):
|
||||
return PLPCDU_OVERHEATING_STRING;
|
||||
return PCDU_SYSTEM_OVERHEATING_STRING;
|
||||
case (14107):
|
||||
return HEATER_NOT_OFF_FOR_OFF_MODE_STRING;
|
||||
case (14108):
|
||||
return MGT_OVERHEATING_STRING;
|
||||
case (14201):
|
||||
return TX_TIMER_EXPIRED_STRING;
|
||||
case (14202):
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 173 translations.
|
||||
* Generated on: 2023-03-28 22:20:01
|
||||
* Contains 175 translations.
|
||||
* Generated on: 2023-06-21 19:01:02
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
@ -37,6 +37,8 @@ const char *GYRO_3_L3G_HANDLER_STRING = "GYRO_3_L3G_HANDLER";
|
||||
const char *RW4_STRING = "RW4";
|
||||
const char *STAR_TRACKER_STRING = "STAR_TRACKER";
|
||||
const char *GPS_CONTROLLER_STRING = "GPS_CONTROLLER";
|
||||
const char *GPS_0_HEALTH_DEV_STRING = "GPS_0_HEALTH_DEV";
|
||||
const char *GPS_1_HEALTH_DEV_STRING = "GPS_1_HEALTH_DEV";
|
||||
const char *IMTQ_POLLING_STRING = "IMTQ_POLLING";
|
||||
const char *IMTQ_HANDLER_STRING = "IMTQ_HANDLER";
|
||||
const char *PCDU_HANDLER_STRING = "PCDU_HANDLER";
|
||||
@ -244,6 +246,10 @@ const char *translateObject(object_id_t object) {
|
||||
return STAR_TRACKER_STRING;
|
||||
case 0x44130045:
|
||||
return GPS_CONTROLLER_STRING;
|
||||
case 0x44130046:
|
||||
return GPS_0_HEALTH_DEV_STRING;
|
||||
case 0x44130047:
|
||||
return GPS_1_HEALTH_DEV_STRING;
|
||||
case 0x44140013:
|
||||
return IMTQ_POLLING_STRING;
|
||||
case 0x44140014:
|
||||
|
@ -17,8 +17,8 @@
|
||||
#include <mission/payload/ScexDeviceHandler.h>
|
||||
#include <mission/system/acs/SusAssembly.h>
|
||||
#include <mission/system/acs/SusFdir.h>
|
||||
#include <mission/system/fdir/RtdFdir.h>
|
||||
#include <mission/system/objects/TcsBoardAssembly.h>
|
||||
#include <mission/system/tcs/RtdFdir.h>
|
||||
#include <mission/system/tcs/TcsBoardAssembly.h>
|
||||
#include <mission/tcs/Max31865EiveHandler.h>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
@ -27,8 +27,9 @@
|
||||
#include "devices/gpioIds.h"
|
||||
#include "eive/definitions.h"
|
||||
#include "mission/system/acs/acsModeTree.h"
|
||||
#include "mission/system/tcs/tcsModeTree.h"
|
||||
#include "mission/system/tree/payloadModeTree.h"
|
||||
#include "mission/system/tree/tcsModeTree.h"
|
||||
#include "mission/tcs/defs.h"
|
||||
|
||||
void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||
PowerSwitchIF& pwrSwitcher, std::string spiDev,
|
||||
@ -278,7 +279,8 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
||||
std::array<Max31865EiveHandler*, NUM_RTDS> rtds = {};
|
||||
RtdFdir* rtdFdir = nullptr;
|
||||
|
||||
TcsBoardAssembly* tcsBoardAss = ObjectFactory::createTcsBoardAssy(*pwrSwitcher);
|
||||
TcsBoardAssembly* tcsBoardAss =
|
||||
ObjectFactory::createTcsBoardAssy(*pwrSwitcher, tcs::TCS_BOARD_SHORTLY_UNAVAILABLE);
|
||||
|
||||
// Create special low level reader communication interface
|
||||
new Max31865RtdPolling(objects::SPI_RTD_COM_IF, comIF, gpioComIF);
|
||||
|
@ -113,7 +113,9 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
|
||||
if (req->mode != adis.mode) {
|
||||
if (req->mode == acs::SimpleSensorMode::NORMAL) {
|
||||
adis.type = req->type;
|
||||
adis.countdown.setTimeout(adis1650x::START_UP_TIME);
|
||||
adis.decRate = req->cfg.decRateReg;
|
||||
// The initial countdown is handled by the device handler now.
|
||||
// adis.countdown.setTimeout(adis1650x::START_UP_TIME);
|
||||
if (adis.type == adis1650x::Type::ADIS16507) {
|
||||
adis.ownReply.data.accelScaling = adis1650x::ACCELEROMETER_RANGE_16507;
|
||||
} else if (adis.type == adis1650x::Type::ADIS16505) {
|
||||
@ -121,11 +123,13 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
|
||||
} else {
|
||||
sif::warning << "AcsBoardPolling: Unknown ADIS type" << std::endl;
|
||||
}
|
||||
adis.replyResult = returnvalue::FAILED;
|
||||
adis.performStartup = true;
|
||||
} else if (req->mode == acs::SimpleSensorMode::OFF) {
|
||||
adis.performStartup = false;
|
||||
adis.ownReply.cfgWasSet = false;
|
||||
adis.ownReply.dataWasSet = false;
|
||||
adis.replyResult = returnvalue::OK;
|
||||
}
|
||||
adis.mode = req->mode;
|
||||
}
|
||||
@ -142,8 +146,10 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
|
||||
if (req->mode == acs::SimpleSensorMode::NORMAL) {
|
||||
std::memcpy(gyro.sensorCfg, req->ctrlRegs, 5);
|
||||
gyro.performStartup = true;
|
||||
gyro.replyResult = returnvalue::FAILED;
|
||||
} else {
|
||||
gyro.ownReply.cfgWasSet = false;
|
||||
gyro.replyResult = returnvalue::OK;
|
||||
}
|
||||
gyro.mode = req->mode;
|
||||
}
|
||||
@ -159,8 +165,10 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
|
||||
if (req->mode != mgm.mode) {
|
||||
if (req->mode == acs::SimpleSensorMode::NORMAL) {
|
||||
mgm.performStartup = true;
|
||||
mgm.replyResult = returnvalue::FAILED;
|
||||
} else {
|
||||
mgm.ownReply.dataWasSet = false;
|
||||
mgm.replyResult = returnvalue::OK;
|
||||
mgm.ownReply.temperatureWasSet = false;
|
||||
}
|
||||
mgm.mode = req->mode;
|
||||
@ -177,8 +185,10 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
|
||||
if (req->mode != mgm.mode) {
|
||||
if (req->mode == acs::SimpleSensorMode::NORMAL) {
|
||||
mgm.performStartup = true;
|
||||
mgm.replyResult = returnvalue::FAILED;
|
||||
} else {
|
||||
mgm.ownReply.dataWasRead = false;
|
||||
mgm.replyResult = returnvalue::OK;
|
||||
}
|
||||
mgm.mode = req->mode;
|
||||
}
|
||||
@ -309,18 +319,18 @@ void AcsBoardPolling::gyroL3gHandler(GyroL3g& l3g) {
|
||||
std::memcpy(cmdBuf.data() + 1, l3g.sensorCfg, 5);
|
||||
result = spiComIF.sendMessage(l3g.cookie, cmdBuf.data(), 6);
|
||||
if (result != returnvalue::OK) {
|
||||
l3g.replyResult = returnvalue::OK;
|
||||
l3g.replyResult = result;
|
||||
}
|
||||
// Ignore useless reply and red config
|
||||
cmdBuf[0] = l3gd20h::CTRL_REG_1 | l3gd20h::AUTO_INCREMENT_MASK | l3gd20h::READ_MASK;
|
||||
std::memset(cmdBuf.data() + 1, 0, 5);
|
||||
result = spiComIF.sendMessage(l3g.cookie, cmdBuf.data(), 6);
|
||||
if (result != returnvalue::OK) {
|
||||
l3g.replyResult = returnvalue::OK;
|
||||
l3g.replyResult = result;
|
||||
}
|
||||
result = spiComIF.readReceivedMessage(l3g.cookie, &rawReply, &dummy);
|
||||
if (result != returnvalue::OK) {
|
||||
l3g.replyResult = returnvalue::OK;
|
||||
l3g.replyResult = result;
|
||||
}
|
||||
MutexGuard mg(ipcLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
// Cross check configuration as verification that communication is working
|
||||
@ -331,6 +341,7 @@ void AcsBoardPolling::gyroL3gHandler(GyroL3g& l3g) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
l3g.replyResult = returnvalue::OK;
|
||||
l3g.performStartup = false;
|
||||
l3g.ownReply.cfgWasSet = true;
|
||||
l3g.ownReply.sensitivity = l3gd20h::ctrlReg4ToSensitivity(l3g.sensorCfg[3]);
|
||||
@ -357,6 +368,7 @@ void AcsBoardPolling::gyroL3gHandler(GyroL3g& l3g) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
l3g.replyResult = returnvalue::OK;
|
||||
l3g.ownReply.statusReg = rawReply[l3gd20h::STATUS_IDX];
|
||||
l3g.ownReply.angVelocities[0] = (rawReply[l3gd20h::OUT_X_H] << 8) | rawReply[l3gd20h::OUT_X_L];
|
||||
l3g.ownReply.angVelocities[1] = (rawReply[l3gd20h::OUT_Y_H] << 8) | rawReply[l3gd20h::OUT_Y_L];
|
||||
@ -365,6 +377,80 @@ void AcsBoardPolling::gyroL3gHandler(GyroL3g& l3g) {
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t AcsBoardPolling::writeAdisReg(SpiCookie& cookie) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
int retval = 0;
|
||||
// Prepare transfer
|
||||
int fileDescriptor = 0;
|
||||
std::string device = spiComIF.getSpiDev();
|
||||
UnixFileGuard fileHelper(device, fileDescriptor, O_RDWR, "SpiComIF::sendMessage");
|
||||
if (fileHelper.getOpenResult() != returnvalue::OK) {
|
||||
return spi::OPENING_FILE_FAILED;
|
||||
}
|
||||
spi::SpiModes spiMode = spi::SpiModes::MODE_0;
|
||||
uint32_t spiSpeed = 0;
|
||||
cookie.getSpiParameters(spiMode, spiSpeed, nullptr);
|
||||
spiComIF.setSpiSpeedAndMode(fileDescriptor, spiMode, spiSpeed);
|
||||
cookie.assignWriteBuffer(cmdBuf.data());
|
||||
cookie.setTransferSize(2);
|
||||
|
||||
gpioId_t gpioId = cookie.getChipSelectPin();
|
||||
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
|
||||
uint32_t timeoutMs = 0;
|
||||
MutexIF* mutex = spiComIF.getCsMutex();
|
||||
cookie.getMutexParams(timeoutType, timeoutMs);
|
||||
if (mutex == nullptr) {
|
||||
sif::warning << "GyroADIS16507Handler::spiSendCallback: "
|
||||
"Mutex or GPIO interface invalid"
|
||||
<< std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
size_t idx = 0;
|
||||
spi_ioc_transfer* transferStruct = cookie.getTransferStructHandle();
|
||||
uint64_t origTx = transferStruct->tx_buf;
|
||||
uint64_t origRx = transferStruct->rx_buf;
|
||||
for (idx = 0; idx < 4; idx += 2) {
|
||||
result = mutex->lockMutex(timeoutType, timeoutMs);
|
||||
if (result != returnvalue::OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "AcsBoardPolling: Failed to lock mutex" << std::endl;
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
// Pull SPI CS low. For now, no support for active high given
|
||||
if (gpioId != gpio::NO_GPIO) {
|
||||
gpioIF.pullLow(gpioId);
|
||||
}
|
||||
|
||||
// Execute transfer
|
||||
// Initiate a full duplex SPI transfer.
|
||||
retval = ioctl(fileDescriptor, SPI_IOC_MESSAGE(1), cookie.getTransferStructHandle());
|
||||
if (retval < 0) {
|
||||
utility::handleIoctlError("SpiComIF::sendMessage: ioctl error.");
|
||||
result = spi::FULL_DUPLEX_TRANSFER_FAILED;
|
||||
}
|
||||
#if FSFW_HAL_SPI_WIRETAPPING == 1
|
||||
comIf->performSpiWiretapping(cookie);
|
||||
#endif /* FSFW_LINUX_SPI_WIRETAPPING == 1 */
|
||||
|
||||
if (gpioId != gpio::NO_GPIO) {
|
||||
gpioIF.pullHigh(gpioId);
|
||||
}
|
||||
mutex->unlockMutex();
|
||||
|
||||
transferStruct->tx_buf += 2;
|
||||
transferStruct->rx_buf += 2;
|
||||
if (idx < 4) {
|
||||
usleep(adis1650x::STALL_TIME_MICROSECONDS);
|
||||
}
|
||||
}
|
||||
transferStruct->tx_buf = origTx;
|
||||
transferStruct->rx_buf = origRx;
|
||||
cookie.setTransferSize(0);
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t AcsBoardPolling::readAdisCfg(SpiCookie& cookie, size_t transferLen) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
int retval = 0;
|
||||
@ -373,7 +459,7 @@ ReturnValue_t AcsBoardPolling::readAdisCfg(SpiCookie& cookie, size_t transferLen
|
||||
std::string device = spiComIF.getSpiDev();
|
||||
UnixFileGuard fileHelper(device, fileDescriptor, O_RDWR, "SpiComIF::sendMessage");
|
||||
if (fileHelper.getOpenResult() != returnvalue::OK) {
|
||||
return SpiComIF::OPENING_FILE_FAILED;
|
||||
return spi::OPENING_FILE_FAILED;
|
||||
}
|
||||
spi::SpiModes spiMode = spi::SpiModes::MODE_0;
|
||||
uint32_t spiSpeed = 0;
|
||||
@ -416,7 +502,7 @@ ReturnValue_t AcsBoardPolling::readAdisCfg(SpiCookie& cookie, size_t transferLen
|
||||
retval = ioctl(fileDescriptor, SPI_IOC_MESSAGE(1), cookie.getTransferStructHandle());
|
||||
if (retval < 0) {
|
||||
utility::handleIoctlError("SpiComIF::sendMessage: ioctl error.");
|
||||
result = SpiComIF::FULL_DUPLEX_TRANSFER_FAILED;
|
||||
result = spi::FULL_DUPLEX_TRANSFER_FAILED;
|
||||
}
|
||||
#if FSFW_HAL_SPI_WIRETAPPING == 1
|
||||
comIf->performSpiWiretapping(cookie);
|
||||
@ -443,21 +529,21 @@ ReturnValue_t AcsBoardPolling::readAdisCfg(SpiCookie& cookie, size_t transferLen
|
||||
void AcsBoardPolling::gyroAdisHandler(GyroAdis& gyro) {
|
||||
ReturnValue_t result;
|
||||
acs::SimpleSensorMode mode = acs::SimpleSensorMode::OFF;
|
||||
bool cdHasTimedOut = false;
|
||||
bool mustPerformStartup = false;
|
||||
uint16_t decRate = 0;
|
||||
{
|
||||
MutexGuard mg(ipcLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
mode = gyro.mode;
|
||||
cdHasTimedOut = gyro.countdown.hasTimedOut();
|
||||
decRate = gyro.decRate;
|
||||
mustPerformStartup = gyro.performStartup;
|
||||
}
|
||||
if (mode == acs::SimpleSensorMode::OFF) {
|
||||
return;
|
||||
}
|
||||
if (not cdHasTimedOut) {
|
||||
return;
|
||||
}
|
||||
if (mustPerformStartup) {
|
||||
adis1650x::prepareWriteRegCommand(adis1650x::DEC_RATE_REG, decRate, cmdBuf.data(),
|
||||
cmdBuf.size());
|
||||
writeAdisReg(*gyro.cookie);
|
||||
uint8_t regList[6];
|
||||
// Read configuration
|
||||
regList[0] = adis1650x::DIAG_STAT_REG;
|
||||
@ -485,16 +571,23 @@ void AcsBoardPolling::gyroAdisHandler(GyroAdis& gyro) {
|
||||
gyro.replyResult = returnvalue::FAILED;
|
||||
return;
|
||||
}
|
||||
uint16_t decRateReadBack = (rawReply[10] << 8) | rawReply[11];
|
||||
if (decRateReadBack != decRate) {
|
||||
sif::warning << "AcsPollingTask: DEC rate configuration failed. Read " << decRateReadBack
|
||||
<< ", expected " << decRate << std::endl;
|
||||
gyro.replyResult = returnvalue::FAILED;
|
||||
}
|
||||
MutexGuard mg(ipcLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
gyro.ownReply.cfgWasSet = true;
|
||||
gyro.ownReply.cfg.diagStat = (rawReply[2] << 8) | rawReply[3];
|
||||
gyro.ownReply.cfg.filterSetting = (rawReply[4] << 8) | rawReply[5];
|
||||
gyro.ownReply.cfg.rangMdl = (rawReply[6] << 8) | rawReply[7];
|
||||
gyro.ownReply.cfg.mscCtrlReg = (rawReply[8] << 8) | rawReply[9];
|
||||
gyro.ownReply.cfg.decRateReg = (rawReply[10] << 8) | rawReply[11];
|
||||
gyro.ownReply.cfg.decRateReg = decRateReadBack;
|
||||
gyro.ownReply.cfg.prodId = prodId;
|
||||
gyro.ownReply.data.sensitivity = adis1650x::rangMdlToSensitivity(gyro.ownReply.cfg.rangMdl);
|
||||
gyro.performStartup = false;
|
||||
gyro.replyResult = returnvalue::OK;
|
||||
}
|
||||
// Read regular registers
|
||||
std::memcpy(cmdBuf.data(), adis1650x::BURST_READ_ENABLE.data(),
|
||||
@ -533,6 +626,7 @@ void AcsBoardPolling::gyroAdisHandler(GyroAdis& gyro) {
|
||||
}
|
||||
|
||||
MutexGuard mg(ipcLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
gyro.replyResult = returnvalue::OK;
|
||||
gyro.ownReply.dataWasSet = true;
|
||||
gyro.ownReply.cfg.diagStat = rawReply[2] << 8 | rawReply[3];
|
||||
gyro.ownReply.data.angVelocities[0] = (rawReply[4] << 8) | rawReply[5];
|
||||
@ -590,6 +684,7 @@ void AcsBoardPolling::mgmLis3Handler(MgmLis3& mgm) {
|
||||
}
|
||||
// Done here. We can always read back config and data during periodic handling
|
||||
mgm.performStartup = false;
|
||||
mgm.replyResult = returnvalue::OK;
|
||||
}
|
||||
cmdBuf[0] = mgmLis3::readCommand(mgmLis3::CTRL_REG1, true);
|
||||
std::memset(cmdBuf.data() + 1, 0, mgmLis3::NR_OF_DATA_AND_CFG_REGISTERS);
|
||||
@ -607,7 +702,7 @@ void AcsBoardPolling::mgmLis3Handler(MgmLis3& mgm) {
|
||||
// Verify communication by re-checking config
|
||||
if (rawReply[1] != mgm.cfg[0] or rawReply[2] != mgm.cfg[1] or rawReply[3] != mgm.cfg[2] or
|
||||
rawReply[4] != mgm.cfg[3] or rawReply[5] != mgm.cfg[4]) {
|
||||
mgm.replyResult = result;
|
||||
mgm.replyResult = returnvalue::FAILED;
|
||||
return;
|
||||
}
|
||||
{
|
||||
@ -634,6 +729,7 @@ void AcsBoardPolling::mgmLis3Handler(MgmLis3& mgm) {
|
||||
return;
|
||||
}
|
||||
MutexGuard mg(ipcLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
mgm.replyResult = returnvalue::OK;
|
||||
mgm.ownReply.temperatureWasSet = true;
|
||||
mgm.ownReply.temperatureRaw = (rawReply[2] << 8) | rawReply[1];
|
||||
}
|
||||
@ -704,6 +800,7 @@ void AcsBoardPolling::mgmRm3100Handler(MgmRm3100& mgm) {
|
||||
return;
|
||||
}
|
||||
mgm.performStartup = false;
|
||||
mgm.replyResult = returnvalue::OK;
|
||||
}
|
||||
// Regular read operation
|
||||
cmdBuf[0] = mgmRm3100::MEASUREMENT_REG_START | mgmRm3100::READ_MASK;
|
||||
@ -725,6 +822,7 @@ void AcsBoardPolling::mgmRm3100Handler(MgmRm3100& mgm) {
|
||||
mgm.ownReply.scaleFactors[idx] = 1.0 / mgmRm3100::DEFAULT_GAIN;
|
||||
}
|
||||
mgm.ownReply.dataWasRead = true;
|
||||
mgm.replyResult = returnvalue::OK;
|
||||
// Bitshift trickery to account for 24 bit signed value.
|
||||
mgm.ownReply.mgmValuesRaw[0] =
|
||||
((rawReply[1] << 24) | (rawReply[2] << 16) | (rawReply[3] << 8)) >> 8;
|
||||
|
@ -37,6 +37,7 @@ class AcsBoardPolling : public SystemObject,
|
||||
|
||||
struct GyroAdis : public DevBase {
|
||||
adis1650x::Type type;
|
||||
uint16_t decRate;
|
||||
Countdown countdown;
|
||||
acs::Adis1650XReply ownReply;
|
||||
acs::Adis1650XReply readerReply;
|
||||
@ -84,6 +85,8 @@ class AcsBoardPolling : public SystemObject,
|
||||
void gyroAdisHandler(GyroAdis& gyro);
|
||||
void mgmLis3Handler(MgmLis3& mgm);
|
||||
void mgmRm3100Handler(MgmRm3100& mgm);
|
||||
// This fumction configures the register as specified on p.21 of the datasheet.
|
||||
ReturnValue_t writeAdisReg(SpiCookie& cookie);
|
||||
// Special readout: 16us stall time between small 2 byte transfers.
|
||||
ReturnValue_t readAdisCfg(SpiCookie& spiCookie, size_t transferLen);
|
||||
};
|
||||
|
@ -1,6 +1,10 @@
|
||||
target_sources(
|
||||
${OBSW_NAME} PUBLIC AcsBoardPolling.cpp ImtqPollingTask.cpp RwPollingTask.cpp
|
||||
SusPolling.cpp StrComHandler.cpp)
|
||||
target_sources(${OBSW_NAME} PUBLIC AcsBoardPolling.cpp ImtqPollingTask.cpp
|
||||
RwPollingTask.cpp SusPolling.cpp)
|
||||
|
||||
# Dependency on proprietary library
|
||||
if(TGT_BSP MATCHES "arm/q7s")
|
||||
target_sources(${OBSW_NAME} PUBLIC StrComHandler.cpp)
|
||||
endif()
|
||||
|
||||
if(EIVE_BUILD_GPSD_GPS_HANDLER)
|
||||
target_sources(${OBSW_NAME} PRIVATE GpsHyperionLinuxController.cpp)
|
||||
|
@ -18,8 +18,11 @@
|
||||
#include <ctime>
|
||||
|
||||
GpsHyperionLinuxController::GpsHyperionLinuxController(object_id_t objectId, object_id_t parentId,
|
||||
bool debugHyperionGps)
|
||||
: ExtendedControllerBase(objectId), gpsSet(this), debugHyperionGps(debugHyperionGps) {}
|
||||
bool enableHkSets, bool debugHyperionGps)
|
||||
: ExtendedControllerBase(objectId),
|
||||
gpsSet(this),
|
||||
enableHkSets(enableHkSets),
|
||||
debugHyperionGps(debugHyperionGps) {}
|
||||
|
||||
GpsHyperionLinuxController::~GpsHyperionLinuxController() {
|
||||
gps_stream(&gps, WATCH_DISABLE, nullptr);
|
||||
@ -86,7 +89,7 @@ ReturnValue_t GpsHyperionLinuxController::initializeLocalDataPool(
|
||||
localDataPoolMap.emplace(GpsHyperion::SATS_IN_USE, new PoolEntry<uint8_t>());
|
||||
localDataPoolMap.emplace(GpsHyperion::SATS_IN_VIEW, new PoolEntry<uint8_t>());
|
||||
localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>());
|
||||
poolManager.subscribeForRegularPeriodicPacket({gpsSet.getSid(), false, 30.0});
|
||||
poolManager.subscribeForRegularPeriodicPacket({gpsSet.getSid(), enableHkSets, 30.0});
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
@ -99,6 +102,7 @@ void GpsHyperionLinuxController::setResetPinTriggerFunction(gpioResetFunction_t
|
||||
ReturnValue_t GpsHyperionLinuxController::performOperation(uint8_t opCode) {
|
||||
handleQueue();
|
||||
poolManager.performHkOperation();
|
||||
|
||||
while (true) {
|
||||
#if OBSW_THREAD_TRACING == 1
|
||||
trace::threadTrace(opCounter, "GPS CTRL");
|
||||
|
@ -29,7 +29,7 @@ class GpsHyperionLinuxController : public ExtendedControllerBase {
|
||||
|
||||
enum ReadModes { SHM = 0, SOCKET = 1 };
|
||||
|
||||
GpsHyperionLinuxController(object_id_t objectId, object_id_t parentId,
|
||||
GpsHyperionLinuxController(object_id_t objectId, object_id_t parentId, bool enableHkSets,
|
||||
bool debugHyperionGps = false);
|
||||
virtual ~GpsHyperionLinuxController();
|
||||
|
||||
@ -58,6 +58,7 @@ class GpsHyperionLinuxController : public ExtendedControllerBase {
|
||||
private:
|
||||
GpsPrimaryDataset gpsSet;
|
||||
gps_data_t gps = {};
|
||||
bool enableHkSets = false;
|
||||
const char* currentClientBuf = nullptr;
|
||||
ReadModes readMode = ReadModes::SOCKET;
|
||||
Countdown maxTimeToReachFix = Countdown(MAX_SECONDS_TO_REACH_FIX * 1000);
|
||||
|
@ -27,7 +27,7 @@ ReturnValue_t ImtqPollingTask::performOperation(uint8_t operationCode) {
|
||||
|
||||
comStatus = returnvalue::OK;
|
||||
// Stopwatch watch;
|
||||
switch (currentRequest) {
|
||||
switch (currentRequest.requestType) {
|
||||
case imtq::RequestType::MEASURE_NO_ACTUATION: {
|
||||
// Measured to take 24 ms for debug and release builds.
|
||||
// Stopwatch watch;
|
||||
@ -51,6 +51,30 @@ void ImtqPollingTask::handleMeasureStep() {
|
||||
uint8_t* replyPtr;
|
||||
ImtqRepliesDefault replies(replyBuf.data());
|
||||
// If some startup handling is added later, set configured after it was done once.
|
||||
if (performStartup) {
|
||||
// Set integration time for the MGM.
|
||||
cmdBuf[0] = imtq::CC::SET_PARAM;
|
||||
size_t dummy = 0;
|
||||
SerializeAdapter::serialize(&imtq::param::INTEGRATION_TIME_SELECT, cmdBuf.data() + 1, &dummy,
|
||||
cmdBuf.size(), SerializeIF::Endianness::LITTLE);
|
||||
cmdBuf[3] = currentRequest.integrationTimeSel;
|
||||
cmdLen = 4;
|
||||
ReturnValue_t result = performI2cFullRequest(replyBuf.data(), 5);
|
||||
if (result != returnvalue::OK) {
|
||||
comStatus = imtq::STARTUP_CFG_ERROR;
|
||||
}
|
||||
if (replyBuf[0] != imtq::CC::SET_PARAM) {
|
||||
sif::error << "ImtqPollingTask: First byte of reply not equal to sent CC" << std::endl;
|
||||
comStatus = imtq::STARTUP_CFG_ERROR;
|
||||
}
|
||||
if (replyBuf[4] != currentRequest.integrationTimeSel) {
|
||||
sif::error << "ImtqPollingTask: Integration time configuration failed" << std::endl;
|
||||
comStatus = imtq::STARTUP_CFG_ERROR;
|
||||
}
|
||||
currentIntegrationTimeMs =
|
||||
imtq::integrationTimeFromSelectValue(currentRequest.integrationTimeSel);
|
||||
performStartup = false;
|
||||
}
|
||||
replies.setConfigured();
|
||||
|
||||
// Can be used later to verify correct timing (e.g. all data has been read)
|
||||
@ -73,7 +97,7 @@ void ImtqPollingTask::handleMeasureStep() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (specialRequest != imtq::SpecialRequest::NONE) {
|
||||
if (currentRequest.specialRequest != imtq::SpecialRequest::NONE) {
|
||||
auto executeSelfTest = [&](imtq::selfTest::Axis axis) {
|
||||
cmdBuf[0] = imtq::CC::SELF_TEST_CMD;
|
||||
cmdBuf[1] = axis;
|
||||
@ -81,7 +105,7 @@ void ImtqPollingTask::handleMeasureStep() {
|
||||
};
|
||||
// If a self-test is already ongoing, ignore the request.
|
||||
if (replies.getSystemState()[2] != static_cast<uint8_t>(imtq::mode::SELF_TEST)) {
|
||||
switch (specialRequest) {
|
||||
switch (currentRequest.specialRequest) {
|
||||
case (imtq::SpecialRequest::DO_SELF_TEST_POS_X): {
|
||||
executeSelfTest(imtq::selfTest::Axis::X_POSITIVE);
|
||||
break;
|
||||
@ -234,18 +258,21 @@ ReturnValue_t ImtqPollingTask::initializeInterface(CookieIF* cookie) {
|
||||
ReturnValue_t ImtqPollingTask::sendMessage(CookieIF* cookie, const uint8_t* sendData,
|
||||
size_t sendLen) {
|
||||
const auto* imtqReq = reinterpret_cast<const imtq::Request*>(sendData);
|
||||
if (sendLen != sizeof(imtq::Request)) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
{
|
||||
MutexGuard mg(ipcLock);
|
||||
if (imtqReq->request == imtq::RequestType::ACTUATE) {
|
||||
std::memcpy(dipoles, imtqReq->dipoles, sizeof(dipoles));
|
||||
torqueDuration = imtqReq->torqueDuration;
|
||||
}
|
||||
currentRequest = imtqReq->request;
|
||||
specialRequest = imtqReq->specialRequest;
|
||||
if (state != InternalState::IDLE) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
state = InternalState::IS_BUSY;
|
||||
if (currentRequest.mode != imtqReq->mode) {
|
||||
if (imtqReq->mode == acs::SimpleSensorMode::NORMAL) {
|
||||
performStartup = true;
|
||||
}
|
||||
}
|
||||
std::memcpy(¤tRequest, imtqReq, sendLen);
|
||||
}
|
||||
semaphore->release();
|
||||
|
||||
@ -345,10 +372,10 @@ void ImtqPollingTask::buildDipoleCommand() {
|
||||
uint8_t* serPtr = cmdBuf.data() + 1;
|
||||
size_t serLen = 0;
|
||||
for (uint8_t idx = 0; idx < 3; idx++) {
|
||||
SerializeAdapter::serialize(&dipoles[idx], &serPtr, &serLen, cmdBuf.size(),
|
||||
SerializeAdapter::serialize(¤tRequest.dipoles[idx], &serPtr, &serLen, cmdBuf.size(),
|
||||
SerializeIF::Endianness::LITTLE);
|
||||
}
|
||||
SerializeAdapter::serialize(&torqueDuration, &serPtr, &serLen, cmdBuf.size(),
|
||||
SerializeAdapter::serialize(¤tRequest.torqueDuration, &serPtr, &serLen, cmdBuf.size(),
|
||||
SerializeIF::Endianness::LITTLE);
|
||||
// sif::debug << "Dipole X: " << dipoles[0] << std::endl;
|
||||
// sif::debug << "Torqeu Dur: " << torqueDuration << std::endl;
|
||||
@ -357,22 +384,28 @@ void ImtqPollingTask::buildDipoleCommand() {
|
||||
|
||||
ReturnValue_t ImtqPollingTask::readReceivedMessage(CookieIF* cookie, uint8_t** buffer,
|
||||
size_t* size) {
|
||||
imtq::RequestType currentRequest;
|
||||
imtq::Request currentRequest;
|
||||
{
|
||||
MutexGuard mg(ipcLock);
|
||||
currentRequest = this->currentRequest;
|
||||
std::memcpy(¤tRequest, &this->currentRequest, sizeof(currentRequest));
|
||||
}
|
||||
|
||||
size_t replyLen = 0;
|
||||
MutexGuard mg(bufLock);
|
||||
if (currentRequest == imtq::RequestType::MEASURE_NO_ACTUATION) {
|
||||
replyLen = getExchangeBufLen(specialRequest);
|
||||
memcpy(exchangeBuf.data(), replyBuf.data(), replyLen);
|
||||
} else if (currentRequest == imtq::RequestType::ACTUATE) {
|
||||
replyLen = ImtqRepliesWithTorque::BASE_LEN;
|
||||
memcpy(exchangeBuf.data(), replyBufActuation.data(), replyLen);
|
||||
} else {
|
||||
*size = 0;
|
||||
{
|
||||
MutexGuard mg(bufLock);
|
||||
if (currentRequest.requestType == imtq::RequestType::MEASURE_NO_ACTUATION) {
|
||||
replyLen = getExchangeBufLen(currentRequest.specialRequest);
|
||||
memcpy(exchangeBuf.data(), replyBuf.data(), replyLen);
|
||||
} else if (currentRequest.requestType == imtq::RequestType::ACTUATE) {
|
||||
replyLen = ImtqRepliesWithTorque::BASE_LEN;
|
||||
memcpy(exchangeBuf.data(), replyBufActuation.data(), replyLen);
|
||||
} else {
|
||||
*size = 0;
|
||||
}
|
||||
}
|
||||
{
|
||||
MutexGuard mg(ipcLock);
|
||||
this->currentRequest.requestType = imtq::RequestType::DO_NOTHING;
|
||||
}
|
||||
*buffer = exchangeBuf.data();
|
||||
*size = replyLen;
|
||||
@ -417,6 +450,7 @@ void ImtqPollingTask::clearReadFlagsWithTorque(ImtqRepliesWithTorque& replies) {
|
||||
ReturnValue_t ImtqPollingTask::performI2cFullRequest(uint8_t* reply, size_t replyLen) {
|
||||
int fd = 0;
|
||||
if (cmdLen == 0 or reply == nullptr) {
|
||||
sif::error << "ImtqPollingTask: Command lenght is zero or reply PTR is invalid" << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <fsfw/tasks/SemaphoreIF.h>
|
||||
#include <fsfw_hal/linux/i2c/I2cCookie.h>
|
||||
#include <mission/acs/acsBoardPolling.h>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
@ -21,10 +22,10 @@ class ImtqPollingTask : public SystemObject,
|
||||
ReturnValue_t initialize() override;
|
||||
|
||||
private:
|
||||
//! [EXPORT] : [SKIP]
|
||||
static constexpr ReturnValue_t NO_REPLY_AVAILABLE = returnvalue::makeCode(2, 0);
|
||||
|
||||
enum class InternalState { IDLE, IS_BUSY } state = InternalState::IDLE;
|
||||
imtq::RequestType currentRequest = imtq::RequestType::MEASURE_NO_ACTUATION;
|
||||
|
||||
SemaphoreIF* semaphore;
|
||||
ReturnValue_t comStatus = returnvalue::OK;
|
||||
@ -38,10 +39,9 @@ class ImtqPollingTask : public SystemObject,
|
||||
// Required in addition to integration time, otherwise old data might be read.
|
||||
static constexpr uint32_t MGM_READ_BUFFER_TIME_MS = 6;
|
||||
bool ignoreNextActuateRequest = false;
|
||||
bool performStartup = false;
|
||||
|
||||
imtq::SpecialRequest specialRequest = imtq::SpecialRequest::NONE;
|
||||
int16_t dipoles[3] = {};
|
||||
uint16_t torqueDuration = 0;
|
||||
imtq::Request currentRequest{};
|
||||
|
||||
std::array<uint8_t, 32> cmdBuf;
|
||||
std::array<uint8_t, 524> replyBuf;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "devConf.h"
|
||||
#include "mission/acs/defs.h"
|
||||
#include "mission/acs/rwHelpers.h"
|
||||
|
||||
RwPollingTask::RwPollingTask(object_id_t objectId, const char* spiDev, GpioIF& gpioIF)
|
||||
@ -35,6 +36,7 @@ ReturnValue_t RwPollingTask::performOperation(uint8_t operationCode) {
|
||||
semaphore->acquire();
|
||||
// This loop takes 50 ms on a debug build.
|
||||
// Stopwatch watch;
|
||||
// Give all device handlers some time to submit requests.
|
||||
TaskFactory::delayTask(5);
|
||||
int fd = 0;
|
||||
for (auto& skip : skipCommandingForRw) {
|
||||
@ -45,13 +47,24 @@ ReturnValue_t RwPollingTask::performOperation(uint8_t operationCode) {
|
||||
if (result != returnvalue::OK) {
|
||||
continue;
|
||||
}
|
||||
acs::SimpleSensorMode currentMode;
|
||||
rws::SpecialRwRequest specialRequest;
|
||||
|
||||
for (unsigned idx = 0; idx < rwCookies.size(); idx++) {
|
||||
if (rwCookies[idx]->specialRequest == rws::SpecialRwRequest::RESET_MCU) {
|
||||
{
|
||||
MutexGuard mg(ipcLock);
|
||||
currentMode = rwRequests[idx].mode;
|
||||
specialRequest = rwRequests[idx].specialRequest;
|
||||
skipSetSpeedReply[idx] = rwRequests[idx].setSpeed;
|
||||
}
|
||||
if (currentMode == acs::SimpleSensorMode::OFF) {
|
||||
skipCommandingForRw[idx] = true;
|
||||
} else if (specialRequest == rws::SpecialRwRequest::RESET_MCU) {
|
||||
prepareSimpleCommand(rws::RESET_MCU);
|
||||
// No point in commanding that specific RW for the cycle.
|
||||
skipCommandingForRw[idx] = true;
|
||||
writeOneRwCmd(idx, fd);
|
||||
} else if (rwCookies[idx]->setSpeed) {
|
||||
} else if (skipSetSpeedReply[idx]) {
|
||||
prepareSetSpeedCmd(idx);
|
||||
if (writeOneRwCmd(idx, fd) != returnvalue::OK) {
|
||||
continue;
|
||||
@ -121,31 +134,14 @@ ReturnValue_t RwPollingTask::initializeInterface(CookieIF* cookie) {
|
||||
|
||||
ReturnValue_t RwPollingTask::sendMessage(CookieIF* cookie, const uint8_t* sendData,
|
||||
size_t sendLen) {
|
||||
if (sendData == nullptr or sendLen < 8) {
|
||||
if (sendData == nullptr or sendLen != sizeof(rws::RwRequest)) {
|
||||
return DeviceHandlerIF::INVALID_DATA;
|
||||
}
|
||||
int32_t speed = 0;
|
||||
uint16_t rampTime = 0;
|
||||
const uint8_t* currentBuf = sendData;
|
||||
bool setSpeed = currentBuf[0];
|
||||
currentBuf += 1;
|
||||
sendLen -= 1;
|
||||
SerializeAdapter::deSerialize(&speed, ¤tBuf, &sendLen, SerializeIF::Endianness::MACHINE);
|
||||
SerializeAdapter::deSerialize(&rampTime, ¤tBuf, &sendLen, SerializeIF::Endianness::MACHINE);
|
||||
rws::SpecialRwRequest specialRequest = rws::SpecialRwRequest::REQUEST_NONE;
|
||||
if (sendLen == 8 and sendData[7] < static_cast<uint8_t>(rws::SpecialRwRequest::NUM_REQUESTS)) {
|
||||
specialRequest = static_cast<rws::SpecialRwRequest>(sendData[7]);
|
||||
}
|
||||
RwCookie* rwCookie = dynamic_cast<RwCookie*>(cookie);
|
||||
if (rwCookie == nullptr) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
const rws::RwRequest* rwRequest = reinterpret_cast<const rws::RwRequest*>(sendData);
|
||||
uint8_t rwIdx = rwRequest->rwIdx;
|
||||
{
|
||||
MutexGuard mg(ipcLock);
|
||||
rwCookie->setSpeed = setSpeed;
|
||||
rwCookie->currentRwSpeed = speed;
|
||||
rwCookie->currentRampTime = rampTime;
|
||||
rwCookie->specialRequest = specialRequest;
|
||||
std::memcpy(&rwRequests[rwIdx], rwRequest, sizeof(rws::RwRequest));
|
||||
if (state == InternalState::IDLE) {
|
||||
state = InternalState::IS_BUSY;
|
||||
semaphore->release();
|
||||
@ -202,7 +198,7 @@ ReturnValue_t RwPollingTask::openSpi(int flags, int& fd) {
|
||||
fd = open(spiDev, flags);
|
||||
if (fd < 0) {
|
||||
sif::error << "RwPollingTask::openSpi: Failed to open device file" << std::endl;
|
||||
return SpiComIF::OPENING_FILE_FAILED;
|
||||
return spi::OPENING_FILE_FAILED;
|
||||
}
|
||||
|
||||
return returnvalue::OK;
|
||||
@ -332,7 +328,7 @@ ReturnValue_t RwPollingTask::writeOneRwCmd(uint8_t rwIdx, int fd) {
|
||||
ReturnValue_t RwPollingTask::readAllRws(DeviceCommandId_t id) {
|
||||
// SPI dev will be opened in readNextReply on demand.
|
||||
for (unsigned idx = 0; idx < rwCookies.size(); idx++) {
|
||||
if (((id == rws::SET_SPEED) and !rwCookies[idx]->setSpeed) or skipCommandingForRw[idx]) {
|
||||
if (((id == rws::SET_SPEED) and !skipSetSpeedReply[idx]) or skipCommandingForRw[idx]) {
|
||||
continue;
|
||||
}
|
||||
uint8_t* replyBuf;
|
||||
@ -395,7 +391,7 @@ void RwPollingTask::fillSpecialRequestArray() {
|
||||
specialRequestIds[idx] = DeviceHandlerIF::NO_COMMAND_ID;
|
||||
continue;
|
||||
}
|
||||
switch (rwCookies[idx]->specialRequest) {
|
||||
switch (rwRequests[idx].specialRequest) {
|
||||
case (rws::SpecialRwRequest::GET_TM): {
|
||||
specialRequestIds[idx] = rws::GET_TM;
|
||||
break;
|
||||
@ -426,14 +422,14 @@ void RwPollingTask::handleSpecialRequests() {
|
||||
writeOneRwCmd(idx, fd);
|
||||
}
|
||||
closeSpi(fd);
|
||||
usleep(rws::SPI_REPLY_DELAY);
|
||||
for (unsigned idx = 0; idx < rwCookies.size(); idx++) {
|
||||
if (specialRequestIds[idx] == DeviceHandlerIF::NO_COMMAND_ID) {
|
||||
continue;
|
||||
}
|
||||
uint8_t* replyBuf;
|
||||
size_t maxReadLen = idAndIdxToReadBuffer(specialRequestIds[idx], idx, &replyBuf);
|
||||
result = readNextReply(*rwCookies[idx], replyBuf, maxReadLen);
|
||||
// Skip first byte for actual read buffer: Valid byte
|
||||
result = readNextReply(*rwCookies[idx], replyBuf + 1, maxReadLen);
|
||||
if (result == returnvalue::OK) {
|
||||
// The first byte is always a flag which shows whether the value was read
|
||||
// properly at least once.
|
||||
@ -455,17 +451,12 @@ void RwPollingTask::setAllReadFlagsFalse() {
|
||||
}
|
||||
}
|
||||
|
||||
// This closes the SPI
|
||||
void RwPollingTask::closeSpi(int fd) {
|
||||
// This will perform the function to close the SPI
|
||||
close(fd);
|
||||
// The SPI is now closed.
|
||||
}
|
||||
void RwPollingTask::closeSpi(int fd) { close(fd); }
|
||||
|
||||
ReturnValue_t RwPollingTask::sendOneMessage(int fd, RwCookie& rwCookie) {
|
||||
gpioId_t gpioId = rwCookie.getChipSelectPin();
|
||||
if (spiLock == nullptr) {
|
||||
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
|
||||
sif::warning << "RwPollingTask: Mutex or GPIO interface invalid" << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
// Add datalinklayer like specified in the datasheet.
|
||||
@ -473,7 +464,7 @@ ReturnValue_t RwPollingTask::sendOneMessage(int fd, RwCookie& rwCookie) {
|
||||
rws::encodeHdlc(writeBuffer.data(), writeLen, encodedBuffer.data(), lenToSend);
|
||||
pullCsLow(gpioId, gpioIF);
|
||||
if (write(fd, encodedBuffer.data(), lenToSend) != static_cast<ssize_t>(lenToSend)) {
|
||||
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
|
||||
sif::error << "RwPollingTask: Write failed!" << std::endl;
|
||||
pullCsHigh(gpioId, gpioIF);
|
||||
return rws::SPI_WRITE_FAILURE;
|
||||
}
|
||||
@ -484,7 +475,7 @@ ReturnValue_t RwPollingTask::sendOneMessage(int fd, RwCookie& rwCookie) {
|
||||
ReturnValue_t RwPollingTask::pullCsLow(gpioId_t gpioId, GpioIF& gpioIF) {
|
||||
ReturnValue_t result = spiLock->lockMutex(TIMEOUT_TYPE, TIMEOUT_MS);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::debug << "RwPollingTask::pullCsLow: Failed to lock mutex" << std::endl;
|
||||
sif::warning << "RwPollingTask::pullCsLow: Failed to lock mutex" << std::endl;
|
||||
return result;
|
||||
}
|
||||
// Pull SPI CS low. For now, no support for active high given
|
||||
@ -525,8 +516,8 @@ ReturnValue_t RwPollingTask::prepareSetSpeedCmd(uint8_t rwIdx) {
|
||||
uint16_t rampTimeToSet = 10;
|
||||
{
|
||||
MutexGuard mg(ipcLock);
|
||||
speedToSet = rwCookies[rwIdx]->currentRwSpeed;
|
||||
rampTimeToSet = rwCookies[rwIdx]->currentRampTime;
|
||||
speedToSet = rwRequests[rwIdx].currentRwSpeed;
|
||||
rampTimeToSet = rwRequests[rwIdx].currentRampTime;
|
||||
}
|
||||
size_t serLen = 1;
|
||||
SerializeAdapter::serialize(&speedToSet, &serPtr, &serLen, writeBuffer.size(),
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
||||
#include <fsfw_hal/linux/spi/SpiCookie.h>
|
||||
#include <mission/acs/defs.h>
|
||||
|
||||
#include "mission/acs/rwHelpers.h"
|
||||
|
||||
@ -26,10 +27,6 @@ class RwCookie : public SpiCookie {
|
||||
std::array<uint8_t, REPLY_BUF_LEN> replyBuf{};
|
||||
std::array<uint8_t, REPLY_BUF_LEN> exchangeBuf{};
|
||||
MutexIF* bufLock;
|
||||
bool setSpeed = true;
|
||||
int32_t currentRwSpeed = 0;
|
||||
uint16_t currentRampTime = 0;
|
||||
rws::SpecialRwRequest specialRequest = rws::SpecialRwRequest::REQUEST_NONE;
|
||||
uint8_t rwIdx;
|
||||
};
|
||||
|
||||
@ -50,8 +47,10 @@ class RwPollingTask : public SystemObject, public ExecutableObjectIF, public Dev
|
||||
const char* spiDev;
|
||||
GpioIF& gpioIF;
|
||||
std::array<bool, 4> skipCommandingForRw;
|
||||
std::array<bool, 4> skipSetSpeedReply;
|
||||
std::array<DeviceCommandId_t, 4> specialRequestIds;
|
||||
std::array<RwCookie*, 4> rwCookies;
|
||||
std::array<rws::RwRequest, 4> rwRequests{};
|
||||
std::array<uint8_t, rws::MAX_CMD_SIZE> writeBuffer;
|
||||
std::array<uint8_t, rws::MAX_CMD_SIZE * 2> encodedBuffer;
|
||||
|
||||
|
@ -17,6 +17,10 @@
|
||||
#include "mission/utility/ProgressPrinter.h"
|
||||
#include "mission/utility/Timestamp.h"
|
||||
|
||||
extern "C" {
|
||||
#include <sagitta/client/actionreq.h>
|
||||
}
|
||||
|
||||
using namespace returnvalue;
|
||||
|
||||
StrComHandler::StrComHandler(object_id_t objectId) : SystemObject(objectId) {
|
||||
@ -42,7 +46,6 @@ ReturnValue_t StrComHandler::performOperation(uint8_t operationCode) {
|
||||
while (true) {
|
||||
lock->lockMutex();
|
||||
state = InternalState::SLEEPING;
|
||||
datalinkLayer.reset();
|
||||
lock->unlockMutex();
|
||||
semaphore.acquire();
|
||||
switch (state) {
|
||||
@ -58,6 +61,7 @@ ReturnValue_t StrComHandler::performOperation(uint8_t operationCode) {
|
||||
}
|
||||
case InternalState::UPLOAD_IMAGE: {
|
||||
replyTimeout.setTimeout(200);
|
||||
resetReplyHandlingState();
|
||||
result = performImageUpload();
|
||||
if (result == returnvalue::OK) {
|
||||
triggerEvent(IMAGE_UPLOAD_SUCCESSFUL);
|
||||
@ -68,6 +72,7 @@ ReturnValue_t StrComHandler::performOperation(uint8_t operationCode) {
|
||||
}
|
||||
case InternalState::DOWNLOAD_IMAGE: {
|
||||
replyTimeout.setTimeout(200);
|
||||
resetReplyHandlingState();
|
||||
result = performImageDownload();
|
||||
if (result == returnvalue::OK) {
|
||||
triggerEvent(IMAGE_DOWNLOAD_SUCCESSFUL);
|
||||
@ -78,6 +83,7 @@ ReturnValue_t StrComHandler::performOperation(uint8_t operationCode) {
|
||||
}
|
||||
case InternalState::FLASH_READ: {
|
||||
replyTimeout.setTimeout(200);
|
||||
resetReplyHandlingState();
|
||||
result = performFlashRead();
|
||||
if (result == returnvalue::OK) {
|
||||
triggerEvent(FLASH_READ_SUCCESSFUL);
|
||||
@ -87,7 +93,8 @@ ReturnValue_t StrComHandler::performOperation(uint8_t operationCode) {
|
||||
break;
|
||||
}
|
||||
case InternalState::FIRMWARE_UPDATE: {
|
||||
replyTimeout.setTimeout(200);
|
||||
replyTimeout.setTimeout(2000);
|
||||
resetReplyHandlingState();
|
||||
result = performFirmwareUpdate();
|
||||
if (result == returnvalue::OK) {
|
||||
triggerEvent(FIRMWARE_UPDATE_SUCCESSFUL);
|
||||
@ -122,6 +129,7 @@ ReturnValue_t StrComHandler::startImageUpload(std::string fullname) {
|
||||
}
|
||||
{
|
||||
MutexGuard mg(lock);
|
||||
replyWasReceived = false;
|
||||
state = InternalState::UPLOAD_IMAGE;
|
||||
}
|
||||
semaphore.release();
|
||||
@ -148,6 +156,7 @@ ReturnValue_t StrComHandler::startImageDownload(std::string path) {
|
||||
downloadImage.path = path;
|
||||
{
|
||||
MutexGuard mg(lock);
|
||||
replyWasReceived = false;
|
||||
state = InternalState::DOWNLOAD_IMAGE;
|
||||
}
|
||||
terminate = false;
|
||||
@ -184,6 +193,7 @@ ReturnValue_t StrComHandler::startFirmwareUpdate(std::string fullname) {
|
||||
flashWrite.lastRegion = static_cast<uint8_t>(startracker::FirmwareRegions::LAST);
|
||||
{
|
||||
MutexGuard mg(lock);
|
||||
replyWasReceived = false;
|
||||
state = InternalState::FIRMWARE_UPDATE;
|
||||
}
|
||||
semaphore.release();
|
||||
@ -213,6 +223,7 @@ ReturnValue_t StrComHandler::startFlashRead(std::string path, uint8_t startRegio
|
||||
flashRead.size = length;
|
||||
{
|
||||
MutexGuard mg(lock);
|
||||
replyWasReceived = false;
|
||||
state = InternalState::FLASH_READ;
|
||||
}
|
||||
semaphore.release();
|
||||
@ -298,6 +309,7 @@ ReturnValue_t StrComHandler::performImageUpload() {
|
||||
uint32_t imageSize = 0;
|
||||
struct UploadActionRequest uploadReq;
|
||||
uploadReq.position = 0;
|
||||
size_t writtenBytes = 0;
|
||||
#ifdef XIPHOS_Q7S
|
||||
if (not sdcMan->getActiveSdCard()) {
|
||||
return HasFileSystemIF::FILESYSTEM_INACTIVE;
|
||||
@ -320,7 +332,9 @@ ReturnValue_t StrComHandler::performImageUpload() {
|
||||
#if OBSW_DEBUG_STARTRACKER == 1
|
||||
ProgressPrinter progressPrinter("Image upload", imageSize);
|
||||
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
||||
while ((uploadReq.position + 1) * SIZE_IMAGE_PART < imageSize) {
|
||||
size_t fullChunks = imageSize / SIZE_IMAGE_PART;
|
||||
size_t remainder = imageSize % SIZE_IMAGE_PART;
|
||||
for (size_t idx = 0; idx < fullChunks; idx++) {
|
||||
if (terminate) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
@ -339,6 +353,7 @@ ReturnValue_t StrComHandler::performImageUpload() {
|
||||
progressPrinter.print((uploadReq.position + 1) * SIZE_IMAGE_PART);
|
||||
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
||||
uploadReq.position++;
|
||||
writtenBytes += SIZE_IMAGE_PART;
|
||||
|
||||
// This does a bit of delaying roughly every second
|
||||
if (uploadReq.position % 50 == 0) {
|
||||
@ -346,20 +361,20 @@ ReturnValue_t StrComHandler::performImageUpload() {
|
||||
TaskFactory::delayTask(2);
|
||||
}
|
||||
}
|
||||
std::memset(uploadReq.data, 0, sizeof(uploadReq.data));
|
||||
uint32_t remainder = imageSize - uploadReq.position * SIZE_IMAGE_PART;
|
||||
file.seekg(uploadReq.position * SIZE_IMAGE_PART, file.beg);
|
||||
file.read(reinterpret_cast<char*>(uploadReq.data), remainder);
|
||||
file.close();
|
||||
uploadReq.position++;
|
||||
arc_pack_upload_action_req(&uploadReq, cmdBuf.data(), &size);
|
||||
result = sendAndRead(size, uploadReq.position);
|
||||
if (result != returnvalue::OK) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
result = checkActionReply(replyLen);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
if (remainder > 0) {
|
||||
std::memset(uploadReq.data, 0, sizeof(uploadReq.data));
|
||||
file.seekg(fullChunks * SIZE_IMAGE_PART, file.beg);
|
||||
file.read(reinterpret_cast<char*>(uploadReq.data), remainder);
|
||||
file.close();
|
||||
arc_pack_upload_action_req(&uploadReq, cmdBuf.data(), &size);
|
||||
result = sendAndRead(size, uploadReq.position);
|
||||
if (result != returnvalue::OK) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
result = checkActionReply(replyLen);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#if OBSW_DEBUG_STARTRACKER == 1
|
||||
progressPrinter.print((uploadReq.position + 1) * SIZE_IMAGE_PART);
|
||||
@ -387,7 +402,8 @@ ReturnValue_t StrComHandler::performFlashWrite() {
|
||||
#endif
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
uint32_t size = 0;
|
||||
uint32_t bytesWritten = 0;
|
||||
uint32_t bytesWrittenInRegion = 0;
|
||||
size_t totalBytesWritten = 0;
|
||||
uint32_t fileSize = 0;
|
||||
|
||||
struct WriteActionRequest req;
|
||||
@ -409,20 +425,18 @@ ReturnValue_t StrComHandler::performFlashWrite() {
|
||||
ProgressPrinter progressPrinter("Flash write", fileSize);
|
||||
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
||||
uint32_t fileChunks = fileSize / CHUNK_SIZE;
|
||||
bytesWritten = 0;
|
||||
bytesWrittenInRegion = 0;
|
||||
req.region = flashWrite.firstRegion;
|
||||
req.length = CHUNK_SIZE;
|
||||
for (uint32_t idx = 0; idx < fileChunks; idx++) {
|
||||
if (terminate) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
file.seekg(idx * CHUNK_SIZE, file.beg);
|
||||
|
||||
auto writeNextSegment = [&](uint32_t chunkIdx) {
|
||||
file.seekg(chunkIdx * CHUNK_SIZE, file.beg);
|
||||
file.read(reinterpret_cast<char*>(req.data), CHUNK_SIZE);
|
||||
if (bytesWritten + CHUNK_SIZE > FLASH_REGION_SIZE) {
|
||||
if (bytesWrittenInRegion + CHUNK_SIZE > FLASH_REGION_SIZE) {
|
||||
req.region++;
|
||||
bytesWritten = 0;
|
||||
bytesWrittenInRegion = 0;
|
||||
}
|
||||
req.address = bytesWritten;
|
||||
req.address = bytesWrittenInRegion;
|
||||
arc_pack_write_action_req(&req, cmdBuf.data(), &size);
|
||||
result = sendAndRead(size, req.address);
|
||||
if (result != returnvalue::OK) {
|
||||
@ -432,34 +446,49 @@ ReturnValue_t StrComHandler::performFlashWrite() {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
bytesWritten += CHUNK_SIZE;
|
||||
totalBytesWritten += CHUNK_SIZE;
|
||||
bytesWrittenInRegion += CHUNK_SIZE;
|
||||
#if OBSW_DEBUG_STARTRACKER == 1
|
||||
progressPrinter.print(idx * CHUNK_SIZE);
|
||||
progressPrinter.print(chunkIdx * CHUNK_SIZE);
|
||||
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
||||
return result;
|
||||
};
|
||||
|
||||
for (uint32_t idx = 0; idx < fileChunks; idx++) {
|
||||
if (terminate) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
result = writeNextSegment(idx);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
if (idx % 50 == 0) {
|
||||
// Some grace time for other tasks
|
||||
TaskFactory::delayTask(2);
|
||||
}
|
||||
}
|
||||
uint32_t remainingBytes = fileSize - fileChunks * CHUNK_SIZE;
|
||||
file.seekg((fileChunks - 1) * CHUNK_SIZE, file.beg);
|
||||
file.read(reinterpret_cast<char*>(req.data), remainingBytes);
|
||||
file.close();
|
||||
if (bytesWritten + CHUNK_SIZE > FLASH_REGION_SIZE) {
|
||||
req.region++;
|
||||
bytesWritten = 0;
|
||||
}
|
||||
req.address = bytesWritten;
|
||||
req.length = remainingBytes;
|
||||
bytesWritten += remainingBytes;
|
||||
arc_pack_write_action_req(&req, cmdBuf.data(), &size);
|
||||
result = sendAndRead(size, req.address);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = checkActionReply(replyLen);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
if (remainingBytes > 0) {
|
||||
file.seekg(fileChunks * CHUNK_SIZE, file.beg);
|
||||
file.read(reinterpret_cast<char*>(req.data), remainingBytes);
|
||||
file.close();
|
||||
if (bytesWrittenInRegion + CHUNK_SIZE > FLASH_REGION_SIZE) {
|
||||
req.region++;
|
||||
bytesWrittenInRegion = 0;
|
||||
}
|
||||
req.address = bytesWrittenInRegion;
|
||||
req.length = remainingBytes;
|
||||
totalBytesWritten += CHUNK_SIZE;
|
||||
bytesWrittenInRegion += remainingBytes;
|
||||
arc_pack_write_action_req(&req, cmdBuf.data(), &size);
|
||||
result = sendAndRead(size, req.address);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = checkActionReply(replyLen);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#if OBSW_DEBUG_STARTRACKER == 1
|
||||
progressPrinter.print(fileSize);
|
||||
@ -645,7 +674,8 @@ ReturnValue_t StrComHandler::sendMessage(CookieIF* cookie, const uint8_t* sendDa
|
||||
return BUSY;
|
||||
}
|
||||
}
|
||||
serial::flushRxBuf(serialPort);
|
||||
// Ensure consistent state.
|
||||
resetReplyHandlingState();
|
||||
|
||||
const uint8_t* txFrame;
|
||||
size_t frameLen;
|
||||
@ -697,6 +727,7 @@ ReturnValue_t StrComHandler::readReceivedMessage(CookieIF* cookie, uint8_t** buf
|
||||
*buffer = const_cast<uint8_t*>(replyPtr);
|
||||
*size = replyLen;
|
||||
}
|
||||
replyLen = 0;
|
||||
return replyResult;
|
||||
}
|
||||
|
||||
@ -781,3 +812,8 @@ ReturnValue_t StrComHandler::readOneReply(uint32_t failParameter) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void StrComHandler::resetReplyHandlingState() {
|
||||
serial::flushRxBuf(serialPort);
|
||||
datalinkLayer.reset();
|
||||
}
|
||||
|
@ -11,8 +11,6 @@
|
||||
#include "bsp_q7s/fs/SdCardManager.h"
|
||||
#endif
|
||||
|
||||
#include "arcsec/client/generated/actionreq.h"
|
||||
#include "arcsec/common/generated/tmtcstructs.h"
|
||||
#include "fsfw/devicehandlers/CookieIF.h"
|
||||
#include "fsfw/objectmanager/SystemObject.h"
|
||||
#include "fsfw/osal/linux/BinarySemaphore.h"
|
||||
@ -174,7 +172,7 @@ class StrComHandler : public SystemObject, public DeviceCommunicationIF, public
|
||||
static const uint32_t FLASH_REGION_SIZE = 0x20000;
|
||||
|
||||
struct ImageDownload {
|
||||
static const uint32_t LAST_POSITION = 4095;
|
||||
static const uint32_t LAST_POSITION = 4096;
|
||||
};
|
||||
|
||||
static const uint32_t MAX_POLLS = 10000;
|
||||
@ -374,6 +372,8 @@ class StrComHandler : public SystemObject, public DeviceCommunicationIF, public
|
||||
* @return
|
||||
*/
|
||||
ReturnValue_t readOneReply(uint32_t failParameter);
|
||||
|
||||
void resetReplyHandlingState();
|
||||
};
|
||||
|
||||
#endif /* BSP_Q7S_DEVICES_STRHELPER_H_ */
|
||||
|
@ -69,9 +69,12 @@ ReturnValue_t SusPolling::sendMessage(CookieIF* cookie, const uint8_t* sendData,
|
||||
if (susDevs[susIdx].mode != susReq->mode) {
|
||||
if (susReq->mode == acs::SimpleSensorMode::NORMAL) {
|
||||
susDevs[susIdx].performStartup = true;
|
||||
susDevs[susIdx].replyResult = returnvalue::FAILED;
|
||||
} else {
|
||||
susDevs[susIdx].ownReply.cfgWasSet = false;
|
||||
susDevs[susIdx].ownReply.dataWasSet = false;
|
||||
// We are off now, but DHB wants a proper reply.
|
||||
susDevs[susIdx].replyResult = returnvalue::OK;
|
||||
}
|
||||
susDevs[susIdx].mode = susReq->mode;
|
||||
}
|
||||
@ -95,11 +98,14 @@ ReturnValue_t SusPolling::readReceivedMessage(CookieIF* cookie, uint8_t** buffer
|
||||
if (susIdx < 0) {
|
||||
return FAILED;
|
||||
}
|
||||
if (susDevs[susIdx].replyResult != returnvalue::OK) {
|
||||
return susDevs[susIdx].replyResult;
|
||||
}
|
||||
MutexGuard mg(ipcLock);
|
||||
std::memcpy(&susDevs[susIdx].readerReply, &susDevs[susIdx].ownReply, sizeof(acs::SusReply));
|
||||
*buffer = reinterpret_cast<uint8_t*>(&susDevs[susIdx].readerReply);
|
||||
*size = sizeof(acs::SusReply);
|
||||
return OK;
|
||||
return susDevs[susIdx].replyResult;
|
||||
}
|
||||
|
||||
ReturnValue_t SusPolling::handleSusPolling() {
|
||||
@ -164,11 +170,18 @@ ReturnValue_t SusPolling::handleSusPolling() {
|
||||
}
|
||||
MutexGuard mg(ipcLock);
|
||||
susDevs[idx].ownReply.tempRaw = ((rawReply[0] & 0x0f) << 8) | rawReply[1];
|
||||
for (unsigned chIdx = 0; chIdx < 6; chIdx++) {
|
||||
susDevs[idx].ownReply.channelsRaw[chIdx] =
|
||||
(rawReply[chIdx * 2 + 2] << 8) | rawReply[chIdx * 2 + 3];
|
||||
// Reply is all ones. Sensor is probably off or faulty when
|
||||
// it should not be.
|
||||
if (susDevs[idx].ownReply.tempRaw == 0x0fff) {
|
||||
susDevs[idx].replyResult = returnvalue::FAILED;
|
||||
} else {
|
||||
susDevs[idx].replyResult = returnvalue::OK;
|
||||
for (unsigned chIdx = 0; chIdx < 6; chIdx++) {
|
||||
susDevs[idx].ownReply.channelsRaw[chIdx] =
|
||||
(rawReply[chIdx * 2 + 2] << 8) | rawReply[chIdx * 2 + 3];
|
||||
}
|
||||
susDevs[idx].ownReply.dataWasSet = true;
|
||||
}
|
||||
susDevs[idx].ownReply.dataWasSet = true;
|
||||
}
|
||||
}
|
||||
return OK;
|
||||
|
@ -37,7 +37,7 @@ void I2cTestClass::battInit() {
|
||||
if (ioctl(bpxInfo.fd, I2C_SLAVE, bpxInfo.addr) < 0) {
|
||||
sif::error << "Failed to acquire bus access and/or talk to slave" << std::endl;
|
||||
}
|
||||
cmdBuf[0] = BpxBattery::PORT_PING;
|
||||
cmdBuf[0] = bpxBat::PORT_PING;
|
||||
cmdBuf[1] = 0x42;
|
||||
sendLen = 2;
|
||||
ReturnValue_t result = i2cWrite(bpxInfo.fd, cmdBuf.data(), sendLen);
|
||||
@ -66,7 +66,7 @@ void I2cTestClass::battPeriodic() {
|
||||
if (ioctl(bpxInfo.fd, I2C_SLAVE, bpxInfo.addr) < 0) {
|
||||
sif::error << "Failed to acquire bus access and/or talk to slave" << std::endl;
|
||||
}
|
||||
cmdBuf[0] = BpxBattery::PORT_GET_HK;
|
||||
cmdBuf[0] = bpxBat::PORT_GET_HK;
|
||||
sendLen = 1;
|
||||
ReturnValue_t result = i2cWrite(bpxInfo.fd, cmdBuf.data(), sendLen);
|
||||
if (result != returnvalue::OK) {
|
||||
|
@ -20,6 +20,7 @@ class SyrlinksComHandler : public DeviceCommunicationIF,
|
||||
|
||||
//! [EXPORT] : [SKIP]
|
||||
static constexpr ReturnValue_t NO_SERIAL_DATA_READ = returnvalue::makeCode(2, 0);
|
||||
//! [EXPORT] : [SKIP]
|
||||
static constexpr ReturnValue_t NO_PACKET_FOUND = returnvalue::makeCode(2, 1);
|
||||
|
||||
enum class State { SLEEPING, ACTIVE } state = State::SLEEPING;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 283 translations.
|
||||
* @brief Auto-generated event translation file. Contains 296 translations.
|
||||
* @details
|
||||
* Generated on: 2023-03-28 22:20:01
|
||||
* Generated on: 2023-06-21 19:01:02
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -97,6 +97,7 @@ const char *SAFE_RATE_RECOVERY_STRING = "SAFE_RATE_RECOVERY";
|
||||
const char *MULTIPLE_RW_INVALID_STRING = "MULTIPLE_RW_INVALID";
|
||||
const char *MEKF_INVALID_INFO_STRING = "MEKF_INVALID_INFO";
|
||||
const char *MEKF_RECOVERY_STRING = "MEKF_RECOVERY";
|
||||
const char *MEKF_AUTOMATIC_RESET_STRING = "MEKF_AUTOMATIC_RESET";
|
||||
const char *MEKF_INVALID_MODE_VIOLATION_STRING = "MEKF_INVALID_MODE_VIOLATION";
|
||||
const char *SAFE_MODE_CONTROLLER_FAILURE_STRING = "SAFE_MODE_CONTROLLER_FAILURE";
|
||||
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
|
||||
@ -160,8 +161,11 @@ const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC";
|
||||
const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS";
|
||||
const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC";
|
||||
const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC";
|
||||
const char *PDEC_TRYING_RESET_WITH_INIT_STRING = "PDEC_TRYING_RESET_WITH_INIT";
|
||||
const char *PDEC_TRYING_RESET_NO_INIT_STRING = "PDEC_TRYING_RESET_NO_INIT";
|
||||
const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
|
||||
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED";
|
||||
const char *PDEC_INIT_FAILED_STRING = "PDEC_INIT_FAILED";
|
||||
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
|
||||
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
|
||||
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
|
||||
@ -193,6 +197,10 @@ const char *MPSOC_EXE_INVALID_APID_STRING = "MPSOC_EXE_INVALID_APID";
|
||||
const char *MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING = "MPSOC_HELPER_SEQ_CNT_MISMATCH";
|
||||
const char *MPSOC_TM_SIZE_ERROR_STRING = "MPSOC_TM_SIZE_ERROR";
|
||||
const char *MPSOC_TM_CRC_MISSMATCH_STRING = "MPSOC_TM_CRC_MISSMATCH";
|
||||
const char *MPSOC_FLASH_READ_PACKET_ERROR_STRING = "MPSOC_FLASH_READ_PACKET_ERROR";
|
||||
const char *MPSOC_FLASH_READ_FAILED_STRING = "MPSOC_FLASH_READ_FAILED";
|
||||
const char *MPSOC_FLASH_READ_SUCCESSFUL_STRING = "MPSOC_FLASH_READ_SUCCESSFUL";
|
||||
const char *MPSOC_READ_TIMEOUT_STRING = "MPSOC_READ_TIMEOUT";
|
||||
const char *TRANSITION_BACK_TO_OFF_STRING = "TRANSITION_BACK_TO_OFF";
|
||||
const char *NEG_V_OUT_OF_BOUNDS_STRING = "NEG_V_OUT_OF_BOUNDS";
|
||||
const char *U_DRO_OUT_OF_BOUNDS_STRING = "U_DRO_OUT_OF_BOUNDS";
|
||||
@ -209,11 +217,11 @@ const char *TRANSITION_OTHER_SIDE_FAILED_STRING = "TRANSITION_OTHER_SIDE_FAILED"
|
||||
const char *NOT_ENOUGH_DEVICES_DUAL_MODE_STRING = "NOT_ENOUGH_DEVICES_DUAL_MODE";
|
||||
const char *POWER_STATE_MACHINE_TIMEOUT_STRING = "POWER_STATE_MACHINE_TIMEOUT";
|
||||
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_STRING = "SIDE_SWITCH_TRANSITION_NOT_ALLOWED";
|
||||
const char *DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY_STRING = "DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY";
|
||||
const char *TRANSITION_OTHER_SIDE_FAILED_12900_STRING = "TRANSITION_OTHER_SIDE_FAILED_12900";
|
||||
const char *NOT_ENOUGH_DEVICES_DUAL_MODE_12901_STRING = "NOT_ENOUGH_DEVICES_DUAL_MODE_12901";
|
||||
const char *POWER_STATE_MACHINE_TIMEOUT_12902_STRING = "POWER_STATE_MACHINE_TIMEOUT_12902";
|
||||
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903_STRING =
|
||||
"SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903";
|
||||
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903_STRING = "SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903";
|
||||
const char *CHILDREN_LOST_MODE_STRING = "CHILDREN_LOST_MODE";
|
||||
const char *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE";
|
||||
const char *CANT_GET_FIX_STRING = "CANT_GET_FIX";
|
||||
@ -266,14 +274,18 @@ const char *VERSION_INFO_STRING = "VERSION_INFO";
|
||||
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
||||
const char *REBOOT_COUNTER_STRING = "REBOOT_COUNTER";
|
||||
const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
||||
const char *I2C_UNAVAILABLE_REBOOT_STRING = "I2C_UNAVAILABLE_REBOOT";
|
||||
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
||||
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
||||
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
||||
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
|
||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||
const char *PLOC_OVERHEATING_STRING = "PLOC_OVERHEATING";
|
||||
const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
|
||||
const char *HPA_OVERHEATING_STRING = "HPA_OVERHEATING";
|
||||
const char *PLPCDU_OVERHEATING_STRING = "PLPCDU_OVERHEATING";
|
||||
const char *CAMERA_OVERHEATING_STRING = "CAMERA_OVERHEATING";
|
||||
const char *PCDU_SYSTEM_OVERHEATING_STRING = "PCDU_SYSTEM_OVERHEATING";
|
||||
const char *HEATER_NOT_OFF_FOR_OFF_MODE_STRING = "HEATER_NOT_OFF_FOR_OFF_MODE";
|
||||
const char *MGT_OVERHEATING_STRING = "MGT_OVERHEATING";
|
||||
const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED";
|
||||
const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON";
|
||||
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
|
||||
@ -477,8 +489,10 @@ const char *translateEvents(Event event) {
|
||||
case (11204):
|
||||
return MEKF_RECOVERY_STRING;
|
||||
case (11205):
|
||||
return MEKF_INVALID_MODE_VIOLATION_STRING;
|
||||
return MEKF_AUTOMATIC_RESET_STRING;
|
||||
case (11206):
|
||||
return MEKF_INVALID_MODE_VIOLATION_STRING;
|
||||
case (11207):
|
||||
return SAFE_MODE_CONTROLLER_FAILURE_STRING;
|
||||
case (11300):
|
||||
return SWITCH_CMD_SENT_STRING;
|
||||
@ -603,9 +617,15 @@ const char *translateEvents(Event event) {
|
||||
case (12409):
|
||||
return WRITE_SYSCALL_ERROR_PDEC_STRING;
|
||||
case (12410):
|
||||
return PDEC_RESET_FAILED_STRING;
|
||||
return PDEC_TRYING_RESET_WITH_INIT_STRING;
|
||||
case (12411):
|
||||
return PDEC_TRYING_RESET_NO_INIT_STRING;
|
||||
case (12412):
|
||||
return PDEC_RESET_FAILED_STRING;
|
||||
case (12413):
|
||||
return OPEN_IRQ_FILE_FAILED_STRING;
|
||||
case (12414):
|
||||
return PDEC_INIT_FAILED_STRING;
|
||||
case (12500):
|
||||
return IMAGE_UPLOAD_FAILED_STRING;
|
||||
case (12501):
|
||||
@ -668,6 +688,14 @@ const char *translateEvents(Event event) {
|
||||
return MPSOC_TM_SIZE_ERROR_STRING;
|
||||
case (12613):
|
||||
return MPSOC_TM_CRC_MISSMATCH_STRING;
|
||||
case (12614):
|
||||
return MPSOC_FLASH_READ_PACKET_ERROR_STRING;
|
||||
case (12615):
|
||||
return MPSOC_FLASH_READ_FAILED_STRING;
|
||||
case (12616):
|
||||
return MPSOC_FLASH_READ_SUCCESSFUL_STRING;
|
||||
case (12617):
|
||||
return MPSOC_READ_TIMEOUT_STRING;
|
||||
case (12700):
|
||||
return TRANSITION_BACK_TO_OFF_STRING;
|
||||
case (12701):
|
||||
@ -700,6 +728,8 @@ const char *translateEvents(Event event) {
|
||||
return POWER_STATE_MACHINE_TIMEOUT_STRING;
|
||||
case (12803):
|
||||
return SIDE_SWITCH_TRANSITION_NOT_ALLOWED_STRING;
|
||||
case (12804):
|
||||
return DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY_STRING;
|
||||
case (12900):
|
||||
return TRANSITION_OTHER_SIDE_FAILED_12900_STRING;
|
||||
case (12901):
|
||||
@ -813,21 +843,29 @@ const char *translateEvents(Event event) {
|
||||
case (14008):
|
||||
return INDIVIDUAL_BOOT_COUNTS_STRING;
|
||||
case (14010):
|
||||
return I2C_UNAVAILABLE_REBOOT_STRING;
|
||||
return TRYING_I2C_RECOVERY_STRING;
|
||||
case (14011):
|
||||
return I2C_REBOOT_STRING;
|
||||
case (14012):
|
||||
return PDEC_REBOOT_STRING;
|
||||
case (14013):
|
||||
return FIRMWARE_INFO_STRING;
|
||||
case (14100):
|
||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||
case (14101):
|
||||
return NO_HEALTHY_HEATER_AVAILABLE_STRING;
|
||||
case (14102):
|
||||
return SYRLINKS_OVERHEATING_STRING;
|
||||
case (14103):
|
||||
return PLOC_OVERHEATING_STRING;
|
||||
case (14104):
|
||||
return OBC_OVERHEATING_STRING;
|
||||
case (14105):
|
||||
return HPA_OVERHEATING_STRING;
|
||||
return CAMERA_OVERHEATING_STRING;
|
||||
case (14106):
|
||||
return PLPCDU_OVERHEATING_STRING;
|
||||
return PCDU_SYSTEM_OVERHEATING_STRING;
|
||||
case (14107):
|
||||
return HEATER_NOT_OFF_FOR_OFF_MODE_STRING;
|
||||
case (14108):
|
||||
return MGT_OVERHEATING_STRING;
|
||||
case (14201):
|
||||
return TX_TIMER_EXPIRED_STRING;
|
||||
case (14202):
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 173 translations.
|
||||
* Generated on: 2023-03-28 22:20:01
|
||||
* Contains 175 translations.
|
||||
* Generated on: 2023-06-21 19:01:02
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
@ -37,6 +37,8 @@ const char *GYRO_3_L3G_HANDLER_STRING = "GYRO_3_L3G_HANDLER";
|
||||
const char *RW4_STRING = "RW4";
|
||||
const char *STAR_TRACKER_STRING = "STAR_TRACKER";
|
||||
const char *GPS_CONTROLLER_STRING = "GPS_CONTROLLER";
|
||||
const char *GPS_0_HEALTH_DEV_STRING = "GPS_0_HEALTH_DEV";
|
||||
const char *GPS_1_HEALTH_DEV_STRING = "GPS_1_HEALTH_DEV";
|
||||
const char *IMTQ_POLLING_STRING = "IMTQ_POLLING";
|
||||
const char *IMTQ_HANDLER_STRING = "IMTQ_HANDLER";
|
||||
const char *PCDU_HANDLER_STRING = "PCDU_HANDLER";
|
||||
@ -244,6 +246,10 @@ const char *translateObject(object_id_t object) {
|
||||
return STAR_TRACKER_STRING;
|
||||
case 0x44130045:
|
||||
return GPS_CONTROLLER_STRING;
|
||||
case 0x44130046:
|
||||
return GPS_0_HEALTH_DEV_STRING;
|
||||
case 0x44130047:
|
||||
return GPS_1_HEALTH_DEV_STRING;
|
||||
case 0x44140013:
|
||||
return IMTQ_POLLING_STRING;
|
||||
case 0x44140014:
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "AxiPtmeConfig.h"
|
||||
|
||||
#include <fsfw/ipc/MutexGuard.h>
|
||||
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
#include "fsfw_hal/linux/uio/UioMapper.h"
|
||||
|
||||
@ -39,97 +41,59 @@ ReturnValue_t AxiPtmeConfig::writeCaduRateReg(uint8_t rateVal) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::enableTxclockManipulator() {
|
||||
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, true, BitPos::EN_TX_CLK_MANIPULATOR);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
void AxiPtmeConfig::enableTxclockManipulator() {
|
||||
writeBit(COMMON_CONFIG_REG, true, BitPos::EN_TX_CLK_MANIPULATOR);
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::disableTxclockManipulator() {
|
||||
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, false, BitPos::EN_TX_CLK_MANIPULATOR);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
void AxiPtmeConfig::disableTxclockManipulator() {
|
||||
writeBit(COMMON_CONFIG_REG, false, BitPos::EN_TX_CLK_MANIPULATOR);
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::enableTxclockInversion() {
|
||||
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, true, BitPos::INVERT_CLOCK);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
void AxiPtmeConfig::enableTxclockInversion() {
|
||||
writeBit(COMMON_CONFIG_REG, true, BitPos::INVERT_CLOCK);
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::disableTxclockInversion() {
|
||||
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, false, BitPos::INVERT_CLOCK);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
void AxiPtmeConfig::disableTxclockInversion() {
|
||||
writeBit(COMMON_CONFIG_REG, false, BitPos::INVERT_CLOCK);
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::enableBatPriorityBit() {
|
||||
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, true, BitPos::EN_BAT_PRIORITY);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
void AxiPtmeConfig::enableBatPriorityBit() {
|
||||
writeBit(COMMON_CONFIG_REG, true, BitPos::EN_BAT_PRIORITY);
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::disableBatPriorityBit() {
|
||||
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, false, BitPos::EN_BAT_PRIORITY);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
void AxiPtmeConfig::disableBatPriorityBit() {
|
||||
writeBit(COMMON_CONFIG_REG, false, BitPos::EN_BAT_PRIORITY);
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::writeReg(uint32_t regOffset, uint32_t writeVal) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
result = mutex->lockMutex(timeoutType, mutexTimeout);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "AxiPtmeConfig::readReg: Failed to lock mutex" << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
void AxiPtmeConfig::writeReg(uint32_t regOffset, uint32_t writeVal) {
|
||||
MutexGuard mg(mutex, timeoutType, mutexTimeout);
|
||||
*(baseAddress + regOffset / ADRESS_DIVIDER) = writeVal;
|
||||
result = mutex->unlockMutex();
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "AxiPtmeConfig::readReg: Failed to unlock mutex" << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::readReg(uint32_t regOffset, uint32_t* readVal) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
result = mutex->lockMutex(timeoutType, mutexTimeout);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "AxiPtmeConfig::readReg: Failed to lock mutex" << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
*readVal = *(baseAddress + regOffset / ADRESS_DIVIDER);
|
||||
result = mutex->unlockMutex();
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "AxiPtmeConfig::readReg: Failed to unlock mutex" << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
uint32_t AxiPtmeConfig::readReg(uint32_t regOffset) {
|
||||
MutexGuard mg(mutex, timeoutType, mutexTimeout);
|
||||
return *(baseAddress + regOffset / ADRESS_DIVIDER);
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::writeBit(uint32_t regOffset, bool bitVal, BitPos bitPos) {
|
||||
uint32_t readVal = 0;
|
||||
ReturnValue_t result = readReg(regOffset, &readVal);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
void AxiPtmeConfig::writePollThreshold(AxiPtmeConfig::IdlePollThreshold pollThreshold) {
|
||||
uint32_t regVal = readCommonCfgReg();
|
||||
// Clear bits first
|
||||
regVal &= ~(0b111 << 3);
|
||||
regVal |= (static_cast<uint8_t>(pollThreshold) << 3);
|
||||
writeCommonCfgReg(regVal);
|
||||
}
|
||||
|
||||
AxiPtmeConfig::IdlePollThreshold AxiPtmeConfig::readPollThreshold() {
|
||||
uint32_t regVal = readCommonCfgReg();
|
||||
return static_cast<AxiPtmeConfig::IdlePollThreshold>((regVal >> 3) & 0b111);
|
||||
}
|
||||
|
||||
void AxiPtmeConfig::writeCommonCfgReg(uint32_t value) { writeReg(COMMON_CONFIG_REG, value); }
|
||||
uint32_t AxiPtmeConfig::readCommonCfgReg() { return readReg(COMMON_CONFIG_REG); }
|
||||
|
||||
void AxiPtmeConfig::writeBit(uint32_t regOffset, bool bitVal, BitPos bitPos) {
|
||||
uint32_t readVal = readReg(regOffset);
|
||||
uint32_t writeVal =
|
||||
(readVal & ~(1 << static_cast<uint32_t>(bitPos))) | bitVal << static_cast<uint32_t>(bitPos);
|
||||
result = writeReg(regOffset, writeVal);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
writeReg(regOffset, writeVal);
|
||||
}
|
||||
|
@ -14,6 +14,16 @@
|
||||
*/
|
||||
class AxiPtmeConfig : public SystemObject {
|
||||
public:
|
||||
enum IdlePollThreshold : uint8_t {
|
||||
ALWAYS = 0b000,
|
||||
POLL_1 = 0b001,
|
||||
POLL_4 = 0b010,
|
||||
POLL_16 = 0b011,
|
||||
POLL_64 = 0b100,
|
||||
POLL_256 = 0b101,
|
||||
POLL_1024 = 0b110,
|
||||
NEVER = 0b111
|
||||
};
|
||||
/**
|
||||
* @brief Constructor
|
||||
* @param axiUio Device file of UIO belonging to the AXI configuration interface.
|
||||
@ -40,8 +50,8 @@ class AxiPtmeConfig : public SystemObject {
|
||||
* Default: Enables TX clock manipulator
|
||||
*
|
||||
*/
|
||||
ReturnValue_t enableTxclockManipulator();
|
||||
ReturnValue_t disableTxclockManipulator();
|
||||
void enableTxclockManipulator();
|
||||
void disableTxclockManipulator();
|
||||
|
||||
/**
|
||||
* @brief The next to functions control whether data will be updated on the rising or falling edge
|
||||
@ -51,11 +61,14 @@ class AxiPtmeConfig : public SystemObject {
|
||||
* Disable clock inversion. Data updated on rising edge.
|
||||
* Default: Inversion is disabled
|
||||
*/
|
||||
ReturnValue_t enableTxclockInversion();
|
||||
ReturnValue_t disableTxclockInversion();
|
||||
void enableTxclockInversion();
|
||||
void disableTxclockInversion();
|
||||
|
||||
ReturnValue_t enableBatPriorityBit();
|
||||
ReturnValue_t disableBatPriorityBit();
|
||||
void enableBatPriorityBit();
|
||||
void disableBatPriorityBit();
|
||||
|
||||
void writePollThreshold(IdlePollThreshold pollThreshold);
|
||||
IdlePollThreshold readPollThreshold();
|
||||
|
||||
private:
|
||||
// Address of register storing the bitrate configuration parameter
|
||||
@ -80,7 +93,7 @@ class AxiPtmeConfig : public SystemObject {
|
||||
*
|
||||
* @param writeVal Value to write
|
||||
*/
|
||||
ReturnValue_t writeReg(uint32_t regOffset, uint32_t writeVal);
|
||||
void writeReg(uint32_t regOffset, uint32_t writeVal);
|
||||
|
||||
/**
|
||||
* @brief Reads value from configuration register
|
||||
@ -88,7 +101,10 @@ class AxiPtmeConfig : public SystemObject {
|
||||
* @param regOffset Offset of register from base address to read from
|
||||
* Qparam readVal Pointer to variable where read value will be written to
|
||||
*/
|
||||
ReturnValue_t readReg(uint32_t regOffset, uint32_t* readVal);
|
||||
uint32_t readReg(uint32_t regOffset);
|
||||
|
||||
uint32_t readCommonCfgReg();
|
||||
void writeCommonCfgReg(uint32_t value);
|
||||
|
||||
/**
|
||||
* @brief Sets one bit in a register
|
||||
@ -99,7 +115,7 @@ class AxiPtmeConfig : public SystemObject {
|
||||
*
|
||||
* @return returnvalue::OK if successful, otherwise returnvalue::FAILED
|
||||
*/
|
||||
ReturnValue_t writeBit(uint32_t regOffset, bool bitVal, BitPos bitPos);
|
||||
void writeBit(uint32_t regOffset, bool bitVal, BitPos bitPos);
|
||||
};
|
||||
|
||||
#endif /* LINUX_OBC_AXIPTMECONFIG_H_ */
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <linux/ipcore/PapbVcInterface.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
@ -18,29 +19,63 @@ PapbVcInterface::~PapbVcInterface() {}
|
||||
|
||||
ReturnValue_t PapbVcInterface::initialize() {
|
||||
UioMapper uioMapper(uioFile, mapNum);
|
||||
uint32_t* baseReg;
|
||||
ReturnValue_t result = uioMapper.getMappedAdress(&baseReg, UioMapper::Permissions::WRITE_ONLY);
|
||||
ReturnValue_t result = uioMapper.getMappedAdress(const_cast<uint32_t**>(&vcBaseReg),
|
||||
UioMapper::Permissions::WRITE_ONLY);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
vcBaseReg = baseReg;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size) {
|
||||
if (pollPapbBusySignal(0) == returnvalue::OK) {
|
||||
startPacketTransfer();
|
||||
// There are no packets smaller than 4, this is considered a configuration error.
|
||||
if (size < 4) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
if (pollInterfaceReadiness(0, true) == returnvalue::OK) {
|
||||
startPacketTransfer(ByteWidthCfg::ONE);
|
||||
} else {
|
||||
return DirectTmSinkIF::IS_BUSY;
|
||||
}
|
||||
// TODO: This should work but does not.. :(
|
||||
// size_t idx = 0;
|
||||
// while (idx < size) {
|
||||
//
|
||||
// nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
|
||||
// if ((size - idx) < 4) {
|
||||
// *vcBaseReg = CONFIG_DATA_INPUT | (size - idx - 1);
|
||||
// usleep(1);
|
||||
// }
|
||||
// if (pollPapbBusySignal(2) == returnvalue::OK) {
|
||||
// // vcBaseReg + DATA_REG_OFFSET + 3 = static_cast<uint8_t>(data + idx);
|
||||
// // vcBaseReg + DATA_REG_OFFSET + 2 = static_cast<uint8_t>(data + idx + 1);
|
||||
// // vcBaseReg + DATA_REG_OFFSET + 1 = static_cast<uint8_t>(data + idx + 2);
|
||||
// // vcBaseReg + DATA_REG_OFFSET = static_cast<uint8_t>(data + idx + 3);
|
||||
//
|
||||
// // std::memcpy((vcBaseReg + DATA_REG_OFFSET), data + idx , nextWriteSize);
|
||||
// *(vcBaseReg + DATA_REG_OFFSET) = *reinterpret_cast<const uint32_t*>(data + idx);
|
||||
// //uint8_t* byteReg = reinterpret_cast<uint8_t*>(vcBaseReg + DATA_REG_OFFSET);
|
||||
//
|
||||
// //byteReg[0] = data[idx];
|
||||
// //byteReg[1] = data[idx];
|
||||
// } else {
|
||||
// abortPacketTransfer();
|
||||
// return returnvalue::FAILED;
|
||||
// }
|
||||
// // TODO: Change this after the bugfix. Right now, the PAPB ignores the content of the byte
|
||||
// // width configuration.5
|
||||
// // It's okay to increment by a larger amount for the last segment here, loop will be over
|
||||
// // in any case.
|
||||
// idx += 4;
|
||||
// }
|
||||
for (size_t idx = 0; idx < size; idx++) {
|
||||
// This delay is super-important, DO NOT REMOVE!
|
||||
// Polling the GPIO too often can mess up the scheduler.
|
||||
// Polling the GPIO or the config register too often messes up the scheduler.
|
||||
// TODO: Maybe this should not be done like this. It would be better if there was a custom
|
||||
// FPGA module which can accept packets and then takes care of dumping that packet into
|
||||
// the PTME. DMA would be an ideal solution for this.
|
||||
nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
|
||||
if (pollPapbBusySignal(2) == returnvalue::OK) {
|
||||
if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
|
||||
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(data[idx]);
|
||||
} else {
|
||||
abortPacketTransfer();
|
||||
@ -48,7 +83,7 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size) {
|
||||
}
|
||||
}
|
||||
nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
|
||||
if (pollPapbBusySignal(2) == returnvalue::OK) {
|
||||
if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
|
||||
completePacketTransfer();
|
||||
} else {
|
||||
abortPacketTransfer();
|
||||
@ -57,27 +92,29 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void PapbVcInterface::startPacketTransfer() { *vcBaseReg = CONFIG_START; }
|
||||
void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) {
|
||||
*vcBaseReg = CONFIG_DATA_INPUT | initWidth;
|
||||
}
|
||||
|
||||
void PapbVcInterface::completePacketTransfer() { *vcBaseReg = CONFIG_END; }
|
||||
|
||||
ReturnValue_t PapbVcInterface::pollPapbBusySignal(uint32_t maxPollRetries) const {
|
||||
gpio::Levels papbBusyState = gpio::Levels::LOW;
|
||||
ReturnValue_t result;
|
||||
ReturnValue_t PapbVcInterface::pollInterfaceReadiness(uint32_t maxPollRetries,
|
||||
bool checkReadyState) const {
|
||||
uint32_t busyIdx = 0;
|
||||
nextDelay.tv_nsec = 0;
|
||||
nextDelay.tv_nsec = FIRST_DELAY_PAPB_POLLING_NS;
|
||||
|
||||
while (true) {
|
||||
/** Check if PAPB interface is ready to receive data */
|
||||
result = gpioComIF->readGpio(papbBusyId, papbBusyState);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "PapbVcInterface::pollPapbBusySignal: Failed to read papb busy signal"
|
||||
<< std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
if (papbBusyState == gpio::Levels::HIGH) {
|
||||
// Check if PAPB interface is ready to receive data. Use the configuration register for this.
|
||||
// Bit 5, see PTME ptme_001_01-0-7-r2 Table 31.
|
||||
uint32_t reg = *vcBaseReg;
|
||||
bool busy = (reg >> 5) & 0b1;
|
||||
bool ready = (reg >> 6) & 0b1;
|
||||
if (not busy) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
if (checkReadyState and not ready) {
|
||||
return PAPB_BUSY;
|
||||
}
|
||||
|
||||
busyIdx++;
|
||||
if (busyIdx >= maxPollRetries) {
|
||||
@ -87,9 +124,7 @@ ReturnValue_t PapbVcInterface::pollPapbBusySignal(uint32_t maxPollRetries) const
|
||||
// Ignore signal handling here for now.
|
||||
nanosleep(&nextDelay, &remDelay);
|
||||
// Adaptive delay.
|
||||
if (nextDelay.tv_nsec == 0) {
|
||||
nextDelay.tv_nsec = FIRST_NON_NULL_DELAY_NS;
|
||||
} else if (nextDelay.tv_nsec * 2 <= MAX_DELAY_PAPB_POLLING_NS) {
|
||||
if (nextDelay.tv_nsec * 2 <= MAX_DELAY_PAPB_POLLING_NS) {
|
||||
nextDelay.tv_nsec *= 2;
|
||||
}
|
||||
}
|
||||
@ -116,7 +151,7 @@ void PapbVcInterface::isVcInterfaceBufferEmpty() {
|
||||
return;
|
||||
}
|
||||
|
||||
bool PapbVcInterface::isBusy() const { return pollPapbBusySignal(0) == PAPB_BUSY; }
|
||||
bool PapbVcInterface::isBusy() const { return pollInterfaceReadiness(0, true) == PAPB_BUSY; }
|
||||
|
||||
void PapbVcInterface::cancelTransfer() { abortPacketTransfer(); }
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
|
||||
#include <linux/ipcore/VirtualChannelIF.h>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "fsfw/returnvalues/returnvalue.h"
|
||||
|
||||
@ -50,13 +52,14 @@ class PapbVcInterface : public VirtualChannelIF {
|
||||
|
||||
static const ReturnValue_t PAPB_BUSY = MAKE_RETURN_CODE(0xA0);
|
||||
|
||||
enum ByteWidthCfg : uint32_t { ONE = 0b00, TWO = 0b01, THREE = 0b10, FOUR = 0b11 };
|
||||
/**
|
||||
* Configuration bits:
|
||||
* bit[1:0]: Size of data (1,2,3 or 4 bytes). 1 Byte <=> b00
|
||||
* bit[2]: Set this bit to 1 to abort a transferred packet
|
||||
* bit[3]: Signals to VcInterface the start of a new telemetry packet
|
||||
*/
|
||||
static constexpr uint32_t CONFIG_START = 0b00001000;
|
||||
static constexpr uint32_t CONFIG_DATA_INPUT = 0b00001000;
|
||||
|
||||
/**
|
||||
* Abort a transferred packet.
|
||||
@ -76,7 +79,7 @@ class PapbVcInterface : public VirtualChannelIF {
|
||||
*/
|
||||
static const int DATA_REG_OFFSET = 256;
|
||||
|
||||
static constexpr long int FIRST_NON_NULL_DELAY_NS = 10;
|
||||
static constexpr long int FIRST_DELAY_PAPB_POLLING_NS = 10;
|
||||
static constexpr long int MAX_DELAY_PAPB_POLLING_NS = 40;
|
||||
|
||||
LinuxLibgpioIF* gpioComIF = nullptr;
|
||||
@ -89,7 +92,7 @@ class PapbVcInterface : public VirtualChannelIF {
|
||||
std::string uioFile;
|
||||
int mapNum = 0;
|
||||
mutable struct timespec nextDelay = {.tv_sec = 0, .tv_nsec = 0};
|
||||
const struct timespec BETWEEN_POLL_DELAY = {.tv_sec = 0, .tv_nsec = 5};
|
||||
const struct timespec BETWEEN_POLL_DELAY = {.tv_sec = 0, .tv_nsec = 10};
|
||||
mutable struct timespec remDelay;
|
||||
|
||||
volatile uint32_t* vcBaseReg = nullptr;
|
||||
@ -100,7 +103,7 @@ class PapbVcInterface : public VirtualChannelIF {
|
||||
* @brief This function sends the config byte to the virtual channel of the PTME IP Core
|
||||
* to initiate a packet transfer.
|
||||
*/
|
||||
void startPacketTransfer();
|
||||
void startPacketTransfer(ByteWidthCfg initWidth);
|
||||
|
||||
void abortPacketTransfer();
|
||||
|
||||
@ -117,7 +120,7 @@ class PapbVcInterface : public VirtualChannelIF {
|
||||
*
|
||||
* @return returnvalue::OK when ready to receive data else PAPB_BUSY.
|
||||
*/
|
||||
inline ReturnValue_t pollPapbBusySignal(uint32_t maxPollRetries) const;
|
||||
inline ReturnValue_t pollInterfaceReadiness(uint32_t maxPollRetries, bool checkReadyState) const;
|
||||
|
||||
/**
|
||||
* @brief This function can be used for debugging to check whether there are packets in
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
#include "fsfw/tmtcservices/TmTcMessage.h"
|
||||
#include "fsfw_hal/linux/uio/UioMapper.h"
|
||||
#include "linux/ipcore/PdecConfig.h"
|
||||
#include "pdec.h"
|
||||
|
||||
using namespace pdec;
|
||||
@ -103,21 +104,10 @@ ReturnValue_t PdecHandler::firstLoop() {
|
||||
|
||||
result = releasePdec();
|
||||
if (result != returnvalue::OK) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
// This configuration must be done while the PDEC is not held in reset.
|
||||
if (OP_MODE == Modes::IRQ) {
|
||||
// Configure interrupt mask register to enable interrupts
|
||||
*(registerBaseAddress + PDEC_IMR_OFFSET) = pdecConfig.getImrReg();
|
||||
}
|
||||
result = resetFarStatFlag();
|
||||
if (result != returnvalue::OK) {
|
||||
// Requires reconfiguration and reinitialization of PDEC
|
||||
triggerEvent(INVALID_FAR);
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
|
||||
return postResetOperation();
|
||||
}
|
||||
|
||||
ReturnValue_t PdecHandler::performOperation(uint8_t operationCode) {
|
||||
@ -141,10 +131,11 @@ ReturnValue_t PdecHandler::polledOperation() {
|
||||
if (newTcReceived()) {
|
||||
handleNewTc();
|
||||
}
|
||||
checkLocks();
|
||||
doPeriodicWork();
|
||||
break;
|
||||
}
|
||||
case State::PDEC_RESET: {
|
||||
triggerEvent(pdec::PDEC_TRYING_RESET_WITH_INIT);
|
||||
ReturnValue_t result = pdecToReset();
|
||||
if (result != returnvalue::OK) {
|
||||
triggerEvent(PDEC_RESET_FAILED);
|
||||
@ -165,8 +156,8 @@ ReturnValue_t PdecHandler::polledOperation() {
|
||||
// See https://yurovsky.github.io/2014/10/10/linux-uio-gpio-interrupt.html for more information.
|
||||
ReturnValue_t PdecHandler::irqOperation() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
int fd = -1;
|
||||
// Used to unmask IRQ
|
||||
// int fd = -1;
|
||||
// Used to unmask IRQ
|
||||
uint32_t info = 1;
|
||||
|
||||
interruptWindowCd.resetTimer();
|
||||
@ -182,22 +173,29 @@ ReturnValue_t PdecHandler::irqOperation() {
|
||||
switch (state) {
|
||||
case State::INIT: {
|
||||
result = handleInitState();
|
||||
if (result == returnvalue::OK) {
|
||||
openIrqFile(&fd);
|
||||
if (result != returnvalue::OK) {
|
||||
break;
|
||||
}
|
||||
openIrqFile();
|
||||
if (ptmeResetWithReinitializationPending) {
|
||||
actionHelper.finish(true, commandedBy, pdec::RESET_PDEC_WITH_REINIITALIZATION);
|
||||
ptmeResetWithReinitializationPending = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State::PDEC_RESET: {
|
||||
triggerEvent(pdec::PDEC_TRYING_RESET_WITH_INIT);
|
||||
result = pdecToReset();
|
||||
if (result != returnvalue::OK) {
|
||||
triggerEvent(PDEC_RESET_FAILED);
|
||||
}
|
||||
usleep(20);
|
||||
state = State::INIT;
|
||||
break;
|
||||
}
|
||||
case State::RUNNING: {
|
||||
checkLocks();
|
||||
checkAndHandleIrqs(fd, info);
|
||||
doPeriodicWork();
|
||||
checkAndHandleIrqs(info);
|
||||
break;
|
||||
}
|
||||
case State::WAIT_FOR_RECOVERY:
|
||||
@ -219,27 +217,28 @@ ReturnValue_t PdecHandler::handleInitState() {
|
||||
ReturnValue_t result = firstLoop();
|
||||
if (result != returnvalue::OK) {
|
||||
if (result == LocalParameterHandler::SD_NOT_READY) {
|
||||
TaskFactory::delayTask(400);
|
||||
if (initTries == MAX_INIT_TRIES) {
|
||||
sif::error << "PdecHandler::handleInitState: SD card never "
|
||||
"becomes ready"
|
||||
<< std::endl;
|
||||
state = State::WAIT_FOR_RECOVERY;
|
||||
} else {
|
||||
state = State::INIT;
|
||||
sif::error << "PdecHandler::handleInitState: SD card never becomes ready" << std::endl;
|
||||
initFailedHandler(result);
|
||||
return result;
|
||||
}
|
||||
state = State::INIT;
|
||||
initTries++;
|
||||
TaskFactory::delayTask(400);
|
||||
return result;
|
||||
}
|
||||
state = State::WAIT_FOR_RECOVERY;
|
||||
sif::error << "PDEC: Init failed with reason 0x" << std::hex << std::setw(4) << result
|
||||
<< std::endl;
|
||||
initFailedHandler(result);
|
||||
return result;
|
||||
}
|
||||
state = State::RUNNING;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void PdecHandler::openIrqFile(int* fd) {
|
||||
*fd = open(uioNames.irq, O_RDWR);
|
||||
if (*fd < 0) {
|
||||
void PdecHandler::openIrqFile() {
|
||||
irqFd = open(uioNames.irq, O_RDWR);
|
||||
if (irqFd < 0) {
|
||||
sif::error << "PdecHandler::irqOperation: Opening UIO IRQ file" << uioNames.irq << " failed"
|
||||
<< std::endl;
|
||||
triggerEvent(OPEN_IRQ_FILE_FAILED);
|
||||
@ -247,16 +246,16 @@ void PdecHandler::openIrqFile(int* fd) {
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t PdecHandler::checkAndHandleIrqs(int fd, uint32_t& info) {
|
||||
ssize_t nb = write(fd, &info, sizeof(info));
|
||||
ReturnValue_t PdecHandler::checkAndHandleIrqs(uint32_t& info) {
|
||||
ssize_t nb = write(irqFd, &info, sizeof(info));
|
||||
if (nb != static_cast<ssize_t>(sizeof(info))) {
|
||||
sif::error << "PdecHandler::irqOperation: Unmasking IRQ failed" << std::endl;
|
||||
triggerEvent(WRITE_SYSCALL_ERROR_PDEC, errno);
|
||||
close(fd);
|
||||
close(irqFd);
|
||||
state = State::INIT;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
struct pollfd fds = {.fd = fd, .events = POLLIN, .revents = 0};
|
||||
struct pollfd fds = {.fd = irqFd, .events = POLLIN, .revents = 0};
|
||||
int ret = poll(&fds, 1, IRQ_TIMEOUT_MS);
|
||||
if (ret == 0) {
|
||||
// No TCs for timeout period
|
||||
@ -264,7 +263,7 @@ ReturnValue_t PdecHandler::checkAndHandleIrqs(int fd, uint32_t& info) {
|
||||
resetIrqLimiters();
|
||||
} else if (ret >= 1) {
|
||||
// Interrupt handling.
|
||||
nb = read(fd, &info, sizeof(info));
|
||||
nb = read(irqFd, &info, sizeof(info));
|
||||
interruptCounter++;
|
||||
if (nb == static_cast<ssize_t>(sizeof(info))) {
|
||||
uint32_t pisr = *(registerBaseAddress + PDEC_PISR_OFFSET);
|
||||
@ -303,7 +302,7 @@ ReturnValue_t PdecHandler::checkAndHandleIrqs(int fd, uint32_t& info) {
|
||||
sif::error << "PdecHandler::irqOperation: Poll error with errno " << errno << ": "
|
||||
<< strerror(errno) << std::endl;
|
||||
triggerEvent(POLL_SYSCALL_ERROR_PDEC, errno);
|
||||
close(fd);
|
||||
close(irqFd);
|
||||
state = State::INIT;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
@ -335,6 +334,7 @@ MessageQueueId_t PdecHandler::getCommandQueue() const { return commandQueue->get
|
||||
|
||||
ReturnValue_t PdecHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||
const uint8_t* data, size_t size) {
|
||||
using namespace pdec;
|
||||
switch (actionId) {
|
||||
case PRINT_CLCW:
|
||||
printClcw();
|
||||
@ -342,6 +342,16 @@ ReturnValue_t PdecHandler::executeAction(ActionId_t actionId, MessageQueueId_t c
|
||||
case PRINT_PDEC_MON:
|
||||
printPdecMon();
|
||||
return EXECUTION_FINISHED;
|
||||
case RESET_PDEC_NO_REINIITALIZATION: {
|
||||
pdecResetNoInit();
|
||||
return EXECUTION_FINISHED;
|
||||
}
|
||||
case RESET_PDEC_WITH_REINIITALIZATION: {
|
||||
initializeReset();
|
||||
ptmeResetWithReinitializationPending = true;
|
||||
this->commandedBy = commandedBy;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
default:
|
||||
return COMMAND_NOT_IMPLEMENTED;
|
||||
}
|
||||
@ -370,7 +380,7 @@ ReturnValue_t PdecHandler::getParameter(uint8_t domainId, uint8_t uniqueIdentifi
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
// PDEC needs reset to apply this parameter change
|
||||
state = State::PDEC_RESET;
|
||||
initializeReset();
|
||||
return returnvalue::OK;
|
||||
} else if ((domainId == 0) and (uniqueIdentifier == ParameterId::NEGATIVE_WINDOW)) {
|
||||
uint8_t newVal = 0;
|
||||
@ -392,7 +402,7 @@ ReturnValue_t PdecHandler::getParameter(uint8_t domainId, uint8_t uniqueIdentifi
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
// PDEC needs reset to apply this parameter change
|
||||
state = State::PDEC_RESET;
|
||||
initializeReset();
|
||||
return returnvalue::OK;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
@ -425,8 +435,7 @@ ReturnValue_t PdecHandler::releasePdec() {
|
||||
}
|
||||
|
||||
ReturnValue_t PdecHandler::pdecToReset() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
result = gpioComIF->pullLow(pdecReset);
|
||||
ReturnValue_t result = gpioComIF->pullLow(pdecReset);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "PdecHandler::pdecToReset: Failed to pull PDEC reset line"
|
||||
" to low"
|
||||
@ -449,22 +458,13 @@ bool PdecHandler::newTcReceived() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void PdecHandler::checkLocks() {
|
||||
uint32_t clcw = getClcw();
|
||||
if (not(clcw & NO_RF_MASK) && not carrierLock) {
|
||||
triggerEvent(CARRIER_LOCK);
|
||||
carrierLock = true;
|
||||
} else if ((clcw & NO_RF_MASK) && carrierLock) {
|
||||
carrierLock = false;
|
||||
triggerEvent(LOST_CARRIER_LOCK_PDEC);
|
||||
}
|
||||
if (not(clcw & NO_BITLOCK_MASK) && not bitLock) {
|
||||
triggerEvent(BIT_LOCK_PDEC);
|
||||
bitLock = true;
|
||||
} else if ((clcw & NO_BITLOCK_MASK) && bitLock) {
|
||||
bitLock = false;
|
||||
triggerEvent(LOST_BIT_LOCK_PDEC);
|
||||
}
|
||||
void PdecHandler::doPeriodicWork() {
|
||||
// scuffed test code
|
||||
// if(testCntr < 30) {
|
||||
// triggerEvent(pdec::INVALID_TC_FRAME, FRAME_DIRTY_RETVAL);
|
||||
// testCntr++;
|
||||
// }
|
||||
checkLocks();
|
||||
}
|
||||
|
||||
bool PdecHandler::checkFrameAna(uint32_t pdecFar) {
|
||||
@ -748,6 +748,68 @@ void PdecHandler::resetIrqLimiters() {
|
||||
interruptCounter = 0;
|
||||
}
|
||||
|
||||
void PdecHandler::checkLocks() {
|
||||
uint32_t clcw = getClcw();
|
||||
if (not(clcw & NO_RF_MASK) && not carrierLock) {
|
||||
triggerEvent(CARRIER_LOCK);
|
||||
carrierLock = true;
|
||||
} else if ((clcw & NO_RF_MASK) && carrierLock) {
|
||||
carrierLock = false;
|
||||
triggerEvent(LOST_CARRIER_LOCK_PDEC);
|
||||
}
|
||||
if (not(clcw & NO_BITLOCK_MASK) && not bitLock) {
|
||||
triggerEvent(BIT_LOCK_PDEC);
|
||||
bitLock = true;
|
||||
} else if ((clcw & NO_BITLOCK_MASK) && bitLock) {
|
||||
bitLock = false;
|
||||
triggerEvent(LOST_BIT_LOCK_PDEC);
|
||||
}
|
||||
}
|
||||
|
||||
void PdecHandler::initFailedHandler(ReturnValue_t reason) {
|
||||
triggerEvent(pdec::PDEC_INIT_FAILED, reason, 0);
|
||||
if (ptmeResetWithReinitializationPending) {
|
||||
actionHelper.finish(false, commandedBy, pdec::RESET_PDEC_WITH_REINIITALIZATION, reason);
|
||||
ptmeResetWithReinitializationPending = false;
|
||||
}
|
||||
state = State::WAIT_FOR_RECOVERY;
|
||||
}
|
||||
|
||||
void PdecHandler::pdecResetNoInit() {
|
||||
triggerEvent(pdec::PDEC_TRYING_RESET_NO_INIT);
|
||||
pdecToReset();
|
||||
usleep(20);
|
||||
releasePdec();
|
||||
ReturnValue_t result = postResetOperation();
|
||||
if (result != returnvalue::OK) {
|
||||
// What can we really do here? Event was already triggered if this is due to the FAR flag
|
||||
// not being reset.
|
||||
sif::error << "PdecHandler::pdecResetNoInit: Post reset operation failed unexpectedly"
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t PdecHandler::postResetOperation() {
|
||||
// This configuration must be done while the PDEC is not held in reset.
|
||||
if (OP_MODE == Modes::IRQ) {
|
||||
// Configure interrupt mask register to enable interrupts
|
||||
*(registerBaseAddress + PDEC_IMR_OFFSET) = pdecConfig.getImrReg();
|
||||
}
|
||||
ReturnValue_t result = resetFarStatFlag();
|
||||
if (result != returnvalue::OK) {
|
||||
// Requires reconfiguration and reinitialization of PDEC
|
||||
triggerEvent(INVALID_FAR);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void PdecHandler::initializeReset() {
|
||||
if (irqFd != 0) {
|
||||
close(irqFd);
|
||||
}
|
||||
state = State::PDEC_RESET;
|
||||
}
|
||||
|
||||
std::string PdecHandler::getMonStatusString(uint32_t status) {
|
||||
switch (status) {
|
||||
case TC_CHANNEL_INACTIVE:
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <fsfw/timemanager/Countdown.h>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "PdecConfig.h"
|
||||
#include "eive/definitions.h"
|
||||
@ -79,73 +81,11 @@ class PdecHandler : public SystemObject,
|
||||
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
|
||||
uint16_t startAtIndex) override;
|
||||
|
||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PDEC_HANDLER;
|
||||
|
||||
//! [EXPORT] : [COMMENT] Frame acceptance report signals an invalid frame
|
||||
//! P1: The frame analysis information (FrameAna field of PDEC_FAR register)
|
||||
//! P2: When frame declared illegal this parameter this parameter gives information about the
|
||||
//! reason (IReason field of the PDEC_FAR register)
|
||||
static const Event INVALID_TC_FRAME = MAKE_EVENT(1, severity::HIGH);
|
||||
//! [EXPORT] : [COMMENT] Read invalid FAR from PDEC after startup
|
||||
static const Event INVALID_FAR = MAKE_EVENT(2, severity::HIGH);
|
||||
//! [EXPORT] : [COMMENT] Carrier lock detected
|
||||
static const Event CARRIER_LOCK = MAKE_EVENT(3, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] Bit lock detected (data valid)
|
||||
static const Event BIT_LOCK_PDEC = MAKE_EVENT(4, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] Lost carrier lock
|
||||
static const Event LOST_CARRIER_LOCK_PDEC = MAKE_EVENT(5, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] Lost bit lock
|
||||
static const Event LOST_BIT_LOCK_PDEC = MAKE_EVENT(6, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] Too many IRQs over the time window of one second. P1: Allowed TCs
|
||||
static constexpr Event TOO_MANY_IRQS = MAKE_EVENT(7, severity::MEDIUM);
|
||||
static constexpr Event POLL_SYSCALL_ERROR_PDEC =
|
||||
event::makeEvent(SUBSYSTEM_ID, 8, severity::MEDIUM);
|
||||
static constexpr Event WRITE_SYSCALL_ERROR_PDEC =
|
||||
event::makeEvent(SUBSYSTEM_ID, 9, severity::HIGH);
|
||||
//! [EXPORT] : [COMMENT] Failed to pull PDEC reset to low
|
||||
static constexpr Event PDEC_RESET_FAILED = event::makeEvent(SUBSYSTEM_ID, 10, severity::HIGH);
|
||||
//! [EXPORT] : [COMMENT] Failed to open the IRQ uio file
|
||||
static constexpr Event OPEN_IRQ_FILE_FAILED = event::makeEvent(SUBSYSTEM_ID, 11, severity::HIGH);
|
||||
|
||||
private:
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::PDEC_HANDLER;
|
||||
|
||||
static constexpr Modes OP_MODE = Modes::IRQ;
|
||||
|
||||
static const ReturnValue_t ABANDONED_CLTU_RETVAL = MAKE_RETURN_CODE(0xA0);
|
||||
static const ReturnValue_t FRAME_DIRTY_RETVAL = MAKE_RETURN_CODE(0xA1);
|
||||
static const ReturnValue_t FRAME_ILLEGAL_ONE_REASON = MAKE_RETURN_CODE(0xA2);
|
||||
static const ReturnValue_t FRAME_ILLEGAL_MULTIPLE_REASONS = MAKE_RETURN_CODE(0xA2);
|
||||
static const ReturnValue_t AD_DISCARDED_LOCKOUT_RETVAL = MAKE_RETURN_CODE(0xA3);
|
||||
static const ReturnValue_t AD_DISCARDED_WAIT_RETVAL = MAKE_RETURN_CODE(0xA4);
|
||||
static const ReturnValue_t AD_DISCARDED_NS_VS = MAKE_RETURN_CODE(0xA5);
|
||||
|
||||
//! [EXPORT] : [COMMENT] Received action message with unknown action id
|
||||
static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xB0);
|
||||
|
||||
static const ReturnValue_t NO_REPORT_RETVAL = MAKE_RETURN_CODE(0xA6);
|
||||
//! Error in version number and reserved A and B fields
|
||||
static const ReturnValue_t ERROR_VERSION_NUMBER_RETVAL = MAKE_RETURN_CODE(0xA7);
|
||||
//! Illegal combination of bypass and control command flag
|
||||
static const ReturnValue_t ILLEGAL_COMBINATION_RETVAL = MAKE_RETURN_CODE(0xA8);
|
||||
//! Spacecraft identifier did not match
|
||||
static const ReturnValue_t INVALID_SC_ID_RETVAL = MAKE_RETURN_CODE(0xA9);
|
||||
//! VC identifier bits 0 to 4 did not match
|
||||
static const ReturnValue_t INVALID_VC_ID_MSB_RETVAL = MAKE_RETURN_CODE(0xAA);
|
||||
//! VC identifier bit 5 did not match
|
||||
static const ReturnValue_t INVALID_VC_ID_LSB_RETVAL = MAKE_RETURN_CODE(0xAB);
|
||||
//! N(S) of BC or BD frame not set to all zeros
|
||||
static const ReturnValue_t NS_NOT_ZERO_RETVAL = MAKE_RETURN_CODE(0xAC);
|
||||
//! Invalid BC control command
|
||||
static const ReturnValue_t INVALID_BC_CC = MAKE_RETURN_CODE(0xAE);
|
||||
|
||||
static const uint32_t QUEUE_SIZE = config::CCSDS_HANDLER_QUEUE_SIZE;
|
||||
|
||||
// Action IDs
|
||||
static const ActionId_t PRINT_CLCW = 0;
|
||||
// Print PDEC monitor register
|
||||
static const ActionId_t PRINT_PDEC_MON = 1;
|
||||
|
||||
#ifdef TE0720_1CFA
|
||||
static const int CONFIG_MEMORY_MAP_SIZE = 0x400;
|
||||
static const int RAM_MAP_SIZE = 0x4000;
|
||||
@ -185,17 +125,6 @@ class PdecHandler : public SystemObject,
|
||||
|
||||
static constexpr uint32_t MAX_ALLOWED_IRQS_PER_WINDOW = 800;
|
||||
|
||||
enum class FrameAna_t : uint8_t {
|
||||
ABANDONED_CLTU,
|
||||
FRAME_DIRTY,
|
||||
FRAME_ILLEGAL,
|
||||
FRAME_ILLEGAL_MULTI_REASON,
|
||||
AD_DISCARDED_LOCKOUT,
|
||||
AD_DISCARDED_WAIT,
|
||||
AD_DISCARDED_NS_VR,
|
||||
FRAME_ACCEPTED
|
||||
};
|
||||
|
||||
enum class IReason_t : uint8_t {
|
||||
NO_REPORT,
|
||||
ERROR_VERSION_NUMBER,
|
||||
@ -213,6 +142,7 @@ class PdecHandler : public SystemObject,
|
||||
|
||||
Countdown genericCheckCd = Countdown(IRQ_TIMEOUT_MS);
|
||||
object_id_t tcDestinationId;
|
||||
int irqFd = 0;
|
||||
|
||||
AcceptsTelecommandsIF* tcDestination = nullptr;
|
||||
|
||||
@ -258,6 +188,9 @@ class PdecHandler : public SystemObject,
|
||||
bool carrierLock = false;
|
||||
bool bitLock = false;
|
||||
|
||||
MessageQueueId_t commandedBy = MessageQueueIF::NO_QUEUE;
|
||||
bool ptmeResetWithReinitializationPending = false;
|
||||
|
||||
UioNames uioNames;
|
||||
|
||||
ParameterHelper paramHelper;
|
||||
@ -266,6 +199,9 @@ class PdecHandler : public SystemObject,
|
||||
|
||||
uint32_t initTries = 0;
|
||||
|
||||
// scuffed test counter.
|
||||
uint8_t testCntr = 0;
|
||||
|
||||
/**
|
||||
* @brief Performs initialization stuff which must be performed in first
|
||||
* loop of running task
|
||||
@ -282,8 +218,8 @@ class PdecHandler : public SystemObject,
|
||||
ReturnValue_t polledOperation();
|
||||
ReturnValue_t irqOperation();
|
||||
ReturnValue_t handleInitState();
|
||||
void openIrqFile(int* fd);
|
||||
ReturnValue_t checkAndHandleIrqs(int fd, uint32_t& info);
|
||||
void openIrqFile();
|
||||
ReturnValue_t checkAndHandleIrqs(uint32_t& info);
|
||||
|
||||
uint32_t readFar();
|
||||
|
||||
@ -325,6 +261,8 @@ class PdecHandler : public SystemObject,
|
||||
* @brief Checks if carrier lock or bit lock has been detected and triggers appropriate
|
||||
* event.
|
||||
*/
|
||||
void doPeriodicWork();
|
||||
|
||||
void checkLocks();
|
||||
|
||||
void resetIrqLimiters();
|
||||
@ -400,6 +338,13 @@ class PdecHandler : public SystemObject,
|
||||
*/
|
||||
void printPdecMon();
|
||||
|
||||
void pdecResetNoInit();
|
||||
|
||||
ReturnValue_t postResetOperation();
|
||||
void initializeReset();
|
||||
|
||||
void initFailedHandler(ReturnValue_t reason);
|
||||
|
||||
std::string getMonStatusString(uint32_t status);
|
||||
};
|
||||
|
||||
|
@ -26,33 +26,30 @@ ReturnValue_t PtmeConfig::setRate(uint32_t bitRate) {
|
||||
return axiPtmeConfig->writeCaduRateReg(static_cast<uint8_t>(rateVal));
|
||||
}
|
||||
|
||||
ReturnValue_t PtmeConfig::invertTxClock(bool invert) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
void PtmeConfig::invertTxClock(bool invert) {
|
||||
if (invert) {
|
||||
result = axiPtmeConfig->enableTxclockInversion();
|
||||
axiPtmeConfig->enableTxclockInversion();
|
||||
} else {
|
||||
result = axiPtmeConfig->disableTxclockInversion();
|
||||
axiPtmeConfig->disableTxclockInversion();
|
||||
}
|
||||
if (result != returnvalue::OK) {
|
||||
return CLK_INVERSION_FAILED;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PtmeConfig::configTxManipulator(bool enable) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
void PtmeConfig::configTxManipulator(bool enable) {
|
||||
if (enable) {
|
||||
result = axiPtmeConfig->enableTxclockManipulator();
|
||||
axiPtmeConfig->enableTxclockManipulator();
|
||||
} else {
|
||||
result = axiPtmeConfig->disableTxclockManipulator();
|
||||
axiPtmeConfig->disableTxclockManipulator();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PtmeConfig::enableBatPriorityBit(bool enable) {
|
||||
void PtmeConfig::enableBatPriorityBit(bool enable) {
|
||||
if (enable) {
|
||||
return axiPtmeConfig->enableBatPriorityBit();
|
||||
axiPtmeConfig->enableBatPriorityBit();
|
||||
} else {
|
||||
return axiPtmeConfig->disableBatPriorityBit();
|
||||
axiPtmeConfig->disableBatPriorityBit();
|
||||
}
|
||||
}
|
||||
|
||||
void PtmeConfig::setPollThreshold(AxiPtmeConfig::IdlePollThreshold pollThreshold) {
|
||||
axiPtmeConfig->writePollThreshold(pollThreshold);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class PtmeConfig : public SystemObject {
|
||||
*
|
||||
* @return REUTRN_OK if successful, otherwise error return value
|
||||
*/
|
||||
ReturnValue_t invertTxClock(bool invert);
|
||||
void invertTxClock(bool invert);
|
||||
|
||||
/**
|
||||
* @brief Controls the tx clock manipulator of the PTME wrapper component
|
||||
@ -53,7 +53,7 @@ class PtmeConfig : public SystemObject {
|
||||
*
|
||||
* @return REUTRN_OK if successful, otherwise error return value
|
||||
*/
|
||||
ReturnValue_t configTxManipulator(bool enable);
|
||||
void configTxManipulator(bool enable);
|
||||
|
||||
/**
|
||||
* Enable the bat priority bit in the PTME wrapper component.
|
||||
@ -62,7 +62,9 @@ class PtmeConfig : public SystemObject {
|
||||
* @param enable
|
||||
* @return
|
||||
*/
|
||||
ReturnValue_t enableBatPriorityBit(bool enable);
|
||||
void enableBatPriorityBit(bool enable);
|
||||
|
||||
void setPollThreshold(AxiPtmeConfig::IdlePollThreshold pollThreshold);
|
||||
|
||||
private:
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::RATE_SETTER;
|
||||
|
@ -1,10 +1,95 @@
|
||||
#ifndef LINUX_OBC_PDEC_H_
|
||||
#define LINUX_OBC_PDEC_H_
|
||||
|
||||
#include <eive/resultClassIds.h>
|
||||
#include <fsfw/action/ActionMessage.h>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace pdec {
|
||||
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::PDEC_HANDLER;
|
||||
static const ReturnValue_t ABANDONED_CLTU_RETVAL = MAKE_RETURN_CODE(0xA0);
|
||||
static const ReturnValue_t FRAME_DIRTY_RETVAL = MAKE_RETURN_CODE(0xA1);
|
||||
static const ReturnValue_t FRAME_ILLEGAL_ONE_REASON = MAKE_RETURN_CODE(0xA2);
|
||||
static const ReturnValue_t FRAME_ILLEGAL_MULTIPLE_REASONS = MAKE_RETURN_CODE(0xA2);
|
||||
static const ReturnValue_t AD_DISCARDED_LOCKOUT_RETVAL = MAKE_RETURN_CODE(0xA3);
|
||||
static const ReturnValue_t AD_DISCARDED_WAIT_RETVAL = MAKE_RETURN_CODE(0xA4);
|
||||
static const ReturnValue_t AD_DISCARDED_NS_VS = MAKE_RETURN_CODE(0xA5);
|
||||
|
||||
//! [EXPORT] : [COMMENT] Received action message with unknown action id
|
||||
static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xB0);
|
||||
|
||||
static const ReturnValue_t NO_REPORT_RETVAL = MAKE_RETURN_CODE(0xA6);
|
||||
//! Error in version number and reserved A and B fields
|
||||
static const ReturnValue_t ERROR_VERSION_NUMBER_RETVAL = MAKE_RETURN_CODE(0xA7);
|
||||
//! Illegal combination of bypass and control command flag
|
||||
static const ReturnValue_t ILLEGAL_COMBINATION_RETVAL = MAKE_RETURN_CODE(0xA8);
|
||||
//! Spacecraft identifier did not match
|
||||
static const ReturnValue_t INVALID_SC_ID_RETVAL = MAKE_RETURN_CODE(0xA9);
|
||||
//! VC identifier bits 0 to 4 did not match
|
||||
static const ReturnValue_t INVALID_VC_ID_MSB_RETVAL = MAKE_RETURN_CODE(0xAA);
|
||||
//! VC identifier bit 5 did not match
|
||||
static const ReturnValue_t INVALID_VC_ID_LSB_RETVAL = MAKE_RETURN_CODE(0xAB);
|
||||
//! N(S) of BC or BD frame not set to all zeros
|
||||
static const ReturnValue_t NS_NOT_ZERO_RETVAL = MAKE_RETURN_CODE(0xAC);
|
||||
//! Invalid BC control command
|
||||
static const ReturnValue_t INVALID_BC_CC = MAKE_RETURN_CODE(0xAE);
|
||||
|
||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PDEC_HANDLER;
|
||||
|
||||
//! [EXPORT] : [COMMENT] Frame acceptance report signals an invalid frame
|
||||
//! P1: The frame analysis information (FrameAna field of PDEC_FAR register)
|
||||
//! P2: When frame declared illegal this parameter this parameter gives information about the
|
||||
//! reason (IReason field of the PDEC_FAR register)
|
||||
static const Event INVALID_TC_FRAME = MAKE_EVENT(1, severity::HIGH);
|
||||
//! [EXPORT] : [COMMENT] Read invalid FAR from PDEC after startup
|
||||
static const Event INVALID_FAR = MAKE_EVENT(2, severity::HIGH);
|
||||
//! [EXPORT] : [COMMENT] Carrier lock detected
|
||||
static const Event CARRIER_LOCK = MAKE_EVENT(3, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] Bit lock detected (data valid)
|
||||
static const Event BIT_LOCK_PDEC = MAKE_EVENT(4, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] Lost carrier lock
|
||||
static const Event LOST_CARRIER_LOCK_PDEC = MAKE_EVENT(5, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] Lost bit lock
|
||||
static const Event LOST_BIT_LOCK_PDEC = MAKE_EVENT(6, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] Too many IRQs over the time window of one second. P1: Allowed TCs
|
||||
static constexpr Event TOO_MANY_IRQS = MAKE_EVENT(7, severity::MEDIUM);
|
||||
static constexpr Event POLL_SYSCALL_ERROR_PDEC =
|
||||
event::makeEvent(SUBSYSTEM_ID, 8, severity::MEDIUM);
|
||||
static constexpr Event WRITE_SYSCALL_ERROR_PDEC = event::makeEvent(SUBSYSTEM_ID, 9, severity::HIGH);
|
||||
//! [EXPORT] : [COMMENT] Trying a PDEC reset with complete re-initialization
|
||||
static constexpr Event PDEC_TRYING_RESET_WITH_INIT =
|
||||
event::makeEvent(SUBSYSTEM_ID, 10, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] Trying a PDEC reset without re-initialization.
|
||||
static constexpr Event PDEC_TRYING_RESET_NO_INIT =
|
||||
event::makeEvent(SUBSYSTEM_ID, 11, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] Failed to pull PDEC reset to low
|
||||
static constexpr Event PDEC_RESET_FAILED = event::makeEvent(SUBSYSTEM_ID, 12, severity::HIGH);
|
||||
//! [EXPORT] : [COMMENT] Failed to open the IRQ uio file
|
||||
static constexpr Event OPEN_IRQ_FILE_FAILED = event::makeEvent(SUBSYSTEM_ID, 13, severity::HIGH);
|
||||
//! [EXPORT] : [COMMENT] PDEC initialization failed. This might also be due to the persistent
|
||||
//! confiuration never becoming available, for example due to SD card issues.
|
||||
static constexpr Event PDEC_INIT_FAILED = event::makeEvent(SUBSYSTEM_ID, 14, severity::HIGH);
|
||||
|
||||
// Action IDs
|
||||
static constexpr ActionId_t PRINT_CLCW = 0;
|
||||
// Print PDEC monitor register
|
||||
static constexpr ActionId_t PRINT_PDEC_MON = 1;
|
||||
static constexpr ActionId_t RESET_PDEC_NO_REINIITALIZATION = 2;
|
||||
static constexpr ActionId_t RESET_PDEC_WITH_REINIITALIZATION = 3;
|
||||
|
||||
enum class FrameAna_t : uint8_t {
|
||||
ABANDONED_CLTU,
|
||||
FRAME_DIRTY,
|
||||
FRAME_ILLEGAL,
|
||||
FRAME_ILLEGAL_MULTI_REASON,
|
||||
AD_DISCARDED_LOCKOUT,
|
||||
AD_DISCARDED_WAIT,
|
||||
AD_DISCARDED_NS_VR,
|
||||
FRAME_ACCEPTED
|
||||
};
|
||||
|
||||
static const uint8_t STAT_POSITION = 31;
|
||||
static const uint8_t FRAME_ANA_POSITION = 28;
|
||||
static const uint8_t IREASON_POSITION = 25;
|
||||
|
@ -2,7 +2,8 @@ target_sources(
|
||||
${OBSW_NAME}
|
||||
PUBLIC PlocMemoryDumper.cpp
|
||||
PlocMpsocHandler.cpp
|
||||
PlocMpsocHelper.cpp
|
||||
PlocMpsocSpecialComHelper.cpp
|
||||
plocMpsocHelpers.cpp
|
||||
PlocSupervisorHandler.cpp
|
||||
PlocSupvUartMan.cpp
|
||||
ScexDleParser.cpp
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,9 @@
|
||||
#ifndef BSP_Q7S_DEVICES_PLOC_PLOCMPSOCHANDLER_H_
|
||||
#define BSP_Q7S_DEVICES_PLOC_PLOCMPSOCHANDLER_H_
|
||||
|
||||
#include <linux/payload/PlocMpsocHelper.h>
|
||||
#include <linux/payload/PlocMpsocSpecialComHelper.h>
|
||||
#include <linux/payload/mpsocRetvals.h>
|
||||
#include <linux/payload/plocMpscoDefs.h>
|
||||
#include <linux/payload/plocMpsocHelpers.h>
|
||||
#include <linux/payload/plocSupvDefs.h>
|
||||
|
||||
#include <string>
|
||||
@ -28,9 +28,10 @@
|
||||
* @note The sequence count in the space packets must be incremented with each received and sent
|
||||
* packet otherwise the MPSoC will reply with an acknowledgment failure report.
|
||||
*
|
||||
* @author J. Meier
|
||||
* NOTE: This is not an example for a good device handler, DO NOT USE THIS AS A REFERENCE HANDLER.
|
||||
* @author J. Meier, R. Mueller
|
||||
*/
|
||||
class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
class PlocMpsocHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -43,10 +44,10 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
* module in the programmable logic
|
||||
* @param supervisorHandler Object ID of the supervisor handler
|
||||
*/
|
||||
PlocMPSoCHandler(object_id_t objectId, object_id_t uartComIFid, CookieIF* comCookie,
|
||||
PlocMPSoCHelper* plocMPSoCHelper, Gpio uartIsolatorSwitch,
|
||||
PlocMpsocHandler(object_id_t objectId, object_id_t uartComIFid, CookieIF* comCookie,
|
||||
PlocMpsocSpecialComHelper* plocMPSoCHelper, Gpio uartIsolatorSwitch,
|
||||
object_id_t supervisorHandler);
|
||||
virtual ~PlocMPSoCHandler();
|
||||
virtual ~PlocMpsocHandler();
|
||||
virtual ReturnValue_t initialize() override;
|
||||
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||
const uint8_t* data, size_t size) override;
|
||||
@ -77,7 +78,9 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
uint8_t expectedReplies = 1, bool useAlternateId = false,
|
||||
DeviceCommandId_t alternateReplyID = 0) override;
|
||||
size_t getNextReplyLength(DeviceCommandId_t deviceCommand) override;
|
||||
virtual ReturnValue_t doSendReadHook() override;
|
||||
ReturnValue_t doSendReadHook() override;
|
||||
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||||
bool dontCheckQueue() override;
|
||||
|
||||
private:
|
||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_MPSOC_HANDLER;
|
||||
@ -103,7 +106,8 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
|
||||
static const uint16_t APID_MASK = 0x7FF;
|
||||
static const uint16_t PACKET_SEQUENCE_COUNT_MASK = 0x3FFF;
|
||||
static const uint8_t STATUS_OFFSET = 10;
|
||||
|
||||
mpsoc::HkReport hkReport;
|
||||
|
||||
MessageQueueIF* eventQueue = nullptr;
|
||||
MessageQueueIF* commandActionHelperQueue = nullptr;
|
||||
@ -114,6 +118,41 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
SpacePacketCreator creator;
|
||||
ploc::SpTcParams spParams = ploc::SpTcParams(creator);
|
||||
|
||||
PoolEntry<uint32_t> peStatus = PoolEntry<uint32_t>();
|
||||
PoolEntry<uint8_t> peMode = PoolEntry<uint8_t>();
|
||||
PoolEntry<uint8_t> peDownlinkPwrOn = PoolEntry<uint8_t>();
|
||||
PoolEntry<uint8_t> peDownlinkReplyActive = PoolEntry<uint8_t>();
|
||||
PoolEntry<uint8_t> peDownlinkJesdSyncStatus = PoolEntry<uint8_t>();
|
||||
PoolEntry<uint8_t> peDownlinkDacStatus = PoolEntry<uint8_t>();
|
||||
PoolEntry<uint8_t> peCameraStatus = PoolEntry<uint8_t>();
|
||||
PoolEntry<uint8_t> peCameraSdiStatus = PoolEntry<uint8_t>();
|
||||
PoolEntry<float> peCameraFpgaTemp = PoolEntry<float>();
|
||||
PoolEntry<float> peCameraSocTemp = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonTemp = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVccInt = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVccAux = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVccBram = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVccPaux = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVccPint = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVccPdro = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonMb12V = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonMb3V3 = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonMb1V8 = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVcc12V = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVcc5V = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVcc3V3 = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVcc3V3VA = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVcc2V5DDR = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVcc1V2DDR = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVcc0V9 = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonVcc0V6VTT = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonSafeCotsCur = PoolEntry<float>();
|
||||
PoolEntry<float> peSysmonNvm4XoCur = PoolEntry<float>();
|
||||
PoolEntry<uint16_t> peSemUncorrectableErrs = PoolEntry<uint16_t>();
|
||||
PoolEntry<uint16_t> peSemCorrectableErrs = PoolEntry<uint16_t>();
|
||||
PoolEntry<uint8_t> peSemStatus = PoolEntry<uint8_t>();
|
||||
PoolEntry<uint8_t> peRebootMpsocRequired = PoolEntry<uint8_t>();
|
||||
|
||||
/**
|
||||
* This variable is used to store the id of the next reply to receive. This is necessary
|
||||
* because the PLOC sends as reply to each command at least one acknowledgment and execution
|
||||
@ -123,13 +162,14 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
|
||||
SerialComIF* uartComIf = nullptr;
|
||||
|
||||
PlocMPSoCHelper* plocMPSoCHelper = nullptr;
|
||||
PlocMpsocSpecialComHelper* specialComHelper = nullptr;
|
||||
Gpio uartIsolatorSwitch;
|
||||
object_id_t supervisorHandler = 0;
|
||||
CommandActionHelper commandActionHelper;
|
||||
|
||||
// Used to block incoming commands when MPSoC helper class is currently executing a command
|
||||
bool plocMPSoCHelperExecuting = false;
|
||||
bool specialComHelperExecuting = false;
|
||||
bool commandIsPending = false;
|
||||
|
||||
struct TmMemReadReport {
|
||||
static const uint8_t FIX_SIZE = 14;
|
||||
@ -137,20 +177,18 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
};
|
||||
|
||||
TmMemReadReport tmMemReadReport;
|
||||
|
||||
struct TmCamCmdRpt {
|
||||
size_t rememberSpacePacketSize = 0;
|
||||
};
|
||||
|
||||
TmCamCmdRpt tmCamCmdRpt;
|
||||
Countdown cmdCountdown = Countdown(10000);
|
||||
|
||||
struct TelemetryBuffer {
|
||||
uint16_t length = 0;
|
||||
uint8_t buffer[mpsoc::SP_MAX_SIZE];
|
||||
};
|
||||
|
||||
size_t foundPacketLen = 0;
|
||||
TelemetryBuffer tmBuffer;
|
||||
uint32_t waitCycles = 0;
|
||||
|
||||
enum class StartupState { IDLE, HW_INIT, WAIT_CYCLES, DONE } startupState = StartupState::IDLE;
|
||||
enum class PowerState { OFF, BOOTING, SHUTDOWN, ON };
|
||||
|
||||
PowerState powerState = PowerState::OFF;
|
||||
@ -167,6 +205,8 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
ReturnValue_t prepareTcReplayStop();
|
||||
ReturnValue_t prepareTcDownlinkPwrOn(const uint8_t* commandData, size_t commandDataLen);
|
||||
ReturnValue_t prepareTcDownlinkPwrOff();
|
||||
ReturnValue_t prepareTcGetHkReport();
|
||||
ReturnValue_t prepareTcGetDirContent(const uint8_t* commandData, size_t commandDataLen);
|
||||
ReturnValue_t prepareTcReplayWriteSequence(const uint8_t* commandData, size_t commandDataLen);
|
||||
ReturnValue_t prepareTcCamCmdSend(const uint8_t* commandData, size_t commandDataLen);
|
||||
ReturnValue_t prepareTcModeIdle();
|
||||
@ -174,7 +214,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
ReturnValue_t prepareTcSimplexSendFile(const uint8_t* commandData, size_t commandDataLen);
|
||||
ReturnValue_t prepareTcDownlinkDataModulate(const uint8_t* commandData, size_t commandDataLen);
|
||||
ReturnValue_t prepareTcModeSnapshot();
|
||||
void finishTcPrep(size_t packetLen);
|
||||
ReturnValue_t finishTcPrep(mpsoc::TcBase& tcBase);
|
||||
|
||||
/**
|
||||
* @brief This function checks the crc of the received PLOC reply.
|
||||
@ -213,6 +253,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
*/
|
||||
ReturnValue_t handleMemoryReadReport(const uint8_t* data);
|
||||
|
||||
ReturnValue_t handleGetHkReport(const uint8_t* data);
|
||||
ReturnValue_t handleCamCmdRpt(const uint8_t* data);
|
||||
|
||||
/**
|
||||
@ -231,7 +272,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
* @param dataSize Size of telemetry in bytes.
|
||||
* @param replyId Id of the reply. This will be added to the ActionMessage.
|
||||
*/
|
||||
void handleDeviceTM(const uint8_t* data, size_t dataSize, DeviceCommandId_t replyId);
|
||||
void handleDeviceTm(const uint8_t* data, size_t dataSize, DeviceCommandId_t replyId);
|
||||
|
||||
/**
|
||||
* @brief In case an acknowledgment failure reply has been received this function disables
|
||||
@ -255,15 +296,11 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
*/
|
||||
void disableExeReportReply();
|
||||
|
||||
void printStatus(const uint8_t* data);
|
||||
|
||||
ReturnValue_t prepareTcModeReplay();
|
||||
|
||||
uint16_t getStatus(const uint8_t* data);
|
||||
void cmdDoneHandler(bool success, ReturnValue_t result);
|
||||
|
||||
void handleActionCommandFailure(ActionId_t actionId);
|
||||
|
||||
std::string getStatusString(uint16_t status);
|
||||
};
|
||||
|
||||
#endif /* BSP_Q7S_DEVICES_PLOC_PLOCMPSOCHANDLER_H_ */
|
||||
|
@ -1,355 +0,0 @@
|
||||
#include <linux/payload/PlocMpsocHelper.h>
|
||||
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
|
||||
#ifdef XIPHOS_Q7S
|
||||
#include "bsp_q7s/fs/FilesystemHelper.h"
|
||||
#endif
|
||||
|
||||
#include "mission/utility/Timestamp.h"
|
||||
|
||||
using namespace ploc;
|
||||
|
||||
PlocMPSoCHelper::PlocMPSoCHelper(object_id_t objectId) : SystemObject(objectId) {
|
||||
spParams.buf = commandBuffer;
|
||||
spParams.maxSize = sizeof(commandBuffer);
|
||||
}
|
||||
|
||||
PlocMPSoCHelper::~PlocMPSoCHelper() {}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::initialize() {
|
||||
#ifdef XIPHOS_Q7S
|
||||
sdcMan = SdCardManager::instance();
|
||||
if (sdcMan == nullptr) {
|
||||
sif::warning << "PlocMPSoCHelper::initialize: Invalid SD Card Manager" << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
#endif
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::performOperation(uint8_t operationCode) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
semaphore.acquire();
|
||||
while (true) {
|
||||
#if OBSW_THREAD_TRACING == 1
|
||||
trace::threadTrace(opCounter, "PLOC MPSOC Helper");
|
||||
#endif
|
||||
switch (internalState) {
|
||||
case InternalState::IDLE: {
|
||||
semaphore.acquire();
|
||||
break;
|
||||
}
|
||||
case InternalState::FLASH_WRITE: {
|
||||
result = performFlashWrite();
|
||||
if (result == returnvalue::OK) {
|
||||
triggerEvent(MPSOC_FLASH_WRITE_SUCCESSFUL);
|
||||
} else {
|
||||
triggerEvent(MPSOC_FLASH_WRITE_FAILED);
|
||||
}
|
||||
internalState = InternalState::IDLE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
sif::debug << "PlocMPSoCHelper::performOperation: Invalid state" << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::setComIF(DeviceCommunicationIF* communicationInterface_) {
|
||||
uartComIF = dynamic_cast<SerialComIF*>(communicationInterface_);
|
||||
if (uartComIF == nullptr) {
|
||||
sif::warning << "PlocMPSoCHelper::initialize: Invalid uart com if" << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void PlocMPSoCHelper::setComCookie(CookieIF* comCookie_) { comCookie = comCookie_; }
|
||||
|
||||
void PlocMPSoCHelper::setSequenceCount(SourceSequenceCounter* sequenceCount_) {
|
||||
sequenceCount = sequenceCount_;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::startFlashWrite(std::string obcFile, std::string mpsocFile) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
#ifdef XIPHOS_Q7S
|
||||
result = FilesystemHelper::checkPath(obcFile);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = FilesystemHelper::fileExists(mpsocFile);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
#ifdef TE0720_1CFA
|
||||
if (not std::filesystem::exists(obcFile)) {
|
||||
sif::warning << "PlocMPSoCHelper::startFlashWrite: File " << obcFile << "does not exist"
|
||||
<< std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
#endif
|
||||
|
||||
flashWrite.obcFile = obcFile;
|
||||
flashWrite.mpsocFile = mpsocFile;
|
||||
internalState = InternalState::FLASH_WRITE;
|
||||
result = resetHelper();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::resetHelper() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
semaphore.release();
|
||||
spParams.buf = commandBuffer;
|
||||
terminate = false;
|
||||
result = uartComIF->flushUartRxBuffer(comCookie);
|
||||
return result;
|
||||
}
|
||||
|
||||
void PlocMPSoCHelper::stopProcess() { terminate = true; }
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::performFlashWrite() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
result = flashfopen();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
uint8_t tempData[mpsoc::MAX_DATA_SIZE];
|
||||
std::ifstream file(flashWrite.obcFile, std::ifstream::binary);
|
||||
// Set position of next character to end of file input stream
|
||||
file.seekg(0, file.end);
|
||||
// tellg returns position of character in input stream
|
||||
size_t remainingSize = file.tellg();
|
||||
size_t dataLength = 0;
|
||||
size_t bytesRead = 0;
|
||||
while (remainingSize > 0) {
|
||||
if (terminate) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
if (remainingSize > mpsoc::MAX_DATA_SIZE) {
|
||||
dataLength = mpsoc::MAX_DATA_SIZE;
|
||||
} else {
|
||||
dataLength = remainingSize;
|
||||
}
|
||||
if (file.is_open()) {
|
||||
file.seekg(bytesRead, file.beg);
|
||||
file.read(reinterpret_cast<char*>(tempData), dataLength);
|
||||
bytesRead += dataLength;
|
||||
remainingSize -= dataLength;
|
||||
} else {
|
||||
return FILE_CLOSED_ACCIDENTALLY;
|
||||
}
|
||||
(*sequenceCount)++;
|
||||
mpsoc::TcFlashWrite tc(spParams, *sequenceCount);
|
||||
result = tc.buildPacket(tempData, dataLength);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = handlePacketTransmission(tc);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
result = flashfclose();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::flashfopen() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
spParams.buf = commandBuffer;
|
||||
(*sequenceCount)++;
|
||||
mpsoc::FlashFopen flashFopen(spParams, *sequenceCount);
|
||||
result = flashFopen.createPacket(flashWrite.mpsocFile, mpsoc::FlashFopen::APPEND);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = handlePacketTransmission(flashFopen);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::flashfclose() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
spParams.buf = commandBuffer;
|
||||
(*sequenceCount)++;
|
||||
mpsoc::FlashFclose flashFclose(spParams, *sequenceCount);
|
||||
result = flashFclose.createPacket(flashWrite.mpsocFile);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = handlePacketTransmission(flashFclose);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::handlePacketTransmission(ploc::SpTcBase& tc) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
result = sendCommand(tc);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = handleAck();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = handleExe();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::sendCommand(ploc::SpTcBase& tc) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
result = uartComIF->sendMessage(comCookie, tc.getFullPacket(), tc.getFullPacketLen());
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "PlocMPSoCHelper::sendCommand: Failed to send command" << std::endl;
|
||||
triggerEvent(MPSOC_SENDING_COMMAND_FAILED, result, static_cast<uint32_t>(internalState));
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::handleAck() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
result = handleTmReception(mpsoc::SIZE_ACK_REPORT);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
SpTmReader tmPacket(tmBuf.data(), tmBuf.size());
|
||||
result = checkReceivedTm(tmPacket);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
uint16_t apid = tmPacket.getApid();
|
||||
if (apid != mpsoc::apid::ACK_SUCCESS) {
|
||||
handleAckApidFailure(apid);
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void PlocMPSoCHelper::handleAckApidFailure(uint16_t apid) {
|
||||
if (apid == mpsoc::apid::ACK_FAILURE) {
|
||||
triggerEvent(MPSOC_ACK_FAILURE_REPORT, static_cast<uint32_t>(internalState));
|
||||
sif::warning << "PlocMPSoCHelper::handleAckApidFailure: Received acknowledgement failure "
|
||||
<< "report" << std::endl;
|
||||
} else {
|
||||
triggerEvent(MPSOC_ACK_INVALID_APID, apid, static_cast<uint32_t>(internalState));
|
||||
sif::warning << "PlocMPSoCHelper::handleAckApidFailure: Expected acknowledgement report "
|
||||
<< "but received space packet with apid " << std::hex << apid << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::handleExe() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
|
||||
result = handleTmReception(mpsoc::SIZE_EXE_REPORT);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
ploc::SpTmReader tmPacket(tmBuf.data(), tmBuf.size());
|
||||
result = checkReceivedTm(tmPacket);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
uint16_t apid = tmPacket.getApid();
|
||||
if (apid != mpsoc::apid::EXE_SUCCESS) {
|
||||
handleExeApidFailure(apid);
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void PlocMPSoCHelper::handleExeApidFailure(uint16_t apid) {
|
||||
if (apid == mpsoc::apid::EXE_FAILURE) {
|
||||
triggerEvent(MPSOC_EXE_FAILURE_REPORT, static_cast<uint32_t>(internalState));
|
||||
sif::warning << "PlocMPSoCHelper::handleExeApidFailure: Received execution failure "
|
||||
<< "report" << std::endl;
|
||||
} else {
|
||||
triggerEvent(MPSOC_EXE_INVALID_APID, apid, static_cast<uint32_t>(internalState));
|
||||
sif::warning << "PlocMPSoCHelper::handleExeApidFailure: Expected execution report "
|
||||
<< "but received space packet with apid " << std::hex << apid << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::handleTmReception(size_t remainingBytes) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
size_t readBytes = 0;
|
||||
size_t currentBytes = 0;
|
||||
for (int retries = 0; retries < RETRIES; retries++) {
|
||||
result = receive(tmBuf.data() + readBytes, ¤tBytes, remainingBytes);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
readBytes += currentBytes;
|
||||
remainingBytes = remainingBytes - currentBytes;
|
||||
if (remainingBytes == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (remainingBytes != 0) {
|
||||
sif::warning << "PlocMPSoCHelper::handleTmReception: Failed to receive reply" << std::endl;
|
||||
triggerEvent(MPSOC_MISSING_EXE, remainingBytes, static_cast<uint32_t>(internalState));
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::checkReceivedTm(SpTmReader& reader) {
|
||||
ReturnValue_t result = reader.checkSize();
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "PlocMPSoCHelper::handleTmReception: Size check on received TM failed"
|
||||
<< std::endl;
|
||||
triggerEvent(MPSOC_TM_SIZE_ERROR);
|
||||
return result;
|
||||
}
|
||||
reader.checkCrc();
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "PlocMPSoCHelper::handleTmReception: CRC check failed" << std::endl;
|
||||
triggerEvent(MPSOC_TM_CRC_MISSMATCH, *sequenceCount);
|
||||
return result;
|
||||
}
|
||||
(*sequenceCount)++;
|
||||
uint16_t recvSeqCnt = reader.getSequenceCount();
|
||||
if (recvSeqCnt != *sequenceCount) {
|
||||
triggerEvent(MPSOC_HELPER_SEQ_CNT_MISMATCH, *sequenceCount, recvSeqCnt);
|
||||
*sequenceCount = recvSeqCnt;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHelper::receive(uint8_t* data, size_t* readBytes, size_t requestBytes) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
uint8_t* buffer = nullptr;
|
||||
result = uartComIF->requestReceiveMessage(comCookie, requestBytes);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "PlocMPSoCHelper::receive: Failed to request reply" << std::endl;
|
||||
triggerEvent(MPSOC_HELPER_REQUESTING_REPLY_FAILED, result,
|
||||
static_cast<uint32_t>(static_cast<uint32_t>(internalState)));
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
result = uartComIF->readReceivedMessage(comCookie, &buffer, readBytes);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "PlocMPSoCHelper::receive: Failed to read received message" << std::endl;
|
||||
triggerEvent(MPSOC_HELPER_READING_REPLY_FAILED, result, static_cast<uint32_t>(internalState));
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
if (*readBytes > 0) {
|
||||
std::memcpy(data, buffer, *readBytes);
|
||||
}
|
||||
return result;
|
||||
}
|
544
linux/payload/PlocMpsocSpecialComHelper.cpp
Normal file
544
linux/payload/PlocMpsocSpecialComHelper.cpp
Normal file
@ -0,0 +1,544 @@
|
||||
#include <fsfw/globalfunctions/arrayprinter.h>
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
#include <linux/payload/PlocMpsocSpecialComHelper.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
|
||||
#ifdef XIPHOS_Q7S
|
||||
#include "bsp_q7s/fs/FilesystemHelper.h"
|
||||
#endif
|
||||
|
||||
#include "mission/utility/Timestamp.h"
|
||||
|
||||
using namespace ploc;
|
||||
|
||||
PlocMpsocSpecialComHelper::PlocMpsocSpecialComHelper(object_id_t objectId)
|
||||
: SystemObject(objectId) {
|
||||
spParams.buf = commandBuffer;
|
||||
spParams.maxSize = sizeof(commandBuffer);
|
||||
}
|
||||
|
||||
PlocMpsocSpecialComHelper::~PlocMpsocSpecialComHelper() {}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::initialize() {
|
||||
#ifdef XIPHOS_Q7S
|
||||
sdcMan = SdCardManager::instance();
|
||||
if (sdcMan == nullptr) {
|
||||
sif::warning << "PlocMPSoCHelper::initialize: Invalid SD Card Manager" << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
#endif
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::performOperation(uint8_t operationCode) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
semaphore.acquire();
|
||||
while (true) {
|
||||
#if OBSW_THREAD_TRACING == 1
|
||||
trace::threadTrace(opCounter, "PLOC MPSOC Helper");
|
||||
#endif
|
||||
switch (internalState) {
|
||||
case InternalState::IDLE: {
|
||||
semaphore.acquire();
|
||||
break;
|
||||
}
|
||||
case InternalState::FLASH_WRITE: {
|
||||
result = performFlashWrite();
|
||||
if (result == returnvalue::OK) {
|
||||
triggerEvent(MPSOC_FLASH_WRITE_SUCCESSFUL, sequenceCount->get());
|
||||
} else {
|
||||
triggerEvent(MPSOC_FLASH_WRITE_FAILED, sequenceCount->get());
|
||||
}
|
||||
internalState = InternalState::IDLE;
|
||||
break;
|
||||
}
|
||||
case InternalState::FLASH_READ: {
|
||||
result = performFlashRead();
|
||||
if (result == returnvalue::OK) {
|
||||
triggerEvent(MPSOC_FLASH_READ_SUCCESSFUL, sequenceCount->get());
|
||||
} else {
|
||||
triggerEvent(MPSOC_FLASH_READ_FAILED, sequenceCount->get());
|
||||
}
|
||||
internalState = InternalState::IDLE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
sif::debug << "PlocMPSoCHelper::performOperation: Invalid state" << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::setComIF(DeviceCommunicationIF* communicationInterface_) {
|
||||
uartComIF = dynamic_cast<SerialComIF*>(communicationInterface_);
|
||||
if (uartComIF == nullptr) {
|
||||
sif::warning << "PlocMPSoCHelper::initialize: Invalid uart com if" << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void PlocMpsocSpecialComHelper::setComCookie(CookieIF* comCookie_) { comCookie = comCookie_; }
|
||||
|
||||
void PlocMpsocSpecialComHelper::setSequenceCount(SourceSequenceCounter* sequenceCount_) {
|
||||
sequenceCount = sequenceCount_;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::startFlashWrite(std::string obcFile,
|
||||
std::string mpsocFile) {
|
||||
if (internalState != InternalState::IDLE) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
ReturnValue_t result = startFlashReadOrWriteBase(std::move(obcFile), std::move(mpsocFile));
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
internalState = InternalState::FLASH_WRITE;
|
||||
return semaphore.release();
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::startFlashRead(std::string obcFile, std::string mpsocFile,
|
||||
size_t readFileSize) {
|
||||
if (internalState != InternalState::IDLE) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
ReturnValue_t result = startFlashReadOrWriteBase(std::move(obcFile), std::move(mpsocFile));
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
flashReadAndWrite.totalReadSize = readFileSize;
|
||||
internalState = InternalState::FLASH_READ;
|
||||
return semaphore.release();
|
||||
}
|
||||
|
||||
void PlocMpsocSpecialComHelper::resetHelper() {
|
||||
spParams.buf = commandBuffer;
|
||||
terminate = false;
|
||||
uartComIF->flushUartRxBuffer(comCookie);
|
||||
}
|
||||
|
||||
void PlocMpsocSpecialComHelper::stopProcess() { terminate = true; }
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::performFlashWrite() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
std::ifstream file(flashReadAndWrite.obcFile, std::ifstream::binary);
|
||||
if (file.bad()) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
result = flashfopen(mpsoc::FileAccessModes::WRITE | mpsoc::FileAccessModes::OPEN_ALWAYS);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
// Set position of next character to end of file input stream
|
||||
file.seekg(0, file.end);
|
||||
// tellg returns position of character in input stream
|
||||
size_t remainingSize = file.tellg();
|
||||
size_t dataLength = 0;
|
||||
size_t bytesRead = 0;
|
||||
while (remainingSize > 0) {
|
||||
if (terminate) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
// The minus 4 is necessary for unknown reasons. Maybe some bug in the ILH software?
|
||||
if (remainingSize > mpsoc::MAX_FLASH_WRITE_DATA_SIZE - 4) {
|
||||
dataLength = mpsoc::MAX_FLASH_WRITE_DATA_SIZE - 4;
|
||||
} else {
|
||||
dataLength = remainingSize;
|
||||
}
|
||||
if (file.bad() or not file.is_open()) {
|
||||
return FILE_WRITE_ERROR;
|
||||
}
|
||||
file.seekg(bytesRead, file.beg);
|
||||
file.read(reinterpret_cast<char*>(fileBuf.data()), dataLength);
|
||||
bytesRead += dataLength;
|
||||
remainingSize -= dataLength;
|
||||
mpsoc::TcFlashWrite tc(spParams, *sequenceCount);
|
||||
result = tc.setPayload(fileBuf.data(), dataLength);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = tc.finishPacket();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
(*sequenceCount)++;
|
||||
result = handlePacketTransmissionNoReply(tc);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
result = flashfclose();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
|
||||
std::error_code e;
|
||||
std::ofstream ofile(flashReadAndWrite.obcFile, std::ios::trunc | std::ios::binary);
|
||||
if (ofile.bad()) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
ReturnValue_t result = flashfopen(mpsoc::FileAccessModes::READ);
|
||||
if (result != returnvalue::OK) {
|
||||
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
||||
return result;
|
||||
}
|
||||
size_t readSoFar = 0;
|
||||
size_t nextReadSize = mpsoc::MAX_FLASH_READ_DATA_SIZE;
|
||||
while (readSoFar < flashReadAndWrite.totalReadSize) {
|
||||
if (terminate) {
|
||||
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
||||
return returnvalue::OK;
|
||||
}
|
||||
nextReadSize = mpsoc::MAX_FLASH_READ_DATA_SIZE;
|
||||
if (flashReadAndWrite.totalReadSize - readSoFar < mpsoc::MAX_FLASH_READ_DATA_SIZE) {
|
||||
nextReadSize = flashReadAndWrite.totalReadSize - readSoFar;
|
||||
}
|
||||
if (ofile.bad() or not ofile.is_open()) {
|
||||
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
||||
return FILE_READ_ERROR;
|
||||
}
|
||||
mpsoc::TcFlashRead flashReadRequest(spParams, *sequenceCount);
|
||||
result = flashReadRequest.setPayload(nextReadSize);
|
||||
if (result != returnvalue::OK) {
|
||||
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
||||
return result;
|
||||
}
|
||||
result = flashReadRequest.finishPacket();
|
||||
if (result != returnvalue::OK) {
|
||||
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
||||
return result;
|
||||
}
|
||||
(*sequenceCount)++;
|
||||
result = handlePacketTransmissionFlashRead(flashReadRequest, ofile, nextReadSize);
|
||||
if (result != returnvalue::OK) {
|
||||
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
||||
return result;
|
||||
}
|
||||
readSoFar += nextReadSize;
|
||||
}
|
||||
result = flashfclose();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::flashfopen(uint8_t mode) {
|
||||
spParams.buf = commandBuffer;
|
||||
mpsoc::FlashFopen flashFopen(spParams, *sequenceCount);
|
||||
ReturnValue_t result = flashFopen.setPayload(flashReadAndWrite.mpsocFile, mode);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = flashFopen.finishPacket();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
(*sequenceCount)++;
|
||||
result = handlePacketTransmissionNoReply(flashFopen);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::flashfclose() {
|
||||
spParams.buf = commandBuffer;
|
||||
mpsoc::FlashFclose flashFclose(spParams, *sequenceCount);
|
||||
ReturnValue_t result = flashFclose.finishPacket();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
(*sequenceCount)++;
|
||||
result = handlePacketTransmissionNoReply(flashFclose);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::handlePacketTransmissionFlashRead(mpsoc::TcFlashRead& tc,
|
||||
std::ofstream& ofile,
|
||||
size_t expectedReadLen) {
|
||||
ReturnValue_t result = sendCommand(tc);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = handleAck();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = handleTmReception();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// We have the nominal case where the flash read report appears first, or the case where we
|
||||
// get an EXE failure immediately.
|
||||
if (spReader.getApid() == mpsoc::apid::TM_FLASH_READ_REPORT) {
|
||||
result = handleFlashReadReply(ofile, expectedReadLen);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return handleExe();
|
||||
} else if (spReader.getApid() == mpsoc::apid::EXE_FAILURE) {
|
||||
handleExeFailure();
|
||||
} else {
|
||||
triggerEvent(MPSOC_EXE_INVALID_APID, spReader.getApid(), static_cast<uint32_t>(internalState));
|
||||
sif::warning << "PLOC MPSoC: Expected execution report "
|
||||
<< "but received space packet with apid " << std::hex << spReader.getApid()
|
||||
<< std::endl;
|
||||
}
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::handlePacketTransmissionNoReply(ploc::SpTcBase& tc) {
|
||||
ReturnValue_t result = sendCommand(tc);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = handleAck();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return handleExe();
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::sendCommand(ploc::SpTcBase& tc) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
result = uartComIF->sendMessage(comCookie, tc.getFullPacket(), tc.getFullPacketLen());
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "PlocMPSoCHelper::sendCommand: Failed to send command" << std::endl;
|
||||
triggerEvent(MPSOC_SENDING_COMMAND_FAILED, result, static_cast<uint32_t>(internalState));
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::handleAck() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
result = handleTmReception();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = checkReceivedTm();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
uint16_t apid = spReader.getApid();
|
||||
if (apid != mpsoc::apid::ACK_SUCCESS) {
|
||||
handleAckApidFailure(spReader);
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void PlocMpsocSpecialComHelper::handleAckApidFailure(const ploc::SpTmReader& reader) {
|
||||
uint16_t apid = reader.getApid();
|
||||
if (apid == mpsoc::apid::ACK_FAILURE) {
|
||||
uint16_t status = mpsoc::getStatusFromRawData(reader.getFullData());
|
||||
sif::warning << "PLOC MPSoC ACK Failure: " << mpsoc::getStatusString(status) << std::endl;
|
||||
triggerEvent(MPSOC_ACK_FAILURE_REPORT, static_cast<uint32_t>(internalState), status);
|
||||
} else {
|
||||
triggerEvent(MPSOC_ACK_INVALID_APID, apid, static_cast<uint32_t>(internalState));
|
||||
sif::warning << "PlocMPSoCHelper::handleAckApidFailure: Expected acknowledgement report "
|
||||
<< "but received space packet with apid " << std::hex << apid << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::handleExe() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
|
||||
result = handleTmReception();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = checkReceivedTm();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
uint16_t apid = spReader.getApid();
|
||||
if (apid == mpsoc::apid::EXE_FAILURE) {
|
||||
handleExeFailure();
|
||||
return returnvalue::FAILED;
|
||||
} else if (apid != mpsoc::apid::EXE_SUCCESS) {
|
||||
triggerEvent(MPSOC_EXE_INVALID_APID, apid, static_cast<uint32_t>(internalState));
|
||||
sif::warning << "PLOC MPSoC: Expected execution report "
|
||||
<< "but received space packet with apid " << std::hex << apid << std::endl;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void PlocMpsocSpecialComHelper::handleExeFailure() {
|
||||
uint16_t status = mpsoc::getStatusFromRawData(spReader.getFullData());
|
||||
sif::warning << "PLOC MPSoC EXE Failure: " << mpsoc::getStatusString(status) << std::endl;
|
||||
triggerEvent(MPSOC_EXE_FAILURE_REPORT, static_cast<uint32_t>(internalState));
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::handleTmReception() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
tmCountdown.resetTimer();
|
||||
size_t readBytes = 0;
|
||||
size_t currentBytes = 0;
|
||||
uint32_t usleepDelay = 5;
|
||||
size_t fullPacketLen = 0;
|
||||
while (true) {
|
||||
if (tmCountdown.hasTimedOut()) {
|
||||
triggerEvent(MPSOC_READ_TIMEOUT, tmCountdown.getTimeoutMs());
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
result = receive(tmBuf.data() + readBytes, 6, ¤tBytes);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
spReader.setReadOnlyData(tmBuf.data(), tmBuf.size());
|
||||
fullPacketLen = spReader.getFullPacketLen();
|
||||
readBytes += currentBytes;
|
||||
if (readBytes == 6) {
|
||||
break;
|
||||
}
|
||||
usleep(usleepDelay);
|
||||
if (usleepDelay < 200000) {
|
||||
usleepDelay *= 4;
|
||||
}
|
||||
}
|
||||
while (true) {
|
||||
if (tmCountdown.hasTimedOut()) {
|
||||
triggerEvent(MPSOC_READ_TIMEOUT, tmCountdown.getTimeoutMs());
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
result = receive(tmBuf.data() + readBytes, fullPacketLen - readBytes, ¤tBytes);
|
||||
readBytes += currentBytes;
|
||||
if (fullPacketLen == readBytes) {
|
||||
break;
|
||||
}
|
||||
usleep(usleepDelay);
|
||||
if (usleepDelay < 200000) {
|
||||
usleepDelay *= 4;
|
||||
}
|
||||
}
|
||||
// arrayprinter::print(tmBuf.data(), readBytes);
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::handleFlashReadReply(std::ofstream& ofile,
|
||||
size_t expectedReadLen) {
|
||||
ReturnValue_t result = checkReceivedTm();
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
uint16_t apid = spReader.getApid();
|
||||
if (apid != mpsoc::apid::TM_FLASH_READ_REPORT) {
|
||||
triggerEvent(MPSOC_FLASH_READ_PACKET_ERROR, FlashReadErrorType::FLASH_READ_APID_ERROR);
|
||||
sif::warning << "PLOC MPSoC Flash Read: Unexpected APID" << std::endl;
|
||||
return result;
|
||||
}
|
||||
const uint8_t* packetData = spReader.getPacketData();
|
||||
size_t deserDummy = spReader.getPacketDataLen() - mpsoc::CRC_SIZE;
|
||||
uint32_t receivedReadLen = 0;
|
||||
// I think this is buggy, weird stuff in the short name field.
|
||||
// std::string receivedShortName = std::string(reinterpret_cast<const char*>(packetData), 12);
|
||||
// if (receivedShortName != flashReadAndWrite.mpsocFile.substr(0, 11)) {
|
||||
// sif::warning << "PLOC MPSoC Flash Read: Missmatch between request file name and "
|
||||
// "received file name"
|
||||
// << std::endl;
|
||||
// triggerEvent(MPSOC_FLASH_READ_PACKET_ERROR, FlashReadErrorType::FLASH_READ_FILENAME_ERROR);
|
||||
// return returnvalue::FAILED;
|
||||
// }
|
||||
packetData += 12;
|
||||
result = SerializeAdapter::deSerialize(&receivedReadLen, &packetData, &deserDummy,
|
||||
SerializeIF::Endianness::NETWORK);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
if (receivedReadLen != expectedReadLen) {
|
||||
sif::warning << "PLOC MPSoC Flash Read: Missmatch between request read length and "
|
||||
"received read length"
|
||||
<< std::endl;
|
||||
triggerEvent(MPSOC_FLASH_READ_PACKET_ERROR, FlashReadErrorType::FLASH_READ_READLEN_ERROR);
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
ofile.write(reinterpret_cast<const char*>(packetData), receivedReadLen);
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::fileCheck(std::string obcFile) {
|
||||
#ifdef XIPHOS_Q7S
|
||||
ReturnValue_t result = FilesystemHelper::checkPath(obcFile);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
#elif defined(TE0720_1CFA)
|
||||
if (not std::filesystem::exists(obcFile)) {
|
||||
sif::warning << "PlocMPSoCHelper::startFlashWrite: File " << obcFile << "does not exist"
|
||||
<< std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
#endif
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::startFlashReadOrWriteBase(std::string obcFile,
|
||||
std::string mpsocFile) {
|
||||
ReturnValue_t result = fileCheck(obcFile);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
flashReadAndWrite.obcFile = std::move(obcFile);
|
||||
flashReadAndWrite.mpsocFile = std::move(mpsocFile);
|
||||
resetHelper();
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::checkReceivedTm() {
|
||||
ReturnValue_t result = spReader.checkSize();
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "PLOC MPSoC: Size check on received TM failed" << std::endl;
|
||||
triggerEvent(MPSOC_TM_SIZE_ERROR);
|
||||
return result;
|
||||
}
|
||||
spReader.checkCrc();
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "PLOC MPSoC: CRC check failed" << std::endl;
|
||||
triggerEvent(MPSOC_TM_CRC_MISSMATCH, *sequenceCount);
|
||||
return result;
|
||||
}
|
||||
uint16_t recvSeqCnt = spReader.getSequenceCount();
|
||||
if (recvSeqCnt != *sequenceCount) {
|
||||
triggerEvent(MPSOC_HELPER_SEQ_CNT_MISMATCH, *sequenceCount, recvSeqCnt);
|
||||
*sequenceCount = recvSeqCnt;
|
||||
}
|
||||
// This sequence count ping pong does not make any sense but it is how the MPSoC expects it.
|
||||
(*sequenceCount)++;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::receive(uint8_t* data, size_t requestBytes,
|
||||
size_t* readBytes) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
uint8_t* buffer = nullptr;
|
||||
result = uartComIF->requestReceiveMessage(comCookie, requestBytes);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "PlocMPSoCHelper::receive: Failed to request reply" << std::endl;
|
||||
triggerEvent(MPSOC_HELPER_REQUESTING_REPLY_FAILED, result,
|
||||
static_cast<uint32_t>(static_cast<uint32_t>(internalState)));
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
result = uartComIF->readReceivedMessage(comCookie, &buffer, readBytes);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "PlocMPSoCHelper::receive: Failed to read received message" << std::endl;
|
||||
triggerEvent(MPSOC_HELPER_READING_REPLY_FAILED, result, static_cast<uint32_t>(internalState));
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
if (*readBytes > 0) {
|
||||
std::memcpy(data, buffer, *readBytes);
|
||||
}
|
||||
return result;
|
||||
}
|
@ -1,11 +1,12 @@
|
||||
#ifndef BSP_Q7S_DEVICES_PLOCMPSOCHELPER_H_
|
||||
#define BSP_Q7S_DEVICES_PLOCMPSOCHELPER_H_
|
||||
|
||||
#include <linux/payload/plocMpscoDefs.h>
|
||||
#include <linux/payload/plocMpsocHelpers.h>
|
||||
#include <mission/utility/trace.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "fsfw/devicehandlers/CookieIF.h"
|
||||
#include "fsfw/objectmanager/SystemObject.h"
|
||||
#include "fsfw/osal/linux/BinarySemaphore.h"
|
||||
@ -22,14 +23,14 @@
|
||||
* MPSoC and OBC.
|
||||
* @author J. Meier
|
||||
*/
|
||||
class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF {
|
||||
class PlocMpsocSpecialComHelper : public SystemObject, public ExecutableObjectIF {
|
||||
public:
|
||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_MPSOC_HELPER;
|
||||
|
||||
//! [EXPORT] : [COMMENT] Flash write fails
|
||||
static const Event MPSOC_FLASH_WRITE_FAILED = MAKE_EVENT(0, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] Flash write successful
|
||||
static const Event MPSOC_FLASH_WRITE_SUCCESSFUL = MAKE_EVENT(1, severity::LOW);
|
||||
static const Event MPSOC_FLASH_WRITE_SUCCESSFUL = MAKE_EVENT(1, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] Communication interface returned failure when trying to send the command
|
||||
//! to the MPSoC
|
||||
//! P1: Return value returned by the communication interface sendMessage function
|
||||
@ -71,9 +72,19 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF {
|
||||
static const Event MPSOC_HELPER_SEQ_CNT_MISMATCH = MAKE_EVENT(11, severity::LOW);
|
||||
static const Event MPSOC_TM_SIZE_ERROR = MAKE_EVENT(12, severity::LOW);
|
||||
static const Event MPSOC_TM_CRC_MISSMATCH = MAKE_EVENT(13, severity::LOW);
|
||||
static const Event MPSOC_FLASH_READ_PACKET_ERROR = MAKE_EVENT(14, severity::LOW);
|
||||
static const Event MPSOC_FLASH_READ_FAILED = MAKE_EVENT(15, severity::LOW);
|
||||
static const Event MPSOC_FLASH_READ_SUCCESSFUL = MAKE_EVENT(16, severity::INFO);
|
||||
static const Event MPSOC_READ_TIMEOUT = MAKE_EVENT(17, severity::LOW);
|
||||
|
||||
PlocMPSoCHelper(object_id_t objectId);
|
||||
virtual ~PlocMPSoCHelper();
|
||||
enum FlashReadErrorType : uint32_t {
|
||||
FLASH_READ_APID_ERROR = 0,
|
||||
FLASH_READ_FILENAME_ERROR = 1,
|
||||
FLASH_READ_READLEN_ERROR = 2
|
||||
};
|
||||
|
||||
PlocMpsocSpecialComHelper(object_id_t objectId);
|
||||
virtual ~PlocMpsocSpecialComHelper();
|
||||
|
||||
ReturnValue_t initialize() override;
|
||||
ReturnValue_t performOperation(uint8_t operationCode = 0) override;
|
||||
@ -90,6 +101,14 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF {
|
||||
* @return returnvalue::OK if successful, otherwise error return value
|
||||
*/
|
||||
ReturnValue_t startFlashWrite(std::string obcFile, std::string mpsocFile);
|
||||
/**
|
||||
*
|
||||
* @param obcFile Full target file name on OBC
|
||||
* @param mpsocFile The file on the MPSoC which should be copied ot the OBC
|
||||
* @param readFileSize The size of the file on the MPSoC.
|
||||
* @return
|
||||
*/
|
||||
ReturnValue_t startFlashRead(std::string obcFile, std::string mpsocFile, size_t readFileSize);
|
||||
|
||||
/**
|
||||
* @brief Can be used to interrupt a running data transfer.
|
||||
@ -104,20 +123,25 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF {
|
||||
private:
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_MPSOC_HELPER;
|
||||
|
||||
//! [EXPORT] : [COMMENT] File accidentally close
|
||||
static const ReturnValue_t FILE_CLOSED_ACCIDENTALLY = MAKE_RETURN_CODE(0xA0);
|
||||
//! [EXPORT] : [COMMENT] File error occured for file transfers from OBC to the MPSoC.
|
||||
static const ReturnValue_t FILE_WRITE_ERROR = MAKE_RETURN_CODE(0xA0);
|
||||
//! [EXPORT] : [COMMENT] File error occured for file transfers from MPSoC to OBC.
|
||||
static const ReturnValue_t FILE_READ_ERROR = MAKE_RETURN_CODE(0xA1);
|
||||
|
||||
// Maximum number of times the communication interface retries polling data from the reply
|
||||
// buffer
|
||||
static const int RETRIES = 10000;
|
||||
|
||||
struct FlashWrite {
|
||||
struct FlashInfo {
|
||||
std::string obcFile;
|
||||
std::string mpsocFile;
|
||||
};
|
||||
|
||||
struct FlashWrite flashWrite;
|
||||
struct FlashRead : public FlashInfo {
|
||||
size_t totalReadSize = 0;
|
||||
};
|
||||
|
||||
struct FlashRead flashReadAndWrite;
|
||||
#if OBSW_THREAD_TRACING == 1
|
||||
uint32_t opCounter = 0;
|
||||
#endif
|
||||
@ -134,7 +158,10 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF {
|
||||
SpacePacketCreator creator;
|
||||
ploc::SpTcParams spParams = ploc::SpTcParams(creator);
|
||||
|
||||
std::array<uint8_t, mpsoc::MAX_REPLY_SIZE> tmBuf;
|
||||
Countdown tmCountdown = Countdown(5000);
|
||||
|
||||
std::array<uint8_t, mpsoc::SP_MAX_DATA_SIZE> fileBuf{};
|
||||
std::array<uint8_t, mpsoc::MAX_REPLY_SIZE> tmBuf{};
|
||||
|
||||
bool terminate = false;
|
||||
|
||||
@ -147,20 +174,27 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF {
|
||||
CookieIF* comCookie = nullptr;
|
||||
// Sequence count, must be set by Ploc MPSoC Handler
|
||||
SourceSequenceCounter* sequenceCount = nullptr;
|
||||
ploc::SpTmReader spReader;
|
||||
|
||||
ReturnValue_t resetHelper();
|
||||
void resetHelper();
|
||||
ReturnValue_t performFlashWrite();
|
||||
ReturnValue_t flashfopen();
|
||||
ReturnValue_t performFlashRead();
|
||||
ReturnValue_t flashfopen(uint8_t accessMode);
|
||||
ReturnValue_t flashfclose();
|
||||
ReturnValue_t handlePacketTransmission(ploc::SpTcBase& tc);
|
||||
ReturnValue_t handlePacketTransmissionNoReply(ploc::SpTcBase& tc);
|
||||
ReturnValue_t handlePacketTransmissionFlashRead(mpsoc::TcFlashRead& tc, std::ofstream& ofile,
|
||||
size_t expectedReadLen);
|
||||
ReturnValue_t handleFlashReadReply(std::ofstream& ofile, size_t expectedReadLen);
|
||||
ReturnValue_t sendCommand(ploc::SpTcBase& tc);
|
||||
ReturnValue_t receive(uint8_t* data, size_t* readBytes, size_t requestBytes);
|
||||
ReturnValue_t receive(uint8_t* data, size_t requestBytes, size_t* readBytes);
|
||||
ReturnValue_t handleAck();
|
||||
ReturnValue_t handleExe();
|
||||
void handleAckApidFailure(uint16_t apid);
|
||||
void handleExeApidFailure(uint16_t apid);
|
||||
ReturnValue_t handleTmReception(size_t remainingBytes);
|
||||
ReturnValue_t checkReceivedTm(ploc::SpTmReader& reader);
|
||||
ReturnValue_t startFlashReadOrWriteBase(std::string obcFile, std::string mpsocFile);
|
||||
ReturnValue_t fileCheck(std::string obcFile);
|
||||
void handleAckApidFailure(const ploc::SpTmReader& reader);
|
||||
void handleExeFailure();
|
||||
ReturnValue_t handleTmReception();
|
||||
ReturnValue_t checkReceivedTm();
|
||||
};
|
||||
|
||||
#endif /* BSP_Q7S_DEVICES_PLOCMPSOCHELPER_H_ */
|
@ -151,7 +151,7 @@ void PlocSupervisorHandler::doStartUp() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (startupState == StartupState::SET_TIME_EXECUTING) {
|
||||
if (startupState == StartupState::TIME_WAS_SET) {
|
||||
startupState = StartupState::ON;
|
||||
}
|
||||
if (startupState == StartupState::ON) {
|
||||
@ -176,7 +176,7 @@ ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand(DeviceCommandId_t*
|
||||
ReturnValue_t PlocSupervisorHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
|
||||
if (startupState == StartupState::SET_TIME) {
|
||||
*id = supv::SET_TIME_REF;
|
||||
startupState = StartupState::SET_TIME_EXECUTING;
|
||||
startupState = StartupState::WAIT_FOR_TIME_REPLY;
|
||||
return buildCommandFromCommand(*id, nullptr, 0);
|
||||
}
|
||||
return NOTHING_TO_SEND;
|
||||
@ -1909,6 +1909,10 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionSuccessReport(ExecutionRepor
|
||||
case supv::SET_TIME_REF: {
|
||||
// We could only allow proper bootup when the time was set successfully, but
|
||||
// this makes debugging difficult.
|
||||
|
||||
if (startupState == StartupState::WAIT_FOR_TIME_REPLY) {
|
||||
startupState = StartupState::TIME_WAS_SET;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -99,7 +99,14 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
||||
static const uint32_t MRAM_DUMP_TIMEOUT = 60000;
|
||||
// 4 s
|
||||
static const uint32_t BOOT_TIMEOUT = 4000;
|
||||
enum class StartupState : uint8_t { OFF, BOOTING, SET_TIME, SET_TIME_EXECUTING, ON };
|
||||
enum class StartupState : uint8_t {
|
||||
OFF,
|
||||
BOOTING,
|
||||
SET_TIME,
|
||||
WAIT_FOR_TIME_REPLY,
|
||||
TIME_WAS_SET,
|
||||
ON
|
||||
};
|
||||
|
||||
static constexpr bool SET_TIME_DURING_BOOT = true;
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
class ScexHelper : public SerializeIF {
|
||||
public:
|
||||
//! [EXPORT] : [SKIP]
|
||||
static const ReturnValue_t INVALID_CRC = returnvalue::makeCode(0, 2);
|
||||
|
||||
ScexHelper();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user