Compare commits
1916 Commits
Author | SHA1 | Date | |
---|---|---|---|
087db386d7 | |||
2f5f47a02c | |||
8821cc1079 | |||
14cea6369a | |||
0a37db617b | |||
101117cebe | |||
4863dad1cd | |||
c6289e27ae | |||
6538005a30 | |||
fa5883bdf3 | |||
b261a4ecfa | |||
a6dfe02128 | |||
bcd31c9248 | |||
bf73f2ff04 | |||
b2a8c5d7ec | |||
2dd97a55f8 | |||
ccf03b131b | |||
c48268ffa9 | |||
97a78fc4c9 | |||
0bdc6d3d7c | |||
66583e8009 | |||
c0f01a75e4 | |||
6a15aa14a2 | |||
11e9d71775 | |||
d30bab7bc0 | |||
a366ef0960 | |||
930f7a5233 | |||
68f4323d14 | |||
01e97c8381 | |||
1b73e7de7d | |||
8759f86889 | |||
a2d5138c71 | |||
f5c4e2b788 | |||
af1c18e8cf | |||
c562c4a240 | |||
45e1e7250b | |||
70e2a3f5f8 | |||
e6a5847e9c | |||
72ae6aee94 | |||
25e5f8d2a4 | |||
0f25f95307 | |||
af5d4e12c5 | |||
fd62efcae2 | |||
1b00029202 | |||
72174c76cd | |||
7476f33905 | |||
e48d080673 | |||
888ade0bfb | |||
a2fd590280 | |||
23c9e8eed7 | |||
1f8f62457d | |||
cb43688f38 | |||
f84e7e42d6 | |||
51317782c3 | |||
97bb255d53 | |||
97888953ec | |||
112cfa3ee7 | |||
5de7653600 | |||
bf7e4b4b8c | |||
e3389c32a7 | |||
58db0d7184 | |||
5218202824 | |||
c169229107 | |||
d2daa89d89 | |||
ca7fbcf6a9 | |||
db2905c834 | |||
2ccd2a832c | |||
892d2f5939 | |||
cee56f6d02 | |||
3016683db3 | |||
f66777a23c | |||
e38b39b3b2 | |||
4e9646fe10 | |||
ca6556c000 | |||
6aae94823e | |||
0dc26ec8b2 | |||
3b5ecb43cc | |||
e7a1c9f402 | |||
ff9a5fc1bf | |||
2fcba4028c | |||
85d0ac92da | |||
b3a14e9a9b | |||
bf61724374 | |||
8c9424f02b | |||
350b892bb7 | |||
586f04e488 | |||
1f7ab7c2ce | |||
9d8991491a | |||
b64cc8f404 | |||
acae88c67c | |||
4fa5aa6b84 | |||
b48a6e2318 | |||
193ed01bce | |||
d18a0e98a5 | |||
6e10ccd2d6 | |||
3b61697615 | |||
f82cc2aeda | |||
0b2aff56e5 | |||
7f141aa1e8 | |||
c8d09debf7 | |||
1938addaa8 | |||
e6b5ee65f3 | |||
4d6ccaeb4b | |||
3003a4c4d1 | |||
f96fbf707d | |||
80115640ba | |||
4c1b79fd66 | |||
c8a2395d61 | |||
f6f3f17505 | |||
300f3230d1 | |||
c71a1a29f3 | |||
cfbc53792d | |||
5b5489c8da | |||
773e1c9ecc | |||
f041655378 | |||
206c29bb25 | |||
e8da0885eb | |||
f209ac6b2d | |||
b20266f153 | |||
e6b0b4048c | |||
982db82ddb | |||
0d175951ec | |||
3b383b98df | |||
41f1eaec44 | |||
05be170890 | |||
1e4766ddfc | |||
8720dacb7f | |||
39bf9f9b5b | |||
2165f34a28 | |||
70e1d41a08 | |||
3b0490835c | |||
6c7d1e674c | |||
cc3bcdfaeb | |||
26f9c499d8 | |||
59e165be4f | |||
53133573e1 | |||
7a7f25a638 | |||
ec2ec32af4 | |||
fcba76b7f1 | |||
60afb573a0 | |||
ff50203fbb | |||
da72b3a96a | |||
1cf3fbaabe | |||
245b5dfcc6 | |||
04e3d2486d | |||
c4ef164f41 | |||
39bb90eb61 | |||
7a4a42c692 | |||
21ed43614e | |||
7288a5edbd | |||
d55daebabf | |||
ca22904d32 | |||
4ec362d849 | |||
00834de1b7 | |||
3ade660132 | |||
3e2338f3a4 | |||
79d27ff9e3 | |||
d13e593f89 | |||
35caddbfc4 | |||
196aca241e | |||
6530ad8f1a | |||
34807c94ba | |||
0919acf2d5 | |||
69ea16c36d | |||
e2cb88da0e | |||
f2ffb12219 | |||
25dfb54be0 | |||
f43a93842e | |||
ad4ab98356 | |||
7b571bc007 | |||
dfb1e88f55 | |||
7b539e2fa5 | |||
4b37a19644 | |||
718a440442 | |||
7e33ec16e4 | |||
26d8e852dc | |||
0fc17624f3 | |||
74ffbf1dcd | |||
b5049fa8d0 | |||
652326443b | |||
d4b7c6493a | |||
4aa6ed4de4 | |||
9067c4180e | |||
0056ebcb62 | |||
a2485a2195 | |||
eaa0fc6cbe | |||
14188a4f3b | |||
eee92baa6e | |||
6104bf7adb | |||
e52c909580 | |||
5f17b1f6e8 | |||
90175e5c9d | |||
7a8816e49a | |||
c4cd6332f8 | |||
8ff70462cb | |||
2e9de68e17 | |||
8ad1daa11f | |||
4a820fba55 | |||
d045498761 | |||
0a7eb6f6bc | |||
3784cf688f | |||
f646566228 | |||
58527dacf6 | |||
03cf5891b0 | |||
1b79bfc02a | |||
3c6c990b8f | |||
1252897a1c | |||
22b2f137b4 | |||
c347b6d1d4 | |||
24b939c50b | |||
ef5bc9731d | |||
67128b398c | |||
c251d93305 | |||
26aeb88d84 | |||
11f476878d | |||
db90c59557 | |||
543568be39 | |||
a8e886200f | |||
0fabe3adb6 | |||
f2598b5c4c | |||
f7573b4902 | |||
9556ce6d9f | |||
6f1a2952d5 | |||
c09d94f003 | |||
10807d577f | |||
6e6dff56f2 | |||
959adcafb1 | |||
251dddc42d | |||
1129836112 | |||
d4923ac3e8 | |||
8e5adae8ef | |||
e9514b1c97 | |||
c06dd15303 | |||
89ba9f7009 | |||
0df5070fa6 | |||
20edbf6213 | |||
d7ebc4dbe2 | |||
316971c6bc | |||
c7bed10bdf | |||
cc4c3182a0 | |||
71a2ecc2ea | |||
2f9cdefc96 | |||
ea993ad2e9 | |||
972012e549 | |||
a6af6174f4 | |||
9ae43d83f9 | |||
828b6adf77 | |||
9b4026a1c9 | |||
72753aa43a | |||
cf42ca7835 | |||
e41f8901c5 | |||
c99b9f5afa | |||
a245966793 | |||
746f288f1e | |||
9501d0802f | |||
be3c778fee | |||
13f2f39325 | |||
66b4fc6294 | |||
aae4d019e7 | |||
cbb6a45407 | |||
95ce2c79b9 | |||
8810ad3d60 | |||
66a1e690e0 | |||
1744f1aff0 | |||
0206115abb | |||
6e8fc83aed | |||
f02bc6b345 | |||
d662cdba34 | |||
dd5373a728 | |||
d2e3f14b72 | |||
6d148307ae | |||
d671de7efb | |||
862f8b3da3 | |||
e349bb8a7f | |||
cb1a98ccff | |||
95e20e70ff | |||
f765707886 | |||
fd6be806ed | |||
22bac9e7c0 | |||
36fe0921de | |||
acd4c5da6d | |||
cb869fef0c | |||
d3fc9a4491 | |||
7af7eff316 | |||
7392012a00 | |||
89518a035a | |||
89230b60d7 | |||
104d9647fe | |||
eb2a0604e9 | |||
0cb7446297 | |||
f789380343 | |||
e33a0fd60b | |||
b4ce9d2a22 | |||
5984bb52f2 | |||
9b6c3964c6 | |||
089d04646a | |||
ed992e495b | |||
8da373542e | |||
ee974d0e2d | |||
0907e8f5e5 | |||
59b80807ba | |||
80e12fb194 | |||
7c3031de78 | |||
f160dfa56d | |||
bf16d6d86a | |||
43a2993f4d | |||
e19c03f0d7 | |||
33d552693f | |||
152a9b2dce | |||
91af3ac497 | |||
ee4db78a95 | |||
89f6314a18 | |||
5db1f71854 | |||
0ee7bdad0a | |||
481e546e6d | |||
1e45bff0cc | |||
419864e5da | |||
cd88e8948d | |||
ca743ccd6c | |||
9fc6386ac5 | |||
513dcf9be1 | |||
b60891ddd1 | |||
cd988753ae | |||
d37770422b | |||
12539ba415 | |||
0726b9d730 | |||
66d3b06f9e | |||
bd60255220 | |||
ba9268aae6 | |||
9f83a49690 | |||
5d9ed222f5 | |||
5205c5b78a | |||
3b17af9d07 | |||
205bd4648e | |||
29f1dd0f8e | |||
0254fb9fd2 | |||
eee3da50f2 | |||
d32ce3c563 | |||
a190d99f6d | |||
5357de8da8 | |||
9614a76acf | |||
0466622a16 | |||
90c1d45f20 | |||
8873ecae48 | |||
5ad2fa5e93 | |||
2c4a47f302 | |||
0d8cb295d9 | |||
2a91105124 | |||
eaceb32359 | |||
01d8eccdd2 | |||
28f3b07c5c | |||
9633359db3 | |||
ee811371c5 | |||
5f6f806b88 | |||
721d38f758 | |||
19d04c0023 | |||
67a14ca6f6 | |||
83b81e1ba8 | |||
5f275778de | |||
ce72e4308e | |||
8b45786e5d | |||
e915f6cc90 | |||
c9f16b223a | |||
2ee70d53d9 | |||
6c16238cc7 | |||
1803b2c650 | |||
3137ebb86e | |||
fd1c090141 | |||
82d428440b | |||
018f93cfbe | |||
c64a490324 | |||
62cadd16ab | |||
a1cb4fb549 | |||
e416d94224 | |||
411b2595fa | |||
2c3a7791e1 | |||
f19729e11d | |||
019cc29c24 | |||
d1402587dc | |||
793e6f4119 | |||
0ec0d551a3 | |||
2a9c1aab7f | |||
41adaf36bf | |||
7dae81c122 | |||
243088252c | |||
9be00603f4 | |||
f3fe65080b | |||
d9ef0f9a9d | |||
7aa977efdf | |||
adda32854d | |||
01ac2f4aff | |||
b01b9d3b99 | |||
a2a822c118 | |||
1bdfd5f8ea | |||
0f5e65e5ce | |||
62e7e23512 | |||
b6558acdbc | |||
257efd4974 | |||
6ca210ac31 | |||
b3b736a7bd | |||
b3dd2ec57a | |||
262e6d0b39 | |||
7bda0dfb97 | |||
eefdc8ff5b | |||
1a8f9ab4a2 | |||
0d7b77e5d1 | |||
6ea22b63df | |||
a91e6b7dfe | |||
1d5856b4d4 | |||
35ad0a40d3 | |||
5349fb45e3 | |||
b5b80cef97 | |||
582c8e8eff | |||
3ffdcf3885 | |||
80f8df3ee4 | |||
ef24aba750 | |||
586966bebe | |||
a864d51ddf | |||
6104b94268 | |||
682b528004 | |||
124e08e80b | |||
030d3272d3 | |||
03fbc6b23d | |||
c149f3871a | |||
328fd149e5 | |||
d0613727ba | |||
7af4a777ae | |||
c98b3f6aa4 | |||
532add94d0 | |||
e3d9614fae | |||
9ce065adb2 | |||
d38b5346a2 | |||
fb0ff922a8 | |||
cac634503d | |||
56cdd1173e | |||
ea6b13d189 | |||
60b07035b1 | |||
94262a9d04 | |||
bcce945cce | |||
803c0b1a3e | |||
9285e13ce5 | |||
6b80daab0a | |||
82c97656f1 | |||
3ad6c8a56c | |||
7275454f8a | |||
57054c46ab | |||
40446b1fea | |||
1eb26240b1 | |||
81a4112c45 | |||
48b0ee8662 | |||
67e9dc9090 | |||
a7d3f2c3f8 | |||
2c8cfa3874 | |||
6016063add | |||
04e1cb52ac | |||
a3f2219f9b | |||
fd0da7379a | |||
4c079b7d33 | |||
7d8cf0cbfe | |||
6b931dce7f | |||
6074e9246e | |||
a918d61f2b | |||
4fe14b464a | |||
03470284a4 | |||
700d7ced64 | |||
2b38fe19af | |||
2bacf1efa0 | |||
641c069664 | |||
9a9574369a | |||
4b6e0addf1 | |||
01fbb2d9fd | |||
f945252d3c | |||
ffebe00f93 | |||
6523634b2a | |||
8f3ea62632 | |||
612c9967b4 | |||
cd9b0cb4f4 | |||
98bf2d592c | |||
7cbc3fe06c | |||
8d68d80eb2 | |||
27420b0c4e | |||
4de18cbaa4 | |||
f36c2e9587 | |||
b1d56eb299 | |||
a2cb348ee3 | |||
953d7f1db4 | |||
263b62e6d0 | |||
a0f4b031be | |||
cab2d00530 | |||
8f5a454771 | |||
bf65d13849 | |||
de4e28fcec | |||
0c78037fb8 | |||
10a18ba6af | |||
5abecd065c | |||
6f4c81117b | |||
da898a3f16 | |||
ec8c5b7a5c | |||
b3cdb05214 | |||
e9104b7479 | |||
0dae3b04be | |||
0d32bc0c0a | |||
6352b65f46 | |||
f12fa77644 | |||
f0d77125e1 | |||
d9708c6175 | |||
d709e190e2 | |||
eb6a0c410f | |||
da78f00f82 | |||
2f07f2b75e | |||
1d541dcca5 | |||
c1598f8808 | |||
378120416a | |||
fdc37ad381 | |||
8e7c4b5da2 | |||
7fa8a497f2 | |||
8fbb058322 | |||
54d48feb2d | |||
2bfc9bc565 | |||
706e3c8882 | |||
fdebddb965 | |||
cb6a98b0d2 | |||
47e97ff1be | |||
7f74cca11f | |||
2f7abb2da8 | |||
1e0c94246d | |||
12c5a10662 | |||
d233dc9f82 | |||
e1703be49b | |||
1518fba6bd | |||
537b8282c3 | |||
03941472a8 | |||
f41cf14df5 | |||
e99819449a | |||
123db49c78 | |||
f54945de12 | |||
7ee9bf6edf | |||
75ade4d8f8 | |||
08f36954ad | |||
29e031f0df | |||
7ff63930d4 | |||
0968d91fb5 | |||
c6c92e1140 | |||
9d59f960a4 | |||
fb3359b44f | |||
cfad85c6c5 | |||
c29d7e6f3e | |||
8b1d6cf07d | |||
feb59d321c | |||
6be54a9485 | |||
97f7f7c973 | |||
a026f5e2d0 | |||
bc2a0d875f | |||
39f83937c5 | |||
d831110127 | |||
e5271a9ca5 | |||
4b8f5992b5 | |||
efe63b394c | |||
9fdb41506b | |||
655e01c2d1 | |||
8c001b6443 | |||
8b0eceb072 | |||
f784d4f248 | |||
7c68de26d2 | |||
e7123a4bb1 | |||
a13ae7abcc | |||
9ddcc8dc14 | |||
177b573cd4 | |||
1553900145 | |||
166fd77f7b | |||
075bba242b | |||
29e78a7ae3 | |||
11e06f6b21 | |||
a893618f60 | |||
918cd7b237 | |||
d506b515fc | |||
a26924fa04 | |||
6f84099c5e | |||
024e06a3d3 | |||
35b9c7a4df | |||
fd9503ed3b | |||
0bf1df81cd | |||
0654001945 | |||
a0d09e7f23 | |||
14d70950f8 | |||
bf70e8ece4 | |||
e07492c855 | |||
92b3f740d5 | |||
16eab6b266 | |||
6d428859f2 | |||
650f24d0ff | |||
1de832509a | |||
ef09cdabc2 | |||
3da5f1d6cc | |||
e0c33b21e9 | |||
2d4c881d3a | |||
56840deb9b | |||
ecb22bdd85 | |||
9b2398888d | |||
a57384f6c4 | |||
2aac3c67ee | |||
66d20dc118 | |||
a75e035cc5 | |||
3c5a2568ef | |||
131fff6847 | |||
d9acbe3207 | |||
4ba0d36800 | |||
6a1d4bd52f | |||
4cccafbe01 | |||
f5092b27ba | |||
17fa9a6e82 | |||
2813d229bb | |||
6c0234149e | |||
99913594fd | |||
f864d73253 | |||
af8caca3f6 | |||
e2f8ca752f | |||
efbb5d69c7 | |||
ebc32d1cc2 | |||
b4d9ea6c19 | |||
323140c846 | |||
cec9ef6c5d | |||
97a001a1da | |||
59a0a74032 | |||
60c99fdbfb | |||
068b31a3d6 | |||
1d20c3b472 | |||
14c43c49dc | |||
53f31ca5a4 | |||
b5e096abcb | |||
f4f6d1ed81 | |||
ac22a00e09 | |||
4958fa73d1 | |||
c90d6f1f55 | |||
227b371329 | |||
577915db13 | |||
2c0efdee5a | |||
7e3de3ca95 | |||
f81984235b | |||
3759b5d34a | |||
c5a4fcd674 | |||
1d40e40691 | |||
4b36313fea | |||
2f2d164526 | |||
6521e419eb | |||
e94af34ef0 | |||
f5b5ef66b7 | |||
767618f61f | |||
84a4d093bc | |||
b0c84f9284 | |||
6b919c727d | |||
62eb39923f | |||
b3202623f4 | |||
bd455b750c | |||
1cad316575 | |||
37b786898e | |||
35172185f9 | |||
fc5196f8da | |||
285bd7116b | |||
08df102f36 | |||
33684f2ef7 | |||
bc4c6c3a54 | |||
109560feb2 | |||
ea32d87c25 | |||
01d6060111 | |||
c2079dcbba | |||
9041a3376c | |||
9dfd8491d2 | |||
d73946e005 | |||
c5e856aaa6 | |||
22fdb6994a | |||
57aab39b8b | |||
bcec465f9a | |||
99e5d3bb03 | |||
ea7b43234e | |||
51629da4a0 | |||
4bb802362b | |||
a3eaace4a5 | |||
29eda50e35 | |||
d01308f0ba | |||
5a5d00e4e5 | |||
ee51b5428d | |||
c34d32e65e | |||
417969fcec | |||
15f8b9d0fb | |||
59689f2af6 | |||
8a88695409 | |||
9ded406f49 | |||
f8b9373627 | |||
1cda86ee94 | |||
e527695a33 | |||
c496271a0e | |||
3159574cfa | |||
5542507024 | |||
fa62f07dce | |||
c61e8f6dd7 | |||
8d69996d4c | |||
c843e34464 | |||
7eab7169f7 | |||
9d14788ef3 | |||
7ec8ca3356 | |||
fc61066848 | |||
cea0a28cee | |||
557fe5a9a2 | |||
f7e59edaf2 | |||
4052534235 | |||
ee885b516f | |||
a4d551e420 | |||
b943fee515 | |||
5f9a52977b | |||
1d12d5f144 | |||
fddfa80f76 | |||
c04936d0dc | |||
13b3fe03b8 | |||
79a13b8b6a | |||
2e11f067e2 | |||
e1e6ce5d34 | |||
4528e61fcd | |||
881f9ea7ea | |||
b1da4bb81b | |||
50d8d0b278 | |||
7e0b30e845 | |||
349ebca08d | |||
6dcec02377 | |||
da166c7bc3 | |||
80f48acb07 | |||
c1d8693d3c | |||
6ae0ee5b26 | |||
098fcc4f12 | |||
bfa61632c2 | |||
e25eed7687 | |||
4412690652 | |||
7c53cafbbe | |||
f2629f1b51 | |||
6fa1084d21 | |||
ba5621f4b7 | |||
fdb2b52f2f | |||
02f0349525 | |||
de95a1ba61 | |||
b7ec4e3b20 | |||
37988fbfd4 | |||
d0c8c2a418 | |||
953be9cccd | |||
2a0ba039e6 | |||
c170bff720 | |||
489c813bcc | |||
d6a4048793 | |||
6a24e1b935 | |||
9373a24413 | |||
7514071d79 | |||
2580b7cb20 | |||
6cda616236 | |||
4f2853e1b8 | |||
835d2277d8 | |||
6829c16ced | |||
8bc71b268e | |||
e8120fcdef | |||
bc6cecc14a | |||
f5ba859560 | |||
b2de4ee08c | |||
d82810d5e7 | |||
9cf65be1be | |||
540bd63f4c | |||
ecc61d184b | |||
36ed787db1 | |||
ab0a3bfd45 | |||
36f20d235c | |||
454d56935c | |||
afbaec8e2d | |||
e3cc45d7e3 | |||
d6b60723d9 | |||
94fee2d429 | |||
650bfd1ad3 | |||
568954e9e0 | |||
b6022d2ff1 | |||
b1ea53ef1e | |||
5f9a445aa2 | |||
d6aa6875cc | |||
5d0a1858cc | |||
07ca738842 | |||
6567fd1023 | |||
c8e376a625 | |||
b881b57a1b | |||
a9fcb6a183 | |||
18af6228a0 | |||
4f8fdc973f | |||
5f81b0866a | |||
7ae2b44806 | |||
8ffd10cacc | |||
d4e8db49d2 | |||
86babcf07b | |||
9d7291eea2 | |||
77aff26204 | |||
64e1355e06 | |||
f4f0796459 | |||
974434d326 | |||
5e8eb7151b | |||
970e018c27 | |||
67835dd7f7 | |||
ee01b6253e | |||
1a4dbce350 | |||
4d6d4dd44d | |||
c49580ea51 | |||
4d6215f546 | |||
fd7709ea81 | |||
10378ef1bb | |||
9bcc424d86 | |||
05d168d6ee | |||
32042afccd | |||
3b8903b2e2 | |||
47f998b493 | |||
02b52d2b55 | |||
9f28f32af9 | |||
a9bd792194 | |||
6b36ba8323 | |||
d9514e4184 | |||
b9ed485d60 | |||
b8130265cd | |||
e4a227359b | |||
f9ae4860d9 | |||
3a092fd920 | |||
129399c40e | |||
777d673465 | |||
825365263f | |||
4ed1e2411a | |||
519d55af4b | |||
e46b4c51d5 | |||
76d18a67bc | |||
2c2c73b23f | |||
b3a5c94f02 | |||
ef0a78dedb | |||
c2100cc782 | |||
4615b2fe16 | |||
daa7c6652d | |||
9f829f1c50 | |||
02f7b1ae4a | |||
d9e142e1a8 | |||
305f8aa561 | |||
e6bafd51dc | |||
5a54d4e1ed | |||
7226f02d4b | |||
1e0d9561a2 | |||
12d5422e7f | |||
aaac3b24b2 | |||
a5997c773f | |||
4590e1d9c9 | |||
f6abe2b466 | |||
c2fb224fea | |||
2b00d3a565 | |||
3a69bc705a | |||
c0f936b757 | |||
1ad30f33a5 | |||
fc1dedeb7a | |||
b8baca92e2 | |||
43deed9dc0 | |||
8c03b2ec95 | |||
4bed0fd563 | |||
acba821afd | |||
2d4551d559 | |||
07effb628e | |||
491b378ad3 | |||
8a3fca4605 | |||
78bc422004 | |||
3c9ce040cf | |||
20df025ccb | |||
27f676a725 | |||
9a056e6ad5 | |||
60e75612fd | |||
048033d264 | |||
f5c5377a81 | |||
9768541c35 | |||
bdf397a71e | |||
a4cd2d1702 | |||
a526bfe972 | |||
45eadb8302 | |||
19fc638447 | |||
bfc2aaedd8 | |||
3150847331 | |||
a6748f8034 | |||
9beb695aa0 | |||
617507b3d4 | |||
fa7281794a | |||
01824f2f66 | |||
bf5e72af8e | |||
079228e559 | |||
ddce821295 | |||
c63ca66f68 | |||
036b388928 | |||
13a3f78e56 | |||
8f7ff3da7c | |||
7bbf40a5ab | |||
13f3963f69 | |||
54e6c4826f | |||
8d9eb9ac58 | |||
83ab34dfc3 | |||
4707581c41 | |||
d9e1a331b2 | |||
9ad34aa395 | |||
9b211e1de7 | |||
438f9f3358 | |||
d58e79d1ec | |||
c9f8d2e219 | |||
4aba46e02c | |||
24d2405fc8 | |||
e2f98778f8 | |||
1a7b4ded27 | |||
0c595c5aeb | |||
0536522ed3 | |||
985c71fa2a | |||
f6bdbe897f | |||
5ac549a384 | |||
e387a61278 | |||
7182d9b8cc | |||
03ec64672b | |||
241da2c591 | |||
7e25f5012e | |||
bc2a8cba94 | |||
ecc5ec05f3 | |||
c07f188542 | |||
fa8a2c7666 | |||
693613037a | |||
311c2e947a | |||
bd1031b92a | |||
694b885c0f | |||
7d1bf3f9ba | |||
77761ee9e3 | |||
e1e690d487 | |||
e234f4c6b0 | |||
4725882ada | |||
d8e191e5c3 | |||
4ad6584782 | |||
03a3c3a761 | |||
4dca9f21d4 | |||
9410902454 | |||
915f66f248 | |||
4deee6b98f | |||
744f689556 | |||
1128d355bb | |||
b879533d41 | |||
46da8508c3 | |||
3319a3fa48 | |||
d432443545 | |||
bb18525ed9 | |||
a4bf6d9872 | |||
eef84f4d09 | |||
fbab1a6aa9 | |||
bc82073ebb | |||
d71c522891 | |||
d9b4250dba | |||
4611e32200 | |||
ce12293dcc | |||
ae6f6538d2 | |||
1f08d85319 | |||
8f8416c078 | |||
b74db7b087 | |||
430e535fe9 | |||
d0a7d2892e | |||
485ee2f8e0 | |||
a0ad48d169 | |||
fbe0c35373 | |||
c2fd3b22f3 | |||
a58beb85e6 | |||
c49bda449f | |||
2698c71d27 | |||
95fe06a09b | |||
c6366f4906 | |||
adef468c0b | |||
e3726a7078 | |||
c1b9a0f4ff | |||
3fe6b19dc0 | |||
1b0d86620e | |||
ee5024f4ce | |||
a3b05fb527 | |||
e5b297a513 | |||
0419561ff8 | |||
a761b3f83c | |||
1926e7f864 | |||
72071e467e | |||
95299cf522 | |||
3586ce3c31 | |||
8c9d215672 | |||
21eacd4c43 | |||
9ec69bb649 | |||
3920671dd3 | |||
fe80ff4070 | |||
588cc16fc5 | |||
aa4f0b4eea | |||
0e2ae50fc5 | |||
6fd10e7180 | |||
2b3fe93906 | |||
fdcd8e2800 | |||
eb6f397bb8 | |||
4b396884c6 | |||
6e0f2c0dee | |||
43fa8bf403 | |||
c03b6c9268 | |||
96525d4aef | |||
45413726e7 | |||
3d0ecadb1f | |||
fecfa4b1c3 | |||
d2fe685a74 | |||
c9221a2b95 | |||
fee8282cc5 | |||
09381ee86b | |||
f8196de089 | |||
694d626081 | |||
326b28b43e | |||
bd7a38ac2b | |||
81cc900b9b | |||
c85dd691ae | |||
5670af7198 | |||
e82a2945e3 | |||
aeddc92cf3 | |||
e66567eb94 | |||
abee554454 | |||
e38044a3d0 | |||
3751646c2b | |||
111a91d98e | |||
5f377a6c9e | |||
47fd6b1add | |||
5167f275be | |||
08a4491a15 | |||
17a1d8145c | |||
b9ba14e395 | |||
586cca2f39 | |||
cc6c25cba6 | |||
879e6fa758 | |||
638573757b | |||
f0554311a2 | |||
c291caba7d | |||
d4e2ff2e71 | |||
59a8003ad8 | |||
c7c66364dc | |||
e31aaf5b97 | |||
11d8b66db2 | |||
7e6ab01528 | |||
a0750210ca | |||
8d4ee96c52 | |||
1546062433 | |||
980009b1cb | |||
3682a22021 | |||
a70570f79d | |||
19c8703e15 | |||
44b384cd17 | |||
58f1c93de5 | |||
d447f4ba42 | |||
5e7a088da9 | |||
6e4d3393ba | |||
9c4b2872e3 | |||
42b570a274 | |||
dbe2c4572b | |||
080ff82531 | |||
b78fa73c75 | |||
673c24a34d | |||
8fa1d69db3 | |||
588a6572b3 | |||
9791c11c99 | |||
2120ff8cca | |||
153c62337f | |||
db763e394d | |||
d144502f1c | |||
f6706c4f9b | |||
9e9aa71e9b | |||
3f079b415d | |||
4ebf73bd03 | |||
83361a5e16 | |||
bc169d50b9 | |||
3ae08a4a57 | |||
46904ee3f1 | |||
7ea03106f7 | |||
ce3841a23d | |||
2f0eace822 | |||
d8c0ba19fd | |||
5e557d2d46 | |||
4090941c3e | |||
27d6e95062 | |||
66e2d782b2 | |||
25867e76b1 | |||
a2626afebb | |||
93eac8c6eb | |||
2a41b4361c | |||
25c59aa187 | |||
d14d7ae66d | |||
ce9fac6b71 | |||
5910527d5e | |||
27e2708b7b | |||
82d4569e79 | |||
d52ee5ff38 | |||
635473b687 | |||
557162fe8c | |||
6503778cd5 | |||
7b6e32ff86 | |||
eb30696cad | |||
ac83e66016 | |||
c79e17514c | |||
7df1046f71 | |||
e383c90487 | |||
93ec49bf8d | |||
39dfed2ab5 | |||
fca45014e4 | |||
8fde9ee9be | |||
88dcba7966 | |||
189bba9f45 | |||
0854b1c778 | |||
887d193526 | |||
4e74dc7bee | |||
98ecbfba61 | |||
772fab2b71 | |||
4de1495c40 | |||
cb7608b4e6 | |||
25e7872a6f | |||
1d8549f810 | |||
663fa0f4ac | |||
217d1b63f2 | |||
4f01026883 | |||
5303139498 | |||
fb37014b65 | |||
a704986d74 | |||
cce2da5229 | |||
d51904de2d | |||
10f1898b98 | |||
341966e709 | |||
00d4a7602a | |||
94c178941d | |||
a81e7c5057 | |||
23906047ec | |||
76b162113f | |||
0afadc05a4 | |||
8d0448341b | |||
2531de507a | |||
8fedaa43e9 | |||
cfae090de4 | |||
04b9b03502 | |||
5e1d0543d7 | |||
0163791e26 | |||
30aa802069 | |||
cbf5ca6d93 | |||
998c39d564 | |||
73df54abb0 | |||
3edf429557 | |||
0f29fd51ce | |||
ac44690966 | |||
55ecb34665 | |||
c1b95e8bbd | |||
39ac8c8422 | |||
7f29cf7e58 | |||
099759c5f5 | |||
95113179d8 | |||
150073ae8e | |||
a3d1dde455 | |||
268233551d | |||
c2d2848020 | |||
9aedc32527 | |||
7aae4efd69 | |||
b53cc475fe | |||
dcf6367314 | |||
164bfc3521 | |||
b75102f670 | |||
9024460da3 | |||
7df7ced43e | |||
bac8166611 | |||
b981878c58 | |||
0507bf14b1 | |||
c83a6a44c6 | |||
de3b2cefb0 | |||
98597b98d7 | |||
bd52da8afd | |||
20fd204aa9 | |||
8bfe2405cd | |||
29fd2653f1 | |||
d9453c3b83 | |||
d9d7559097 | |||
c338c4fb58 | |||
e4936b1bed | |||
b9753dc5ba | |||
c4c1f09f2e | |||
74f116f2fa | |||
6365f497a7 | |||
b3a2cc4367 | |||
bbf0def3ff | |||
b6522c9fb3 | |||
62b3e16ac4 | |||
5431dfc9bd | |||
4d473315fe | |||
3f2910c3a7 | |||
8b415883e9 | |||
ec02332615 | |||
8a9ed28845 | |||
fa245d3c4a | |||
5d67b896aa | |||
ff9bcd6b14 | |||
58d6b59b7c | |||
c97d319b2a | |||
9cea0c50c3 | |||
8ee6a23229 | |||
b6c5796121 | |||
2d72942d47 | |||
12a367f65f | |||
d5677c20f7 | |||
b80ecfb600 | |||
9c217ad91e | |||
d37f48336b | |||
3e17de0127 | |||
8858084f6e | |||
283b897ae7 | |||
8c10cbe37b | |||
130a3ce727 | |||
33ac72de83 | |||
fcc9858b66 | |||
828d791da5 | |||
3965c08bfb | |||
eddc620307 | |||
0b1136ad28 | |||
b49d37e15a | |||
d33ae9ede7 | |||
b89e440fc4 | |||
7ea2fd67c7 | |||
04b04ed859 | |||
e62c527d05 | |||
873bb2f79e | |||
762ae04bb2 | |||
1f381d9477 | |||
ed603f4e48 | |||
293082a7e8 | |||
a9699ad969 | |||
279697b326 | |||
6f1f92c9d1 | |||
cf1a1185fc | |||
c6e8c40b2c | |||
46945a8674 | |||
5fe3ac09a5 | |||
f35c42aead | |||
e9dd0f8f6d | |||
c493273a21 | |||
fac2fc4971 | |||
72b503bb8f | |||
25873da6c0 | |||
fba820a1c0 | |||
578b4a4408 | |||
87b07384ad | |||
bc66a88d74 | |||
2b445369fd | |||
2b2b14193f | |||
141a3e9be8 | |||
ace8900ca4 | |||
46248a5b69 | |||
60bf8df9ef | |||
93cc7af5ee | |||
1c4e9c8db6 | |||
c9697572c3 | |||
b1f861b59c | |||
d36202d86b | |||
a0dd3f585b | |||
3c29a4fc55 | |||
c6c2469487 | |||
ee1fc8aa8b | |||
d72052fe2a | |||
622ce1d4f3 | |||
60418f6fdc | |||
1d0a13a79d | |||
577e96bc95 | |||
266e1a8527 | |||
72300f0217 | |||
e51670f615 | |||
7d99d8e805 | |||
a726f7535d | |||
b38afa5df3 | |||
0bbdd21d81 | |||
fb2325b9ea | |||
828738ba0e | |||
a3a919437e | |||
3180602217 | |||
d3252434aa | |||
08bdc87505 | |||
377a672cd2 | |||
ce83b64ca2 | |||
b2442041f0 | |||
b2e0ef24f3 | |||
f73d293cdd | |||
5f929f6cf8 | |||
2d939a2894 | |||
84a3466b4d | |||
2b327bf3a7 | |||
fbf8f5ef6c | |||
b93a278cbf | |||
a1c9fece1e | |||
d4acdb67bb | |||
ffbf7df557 | |||
93b7bbc43e | |||
5be341d991 | |||
b9191eb9ac | |||
b0f000a42f | |||
3cdb129870 | |||
44ef698c35 | |||
fdef405878 | |||
5ba5e69273 | |||
87ab84c649 | |||
0763f11998 | |||
4a404835c0 | |||
acc7739958 | |||
425e7c1e52 | |||
2c223712ff | |||
d81ae3c35f | |||
0a9173559d | |||
55608f0660 | |||
f8a5e04dc7 | |||
003d37c490 | |||
2338d951c7 | |||
ad5ee7fa44 | |||
32cda0f58b | |||
bd3350c28a | |||
868ba0cd03 | |||
46165f8166 | |||
a20dce5a87 | |||
0484daac23 | |||
23f12d2fd1 | |||
f771fefbc9 | |||
44aae18311 | |||
41eefda1bc | |||
f376c01e02 | |||
e223a6eac0 | |||
35cd18240c | |||
073ebb4afe | |||
c731418b65 | |||
5265575186 | |||
49524abeb7 | |||
4f25bdd121 | |||
43ed7d4bc5 | |||
1f687ffc38 | |||
ad168f18b3 | |||
f932c4c2c5 | |||
17a336ba0a | |||
da98cd77e8 | |||
5aa98a1aff | |||
2c65dd87e1 | |||
b52bade150 | |||
e3730a9b94 | |||
a08b695fa5 | |||
4786905678 | |||
6766395f44 | |||
8d1cbd9f8b | |||
c7b90fb8e0 | |||
92b732a189 | |||
63a8f31a45 | |||
cf80ab01fd | |||
1b92aa03f3 | |||
f327bdcd91 | |||
f35ed8101a | |||
d980c0404c | |||
609d429161 | |||
cc79ffc57b | |||
9953a49b09 | |||
4dfd97a300 | |||
697e27f876 | |||
0a5b79b8cd | |||
c1e92605d4 | |||
3eed1508fd | |||
13fe25ff03 | |||
f07b905df5 | |||
902caa3985 | |||
281eb3237c | |||
f3ac6d4a7e | |||
c430caadd7 | |||
98fcf06e31 | |||
f545928adc | |||
666c7bc77f | |||
30f020bff3 | |||
28c662e6a7 | |||
4b36cdc3da | |||
6e5a8ffc31 | |||
2bbe98a403 | |||
2a00f5af47 | |||
02eff4a26f | |||
c248cdb876 | |||
0857a480e5 | |||
2c00119b47 | |||
ae11f73e24 | |||
3ab27f63f2 | |||
7c821e33f0 | |||
9a3fd51337 | |||
f08709ef29 | |||
114d16224e | |||
cdadb02420 | |||
9bf6ac7a9a | |||
00dd2e99a8 | |||
ffc4a3456b | |||
72f8e359bb | |||
53535b6023 | |||
bb66228837 | |||
bce8c71e38 | |||
33bd5cb63a | |||
311d03e680 | |||
612a475eec | |||
4e3abb92f2 | |||
eb371b3024 | |||
3ef0b3ea6d | |||
03e007fd36 | |||
5b770a6407 | |||
3510cc85fc | |||
32005a2d3a | |||
9163db6bcf | |||
1f6f11ee88 | |||
a55e6a1725 | |||
3059e196a3 | |||
42c52295f7 | |||
38e0df5d12 | |||
c436a2abda | |||
2b4ec6d274 | |||
38e74e6eaf | |||
7fb689b451 | |||
e5ec8a7490 | |||
23cfe3aa69 | |||
9481cc2eb0 | |||
99f92a87da | |||
b9f4a7be0c | |||
f96d831cc9 | |||
7d7efaca42 | |||
9ee969218c | |||
cf57be14bc | |||
2f0f837534 | |||
7384c5ce16 | |||
f6fc47671f | |||
3c469e5c7a | |||
478e3b9237 | |||
9da5a55ef3 | |||
f6729cb3b4 | |||
6c56810233 | |||
6b03902465 | |||
5690e35a58 | |||
d08546e5fe | |||
55dec574c5 | |||
94bf91ab2b | |||
89af06a310 | |||
0d08a282b4 | |||
1dee4e5e0d | |||
24093e13e7 | |||
859855ed31 | |||
0c681a06c7 | |||
37558c0fdc | |||
876c2b36bf | |||
012590273f | |||
d2d13e3de6 | |||
31f6a865d3 | |||
d51c088afd | |||
a39ff34a0a | |||
a855920fb2 | |||
ee6bb4df3b | |||
1a17770bbc | |||
6261296a0a | |||
d4de445112 | |||
0815380044 | |||
7921acefd4 | |||
c599714aea | |||
f60a80f308 | |||
8d0c6ebc57 | |||
a21e938f36 | |||
608632fde3 | |||
4ca892e9f3 | |||
08c225a633 | |||
bc32c51460 | |||
7ce24ef392 | |||
4c5515c05c | |||
a07a55eac1 | |||
ceba3b9dca | |||
a74ddbbb9f | |||
02df949a48 | |||
ec7ce5ddb6 | |||
ca9ef28199 | |||
5ed0ade358 | |||
e7005c18a4 | |||
63f48c5f45 | |||
b47d00844a | |||
19cf64f5f0 | |||
d690a54005 | |||
f90120191f | |||
4c0bf18268 | |||
76ca81b997 | |||
07d93b6b67 | |||
09ccb5ddf7 | |||
47b65a1fa3 | |||
a2b0e53301 | |||
3be45b32ef | |||
b88b4cc06d | |||
9e006d93fe | |||
c42eae9c17 | |||
b6dc81da0e | |||
cb49ec1c7e | |||
2118c0691c | |||
7515f88843 | |||
4a070f2b7f | |||
ea6fd8c952 | |||
e2a0db8fcc | |||
d3da5bd2d8 | |||
52f15906d8 | |||
fd5cc19231 | |||
27e46615b6 | |||
54523b25d1 | |||
1d6258d223 | |||
28cd78db96 | |||
f564fb5c1a | |||
763bf2d85b | |||
9d02322cd7 | |||
20936faec6 | |||
cfe7599f62 | |||
4515703efa | |||
8cc368b131 | |||
4bf22f689a | |||
3b575acd55 | |||
8dbb3dcd9b | |||
e46bb42266 | |||
f32f68d0e0 | |||
95a3ea1d23 | |||
23025eec7a | |||
32865d1834 | |||
bb2f8edc77 | |||
75ab11fc35 | |||
d184f7487e | |||
2b9afbedff | |||
895d03a35c | |||
dc024e5385 | |||
5df45f9fa7 | |||
74837753bf | |||
a4735defaa | |||
b5cd873f6d | |||
af0853a42b | |||
45c95e559e | |||
6350dbe0e9 | |||
d254331b8e | |||
826f4ce29c | |||
de66ac66c6 | |||
048cd89053 | |||
5dc41badc3 | |||
1ac9e53b1f | |||
e3c245b99f | |||
c8ddf7472c | |||
fe6b13bb81 | |||
ba70bde3e9 | |||
9503b2ca93 | |||
10611d0415 | |||
42f5f6e943 | |||
2b545f67ec | |||
6069948b4e | |||
60d81fac41 | |||
7ce9bbf2e8 | |||
89083cdbc8 | |||
b742f91ea8 | |||
8e26ad2871 | |||
c7bfe4002d | |||
4faf00de94 | |||
9044a5476c | |||
aed2d077af | |||
954cd91c93 | |||
a13ccb43d2 | |||
1f2c410a5f | |||
caa81e3b8e | |||
264a34d227 | |||
d5a908ab75 | |||
23684710e7 | |||
772e189040 | |||
957d4a61d8 | |||
0e3918a3a7 | |||
beb99d53f7 | |||
1afd34b450 | |||
a2c1ca97b8 | |||
70092b348a | |||
2d821ef8df | |||
b2e3bc7e7a | |||
ddc68669fc | |||
098f69b1bc | |||
3995b15ccf | |||
a45e7d7561 | |||
8297bca969 | |||
964f9dc688 | |||
ce743e238b | |||
53214f0019 | |||
004e79580e | |||
802b851924 | |||
e1526f712e | |||
14b8b00880 | |||
621966b6f3 | |||
b6cde9e8fc | |||
b1f7c66066 | |||
39778f9663 | |||
a0c784113b | |||
0c549dd1ce | |||
76283e0e49 | |||
97fd35fe7b | |||
191d5f1268 | |||
e5fd62a121 | |||
3f3162fb36 | |||
885a7b0c6a | |||
ba541300ca | |||
7dcc00312f | |||
d19ddaa46c | |||
51572208a9 | |||
745fad2a19 | |||
655c38a210 | |||
09642eb6bf | |||
23da59fec5 | |||
833f7c6885 | |||
82af8e00df | |||
e5ccc6473e | |||
59bfa2526e | |||
24c050765b | |||
95d2bc0887 | |||
bc277067ed | |||
890fba18e1 | |||
a3a9bc8b39 | |||
d6adde92fc | |||
1d6b5cbda4 | |||
b54c40db11 | |||
cd1eb02f02 | |||
b059e831c0 | |||
35f9869861 | |||
ae16dcc4a7 | |||
0f60c7f356 | |||
ffb93dacd7 | |||
e1c0a451ee | |||
4e1df940d9 | |||
f24ea413c8 | |||
921f413888 | |||
8dd1d81e0d | |||
23238a1e58 | |||
7799e3477f | |||
115c6a6a57 | |||
db47e56474 | |||
592cbf6fad | |||
cace1217df | |||
e200e2d0df | |||
2256ffecbe | |||
e86831fb40 | |||
451581e1aa | |||
44dda9455d | |||
5173a0c9cb | |||
d7ff74b6bd | |||
3475e167ee | |||
00059251f0 | |||
c2845aefaf | |||
d25e883e65 | |||
2286451039 | |||
278db35ae0 | |||
b5d3422d90 | |||
4a8096998d | |||
31093c0d13 | |||
d5867f104f | |||
1c9c2aba5b | |||
9b8d2f3097 | |||
5204afb9bd | |||
4af8c85a84 | |||
0135bebc70 | |||
69099881bd | |||
b1e8be2ba5 | |||
f198a401f2 | |||
a9096a46c0 | |||
a3ed5aef8e | |||
46a756b1ee | |||
4bd2a2dac8 | |||
ed76062904 | |||
8b23fd3dd2 | |||
e897fb63d8 | |||
098741ffe6 | |||
e87221a8a3 | |||
c54f52eff6 | |||
72d9775de0 | |||
f4067abdac | |||
dd7521cc4b | |||
83b8cf3198 | |||
eca0cdf99b | |||
bf5474fd24 | |||
440bc22a83 | |||
917d746d1a | |||
b9b850f621 | |||
ffc7a55763 | |||
c0c83faf64 | |||
b6a5c8c854 | |||
dc45c53e38 | |||
22d4d7085d | |||
e0399a5db3 | |||
b2688c5ac0 | |||
f29b578cae | |||
6effbaa85e | |||
da177f1170 | |||
5abbaeddb0 | |||
def93d3e59 | |||
48ed7500d8 | |||
a5f2f3e8ea | |||
bff4f6fa8d | |||
75a4cd1b69 | |||
29a34256a7 | |||
0d3509b991 | |||
62bf792888 | |||
06941fcf5b | |||
deb7c4e500 | |||
ada1111252 | |||
07fe2cb122 | |||
2b6334b9dc | |||
ab273a8a59 | |||
42bb2f554f | |||
6bdc420d0e | |||
386fc60441 | |||
a0356a5092 | |||
5c2266e214 | |||
c50f8c716f | |||
86450f9d66 | |||
371a11684a | |||
83362f7a00 | |||
c3b2e3ef0f | |||
a0f8872ad7 | |||
b01217cf16 | |||
e781da1be4 | |||
13a6a45d30 | |||
2d64892a81 | |||
d190165bf3 | |||
ed7bba2cf5 | |||
a8e03ab8fe | |||
81696b334c | |||
43f25e8002 | |||
c800ddfa31 | |||
e9a4c63127 | |||
0a5bd6ef73 | |||
3cff1c48e9 | |||
99f703a2eb | |||
7aca487888 | |||
5d721706f3 | |||
bcef1f5d33 | |||
19c73167c9 | |||
69f34acbd2 | |||
8f61d14a82 | |||
470f0ad7e8 | |||
f939bfc469 | |||
4714c15d65 | |||
b783e9865e | |||
d8907d5ccc | |||
213787d435 | |||
a4bf47499e | |||
0e8a085f97 | |||
f9ee01b02d | |||
773747dd54 | |||
d97e0a1a6a | |||
0ebd0a0c0b | |||
18e8827a84 | |||
db7f7bdae2 | |||
f89f7630c1 | |||
20b57906b7 | |||
e1b3688869 | |||
22691b6950 | |||
10da5cd45b | |||
15fb86ddb7 | |||
cc35db91cd | |||
8edf7fc0de | |||
2bc7c7b3ae | |||
43497b399f | |||
84fc44fd5f | |||
2a9dc518a0 | |||
6a900693f3 | |||
a2e1ed56c9 | |||
3289a40320 | |||
09c0afbe7f | |||
ea82748496 | |||
b6b258d82c | |||
214428295b | |||
4aecd07970 | |||
7be6bbc948 | |||
430646afd0 | |||
d929b27c08 | |||
d3d29a3691 | |||
bcf7fa216a | |||
5824b28993 | |||
f196838f6b | |||
607822b413 | |||
21258c2d79 | |||
f5adbea923 | |||
8536c79445 | |||
46dd2b92e5 | |||
b2a715ef6a | |||
0f06219fd3 | |||
c8d91dce7d | |||
bb0ce1a329 | |||
cca96f2a96 | |||
73d9bad9e2 | |||
1780a09dc5 | |||
7f3d827a6e | |||
3d1d31c020 | |||
0f57810a9a | |||
63d660119e | |||
076e67dd0b | |||
82e9c6d092 | |||
f0fec11ad7 | |||
d9f2dfa725 | |||
20b7f8b46b | |||
d8757ede0e | |||
454c2f0ad1 | |||
8e9a91f32a | |||
f77b3498ec | |||
bbf4be1cfe | |||
5cbbf4ceb2 | |||
d726ce4e49 | |||
3079dabc20 | |||
84e960a9ef | |||
1844df2195 | |||
763fc54855 | |||
3f12d3500e | |||
9d0e10eb1e | |||
797ed9200f | |||
353cda832d | |||
54a3d31c00 | |||
a562d7e4ca | |||
470b236008 | |||
66c6f08447 | |||
f0e4d5a61e | |||
57d37f14f3 | |||
dcd0a650f0 | |||
d10ff4efa6 | |||
abe5f43ae9 | |||
16429009b4 | |||
6af7ccc6a2 | |||
9512a7d280 | |||
82cb87abae | |||
08c03520f5 | |||
30dd6f1778 | |||
f27fccfd29 | |||
0f609fdaba | |||
8a5248a46d | |||
92cf4580ca | |||
6bdc0b23de | |||
eb08d8849b | |||
02333d8267 | |||
269de1782a | |||
5813c5dd43 | |||
2b41b3ee26 | |||
4a1cce19c4 | |||
5f17f365e3 | |||
dca4335329 | |||
e7b6ca42bf | |||
96bbde7bbc | |||
2ede1ed27c | |||
e140ae4063 | |||
cd11e08193 | |||
46ec376e4d | |||
e70ee1bf9d | |||
4b96997f6c | |||
7986686739 | |||
b2484136b1 | |||
5ebdc9e767 | |||
7885205a07 | |||
858b291f61 | |||
40917ab988 | |||
497149a628 | |||
3d123a09f3 | |||
cc82b8aa42 | |||
28dfcbf0ef | |||
295a2e3fdc | |||
84b0856b52 | |||
053c1a7fe8 | |||
338c8299e2 | |||
a95f7ff8b0 | |||
d497dd53c5 | |||
8b6d3c9835 | |||
edb64d2ec5 | |||
b42986dd8a | |||
4583f0cb86 | |||
d9427c6112 | |||
86d3732f65 | |||
aa86bc722f | |||
3ad7a35f0e | |||
975f202ddb | |||
4649c97205 | |||
89b3b2ff42 | |||
b133a0538c | |||
9e89a0689f | |||
4632a56346 | |||
10a82eca25 | |||
5b0f1efefd | |||
95121b5120 | |||
5d2a70b6c6 | |||
96564f890e | |||
c86e000f09 | |||
f7d436dc6b | |||
e537080166 | |||
83c7ec8067 | |||
581423a40e | |||
e1ed532f91 | |||
3713617ea5 | |||
2fa1061c65 | |||
dd67191044 | |||
355ca27d31 | |||
1508a1e147 | |||
a6c6325d41 | |||
f598ac3daf | |||
77704b3e79 | |||
e8e3138fba | |||
b49ed2bacf | |||
3b40e622fe | |||
0e97c4ad9a | |||
aa9acef76a | |||
7db0872ee3 | |||
cb47667d01 | |||
9c0a89bbdc | |||
5de45a7ae7 | |||
c1fe7563d2 | |||
df73e95d13 | |||
40b84b0576 | |||
b4a54804df | |||
636e2d62d8 | |||
f5723dc181 | |||
0697cca88a | |||
f9dd77b8ec | |||
f014e2d5c7 | |||
9ba65b04fd | |||
298148eebf | |||
bbb4ba2191 | |||
baa6f05f8e | |||
e3783d0941 | |||
c262d1ef90 | |||
874e06baa1 | |||
a0db5dcc7c |
7
.gitignore
vendored
7
.gitignore
vendored
@ -12,8 +12,13 @@
|
|||||||
#vscode
|
#vscode
|
||||||
/.vscode
|
/.vscode
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
/.idea/*
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
__pycache__
|
__pycache__
|
||||||
.idea
|
|
||||||
|
# CLion
|
||||||
|
!/.idea/cmake.xml
|
||||||
|
|
||||||
generators/*.db
|
generators/*.db
|
||||||
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -10,9 +10,6 @@
|
|||||||
[submodule "thirdparty/lwgps"]
|
[submodule "thirdparty/lwgps"]
|
||||||
path = thirdparty/lwgps
|
path = thirdparty/lwgps
|
||||||
url = https://github.com/rmspacefish/lwgps.git
|
url = https://github.com/rmspacefish/lwgps.git
|
||||||
[submodule "generators/fsfwgen"]
|
|
||||||
path = generators/deps/fsfwgen
|
|
||||||
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-gen.git
|
|
||||||
[submodule "thirdparty/arcsec_star_tracker"]
|
[submodule "thirdparty/arcsec_star_tracker"]
|
||||||
path = thirdparty/arcsec_star_tracker
|
path = thirdparty/arcsec_star_tracker
|
||||||
url = https://egit.irs.uni-stuttgart.de/eive/arcsec_star_tracker.git
|
url = https://egit.irs.uni-stuttgart.de/eive/arcsec_star_tracker.git
|
||||||
|
16
.idea/cmake.xml
generated
Normal file
16
.idea/cmake.xml
generated
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<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>
|
||||||
|
<env name="ZYNQ_7020_ROOTFS" value="/opt/xiphos/sdk/ark/sysroots/cortexa9hf-neon-xiphos-linux-gnueabi" />
|
||||||
|
<env name="CROSS_COMPILE" value="/opt/q7s-gcc/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf" />
|
||||||
|
</envs>
|
||||||
|
</ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||||
|
</configuration>
|
||||||
|
</configurations>
|
||||||
|
</component>
|
||||||
|
</project>
|
10
.run/Q7S FM.run.xml
Normal file
10
.run/Q7S FM.run.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Q7S FM" type="com.jetbrains.cidr.remote.gdbserver.type" factoryName="com.jetbrains.cidr.remote.gdbserver.factory" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="eive-obsw" TARGET_NAME="eive-obsw" CONFIG_NAME="Debug" version="1" RUN_TARGET_PROJECT_NAME="eive-obsw" RUN_TARGET_NAME="eive-obsw">
|
||||||
|
<custom-gdb-server version="1" gdb-connect="localhost:1234" executable="" warmup-ms="0" download-type="NONE" sshConfigName="Q7S FM" uploadFile="/tmp/eive-obsw" defaultGdbServerArgs=":1234 /tmp/eive-obsw">
|
||||||
|
<debugger kind="GDB" isBundled="true" />
|
||||||
|
</custom-gdb-server>
|
||||||
|
<method v="2">
|
||||||
|
<option name="CLION.COMPOUND.BUILD" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
771
CHANGELOG.md
771
CHANGELOG.md
@ -8,9 +8,777 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|||||||
The [milestone](https://egit.irs.uni-stuttgart.de/eive/eive-obsw/milestones)
|
The [milestone](https://egit.irs.uni-stuttgart.de/eive/eive-obsw/milestones)
|
||||||
list yields a list of all related PRs for each release.
|
list yields a list of all related PRs for each release.
|
||||||
|
|
||||||
|
Starting at v2.0.0, this project will adhere to semantic versioning and the the following changes
|
||||||
|
will consitute of a breaking change warranting a new major release:
|
||||||
|
|
||||||
|
- The TMTC interface changes in any shape of form.
|
||||||
|
- The behaviour of the OBSW changes in a major shape or form relevant for operations
|
||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
# [v1.14.0]
|
# [v1.36.0] 2023-03-08
|
||||||
|
|
||||||
|
eive-tmtc: v2.17.2
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Star Tracker Assembly
|
||||||
|
- New `REBOOT_COUNTER` and `INDIVIDUAL_BOOT_COUNTS` events. The first contains the total boot count
|
||||||
|
as a u64, the second one contains the individual boot counts as 4 u16. Add new core controller
|
||||||
|
action command `ANNOUNCE_BOOT_COUNTS` with action ID 3 which triggers both events. These events
|
||||||
|
will also be triggered on each reboot.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Persistent TM stores will now create new files on each reboot.
|
||||||
|
- Fast ACS subsystem commanding: Command SUS board consecutively with other devices now
|
||||||
|
- Star Tracker: Use ground confguration for EM and flight config for FM by default.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Command TCS controller off first for TCS subsystem transition to off.
|
||||||
|
- Health handling for TCS board assembly
|
||||||
|
- Mode fallback from IDLE mode to SAFE mode due to ACS errors/events now works properly for
|
||||||
|
the ACS subsystem
|
||||||
|
- Bugfix in IDLE transition for system.
|
||||||
|
- `std::filesystem` API usages: Avoid exceptions by using variants which return an error code
|
||||||
|
instead of throwing exceptions.
|
||||||
|
- GPS fix loss was not reported if mode is unset.
|
||||||
|
- Star Tracker: OFF to NORMAL transition now posssible. Requires FSFW bump which sets
|
||||||
|
transition source modes properly for those transitions.
|
||||||
|
FSFW PR: https://egit.irs.uni-stuttgart.de/eive/fsfw/pulls/131
|
||||||
|
- Star Tracker JSON initialization is now done during object initization instead of redoing it
|
||||||
|
when building a command. This avoids missed deadlines issues in the ACS PST.
|
||||||
|
- Allow arbitrary submodes for dual lane boards to avoid FDIR reactions of subsystem components.
|
||||||
|
Bump FSFW to allow this.
|
||||||
|
- PUS 15 was not scheduled
|
||||||
|
- Transmitter timeout set to 2 minutes instead of 15 minutes. This will prevent to discharge the
|
||||||
|
battery in case the syrlinks starts transmitting due to detection of unintentional bitlock. This
|
||||||
|
happened e.g. on ground when the uplink to the flying latop was established.
|
||||||
|
- ACS system components are now always scheduled (EM specific)
|
||||||
|
|
||||||
|
# [v1.35.1] 2023-03-04
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- ACS Board Assembly FDIR: Prevent permanent SAFE mode fallbacks by introducing special health
|
||||||
|
handling.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/418/files
|
||||||
|
- Watchdog fixes
|
||||||
|
- IMTQ timing fixes
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Add IMTQ assembly
|
||||||
|
|
||||||
|
# [v1.35.0] 2023-03-04
|
||||||
|
|
||||||
|
eive-tmtc: v2.16.4
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Improved the OBSW watchdog by adding a watch functionality. The watch functionality is optional
|
||||||
|
and has to be enabled specifically by the application being watched by the watchdog when
|
||||||
|
starting the watchdog. If the watch functionality is enabled and the OBSW has not pinged
|
||||||
|
the watchdog via the FIFO for 2 minutes, the watchdog will restart the OBSW service via systemd.
|
||||||
|
The primary OBSW will only activate the watch functionality if it is the OBSW inside the
|
||||||
|
`/usr/bin` directory. This allows debugging the system by leaving flashed or manually copied
|
||||||
|
debugging images 2 minutes to start the watchdog without the watch functionality.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Bumped FSFW: `Countdown` and `Stopwatch` use new monotonic clock API now.
|
||||||
|
- IMTQ: Various fixes, most notably missing buffer time after starting MGM measurement
|
||||||
|
and corrections for actuator commanding.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/430
|
||||||
|
|
||||||
|
# [v1.34.0] 2023-03-03
|
||||||
|
|
||||||
|
eive-tmtc: v2.16.3
|
||||||
|
|
||||||
|
This might include the fix for the race condition where CPU usage jumped to 200 %. The race
|
||||||
|
condition was traced to the `Countdown` class, more specifically to the `getUptime` function where
|
||||||
|
the `/proc/uptime` file is read.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- The SD card prefix is now set earlier inside the `CoreController` constructor
|
||||||
|
- The watchdog handling was moved outside the `CoreController` into the main loop.
|
||||||
|
- Moved polling of all SPI parts to the same PST.
|
||||||
|
- Allow quicker transition for the EIVE system component by allowing consecutive TCS and ACS
|
||||||
|
component commanding again.
|
||||||
|
- Changed a lot of lock guards to use timeouts
|
||||||
|
- Queue sizes of TCP/UDP servers increased from 20 to 50
|
||||||
|
- Significantly simplified and improved lock guard handling in TCS and ACS board polling
|
||||||
|
tasks.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- IMTQ: Sets were filled with wrong data, e.g. Raw MTM was filled with calibrated MTM measurements.
|
||||||
|
- Set RM3100 dataset to valid.
|
||||||
|
- Fixed units in calculation of ACS control laws safe and detumble.
|
||||||
|
- Bump FSFW for change in Countdown: Use system clock instead of reading uptime from file
|
||||||
|
to prevent possible race condition.
|
||||||
|
- GPS: No fix considered a fault now after 30 minutes instead of 5 hours.
|
||||||
|
- SUS Assembly FDIR: Prevent permanent SAFE mode fallbacks by introducing special health
|
||||||
|
handling.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/418/files
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Added Syrlinks Assembly object to allow recovery handling and to fix faulty FDIR behaviour.
|
||||||
|
|
||||||
|
# [v1.33.0] 2023-03-01
|
||||||
|
|
||||||
|
eive-tmtc: v2.16.2
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Move ACS board polling to separate worker thread.
|
||||||
|
- Move SUS board polling to separate worker thread.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Linux GPS handler now checks the individual `*_SET` flags when analysing the `gpsd` struct.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/400
|
||||||
|
|
||||||
|
# [v1.32.0] 2023-02-24
|
||||||
|
|
||||||
|
eive-tmtc: v2.16.1
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- ADIS1650X: Added missing MDL_RANG pool entry for configuration set
|
||||||
|
- Bumped FSFW for bugfix in health service: No execution complete for targeted health announce
|
||||||
|
command.
|
||||||
|
- Removed matrix determinant calculation as part of the `MEKF`, which would take about
|
||||||
|
300ms of runtime
|
||||||
|
- Resetting the `MEKF` now also actually resets its stored state
|
||||||
|
- Bumped FSFW for bugfix in destination handler: Better error handling and able to process
|
||||||
|
destination folder path.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Added basic persistent TM store for PUS telemetry and basic interface to dump and delete
|
||||||
|
telemetry. Implementation is based on a timed rotating files, with the addition that files
|
||||||
|
might be generated more often if the maximum file size of 8192 bytes is exceeded.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/320/files
|
||||||
|
- Commented out commanding of actuators as part of the `AcsController`
|
||||||
|
- Collection sets of the `AcsController` now get updated before running the actual ACS
|
||||||
|
algorithm
|
||||||
|
- `GpsController` now always gets scheduled
|
||||||
|
- The `CoreController` now initializes the initial clock from the time file as early as possible
|
||||||
|
(in the constructor) if possible, which should usually be the case.
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Added basic persistent TM store for PUS telemetry and basic interface to dump and delete
|
||||||
|
telemetry.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/320/files
|
||||||
|
- `ExecutableComIfDummy` class to have a dummy for classes like the RTD polling class.
|
||||||
|
- Added `AcsController` action command to confirm solar array deployment, which then deletes
|
||||||
|
two files
|
||||||
|
- Added `AcsController` action command to reset `MEKF`
|
||||||
|
- `GpsCtrlDummy` now initializes the `gpsSet`
|
||||||
|
- `RwDummy` now initializes with a non faulty state
|
||||||
|
|
||||||
|
|
||||||
|
# [v1.31.1] 2023-02-23
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- ADIS1650X configuration set was empty because the local pool variables were not registered.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/402
|
||||||
|
- ACS Controller: Correction for size of MEKF dataset and some optimization and fixes
|
||||||
|
for actuator control which lead to a crash.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/403
|
||||||
|
|
||||||
|
# [v1.31.0] 2023-02-23
|
||||||
|
|
||||||
|
eive-tmtc: v2.16.0
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Usage of floats as iterators and using them to calculate a uint8_t index in `SusConverter`
|
||||||
|
- Removed unused variables in the `AcsController`
|
||||||
|
- Remove shadowing variables inside ACS assembly classes.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/issues/385
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
COM PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/364
|
||||||
|
|
||||||
|
* Moved transmitter timer and handling of carrier and bitlock event from CCSDS handler to COM
|
||||||
|
subsystem
|
||||||
|
* Added parameter command to be able to change the transmitter timeout
|
||||||
|
* Solves [#362](https://egit.irs.uni-stuttgart.de/eive/eive-obsw/issues/362)
|
||||||
|
* Solves [#360](https://egit.irs.uni-stuttgart.de/eive/eive-obsw/issues/360)
|
||||||
|
* Solves [#361](https://egit.irs.uni-stuttgart.de/eive/eive-obsw/issues/361)
|
||||||
|
* Solves [#386](https://egit.irs.uni-stuttgart.de/eive/eive-obsw/issues/386)
|
||||||
|
- All `targetQuat` functions in `Guidance` now return the target quaternion (target
|
||||||
|
in ECI frame), which is passed on to `CtrlValData`.
|
||||||
|
- Moved polling sequence table definitions and source code to `mission/core` folder.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/395
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- `MEKF` now returns an unique returnvalue depending on why the function terminates. These
|
||||||
|
returnvalues are used in the `AcsController` to determine on how to procede with its
|
||||||
|
perform functions. In case the `MEKF` did terminate before estimating the quaternion
|
||||||
|
and rotational rate, an info event will be triggered. Another info event can only be
|
||||||
|
triggered after the `MEKF` has run successfully again. If the `AcsController` tries to
|
||||||
|
perform any pointing mode and the `MEKF` fails, the `performPointingCtrl` function will
|
||||||
|
set the RWs to the last RW speeds and set a zero dipole vector. If the `MEKF` does not
|
||||||
|
recover within 5 cycles (2 mins) the `AcsController` triggers another event, resulting in
|
||||||
|
the `AcsSubsystem` being commanded to `SAFE`.
|
||||||
|
- `MekfData` now includes `mekfStatus`
|
||||||
|
- `CtrlValData` now includes `tgtRotRate`
|
||||||
|
|
||||||
|
# [v1.30.0] 2023-02-22
|
||||||
|
|
||||||
|
eive-tmtc: v2.14.0
|
||||||
|
|
||||||
|
Event IDs for PDEC handler have changed in a breaking manner.
|
||||||
|
|
||||||
|
## Added and Fixed
|
||||||
|
|
||||||
|
- PDEC: Added basic FDIR to limit the number of allowed TC interrupts and to allow complete task
|
||||||
|
lockups in the case an IRQ is immediately re-raised by the PDEC module. This is done by only
|
||||||
|
allowing a certain number of handled IRQs (whether they yield a valid TC or not) during
|
||||||
|
time windows of one second. Right now, 800 IRQs/TCs are allowed per time window.
|
||||||
|
This time window is reset if a TC reception timeout after 500ms occurs. TBD whether the maximum
|
||||||
|
allowed number will be a configurable parameter. If the number of occured IRQs is exceeded,
|
||||||
|
an event is triggered and the task is delayed for 400 ms.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/393
|
||||||
|
|
||||||
|
# [v1.29.1] 2023-02-21
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Limit number of handled messages for core TM handlers:
|
||||||
|
- https://egit.irs.uni-stuttgart.de/eive/eive-obsw/issues/391
|
||||||
|
- https://egit.irs.uni-stuttgart.de/eive/eive-obsw/issues/390
|
||||||
|
- https://egit.irs.uni-stuttgart.de/eive/eive-obsw/issues/389
|
||||||
|
- HeaterHandler better handling for faulty message reception
|
||||||
|
Issue: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/issues/388
|
||||||
|
- Disable stopwatch in MAX31865 polling task
|
||||||
|
|
||||||
|
# [v1.29.0] 2023-02-21
|
||||||
|
|
||||||
|
eive-tmtc: v2.13.0
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Refactored IMTQ handlers to also perform low level I2C communication tasks in separate thread.
|
||||||
|
This avoids the various delays needed for I2C communication with that device inside the ACS PST.
|
||||||
|
(e.g. 1 ms delay between each transfer, or 10 ms integration delay for MGM measurements).
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Added new heater info set for the TCS controller. This set contains the heater switch states
|
||||||
|
and the current draw.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/351
|
||||||
|
- The HeaterHandler now exposes a mode which reflects whether the heater power
|
||||||
|
is on or off. It also triggers mode events for its heater children objects
|
||||||
|
which show whether the specific heaters are on or off. The heater handler
|
||||||
|
will be part of the TCS tree.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/351
|
||||||
|
|
||||||
|
# [v1.28.1] 2023-02-21
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Patch version which compiles for EM
|
||||||
|
- CFDP Funnel bugfix: CCSDS wrapping was buggy and works properly now.
|
||||||
|
- PDEC: Some adaptions to prevent task lockups on invalid FAR states.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/393
|
||||||
|
- CMakeLists.txt fix which broke CI/CD builds when server could not retrieve full git SHA.
|
||||||
|
- Possible regression in the MAX31865 polling task: Using a `ManualCsLockGuard` for reconfiguring
|
||||||
|
and then polling the sensor is problematic, invalid sensor values will be read.
|
||||||
|
CS probably needs to be de-asserted or some other HW/SPI specific issue. Letting the SPI ComIF
|
||||||
|
do the locking does the job.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Add `-Wshadow=local` shadowing warnings and fixed all of them
|
||||||
|
- Updated generated CSV files: Support for skip directive and explicit
|
||||||
|
"No description" info string
|
||||||
|
- The polling threads for actuator polling now have a slightly higher priority than the ACS PST
|
||||||
|
to ensure timing requirements are met.
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- git post checkout hook which initializes and updates the submodules
|
||||||
|
automatically.
|
||||||
|
|
||||||
|
# [v1.28.0] 2023-02-17
|
||||||
|
|
||||||
|
eive-tmtc: v2.12.7
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- In case the ACS Controller does recognize more than one RW to be invalid and therefore not
|
||||||
|
available, it does not perform pointing control but aborts shortly after `sensorProcessing`. If the
|
||||||
|
problem persits for 5 ACS cycles, the `MULTIPLE_RW_INVALID` event is triggered, which invokes the
|
||||||
|
transition of the `AcsSubsystem` to safe mode.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Igrf13 model vector now outputs as uT instead of nT
|
||||||
|
- Changed timings for `AcsPst`, more time for sun sensors.
|
||||||
|
- Added values for MGM sensor fusion
|
||||||
|
- Refactored RW Software: Polling runs in separate thread, all RWs are now polled in under 60 ms.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/381
|
||||||
|
- Bumped FSFW to allow initializing child modes in `SubsystemBase` derived objects.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Fixed values for GYR sensor fusion
|
||||||
|
- Fixed speed types for `rwHandlingParameter`
|
||||||
|
- Pseudo inverse used for allocating torque to RWs and RW antistiction now actually consider the
|
||||||
|
state of the RWs
|
||||||
|
|
||||||
|
# [v1.27.2] 2023-02-14
|
||||||
|
|
||||||
|
Reaction Wheel handling was determined to be (quasi) broken and needs to be fixed in future release
|
||||||
|
to be usable by ACS controller.
|
||||||
|
|
||||||
|
eive-tmtc: v2.12.6
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Function for the ACS controller to command MTQ and RWs called by all subroutines
|
||||||
|
- RwHandler now handles commanding of RW speeds via RwSpeedActuationSet
|
||||||
|
- Tracing supports which allows checking whether threads are running as usual.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Remove 2 TCS threads.
|
||||||
|
- Move low level polling into ACS PST, move high level device handlers into TCS system task.
|
||||||
|
- ActCmds now returns command vectors as integers as required by the actuators
|
||||||
|
and scales them to the appropriate range
|
||||||
|
- All RwHandler are now polled five times per ACS cycle
|
||||||
|
- Remove 2 TCS threads. Move low level polling into ACS PST, move high level device handlers into
|
||||||
|
TCS system task.
|
||||||
|
- Further reduce number of threads:
|
||||||
|
1. Remove PUS low priority task, move assigned threads to the generic system task
|
||||||
|
2. Group events and verification tasks into PUS high priority task
|
||||||
|
3. Group all other components into PUS medium priority task
|
||||||
|
4. Add SCEX device handler to PL task, remove dedicated thread
|
||||||
|
|
||||||
|
## Removed
|
||||||
|
|
||||||
|
- lwgps dependency not compiled anymore, is not used
|
||||||
|
|
||||||
|
# [v1.27.1] 2023-02-13
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Fix for SPI ComIF: Set transfer size to 0 for failed transfers
|
||||||
|
- Fix shadowing issue with locks in MAX31865 low level handler
|
||||||
|
|
||||||
|
# [v1.27.0] 2023-02-13
|
||||||
|
|
||||||
|
eive-tmtc: v2.12.5
|
||||||
|
|
||||||
|
Added EIVE system top mode component. Currently, only SAFE and IDLE mode are
|
||||||
|
implemented, and the system does not do more than commanding TCS and ACS
|
||||||
|
into the correct modes. It does not have a lot of mode tracking capabilities
|
||||||
|
yet because the ACS controller might alternate between SAFE and DETUMBLE.
|
||||||
|
It takes around 5-10 seconds for the EIVE system to reach the SAFE mode.
|
||||||
|
|
||||||
|
The new system is used at software boot to command the satellite into safe mode
|
||||||
|
on each reboot. This behaviour can be disabled with the
|
||||||
|
`OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP` flag.
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- New EIVE system component like explained above.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- The satellite now commands itself into SAFE mode on each reboot, which
|
||||||
|
triggers a lot of events on each SW reboot. The TCS subsystem will commanded
|
||||||
|
to NORMAL mode immediately while the ACS subsystem will be commanded to
|
||||||
|
SAFE mode. The payload subsystem will be commanded OFF.
|
||||||
|
- `RELEASE_BUILD` flag moved to `commonConfig.h`
|
||||||
|
- The ACS subsystem transitions are now staggered: The SUS board assembly
|
||||||
|
is commanded as a separate transition. This reduces the risk of long bus lockups.
|
||||||
|
- No INFO mode event translations for release builds to reduce number of
|
||||||
|
printouts.
|
||||||
|
- More granular locking inside the MAX31865 low level read handler.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- More DHB thermal module fixes.
|
||||||
|
- ACS PST frequency extended to 0.8 seconds in debug builds to avoid SPI
|
||||||
|
bus lockups.
|
||||||
|
- Local datapool fixes for the `PlocSupervisorHandler`
|
||||||
|
|
||||||
|
# [v1.26.4] 2023-02-10
|
||||||
|
|
||||||
|
eive-tmtc: v2.12.3
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- `SdCardManager.cpp` `isSdCardUsable`: Use `ext4` instead of `vfat` to check read-only state.
|
||||||
|
|
||||||
|
# [v1.26.3] 2023-02-09
|
||||||
|
|
||||||
|
eive-tmtc: v2.12.2
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- First version of a TCS controller heater control loop, but
|
||||||
|
the loop is disabled for now.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Reworked dummy handling for the TCS controller.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/325
|
||||||
|
- Generator scripts now generate files for hosted and for Q7S build.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- GPS Controller: Set fix value to 0 when switching off to allow
|
||||||
|
`GPS_FIX_CHANGE` to work when switching the GPS back on.
|
||||||
|
|
||||||
|
# [v1.26.2] 2023-02-08
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- ACS Controller scheduling is now configurable via the `eive/definitions.h` file. Also ensured
|
||||||
|
that scheduling is done in big blocks to reduce risk of missed deadlines.
|
||||||
|
- Replaced chained locks for polling new sensor data to the `AcsController`.
|
||||||
|
- Made TM store even larger.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Bugfix for PDEC handler which causes the PIR register of the PDEC to never
|
||||||
|
be cleared on release builds. The dummy variable used to read the register
|
||||||
|
needs to be declared volatile to avoid compiler optimizations.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/374
|
||||||
|
- Bumped FSFW for fix of possible memory leaks in TCP/IP TMTC bridge
|
||||||
|
inside the FSFW.
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Create TCS controller for EM build.
|
||||||
|
|
||||||
|
# [v1.26.1] 2023-02-08
|
||||||
|
|
||||||
|
- Initialize parameter helper in ACS controller.
|
||||||
|
|
||||||
|
# [v1.26.0] 2023-02-08
|
||||||
|
|
||||||
|
eive-tmtc v2.12.1
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
### ACS
|
||||||
|
|
||||||
|
- Readded calibration matrices for MGM calibration.
|
||||||
|
- Added calculation of satellite velocity vector from GPS position data
|
||||||
|
- Added detumble mode using GYR values
|
||||||
|
- Added inertial pointing mode
|
||||||
|
- Added nadir pointing mode
|
||||||
|
- Added ground station target mode
|
||||||
|
- Added antistiction for RWs
|
||||||
|
- Added `sunTargetSafe` differentiation for LEOP
|
||||||
|
- Added check for existance of `SD_0_SKEWED_PTG_FILE` and `SD_1_SKEWED_PTG_FILE` to determine
|
||||||
|
which `sunTargetSafe` to use
|
||||||
|
- Added `gpsVelocity` and `gpsPosition` to `gpsProcessed`
|
||||||
|
- Removed deprecated `OutputValues`
|
||||||
|
- Added `HasParametersIF` to `AcsParameters`
|
||||||
|
- Added `ReceivesParameterMessagesIF` and `ParameterHelper` to `AcsController`
|
||||||
|
- Updated `AcsParameters` with actual values and changed structure
|
||||||
|
- Sun vector model and magnetic field vector model calculations are always executed now
|
||||||
|
- `domainId` is now used as identifier for parameter structs
|
||||||
|
- Changed onboard GYR value handling from deg/s to rad/s
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Single sourcing the version information into `CMakeLists.txt`. The `git describe` functionality
|
||||||
|
is only used to retrieve the git SHA hash now. Also removed `OBSWVersion.h` accordingly.
|
||||||
|
- Build system: Fixed small bug, where the version itself was
|
||||||
|
stored as the git SHA hash in `commonConfig.h`. This will be
|
||||||
|
an empty string now for regular versions.
|
||||||
|
- Bump FSFW for important fix in PUS mode service.
|
||||||
|
|
||||||
|
### ACS
|
||||||
|
|
||||||
|
- Bugfixes in 'SensorProcessing' where previously MGM values would be calibrated before being
|
||||||
|
transformed in body RF. However, the calibration values are in the body RF. Also fixed the
|
||||||
|
validity flag of 'mgmVecTotDerivative'.
|
||||||
|
- Fixed calculation of model sun vector
|
||||||
|
- Fixed calculation of model magnetic field vector
|
||||||
|
- Fixed MEKF algorithm
|
||||||
|
- Fixed several variable initializations
|
||||||
|
- Fixed several variable types
|
||||||
|
- Fixed use of `sunMagAngleMin` for safe mode
|
||||||
|
- Fixed MEKF not using correct `sampleTime`
|
||||||
|
- Fixed assignment of `SUS0` and `SUS6` calibration matrices due to wiring being mixed up
|
||||||
|
- Various smaller bugfixes
|
||||||
|
|
||||||
|
# [v1.25.0] 2023-02-06
|
||||||
|
|
||||||
|
eive-tmtc version: v2.12.0
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Updated Subsystem mode IDs to avoid clashes with regular device handler modes.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- `GpsHyperionLinuxController`: Fix `gpsd` polling by continuously calling `gps_read` in one cycle
|
||||||
|
until it does not have any data left anymore. Also, the data is now polled in a permanent loop,
|
||||||
|
where controller handling is done on 0.2 second timeouts.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/368
|
||||||
|
|
||||||
|
# [v1.24.0] 2023-02-03
|
||||||
|
|
||||||
|
- eive-tmtc v2.10.0
|
||||||
|
- `AcsSubsystem`: OFF, SAFE and DETUMBLE mode were tested. Auto-transitions SAFE <-> DETUMBLE tested
|
||||||
|
as well. Other modes still need to be tested.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- `AcsController`: Parameter fix in `DetumbleParameter`.
|
||||||
|
- Set GPS set entries to invalid on MODE_OFF command.
|
||||||
|
- Bump FSFW for bugfix in `setNormalDatapoolEntriesInvalid` where the validity was not set to false
|
||||||
|
properly
|
||||||
|
- Fixed usage of uint instead of int for commanding MTQ. Also fixed the range in which the ACS Ctrl
|
||||||
|
commands the MTQ to match the actual commanding range.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/363
|
||||||
|
- Regression: Revert swap of SUS0 and SUS6. Those devices are on separate power lines. In a
|
||||||
|
future fix, the calibration matrices of SUS0 and SUS6 will be swapped.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Update ACS scheduling to represent the actual ACS design. There is one ACS PST now for all
|
||||||
|
timing sensitive ACS operations. In the debug builds, the new ACS polling sequence table
|
||||||
|
will have a period of 0.6 seconds, but will remain 0.4 seconds for the release build.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/365
|
||||||
|
- `ACS::SensorValues` is now an ACS controller member to reduce the risk of stack overflow.
|
||||||
|
- ACS Subsystem Sequence Mode IDs updated.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/365
|
||||||
|
TMTC PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/130
|
||||||
|
- Update and tweak ACS subsystem to represent the actual ACS design
|
||||||
|
- Event handling in the ACS subsystem for events triggered by the ACS controller.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/365
|
||||||
|
|
||||||
|
# [v1.23.1] 2023-02-02
|
||||||
|
|
||||||
|
TMTC rev: 15adb9bf2ec68304a4f87b8dd418c1a8353283a3
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Bugfix in FSFW where the sequence flags of the PUS packets were set to continuation segment (0b00)
|
||||||
|
instead of unsegmented (0b11).
|
||||||
|
- Bugfix in FSFW where the MGM RM3100 value Z axis data was parse incorrectly.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/fsfw/pulls/123
|
||||||
|
|
||||||
|
# [v1.23.0] 2023-02-01
|
||||||
|
|
||||||
|
TMTC version: v2.9.0
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Bumped FSFW to include improvements and bugfix for Health Service. The health service now
|
||||||
|
supports the announce all health info command.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/725
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Bumped FSFW to include fixes in the time service.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/726
|
||||||
|
- The CCSDS handler starts the transmitter timer each time it is commanded to MODE_ON and times
|
||||||
|
out the timer when the handler is commanded to MODE_OFF
|
||||||
|
- If the timer is timed out the CCSDS handler will disable the TX clock which will cause the
|
||||||
|
syrlinks to got to standby mode
|
||||||
|
- PDEC handler now parses the FAR register also in interrupt mode
|
||||||
|
|
||||||
|
|
||||||
|
# [v1.22.1] 2023-01-30
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Updated FSFW to include addition where the `SO_REUSEADDR` option is set
|
||||||
|
on the TCP server, which should improve its ergonomics.
|
||||||
|
|
||||||
|
# [v1.22.0] 2023-01-28
|
||||||
|
|
||||||
|
TMTC version: v2.6.1
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- First COM subsystem implementation. It mirrors the Syrlinks mode/submodes but also takes
|
||||||
|
care of commanding the CCSDS handler. It expects the Syrlinks submodes as mode commands.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/358
|
||||||
|
- The CCSDS handler has has a new submode (3) to configure the default datarate.
|
||||||
|
- Default datarate parameter commanding moved to COM subsystem.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/358
|
||||||
|
|
||||||
|
# [v1.21.0] 2023-01-26
|
||||||
|
|
||||||
|
TMTC version: v2.5.0
|
||||||
|
Syrlinks PR: PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/353
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- The `OBSW_SYRLINKS_SIMULATED` flag is set to 0 for for both EM and FM.
|
||||||
|
- MGM4 handling in ACS sensor processing: Bugfix in `mulScalar` operation
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/354
|
||||||
|
- Subsystem ID clash: CORE subsystem ID was the same as Syrlinks subsystem ID.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Startracker temperature set and PCDU switcher set are diagnostic now
|
||||||
|
- `SyrlinksHkHandler` renamed to `SyrlinksHandler` to better reflect that it does more than
|
||||||
|
just HK and is also responsible for setting the TX mode of the device.
|
||||||
|
- `SyrlinksHandler`: Go to startup immediately because the Syrlinks device should always be on
|
||||||
|
by default.
|
||||||
|
- `SyrlinksHandler`: Go to normal mode at startup.
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- The Syrlinks handler has submodes for the TX mode now: RX Only (0), RX and TX default
|
||||||
|
datarate (1), RX and TX Low Rate (2), RX and TX High Rate (3) and TX Carrier Wave (4).
|
||||||
|
The submodes apply for both ON and NORMAL mode. The default datarate can be updated using
|
||||||
|
a parameter command (domain ID 0 and unique ID 0) with value 0 for low rate and 1 for high rate.
|
||||||
|
- The Syrlinks handler always sets TX to standby when switching off
|
||||||
|
- The Syrlinks handler triggers a new TX_ON event when the transmitter was switched on successfully
|
||||||
|
and a TX_OFF event when it was switched off successfully.
|
||||||
|
- Startracker temperature set and PCDU switcher set are diagnostic now
|
||||||
|
- The CCSDS handler can accept mode commands now. It accepts ON and OFF commands. Furthermore
|
||||||
|
it has a submode for low datarate (1) and high datarate (2) for the ON command.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/352
|
||||||
|
|
||||||
|
# [v1.20.0] 2023-01-24
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- The Q7S SW now checks for a file named `boot_delay_secs.txt` in the home directory.
|
||||||
|
If it exists and the file is empty, it will delay for 6 seconds before continuing
|
||||||
|
with the regular boot. It can also try to read delay seconds from the file.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/340.
|
||||||
|
- Basic TCS Subsystem component.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/319
|
||||||
|
- Expose base set of STR periodic housekeeping packets
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Moved some PDEC/PTME configuration to `common/config/eive/definitions.h`
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/319
|
||||||
|
- The ACS Controller Gyro Sets (raw and processed) and the MEKF dataset are diagnostics now.
|
||||||
|
- Bumped FSFW for Service 11 improvement which includes size and CRC check for contained TC
|
||||||
|
- Syrlinks module now always included for both EM and FM
|
||||||
|
- SA Deployment: Allow specifying the switch interval and the initial channel. This allows testing
|
||||||
|
the new deployment procedure where each channel is burned for half of the whole burn duration.
|
||||||
|
It also allows burning only one channel for the whole burn duration. The autonomous mechanism
|
||||||
|
was adapted to burn each channel for half of the burn time by default.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/347
|
||||||
|
TMTC PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/127
|
||||||
|
- `Max31865RtdLowlevelHandler.cpp`: For each RTD device, the config is now re-written before
|
||||||
|
every read. This seems to fix some issue with invalid temperature sensor readings.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/345
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- `GyroADIS1650XHandler`: Updated handler to determine correct dynamic range from `RANG_MDL`
|
||||||
|
register readout. This is because ADIS16505-3BMLZ devices are used on the ACS board and the
|
||||||
|
previous range setting was wrong. Also fixed a small error properly set internal state
|
||||||
|
on shut-down.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/342
|
||||||
|
- Syrlinks Handler: Read RX frequency shift as 24 bit signed number now. Also include
|
||||||
|
validity handling for datasets.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/350
|
||||||
|
- `GyroADIS1650XHandler`: Changed calculation of angular rate to be sensitivity based instead of
|
||||||
|
max. range based, as previous fix still left an margin of error between ADIS16505 sensors
|
||||||
|
and L3GD20 sensors.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/346
|
||||||
|
|
||||||
|
# [v1.19.0] 2023-01-10
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- 5V stack is now off by default
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- PLOC SUPV: Minor adaptions and important bugfix for UART manager
|
||||||
|
- Allow cloning and building the hosted OBSW version without proprietary libraries,
|
||||||
|
which also avoids the need to have a Gitea account.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/337
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- First version of ACS controller
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/329
|
||||||
|
- Allow commanding the 5V stack internally in software
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/334
|
||||||
|
- Add automatic 5V stack commanding for all connected devices
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/335
|
||||||
|
|
||||||
|
# [v1.18.0] 2022-12-01
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- PLOC Supervisor: Changes baudrate to 921600
|
||||||
|
- Renamed `/dev/ul-plsv` to `/dev/ploc_supv`, is not a UART lite anymore
|
||||||
|
- Renamed `/dev/i2c_eive` to `/dev/i2c_pl` and `/dev/i2c-2` to `/dev/i2c_ps`.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/328
|
||||||
|
|
||||||
|
# [v1.17.0] 2022-11-28
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- PLOC Supervisor Update: Update SW to use newest PLOC SUPV version by TAS
|
||||||
|
PR 1: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/316
|
||||||
|
PR 2: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/324
|
||||||
|
PR 3: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/326
|
||||||
|
|
||||||
|
# [v1.16.0] 2022-11-18
|
||||||
|
|
||||||
|
- It is now possible to compile Linux components for the hosted build conditionally
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/322
|
||||||
|
- ACS Subsystem. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/231
|
||||||
|
- Payload Subsystem. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/231
|
||||||
|
- Add IRQ mode for PDEC handler. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/310
|
||||||
|
- Extended TM funnels to allow multiple TM recipients.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/312
|
||||||
|
- DHB: Transitions to normal mode now possible directly, which simplifies subsystem implementations
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/313
|
||||||
|
- MAX3185 Low Level Handler and Device Handler: Simplifications and bugfixes to allow switching
|
||||||
|
off without triggering unrequested replies
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/313
|
||||||
|
- Add remaining missing TMP1075 device handlers.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/318
|
||||||
|
|
||||||
|
# [v1.15.0] 2022-10-27
|
||||||
|
|
||||||
|
- Consistent device file naming
|
||||||
|
- Remove rad sensor from EM build, lead to weird bugs on EM which
|
||||||
|
prevented `xsc_boot_copy` from working properly
|
||||||
|
- CFDP closure handling is now working
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/307
|
||||||
|
- Safety mechanism for SD card handling on graceful reboots
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/308
|
||||||
|
- Solar Array Deployment handler update
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/305
|
||||||
|
- IMTQ updates as preparation for ACS controller expansion
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/306
|
||||||
|
- P60 Module: Reduce number of set IDs, use same set IDs for core, auxiliary
|
||||||
|
and config HK set across the three PCDU modules
|
||||||
|
|
||||||
|
# [v1.14.1] 11.10.2022
|
||||||
|
|
||||||
|
- Various bugfixes and regression fixes
|
||||||
|
- General file handling at program initialization now works properly again
|
||||||
|
- Scratch buffer preferred SD card handling works again
|
||||||
|
- Use scoped locks in TCS controller to avoid deadlocks
|
||||||
|
|
||||||
|
# [v1.14.0] 10.10.2022
|
||||||
|
|
||||||
- Provide full SW update capability for the OBSW.
|
- Provide full SW update capability for the OBSW.
|
||||||
This includes very basic CFDP integration, a software update
|
This includes very basic CFDP integration, a software update
|
||||||
@ -29,6 +797,7 @@ list yields a list of all related PRs for each release.
|
|||||||
- Fix for EM SW: Always create ACS Task
|
- Fix for EM SW: Always create ACS Task
|
||||||
- Added Scex device handler and Scex uart reader
|
- Added Scex device handler and Scex uart reader
|
||||||
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/303
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/303
|
||||||
|
- ACS Subsystem. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/228
|
||||||
|
|
||||||
# [v1.13.0] 24.08.2022
|
# [v1.13.0] 24.08.2022
|
||||||
|
|
||||||
|
105
CMakeLists.txt
105
CMakeLists.txt
@ -9,9 +9,9 @@
|
|||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
set(OBSW_VERSION_MAJOR_IF_GIT_FAILS 1)
|
set(OBSW_VERSION_MAJOR 1)
|
||||||
set(OBSW_VERSION_MINOR_IF_GIT_FAILS 14)
|
set(OBSW_VERSION_MINOR 36)
|
||||||
set(OBSW_VERSION_REVISION_IF_GIT_FAILS 0)
|
set(OBSW_VERSION_REVISION 0)
|
||||||
|
|
||||||
# set(CMAKE_VERBOSE TRUE)
|
# set(CMAKE_VERBOSE TRUE)
|
||||||
|
|
||||||
@ -71,11 +71,13 @@ if(EIVE_Q7S_EM)
|
|||||||
1
|
1
|
||||||
CACHE STRING "Q7S EM configuration")
|
CACHE STRING "Q7S EM configuration")
|
||||||
set(INIT_VAL 0)
|
set(INIT_VAL 0)
|
||||||
|
set(OBSW_STAR_TRACKER_GROUND_CONFIG 1)
|
||||||
else()
|
else()
|
||||||
set(OBSW_Q7S_EM
|
set(OBSW_Q7S_EM
|
||||||
0
|
0
|
||||||
CACHE STRING "Q7S EM configuration")
|
CACHE STRING "Q7S EM configuration")
|
||||||
set(INIT_VAL 1)
|
set(INIT_VAL 1)
|
||||||
|
set(OBSW_STAR_TRACKER_GROUND_CONFIG 0)
|
||||||
endif()
|
endif()
|
||||||
set(OBSW_ADD_MGT
|
set(OBSW_ADD_MGT
|
||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
@ -98,14 +100,35 @@ set(OBSW_ADD_ACS_BOARD
|
|||||||
set(OBSW_ADD_GPS_CTRL
|
set(OBSW_ADD_GPS_CTRL
|
||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
CACHE STRING "Add GPS controllers")
|
CACHE STRING "Add GPS controllers")
|
||||||
|
set(OBSW_ADD_CCSDS_IP_CORES
|
||||||
|
1
|
||||||
|
CACHE STRING "Add CCSDS IP cores")
|
||||||
|
set(OBSW_TM_TO_PTME
|
||||||
|
1
|
||||||
|
CACHE STRING "Send telemetry to PTME IP core")
|
||||||
|
set(OBSW_TC_FROM_PDEC
|
||||||
|
1
|
||||||
|
CACHE STRING "Poll telecommand from PDEC IP core")
|
||||||
set(OBSW_ADD_TCS_CTRL
|
set(OBSW_ADD_TCS_CTRL
|
||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
CACHE STRING "Add TCS controllers")
|
CACHE STRING "Add TCS controllers")
|
||||||
|
set(OBSW_ADD_HEATERS
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add TCS heaters")
|
||||||
|
set(OBSW_ADD_PLOC_SUPERVISOR
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add PLOC supervisor handler")
|
||||||
|
set(OBSW_ADD_SA_DEPL
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add SA deployment handler")
|
||||||
|
set(OBSW_ADD_PLOC_MPSOC
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add MPSoC handler")
|
||||||
set(OBSW_ADD_ACS_CTRL
|
set(OBSW_ADD_ACS_CTRL
|
||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
CACHE STRING "Add ACS controller")
|
CACHE STRING "Add ACS controller")
|
||||||
set(OBSW_ADD_RTD_DEVICES
|
set(OBSW_ADD_RTD_DEVICES
|
||||||
1
|
${INIT_VAL}
|
||||||
CACHE STRING "Add RTD devices")
|
CACHE STRING "Add RTD devices")
|
||||||
set(OBSW_ADD_RAD_SENSORS
|
set(OBSW_ADD_RAD_SENSORS
|
||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
@ -114,7 +137,7 @@ set(OBSW_ADD_PL_PCDU
|
|||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
CACHE STRING "Add Payload PCDU modukle")
|
CACHE STRING "Add Payload PCDU modukle")
|
||||||
set(OBSW_ADD_SYRLINKS
|
set(OBSW_ADD_SYRLINKS
|
||||||
${INIT_VAL}
|
1
|
||||||
CACHE STRING "Add Syrlinks module")
|
CACHE STRING "Add Syrlinks module")
|
||||||
set(OBSW_ADD_TMP_DEVICES
|
set(OBSW_ADD_TMP_DEVICES
|
||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
@ -128,6 +151,9 @@ set(OBSW_ADD_RW
|
|||||||
set(OBSW_ADD_SCEX_DEVICE
|
set(OBSW_ADD_SCEX_DEVICE
|
||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
CACHE STRING "Add Solar Cell Experiment module")
|
CACHE STRING "Add Solar Cell Experiment module")
|
||||||
|
set(OBSW_SYRLINKS_SIMULATED
|
||||||
|
0
|
||||||
|
CACHE STRING "Syrlinks is simulated")
|
||||||
|
|
||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
# Pre-Sources preparation
|
# Pre-Sources preparation
|
||||||
@ -144,29 +170,18 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
|
|||||||
set(GIT_INFO
|
set(GIT_INFO
|
||||||
${GIT_INFO}
|
${GIT_INFO}
|
||||||
CACHE STRING "Version information retrieved with git describe")
|
CACHE STRING "Version information retrieved with git describe")
|
||||||
list(GET GIT_INFO 1 OBSW_VERSION_MAJOR)
|
# CMakeLists.txt is now single source of information. list(GET GIT_INFO 1
|
||||||
list(GET GIT_INFO 2 OBSW_VERSION_MINOR)
|
# OBSW_VERSION_MAJOR) list(GET GIT_INFO 2 OBSW_VERSION_MINOR) list(GET
|
||||||
list(GET GIT_INFO 3 OBSW_VERSION_REVISION)
|
# GIT_INFO 3 OBSW_VERSION_REVISION)
|
||||||
list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1)
|
list(LENGTH GIT_INFO LIST_LEN)
|
||||||
if(NOT OBSW_VERSION_MAJOR)
|
if(LIST_LEN GREATER 4)
|
||||||
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
|
list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1)
|
||||||
endif()
|
|
||||||
if(NOT OBSW_VERSION_MINOR)
|
|
||||||
set(FSFW_SUBVERSION ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
|
|
||||||
endif()
|
|
||||||
if(NOT OBSW_VERSION_REVISION)
|
|
||||||
set(FSFW_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
|
|
||||||
endif()
|
endif()
|
||||||
set(GIT_VER_HANDLING_OK TRUE)
|
set(GIT_VER_HANDLING_OK TRUE)
|
||||||
else()
|
else()
|
||||||
set(GIT_VER_HANDLING_OK FALSE)
|
set(GIT_VER_HANDLING_OK FALSE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(NOT GIT_VER_HANDLING_OK)
|
|
||||||
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
|
|
||||||
set(OBSW_VERSION_MINOR ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
|
|
||||||
set(OBSW_VERSION_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Set names and variables
|
# Set names and variables
|
||||||
set(OBSW_NAME ${CMAKE_PROJECT_NAME})
|
set(OBSW_NAME ${CMAKE_PROJECT_NAME})
|
||||||
@ -209,7 +224,8 @@ set(LIB_ARCSEC_PATH ${THIRD_PARTY_FOLDER}/arcsec_star_tracker)
|
|||||||
set(LIB_JSON_PATH ${THIRD_PARTY_FOLDER}/json)
|
set(LIB_JSON_PATH ${THIRD_PARTY_FOLDER}/json)
|
||||||
|
|
||||||
set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF)
|
set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF)
|
||||||
set(EIVE_ADD_LINUX_FILES False)
|
set(EIVE_ADD_LINUX_FILES OFF)
|
||||||
|
set(FSFW_ADD_TMSTORAGE ON)
|
||||||
|
|
||||||
# Analyse different OS and architecture/target options, determine BSP_PATH,
|
# Analyse different OS and architecture/target options, determine BSP_PATH,
|
||||||
# display information about compiler etc.
|
# display information about compiler etc.
|
||||||
@ -229,12 +245,15 @@ if(TGT_BSP)
|
|||||||
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
|
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
|
||||||
if(NOT BUILD_Q7S_SIMPLE_MODE)
|
if(NOT BUILD_Q7S_SIMPLE_MODE)
|
||||||
set(EIVE_ADD_LINUX_FILES TRUE)
|
set(EIVE_ADD_LINUX_FILES TRUE)
|
||||||
|
set(EIVE_ADD_LINUX_FSFWCONFIG TRUE)
|
||||||
set(ADD_GOMSPACE_CSP TRUE)
|
set(ADD_GOMSPACE_CSP TRUE)
|
||||||
set(ADD_GOMSPACE_CLIENTS TRUE)
|
set(ADD_GOMSPACE_CLIENTS TRUE)
|
||||||
set(FSFW_HAL_ADD_LINUX ON)
|
set(FSFW_HAL_ADD_LINUX ON)
|
||||||
set(FSFW_HAL_LINUX_ADD_LIBGPIOD ON)
|
set(FSFW_HAL_LINUX_ADD_LIBGPIOD ON)
|
||||||
set(FSFW_HAL_LINUX_ADD_PERIPHERAL_DRIVERS ON)
|
set(FSFW_HAL_LINUX_ADD_PERIPHERAL_DRIVERS ON)
|
||||||
endif()
|
endif()
|
||||||
|
elseif(UNIX)
|
||||||
|
set(EIVE_ADD_LINUX_FILES ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/raspberrypi")
|
if(TGT_BSP MATCHES "arm/raspberrypi")
|
||||||
@ -269,6 +288,19 @@ if(TGT_BSP)
|
|||||||
else()
|
else()
|
||||||
# Required by FSFW library
|
# Required by FSFW library
|
||||||
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
|
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
|
||||||
|
if(UNIX)
|
||||||
|
set(EIVE_ADD_LINUX_FILES ON)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(BuildType)
|
||||||
|
set_build_type()
|
||||||
|
|
||||||
|
set(FSFW_DEBUG_INFO 0)
|
||||||
|
set(Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 0)
|
||||||
|
if(RELEASE_BUILD MATCHES 0)
|
||||||
|
set(FSFW_DEBUG_INFO 1)
|
||||||
|
set(Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Configuration files
|
# Configuration files
|
||||||
@ -317,6 +349,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||||||
"-Wimplicit-fallthrough=1"
|
"-Wimplicit-fallthrough=1"
|
||||||
"-Wno-unused-parameter"
|
"-Wno-unused-parameter"
|
||||||
"-Wno-psabi"
|
"-Wno-psabi"
|
||||||
|
"-Wshadow=local"
|
||||||
"-Wduplicated-cond" # check for duplicate conditions
|
"-Wduplicated-cond" # check for duplicate conditions
|
||||||
"-Wduplicated-branches" # check for duplicate branches
|
"-Wduplicated-branches" # check for duplicate branches
|
||||||
"-Wlogical-op" # Search for bitwise operations instead of logical
|
"-Wlogical-op" # Search for bitwise operations instead of logical
|
||||||
@ -369,22 +402,20 @@ if(EIVE_ADD_JSON_LIB)
|
|||||||
add_subdirectory(${LIB_JSON_PATH})
|
add_subdirectory(${LIB_JSON_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(thirdparty/rapidcsv)
|
add_subdirectory(thirdparty)
|
||||||
|
|
||||||
if(EIVE_ADD_LINUX_FILES)
|
if(EIVE_ADD_LINUX_FILES)
|
||||||
add_subdirectory(${LIB_ARCSEC_PATH})
|
if(TGT_BSP MATCHES "arm/q7s")
|
||||||
|
add_subdirectory(${LIB_GOMSPACE_PATH})
|
||||||
|
add_subdirectory(${LIB_ARCSEC_PATH})
|
||||||
|
endif()
|
||||||
add_subdirectory(${LINUX_PATH})
|
add_subdirectory(${LINUX_PATH})
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(${BSP_PATH})
|
add_subdirectory(${BSP_PATH})
|
||||||
|
|
||||||
if(UNIX)
|
|
||||||
add_subdirectory(${LIB_GOMSPACE_PATH})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_subdirectory(${COMMON_PATH})
|
add_subdirectory(${COMMON_PATH})
|
||||||
add_subdirectory(${DUMMY_PATH})
|
add_subdirectory(${DUMMY_PATH})
|
||||||
|
|
||||||
add_subdirectory(${LIB_LWGPS_PATH})
|
|
||||||
add_subdirectory(${FSFW_PATH})
|
add_subdirectory(${FSFW_PATH})
|
||||||
add_subdirectory(${LIB_EIVE_MISSION_PATH})
|
add_subdirectory(${LIB_EIVE_MISSION_PATH})
|
||||||
add_subdirectory(${TEST_PATH})
|
add_subdirectory(${TEST_PATH})
|
||||||
@ -451,15 +482,16 @@ endif()
|
|||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
|
|
||||||
# Add libraries
|
# Add libraries
|
||||||
target_link_libraries(${LIB_EIVE_MISSION}
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_FSFW_NAME}
|
||||||
PUBLIC ${LIB_FSFW_NAME} ${LIB_LWGPS_NAME} ${LIB_OS_NAME})
|
${LIB_OS_NAME})
|
||||||
|
|
||||||
target_link_libraries(${LIB_DUMMIES} PUBLIC ${LIB_FSFW_NAME} ${LIB_JSON_NAME})
|
target_link_libraries(${LIB_DUMMIES} PUBLIC ${LIB_FSFW_NAME} ${LIB_JSON_NAME})
|
||||||
|
|
||||||
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_EIVE_MISSION} ${LIB_DUMMIES})
|
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_EIVE_MISSION} ${LIB_DUMMIES})
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/q7s")
|
if(TGT_BSP MATCHES "arm/q7s")
|
||||||
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_GPS} ${LIB_ARCSEC})
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_GPS} ${LIB_ARCSEC}
|
||||||
|
${LIB_GOMSPACE_CLIENTS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION}
|
target_link_libraries(${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION}
|
||||||
@ -469,10 +501,6 @@ if(TGT_BSP MATCHES "arm/egse")
|
|||||||
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
|
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
|
||||||
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_GOMSPACE_CLIENTS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(EIVE_ADD_ETL_LIB)
|
if(EIVE_ADD_ETL_LIB)
|
||||||
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_ETL_TARGET})
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_ETL_TARGET})
|
||||||
endif()
|
endif()
|
||||||
@ -533,6 +561,3 @@ add_custom_command(
|
|||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_SIZE} ${OBSW_BIN_NAME}${FILE_SUFFIX}
|
COMMAND ${CMAKE_SIZE} ${OBSW_BIN_NAME}${FILE_SUFFIX}
|
||||||
COMMENT ${POST_BUILD_COMMENT})
|
COMMENT ${POST_BUILD_COMMENT})
|
||||||
|
|
||||||
include(BuildType)
|
|
||||||
set_build_type()
|
|
||||||
|
86
README.md
86
README.md
@ -18,6 +18,7 @@
|
|||||||
11. [Q7S OBC](#q7s)
|
11. [Q7S OBC](#q7s)
|
||||||
12. [Static Code Analysis](#static-code-analysis)
|
12. [Static Code Analysis](#static-code-analysis)
|
||||||
13. [Eclipse](#eclipse)
|
13. [Eclipse](#eclipse)
|
||||||
|
14. [CLion](#clion)
|
||||||
14. [Running the OBSW on a Raspberry Pi](#rpi)
|
14. [Running the OBSW on a Raspberry Pi](#rpi)
|
||||||
15. [Running OBSW on EGSE](#egse)
|
15. [Running OBSW on EGSE](#egse)
|
||||||
16. [Manually preparing sysroots to compile gpsd](#gpsd)
|
16. [Manually preparing sysroots to compile gpsd](#gpsd)
|
||||||
@ -95,9 +96,7 @@ When using Windows, run theses steps in MSYS2.
|
|||||||
2. Update all the submodules
|
2. Update all the submodules
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git submodule init
|
git submodule update --init
|
||||||
git submodule sync
|
|
||||||
git submodule update
|
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Ensure that the cross-compiler is working with `arm-linux-gnueabihf-gcc --version` and that
|
3. Ensure that the cross-compiler is working with `arm-linux-gnueabihf-gcc --version` and that
|
||||||
@ -290,7 +289,7 @@ helper scripts as well.
|
|||||||
4. Run build command by double clicking the created target or by right clicking
|
4. Run build command by double clicking the created target or by right clicking
|
||||||
the project folder and selecting Build Project.
|
the project folder and selecting Build Project.
|
||||||
|
|
||||||
# <a id="host-commands"></a> Useful and Common Commands (Host)
|
# <a id="host-commands"></a> Useful and Common Commands
|
||||||
|
|
||||||
## Build generation
|
## Build generation
|
||||||
|
|
||||||
@ -319,14 +318,11 @@ cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Release ..
|
|||||||
cmake --build . -j
|
cmake --build . -j
|
||||||
```
|
```
|
||||||
|
|
||||||
### Q7S Watchdog
|
### Hosted OBSW
|
||||||
|
|
||||||
The watchdog will be built along side the primary OBSW binary.
|
|
||||||
|
|
||||||
### Hosted
|
|
||||||
|
|
||||||
You can also use the FSFW OSAL `host` to build on Windows or for generic OSes.
|
You can also use the FSFW OSAL `host` to build on Windows or for generic OSes.
|
||||||
Note: Currently this is not supported.
|
You can use the `clone-submodules-no-privlibs.sh` script to only clone the required (non-private)
|
||||||
|
submodules required to build the hosted OBSW.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mkdir cmake-build-debug && cd cmake-build-debug
|
mkdir cmake-build-debug && cd cmake-build-debug
|
||||||
@ -334,6 +330,21 @@ cmake -DFSFW_OSAL=host -DCMAKE_BUILD_TYPE=Debug ..
|
|||||||
cmake --build . -j
|
cmake --build . -j
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also use the `linux` OSAL:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mkdir cmake-build-debug && cd cmake-build-debug
|
||||||
|
cmake -DFSFW_OSAL=linux -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
|
cmake --build . -j
|
||||||
|
```
|
||||||
|
|
||||||
|
Please note that some additional Linux setup might be necessary.
|
||||||
|
You can find more information in the [Linux section of the FSFW example](https://egit.irs.uni-stuttgart.de/fsfw/fsfw-example-linux-mcu/src/branch/mueller/master/doc/README-linux.md#raising-message-queue-size-limit)
|
||||||
|
|
||||||
|
### Q7S Watchdog
|
||||||
|
|
||||||
|
The watchdog will be built along side the primary OBSW binary.
|
||||||
|
|
||||||
### Unittests
|
### Unittests
|
||||||
|
|
||||||
To build the unittests, the corresponding target must be specified in the build command.
|
To build the unittests, the corresponding target must be specified in the build command.
|
||||||
@ -1055,6 +1066,29 @@ Get fill count:
|
|||||||
xsc_scratch read | wc -c
|
xsc_scratch read | wc -c
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Custom device names in Linux with the `udev` module
|
||||||
|
|
||||||
|
You can assign custom device names using the Linux `udev` system.
|
||||||
|
This works by specifying a rules file inside the `/etc/udev/rules.d` folder
|
||||||
|
which creates a SYMLINK if certain device properties are true.
|
||||||
|
|
||||||
|
Each rule is a new line inside a rules file.
|
||||||
|
For example, the rule
|
||||||
|
|
||||||
|
```txt
|
||||||
|
SUBSYSTEM=="tty", ATTRS{interface}=="Dual RS232-HS", ATTRS{bInterfaceNumber}=="01", SYMLINK+="ploc_supv
|
||||||
|
```
|
||||||
|
|
||||||
|
Will create a symlink `/dev/ploc_supv` if a connected USB device has the
|
||||||
|
same `interface` and `bInterfaceNumber` properties as shown above.
|
||||||
|
|
||||||
|
You can list the properties for a given connected device using `udevadm`.
|
||||||
|
For example, you can do this for a connected example device `/dev/ttyUSB0`
|
||||||
|
by using
|
||||||
|
|
||||||
|
```txt
|
||||||
|
udevadm info -a /dev/ttyUSB0
|
||||||
|
```
|
||||||
|
|
||||||
## Using `system` when debugging
|
## Using `system` when debugging
|
||||||
|
|
||||||
@ -1108,11 +1142,19 @@ cat /proc/tty/driver
|
|||||||
|
|
||||||
## I2C
|
## I2C
|
||||||
|
|
||||||
Getting information about I2C device
|
Getting information about some I2C device
|
||||||
````
|
|
||||||
|
```sh
|
||||||
ls /sys/class/i2c-dev/i2c-0/device/device/driver
|
ls /sys/class/i2c-dev/i2c-0/device/device/driver
|
||||||
````
|
```
|
||||||
This shows the memory mapping of /dev/i2c-0
|
This shows the memory mapping of `/dev/i2c-0`.
|
||||||
|
|
||||||
|
You can use the `i2cdetect` utility to scan for I2C devices.
|
||||||
|
For example, to do this for bus 0 (`/dev/i2c-0`), you can use
|
||||||
|
|
||||||
|
```sh
|
||||||
|
i2cdetect -r -y 0
|
||||||
|
```
|
||||||
|
|
||||||
## CAN
|
## CAN
|
||||||
|
|
||||||
@ -1188,6 +1230,22 @@ Finally, you can convert the generated `.xml` file to HTML with the following co
|
|||||||
cppcheck-htmlreport --file=report.xml --report-dir=cppcheck --source-dir=..
|
cppcheck-htmlreport --file=report.xml --report-dir=cppcheck --source-dir=..
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# <a id="CLion"></a> CLion
|
||||||
|
|
||||||
|
CLion is the recommended IDE for the development of the hosted version of EIVE.
|
||||||
|
You can also set up CLion for cross-compilation of the primary OBSW.
|
||||||
|
|
||||||
|
There is a shared `.idea/cmake.xml` file to get started with this.
|
||||||
|
To make cross-compilation work, two special environment variables
|
||||||
|
need to be set:
|
||||||
|
|
||||||
|
- `ZYNQ_7020_ROOTFS` pointing to the root filesystem
|
||||||
|
- `CROSS_COMPILE` pointing to the the full path of the cross-compiler
|
||||||
|
without the specific tool suffix. For example, if the the cross-compiler
|
||||||
|
tools are located at `/opt/q7s-gcc/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin`,
|
||||||
|
this variable would be set
|
||||||
|
to `/opt/q7s-gcc/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf`
|
||||||
|
|
||||||
# <a id="eclipse"></a> Eclipse
|
# <a id="eclipse"></a> Eclipse
|
||||||
|
|
||||||
When using Eclipse, there are two special build variables in the project properties
|
When using Eclipse, there are two special build variables in the project properties
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#include "ObjectFactory.h"
|
#include "ObjectFactory.h"
|
||||||
|
|
||||||
#include <devConf.h>
|
#include <devConf.h>
|
||||||
#include <fsfw_hal/linux/uart/UartComIF.h>
|
#include <fsfw_hal/linux/serial/SerialComIF.h>
|
||||||
#include <fsfw_hal/linux/uart/UartCookie.h>
|
#include <fsfw_hal/linux/serial/SerialCookie.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "busConf.h"
|
#include "busConf.h"
|
||||||
@ -39,7 +39,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
UartCookie* starTrackerCookie =
|
UartCookie* starTrackerCookie =
|
||||||
new UartCookie(objects::STAR_TRACKER, egse::STAR_TRACKER_UART, UartModes::NON_CANONICAL,
|
new UartCookie(objects::STAR_TRACKER, egse::STAR_TRACKER_UART, UartModes::NON_CANONICAL,
|
||||||
uart::STAR_TRACKER_BAUD, startracker::MAX_FRAME_SIZE * 2 + 2);
|
uart::STAR_TRACKER_BAUD, startracker::MAX_FRAME_SIZE * 2 + 2);
|
||||||
new UartComIF(objects::UART_COM_IF);
|
newSerialComIF(objects::UART_COM_IF);
|
||||||
starTrackerCookie->setNoFixedSizeReply();
|
starTrackerCookie->setNoFixedSizeReply();
|
||||||
StrHelper* strHelper = new StrHelper(objects::STR_HELPER);
|
StrHelper* strHelper = new StrHelper(objects::STR_HELPER);
|
||||||
StarTrackerHandler* starTrackerHandler = new StarTrackerHandler(
|
StarTrackerHandler* starTrackerHandler = new StarTrackerHandler(
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp ObjectFactory.cpp)
|
target_sources(${OBSW_NAME} PUBLIC scheduling.cpp main.cpp ObjectFactory.cpp)
|
||||||
|
|
||||||
add_subdirectory(fsfwconfig)
|
add_subdirectory(fsfwconfig)
|
||||||
add_subdirectory(boardconfig)
|
add_subdirectory(boardconfig)
|
||||||
|
@ -14,7 +14,7 @@ RUN set -ex; \
|
|||||||
rm -rf build-hosted; \
|
rm -rf build-hosted; \
|
||||||
mkdir build-hosted; \
|
mkdir build-hosted; \
|
||||||
cd build-hosted; \
|
cd build-hosted; \
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=linux ..;
|
cmake -DCMAKE_BUILD_TYPE=Release -DOSAL_FSFW=host ..;
|
||||||
|
|
||||||
ENTRYPOINT ["cmake", "--build", "build-hosted"]
|
ENTRYPOINT ["cmake", "--build", "build-hosted"]
|
||||||
CMD ["-j"]
|
CMD ["-j"]
|
||||||
|
@ -1,195 +0,0 @@
|
|||||||
#include "InitMission.h"
|
|
||||||
|
|
||||||
#include <OBSWConfig.h>
|
|
||||||
#include <bsp_hosted/fsfwconfig/pollingsequence/DummyPst.h>
|
|
||||||
#include <fsfw/objectmanager/ObjectManager.h>
|
|
||||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
|
||||||
#include <fsfw/returnvalues/returnvalue.h>
|
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
|
||||||
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
|
||||||
#include <fsfw/tasks/PeriodicTaskIF.h>
|
|
||||||
#include <fsfw/tasks/TaskFactory.h>
|
|
||||||
#include <mission/utility/InitMission.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
#include "ObjectFactory.h"
|
|
||||||
|
|
||||||
#ifdef LINUX
|
|
||||||
ServiceInterfaceStream sif::debug("DEBUG");
|
|
||||||
ServiceInterfaceStream sif::info("INFO");
|
|
||||||
ServiceInterfaceStream sif::warning("WARNING");
|
|
||||||
ServiceInterfaceStream sif::error("ERROR", false, false, true);
|
|
||||||
#else
|
|
||||||
ServiceInterfaceStream sif::debug("DEBUG", true);
|
|
||||||
ServiceInterfaceStream sif::info("INFO", true);
|
|
||||||
ServiceInterfaceStream sif::warning("WARNING", true);
|
|
||||||
ServiceInterfaceStream sif::error("ERROR", true, false, true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ObjectManagerIF* objectManager = nullptr;
|
|
||||||
|
|
||||||
void initmission::initMission() {
|
|
||||||
sif::info << "Building global objects.." << std::endl;
|
|
||||||
/* Instantiate global object manager and also create all objects */
|
|
||||||
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
|
|
||||||
sif::info << "Initializing all objects.." << std::endl;
|
|
||||||
ObjectManager::instance()->initialize();
|
|
||||||
|
|
||||||
/* This function creates and starts all tasks */
|
|
||||||
initTasks();
|
|
||||||
}
|
|
||||||
|
|
||||||
void initmission::initTasks() {
|
|
||||||
TaskFactory* factory = TaskFactory::instance();
|
|
||||||
if (factory == nullptr) {
|
|
||||||
/* Should never happen ! */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#if OBSW_PRINT_MISSED_DEADLINES == 1
|
|
||||||
void (*missedDeadlineFunc)(void) = TaskFactory::printMissedDeadline;
|
|
||||||
#else
|
|
||||||
void (*missedDeadlineFunc)(void) = nullptr;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* TMTC Distribution */
|
|
||||||
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
|
|
||||||
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
|
||||||
ReturnValue_t result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::error << "Object add component failed" << std::endl;
|
|
||||||
}
|
|
||||||
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::error << "Object add component failed" << std::endl;
|
|
||||||
}
|
|
||||||
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::error << "Object add component failed" << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* UDP bridge */
|
|
||||||
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
|
||||||
"TMTC_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
|
||||||
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::error << "Add component UDP Unix Bridge failed" << std::endl;
|
|
||||||
}
|
|
||||||
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
|
||||||
"UDP_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
|
||||||
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::error << "Add component UDP Polling failed" << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PUS Services */
|
|
||||||
PeriodicTaskIF* pusVerification = factory->createPeriodicTask(
|
|
||||||
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
|
||||||
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::error << "Object add component failed" << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
PeriodicTaskIF* eventHandling = factory->createPeriodicTask(
|
|
||||||
"EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
|
||||||
result = eventHandling->addComponent(objects::EVENT_MANAGER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("EVENT_MNGR", objects::EVENT_MANAGER);
|
|
||||||
}
|
|
||||||
result = eventHandling->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS5", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
|
||||||
}
|
|
||||||
|
|
||||||
PeriodicTaskIF* pusHighPrio = factory->createPeriodicTask(
|
|
||||||
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
|
||||||
}
|
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
|
||||||
}
|
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
|
||||||
}
|
|
||||||
|
|
||||||
PeriodicTaskIF* pusMedPrio = factory->createPeriodicTask(
|
|
||||||
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
|
||||||
}
|
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
|
||||||
}
|
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
|
||||||
}
|
|
||||||
|
|
||||||
PeriodicTaskIF* pusLowPrio = factory->createPeriodicTask(
|
|
||||||
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
|
||||||
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
|
||||||
}
|
|
||||||
|
|
||||||
PeriodicTaskIF* thermalTask = factory->createPeriodicTask(
|
|
||||||
"THERMAL_CTL_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
|
||||||
result = thermalTask->addComponent(objects::RTD_0_IC3_PLOC_HEATSPREADER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("RTD_0_dummy", objects::RTD_0_IC3_PLOC_HEATSPREADER);
|
|
||||||
}
|
|
||||||
result = thermalTask->addComponent(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("SUS_0_dummy", objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
|
||||||
}
|
|
||||||
|
|
||||||
result = thermalTask->addComponent(objects::CORE_CONTROLLER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER);
|
|
||||||
}
|
|
||||||
|
|
||||||
result = thermalTask->addComponent(objects::THERMAL_CONTROLLER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
|
|
||||||
}
|
|
||||||
|
|
||||||
FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask(
|
|
||||||
"DUMMY_PST", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
|
||||||
result = dummy_pst::pst(pstTask);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::error << "Failed to add dummy pst to fixed timeslot task" << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if OBSW_ADD_TEST_CODE == 1
|
|
||||||
result = testTask->addComponent(objects::TEST_TASK);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
|
||||||
}
|
|
||||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
|
||||||
|
|
||||||
sif::info << "Starting tasks.." << std::endl;
|
|
||||||
tmTcDistributor->startTask();
|
|
||||||
tmtcBridgeTask->startTask();
|
|
||||||
tmtcPollingTask->startTask();
|
|
||||||
|
|
||||||
pusVerification->startTask();
|
|
||||||
eventHandling->startTask();
|
|
||||||
pusHighPrio->startTask();
|
|
||||||
pusMedPrio->startTask();
|
|
||||||
pusLowPrio->startTask();
|
|
||||||
|
|
||||||
pstTask->startTask();
|
|
||||||
thermalTask->startTask();
|
|
||||||
|
|
||||||
#if OBSW_ADD_TEST_CODE == 1
|
|
||||||
testTask->startTask();
|
|
||||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
|
||||||
|
|
||||||
sif::info << "Tasks started.." << std::endl;
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
#ifndef BSP_LINUX_INITMISSION_H_
|
|
||||||
#define BSP_LINUX_INITMISSION_H_
|
|
||||||
|
|
||||||
namespace initmission {
|
|
||||||
void initMission();
|
|
||||||
void initTasks();
|
|
||||||
}; // namespace initmission
|
|
||||||
|
|
||||||
#endif /* BSP_LINUX_INITMISSION_H_ */
|
|
@ -7,7 +7,6 @@
|
|||||||
#define FSFWCONFIG_OBSWCONFIG_H_
|
#define FSFWCONFIG_OBSWCONFIG_H_
|
||||||
|
|
||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
#include "OBSWVersion.h"
|
|
||||||
|
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
/** All of the following flags should be enabled for mission code */
|
/** All of the following flags should be enabled for mission code */
|
||||||
@ -24,6 +23,7 @@
|
|||||||
#define OBSW_ADD_GPS_0 0
|
#define OBSW_ADD_GPS_0 0
|
||||||
#define OBSW_ADD_GPS_1 0
|
#define OBSW_ADD_GPS_1 0
|
||||||
#define OBSW_ADD_RW 0
|
#define OBSW_ADD_RW 0
|
||||||
|
#define OBSW_DEBUG_TMP1075 0
|
||||||
#define OBSW_ADD_BPX_BATTERY_HANDLER 0
|
#define OBSW_ADD_BPX_BATTERY_HANDLER 0
|
||||||
#define OBSW_ADD_RTD_DEVICES 0
|
#define OBSW_ADD_RTD_DEVICES 0
|
||||||
#define OBSW_ADD_PL_PCDU 0
|
#define OBSW_ADD_PL_PCDU 0
|
||||||
@ -100,6 +100,10 @@
|
|||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
/** CMake Defines */
|
/** CMake Defines */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
#define OBSW_ADD_TMTC_UDP_SERVER 1
|
||||||
|
#define OBSW_ADD_TMTC_TCP_SERVER 1
|
||||||
|
|
||||||
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
||||||
|
|
||||||
#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@
|
#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@
|
||||||
|
@ -1,74 +1,103 @@
|
|||||||
#include "ObjectFactory.h"
|
#include "ObjectFactory.h"
|
||||||
|
|
||||||
|
#include <fsfw/power/DummyPowerSwitcher.h>
|
||||||
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
||||||
#include <fsfw/tmtcservices/PusServiceBase.h>
|
#include <fsfw/tmtcservices/PusServiceBase.h>
|
||||||
#include <mission/controller/ThermalController.h>
|
#include <mission/controller/ThermalController.h>
|
||||||
#include <mission/core/GenericFactory.h>
|
#include <mission/core/GenericFactory.h>
|
||||||
#include <mission/tmtc/TmFunnel.h>
|
#include <mission/tmtc/TmFunnelHandler.h>
|
||||||
#include <objects/systemObjectList.h>
|
#include <objects/systemObjectList.h>
|
||||||
#include <tmtc/pusIds.h>
|
|
||||||
|
|
||||||
|
#include "../mission/utility/DummySdCardManager.h"
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "eive/definitions.h"
|
#include "fsfw/platform.h"
|
||||||
#include "fsfw_tests/integration/task/TestTask.h"
|
#include "fsfw_tests/integration/task/TestTask.h"
|
||||||
|
|
||||||
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
|
#if OBSW_ADD_TMTC_UDP_SERVER == 1
|
||||||
#include "fsfw/osal/common/UdpTcPollingTask.h"
|
#include "fsfw/osal/common/UdpTcPollingTask.h"
|
||||||
#include "fsfw/osal/common/UdpTmTcBridge.h"
|
#include "fsfw/osal/common/UdpTmTcBridge.h"
|
||||||
#else
|
#endif
|
||||||
|
#if OBSW_ADD_TMTC_TCP_SERVER == 1
|
||||||
#include "fsfw/osal/common/TcpTmTcBridge.h"
|
#include "fsfw/osal/common/TcpTmTcBridge.h"
|
||||||
#include "fsfw/osal/common/TcpTmTcServer.h"
|
#include "fsfw/osal/common/TcpTmTcServer.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <fsfw/tmtcpacket/pus/tm.h>
|
|
||||||
|
|
||||||
#if OBSW_ADD_TEST_CODE == 1
|
#if OBSW_ADD_TEST_CODE == 1
|
||||||
#include <test/testtasks/TestTask.h>
|
#include <test/testtasks/TestTask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <dummies/AcuDummy.h>
|
#include <dummies/AcuDummy.h>
|
||||||
#include <dummies/BpxDummy.h>
|
|
||||||
#include <dummies/ComCookieDummy.h>
|
|
||||||
#include <dummies/ComIFDummy.h>
|
|
||||||
#include <dummies/CoreControllerDummy.h>
|
#include <dummies/CoreControllerDummy.h>
|
||||||
#include <dummies/GyroAdisDummy.h>
|
|
||||||
#include <dummies/GyroL3GD20Dummy.h>
|
|
||||||
#include <dummies/ImtqDummy.h>
|
|
||||||
#include <dummies/MgmLIS3MDLDummy.h>
|
|
||||||
#include <dummies/P60DockDummy.h>
|
|
||||||
#include <dummies/PduDummy.h>
|
|
||||||
#include <dummies/PlPcduDummy.h>
|
|
||||||
#include <dummies/RwDummy.h>
|
|
||||||
#include <dummies/StarTrackerDummy.h>
|
|
||||||
#include <dummies/SusDummy.h>
|
|
||||||
#include <dummies/SyrlinksDummy.h>
|
|
||||||
#include <dummies/TemperatureSensorsDummy.h>
|
|
||||||
|
|
||||||
#include "dummies/helpers.h"
|
#include "dummies/helpers.h"
|
||||||
#include "mission/utility/GlobalConfigHandler.h"
|
|
||||||
|
#ifdef PLATFORM_UNIX
|
||||||
|
#include <fsfw_hal/linux/serial/SerialComIF.h>
|
||||||
|
#include <fsfw_hal/linux/serial/SerialCookie.h>
|
||||||
|
|
||||||
|
#include "devices/gpioIds.h"
|
||||||
|
#include "fsfw_hal/linux/gpio/Gpio.h"
|
||||||
|
#include "linux/devices/ploc/PlocMPSoCHandler.h"
|
||||||
|
#include "linux/devices/ploc/PlocMPSoCHelper.h"
|
||||||
|
#include "linux/devices/ploc/PlocSupervisorHandler.h"
|
||||||
|
#include "linux/devices/ploc/PlocSupvUartMan.h"
|
||||||
|
#include "test/gpio/DummyGpioIF.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
void Factory::setStaticFrameworkObjectIds() {
|
void Factory::setStaticFrameworkObjectIds() {
|
||||||
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
|
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
|
||||||
PusServiceBase::PACKET_DESTINATION = objects::TM_FUNNEL;
|
PusServiceBase::PACKET_DESTINATION = objects::PUS_TM_FUNNEL;
|
||||||
|
|
||||||
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
||||||
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
|
CommandingServiceBase::defaultPacketDestination = objects::PUS_TM_FUNNEL;
|
||||||
|
|
||||||
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
|
|
||||||
// No storage object for now.
|
|
||||||
TmFunnel::storageDestination = objects::NO_OBJECT;
|
|
||||||
|
|
||||||
VerificationReporter::DEFAULT_RECEIVER = objects::PUS_SERVICE_1_VERIFICATION;
|
VerificationReporter::DEFAULT_RECEIVER = objects::PUS_SERVICE_1_VERIFICATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::produce(void* args) {
|
void ObjectFactory::produce(void* args) {
|
||||||
Factory::setStaticFrameworkObjectIds();
|
Factory::setStaticFrameworkObjectIds();
|
||||||
ObjectFactory::produceGenericObjects();
|
PusTmFunnel* pusFunnel;
|
||||||
|
CfdpTmFunnel* cfdpFunnel;
|
||||||
|
auto sdcMan = new DummySdCardManager("/tmp");
|
||||||
|
ObjectFactory::produceGenericObjects(nullptr, &pusFunnel, &cfdpFunnel, *sdcMan);
|
||||||
|
|
||||||
|
auto* dummyGpioIF = new DummyGpioIF();
|
||||||
|
auto* dummySwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
|
||||||
|
#ifdef PLATFORM_UNIX
|
||||||
|
new SerialComIF(objects::UART_COM_IF);
|
||||||
|
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||||
|
std::string mpscoDev = "";
|
||||||
|
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,
|
||||||
|
plocMpsocHelper, Gpio(gpioIds::ENABLE_MPSOC_UART, dummyGpioIF),
|
||||||
|
objects::PLOC_SUPERVISOR_HANDLER);
|
||||||
|
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
|
||||||
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
|
std::string plocSupvString = "/dev/ploc_supv";
|
||||||
|
auto supervisorCookie =
|
||||||
|
new SerialCookie(objects::PLOC_SUPERVISOR_HANDLER, plocSupvString, uart::PLOC_SUPV_BAUD,
|
||||||
|
supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
|
||||||
|
supervisorCookie->setNoFixedSizeReply();
|
||||||
|
auto supvHelper = new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER);
|
||||||
|
new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie,
|
||||||
|
Gpio(gpioIds::ENABLE_SUPV_UART, dummyGpioIF), pcdu::PDU1_CH6_PLOC_12V,
|
||||||
|
*supvHelper);
|
||||||
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||||
|
#endif
|
||||||
|
|
||||||
dummy::DummyCfg cfg;
|
dummy::DummyCfg cfg;
|
||||||
dummy::createDummies(cfg);
|
dummy::createDummies(cfg, *dummySwitcher, dummyGpioIF);
|
||||||
new TemperatureSensorsDummy();
|
|
||||||
new SusDummy();
|
HeaterHandler* heaterHandler = nullptr;
|
||||||
new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT);
|
// new ThermalController(objects::THERMAL_CONTROLLER);
|
||||||
|
ObjectFactory::createGenericHeaterComponents(*dummyGpioIF, *dummySwitcher, heaterHandler);
|
||||||
|
if (heaterHandler == nullptr) {
|
||||||
|
sif::error << "HeaterHandler could not be created" << std::endl;
|
||||||
|
} else {
|
||||||
|
ObjectFactory::createThermalController(*heaterHandler);
|
||||||
|
}
|
||||||
new TestTask(objects::TEST_TASK);
|
new TestTask(objects::TEST_TASK);
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,8 @@
|
|||||||
//! If set to 1 the binary needs "cap_sys_nice=eip" privileges to run
|
//! If set to 1 the binary needs "cap_sys_nice=eip" privileges to run
|
||||||
#define FSFW_USE_REALTIME_FOR_LINUX 0
|
#define FSFW_USE_REALTIME_FOR_LINUX 0
|
||||||
|
|
||||||
|
#define FSFW_UDP_SEND_WIRETAPPING_ENABLED 0
|
||||||
|
|
||||||
namespace fsfwconfig {
|
namespace fsfwconfig {
|
||||||
|
|
||||||
//! Default timestamp size. The default timestamp will be an seven byte CDC short timestamp.
|
//! Default timestamp size. The default timestamp will be an seven byte CDC short timestamp.
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
debugging. */
|
debugging. */
|
||||||
#define OBSW_VEBOSE_LEVEL 1
|
#define OBSW_VEBOSE_LEVEL 1
|
||||||
|
|
||||||
#define OBSW_USE_CCSDS_IP_CORE 0
|
#define OBSW_ADD_CCSDS_IP_CORES 0
|
||||||
// Set to 1 if all telemetry should be sent to the PTME IP Core
|
// Set to 1 if all telemetry should be sent to the PTME IP Core
|
||||||
#define OBSW_TM_TO_PTME 0
|
#define OBSW_TM_TO_PTME 0
|
||||||
// Set to 1 if telecommands are received via the PDEC IP Core
|
// Set to 1 if telecommands are received via the PDEC IP Core
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 83 translations.
|
* @brief Auto-generated event translation file. Contains 269 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2021-05-17 19:49:55
|
* Generated on: 2023-03-08 16:44:32
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -34,6 +34,7 @@ const char *DEVICE_UNREQUESTED_REPLY_STRING = "DEVICE_UNREQUESTED_REPLY";
|
|||||||
const char *INVALID_DEVICE_COMMAND_STRING = "INVALID_DEVICE_COMMAND";
|
const char *INVALID_DEVICE_COMMAND_STRING = "INVALID_DEVICE_COMMAND";
|
||||||
const char *MONITORING_LIMIT_EXCEEDED_STRING = "MONITORING_LIMIT_EXCEEDED";
|
const char *MONITORING_LIMIT_EXCEEDED_STRING = "MONITORING_LIMIT_EXCEEDED";
|
||||||
const char *MONITORING_AMBIGUOUS_STRING = "MONITORING_AMBIGUOUS";
|
const char *MONITORING_AMBIGUOUS_STRING = "MONITORING_AMBIGUOUS";
|
||||||
|
const char *DEVICE_WANTS_HARD_REBOOT_STRING = "DEVICE_WANTS_HARD_REBOOT";
|
||||||
const char *FUSE_CURRENT_HIGH_STRING = "FUSE_CURRENT_HIGH";
|
const char *FUSE_CURRENT_HIGH_STRING = "FUSE_CURRENT_HIGH";
|
||||||
const char *FUSE_WENT_OFF_STRING = "FUSE_WENT_OFF";
|
const char *FUSE_WENT_OFF_STRING = "FUSE_WENT_OFF";
|
||||||
const char *POWER_ABOVE_HIGH_LIMIT_STRING = "POWER_ABOVE_HIGH_LIMIT";
|
const char *POWER_ABOVE_HIGH_LIMIT_STRING = "POWER_ABOVE_HIGH_LIMIT";
|
||||||
@ -59,7 +60,6 @@ const char *MONITOR_CHANGED_STATE_STRING = "MONITOR_CHANGED_STATE";
|
|||||||
const char *VALUE_BELOW_LOW_LIMIT_STRING = "VALUE_BELOW_LOW_LIMIT";
|
const char *VALUE_BELOW_LOW_LIMIT_STRING = "VALUE_BELOW_LOW_LIMIT";
|
||||||
const char *VALUE_ABOVE_HIGH_LIMIT_STRING = "VALUE_ABOVE_HIGH_LIMIT";
|
const char *VALUE_ABOVE_HIGH_LIMIT_STRING = "VALUE_ABOVE_HIGH_LIMIT";
|
||||||
const char *VALUE_OUT_OF_RANGE_STRING = "VALUE_OUT_OF_RANGE";
|
const char *VALUE_OUT_OF_RANGE_STRING = "VALUE_OUT_OF_RANGE";
|
||||||
const char *SWITCHING_TM_FAILED_STRING = "SWITCHING_TM_FAILED";
|
|
||||||
const char *CHANGING_MODE_STRING = "CHANGING_MODE";
|
const char *CHANGING_MODE_STRING = "CHANGING_MODE";
|
||||||
const char *MODE_INFO_STRING = "MODE_INFO";
|
const char *MODE_INFO_STRING = "MODE_INFO";
|
||||||
const char *FALLBACK_FAILED_STRING = "FALLBACK_FAILED";
|
const char *FALLBACK_FAILED_STRING = "FALLBACK_FAILED";
|
||||||
@ -75,22 +75,203 @@ const char *OVERWRITING_HEALTH_STRING = "OVERWRITING_HEALTH";
|
|||||||
const char *TRYING_RECOVERY_STRING = "TRYING_RECOVERY";
|
const char *TRYING_RECOVERY_STRING = "TRYING_RECOVERY";
|
||||||
const char *RECOVERY_STEP_STRING = "RECOVERY_STEP";
|
const char *RECOVERY_STEP_STRING = "RECOVERY_STEP";
|
||||||
const char *RECOVERY_DONE_STRING = "RECOVERY_DONE";
|
const char *RECOVERY_DONE_STRING = "RECOVERY_DONE";
|
||||||
|
const char *HANDLE_PACKET_FAILED_STRING = "HANDLE_PACKET_FAILED";
|
||||||
const char *RF_AVAILABLE_STRING = "RF_AVAILABLE";
|
const char *RF_AVAILABLE_STRING = "RF_AVAILABLE";
|
||||||
const char *RF_LOST_STRING = "RF_LOST";
|
const char *RF_LOST_STRING = "RF_LOST";
|
||||||
const char *BIT_LOCK_STRING = "BIT_LOCK";
|
const char *BIT_LOCK_STRING = "BIT_LOCK";
|
||||||
const char *BIT_LOCK_LOST_STRING = "BIT_LOCK_LOST";
|
const char *BIT_LOCK_LOST_STRING = "BIT_LOCK_LOST";
|
||||||
const char *FRAME_PROCESSING_FAILED_STRING = "FRAME_PROCESSING_FAILED";
|
const char *FRAME_PROCESSING_FAILED_STRING = "FRAME_PROCESSING_FAILED";
|
||||||
const char *CLOCK_SET_STRING = "CLOCK_SET";
|
const char *CLOCK_SET_STRING = "CLOCK_SET";
|
||||||
|
const char *CLOCK_DUMP_STRING = "CLOCK_DUMP";
|
||||||
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
|
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
|
||||||
|
const char *TC_DELETION_FAILED_STRING = "TC_DELETION_FAILED";
|
||||||
const char *TEST_STRING = "TEST";
|
const char *TEST_STRING = "TEST";
|
||||||
const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
||||||
|
const char *STORE_ERROR_STRING = "STORE_ERROR";
|
||||||
|
const char *MSG_QUEUE_ERROR_STRING = "MSG_QUEUE_ERROR";
|
||||||
|
const char *SERIALIZATION_ERROR_STRING = "SERIALIZATION_ERROR";
|
||||||
|
const char *FILESTORE_ERROR_STRING = "FILESTORE_ERROR";
|
||||||
|
const char *FILENAME_TOO_LARGE_ERROR_STRING = "FILENAME_TOO_LARGE_ERROR";
|
||||||
|
const char *SAFE_RATE_VIOLATION_STRING = "SAFE_RATE_VIOLATION";
|
||||||
|
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_INVALID_MODE_VIOLATION_STRING = "MEKF_INVALID_MODE_VIOLATION";
|
||||||
|
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
|
||||||
|
const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED";
|
||||||
|
const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
|
||||||
|
const char *FDIR_REACTION_IGNORED_STRING = "FDIR_REACTION_IGNORED";
|
||||||
|
const char *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_FAILED";
|
||||||
|
const char *GPIO_PULL_LOW_FAILED_STRING = "GPIO_PULL_LOW_FAILED";
|
||||||
|
const char *HEATER_WENT_ON_STRING = "HEATER_WENT_ON";
|
||||||
|
const char *HEATER_WENT_OFF_STRING = "HEATER_WENT_OFF";
|
||||||
|
const char *SWITCH_ALREADY_ON_STRING = "SWITCH_ALREADY_ON";
|
||||||
|
const char *SWITCH_ALREADY_OFF_STRING = "SWITCH_ALREADY_OFF";
|
||||||
|
const char *MAIN_SWITCH_TIMEOUT_STRING = "MAIN_SWITCH_TIMEOUT";
|
||||||
|
const char *FAULTY_HEATER_WAS_ON_STRING = "FAULTY_HEATER_WAS_ON";
|
||||||
|
const char *BURN_PHASE_START_STRING = "BURN_PHASE_START";
|
||||||
|
const char *BURN_PHASE_DONE_STRING = "BURN_PHASE_DONE";
|
||||||
|
const char *MAIN_SWITCH_ON_TIMEOUT_STRING = "MAIN_SWITCH_ON_TIMEOUT";
|
||||||
|
const char *MAIN_SWITCH_OFF_TIMEOUT_STRING = "MAIN_SWITCH_OFF_TIMEOUT";
|
||||||
|
const char *DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA1_GPIO_SWTICH_ON_FAILED";
|
||||||
|
const char *DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA2_GPIO_SWTICH_ON_FAILED";
|
||||||
|
const char *DEPL_SA1_GPIO_SWTICH_OFF_FAILED_STRING = "DEPL_SA1_GPIO_SWTICH_OFF_FAILED";
|
||||||
|
const char *DEPL_SA2_GPIO_SWTICH_OFF_FAILED_STRING = "DEPL_SA2_GPIO_SWTICH_OFF_FAILED";
|
||||||
|
const char *AUTONOMOUS_DEPLOYMENT_COMPLETED_STRING = "AUTONOMOUS_DEPLOYMENT_COMPLETED";
|
||||||
const char *MEMORY_READ_RPT_CRC_FAILURE_STRING = "MEMORY_READ_RPT_CRC_FAILURE";
|
const char *MEMORY_READ_RPT_CRC_FAILURE_STRING = "MEMORY_READ_RPT_CRC_FAILURE";
|
||||||
const char *ACK_FAILURE_STRING = "ACK_FAILURE";
|
const char *ACK_FAILURE_STRING = "ACK_FAILURE";
|
||||||
const char *EXE_FAILURE_STRING = "EXE_FAILURE";
|
const char *EXE_FAILURE_STRING = "EXE_FAILURE";
|
||||||
const char *CRC_FAILURE_EVENT_STRING = "CRC_FAILURE_EVENT";
|
const char *MPSOC_HANDLER_CRC_FAILURE_STRING = "MPSOC_HANDLER_CRC_FAILURE";
|
||||||
|
const char *MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH_STRING = "MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH";
|
||||||
|
const char *MPSOC_SHUTDOWN_FAILED_STRING = "MPSOC_SHUTDOWN_FAILED";
|
||||||
|
const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE";
|
||||||
|
const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE";
|
||||||
|
const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE";
|
||||||
|
const char *SELF_TEST_PWM_FAILURE_STRING = "SELF_TEST_PWM_FAILURE";
|
||||||
|
const char *SELF_TEST_TC_FAILURE_STRING = "SELF_TEST_TC_FAILURE";
|
||||||
|
const char *SELF_TEST_MTM_RANGE_FAILURE_STRING = "SELF_TEST_MTM_RANGE_FAILURE";
|
||||||
|
const char *SELF_TEST_COIL_CURRENT_FAILURE_STRING = "SELF_TEST_COIL_CURRENT_FAILURE";
|
||||||
|
const char *INVALID_ERROR_BYTE_STRING = "INVALID_ERROR_BYTE";
|
||||||
|
const char *ERROR_STATE_STRING = "ERROR_STATE";
|
||||||
|
const char *RESET_OCCURED_STRING = "RESET_OCCURED";
|
||||||
|
const char *BOOTING_FIRMWARE_FAILED_EVENT_STRING = "BOOTING_FIRMWARE_FAILED_EVENT";
|
||||||
|
const char *BOOTING_BOOTLOADER_FAILED_EVENT_STRING = "BOOTING_BOOTLOADER_FAILED_EVENT";
|
||||||
|
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
|
||||||
|
const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM";
|
||||||
|
const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM";
|
||||||
|
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
||||||
|
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
||||||
|
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
||||||
|
const char *SUPV_HELPER_EXECUTING_STRING = "SUPV_HELPER_EXECUTING";
|
||||||
|
const char *SUPV_MPSOC_SHUTDOWN_BUILD_FAILED_STRING = "SUPV_MPSOC_SHUTDOWN_BUILD_FAILED";
|
||||||
|
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
||||||
|
const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
|
||||||
|
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
|
||||||
|
const char *MRAM_DUMP_FAILED_STRING = "MRAM_DUMP_FAILED";
|
||||||
|
const char *MRAM_DUMP_FINISHED_STRING = "MRAM_DUMP_FINISHED";
|
||||||
|
const char *INVALID_TC_FRAME_STRING = "INVALID_TC_FRAME";
|
||||||
|
const char *INVALID_FAR_STRING = "INVALID_FAR";
|
||||||
|
const char *CARRIER_LOCK_STRING = "CARRIER_LOCK";
|
||||||
|
const char *BIT_LOCK_PDEC_STRING = "BIT_LOCK_PDEC";
|
||||||
|
const char *LOST_CARRIER_LOCK_PDEC_STRING = "LOST_CARRIER_LOCK_PDEC";
|
||||||
|
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_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
|
||||||
|
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_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";
|
||||||
|
const char *IMAGE_DOWNLOAD_SUCCESSFUL_STRING = "IMAGE_DOWNLOAD_SUCCESSFUL";
|
||||||
|
const char *FLASH_WRITE_SUCCESSFUL_STRING = "FLASH_WRITE_SUCCESSFUL";
|
||||||
|
const char *FLASH_READ_SUCCESSFUL_STRING = "FLASH_READ_SUCCESSFUL";
|
||||||
|
const char *FLASH_READ_FAILED_STRING = "FLASH_READ_FAILED";
|
||||||
|
const char *FIRMWARE_UPDATE_SUCCESSFUL_STRING = "FIRMWARE_UPDATE_SUCCESSFUL";
|
||||||
|
const char *FIRMWARE_UPDATE_FAILED_STRING = "FIRMWARE_UPDATE_FAILED";
|
||||||
|
const char *STR_HELPER_READING_REPLY_FAILED_STRING = "STR_HELPER_READING_REPLY_FAILED";
|
||||||
|
const char *STR_HELPER_COM_ERROR_STRING = "STR_HELPER_COM_ERROR";
|
||||||
|
const char *STR_HELPER_NO_REPLY_STRING = "STR_HELPER_NO_REPLY";
|
||||||
|
const char *STR_HELPER_DEC_ERROR_STRING = "STR_HELPER_DEC_ERROR";
|
||||||
|
const char *POSITION_MISMATCH_STRING = "POSITION_MISMATCH";
|
||||||
|
const char *STR_HELPER_FILE_NOT_EXISTS_STRING = "STR_HELPER_FILE_NOT_EXISTS";
|
||||||
|
const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET_FAILED";
|
||||||
|
const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED";
|
||||||
|
const char *MPSOC_FLASH_WRITE_FAILED_STRING = "MPSOC_FLASH_WRITE_FAILED";
|
||||||
|
const char *MPSOC_FLASH_WRITE_SUCCESSFUL_STRING = "MPSOC_FLASH_WRITE_SUCCESSFUL";
|
||||||
|
const char *MPSOC_SENDING_COMMAND_FAILED_STRING = "MPSOC_SENDING_COMMAND_FAILED";
|
||||||
|
const char *MPSOC_HELPER_REQUESTING_REPLY_FAILED_STRING = "MPSOC_HELPER_REQUESTING_REPLY_FAILED";
|
||||||
|
const char *MPSOC_HELPER_READING_REPLY_FAILED_STRING = "MPSOC_HELPER_READING_REPLY_FAILED";
|
||||||
|
const char *MPSOC_MISSING_ACK_STRING = "MPSOC_MISSING_ACK";
|
||||||
|
const char *MPSOC_MISSING_EXE_STRING = "MPSOC_MISSING_EXE";
|
||||||
|
const char *MPSOC_ACK_FAILURE_REPORT_STRING = "MPSOC_ACK_FAILURE_REPORT";
|
||||||
|
const char *MPSOC_EXE_FAILURE_REPORT_STRING = "MPSOC_EXE_FAILURE_REPORT";
|
||||||
|
const char *MPSOC_ACK_INVALID_APID_STRING = "MPSOC_ACK_INVALID_APID";
|
||||||
|
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 *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";
|
||||||
|
const char *I_DRO_OUT_OF_BOUNDS_STRING = "I_DRO_OUT_OF_BOUNDS";
|
||||||
|
const char *U_X8_OUT_OF_BOUNDS_STRING = "U_X8_OUT_OF_BOUNDS";
|
||||||
|
const char *I_X8_OUT_OF_BOUNDS_STRING = "I_X8_OUT_OF_BOUNDS";
|
||||||
|
const char *U_TX_OUT_OF_BOUNDS_STRING = "U_TX_OUT_OF_BOUNDS";
|
||||||
|
const char *I_TX_OUT_OF_BOUNDS_STRING = "I_TX_OUT_OF_BOUNDS";
|
||||||
|
const char *U_MPA_OUT_OF_BOUNDS_STRING = "U_MPA_OUT_OF_BOUNDS";
|
||||||
|
const char *I_MPA_OUT_OF_BOUNDS_STRING = "I_MPA_OUT_OF_BOUNDS";
|
||||||
|
const char *U_HPA_OUT_OF_BOUNDS_STRING = "U_HPA_OUT_OF_BOUNDS";
|
||||||
|
const char *I_HPA_OUT_OF_BOUNDS_STRING = "I_HPA_OUT_OF_BOUNDS";
|
||||||
|
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 *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";
|
||||||
|
const char *P60_BOOT_COUNT_STRING = "P60_BOOT_COUNT";
|
||||||
|
const char *BATT_MODE_STRING = "BATT_MODE";
|
||||||
|
const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED";
|
||||||
|
const char *SUPV_UPDATE_FAILED_STRING = "SUPV_UPDATE_FAILED";
|
||||||
|
const char *SUPV_UPDATE_SUCCESSFUL_STRING = "SUPV_UPDATE_SUCCESSFUL";
|
||||||
|
const char *SUPV_CONTINUE_UPDATE_FAILED_STRING = "SUPV_CONTINUE_UPDATE_FAILED";
|
||||||
|
const char *SUPV_CONTINUE_UPDATE_SUCCESSFUL_STRING = "SUPV_CONTINUE_UPDATE_SUCCESSFUL";
|
||||||
|
const char *TERMINATED_UPDATE_PROCEDURE_STRING = "TERMINATED_UPDATE_PROCEDURE";
|
||||||
|
const char *SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL_STRING = "SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL";
|
||||||
|
const char *SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING = "SUPV_EVENT_BUFFER_REQUEST_FAILED";
|
||||||
|
const char *SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING = "SUPV_EVENT_BUFFER_REQUEST_TERMINATED";
|
||||||
|
const char *SUPV_MEM_CHECK_OK_STRING = "SUPV_MEM_CHECK_OK";
|
||||||
|
const char *SUPV_MEM_CHECK_FAIL_STRING = "SUPV_MEM_CHECK_FAIL";
|
||||||
|
const char *SUPV_SENDING_COMMAND_FAILED_STRING = "SUPV_SENDING_COMMAND_FAILED";
|
||||||
|
const char *SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING = "SUPV_HELPER_REQUESTING_REPLY_FAILED";
|
||||||
|
const char *SUPV_HELPER_READING_REPLY_FAILED_STRING = "SUPV_HELPER_READING_REPLY_FAILED";
|
||||||
|
const char *SUPV_MISSING_ACK_STRING = "SUPV_MISSING_ACK";
|
||||||
|
const char *SUPV_MISSING_EXE_STRING = "SUPV_MISSING_EXE";
|
||||||
|
const char *SUPV_ACK_FAILURE_REPORT_STRING = "SUPV_ACK_FAILURE_REPORT";
|
||||||
|
const char *SUPV_EXE_FAILURE_REPORT_STRING = "SUPV_EXE_FAILURE_REPORT";
|
||||||
|
const char *SUPV_ACK_INVALID_APID_STRING = "SUPV_ACK_INVALID_APID";
|
||||||
|
const char *SUPV_EXE_INVALID_APID_STRING = "SUPV_EXE_INVALID_APID";
|
||||||
|
const char *ACK_RECEPTION_FAILURE_STRING = "ACK_RECEPTION_FAILURE";
|
||||||
|
const char *EXE_RECEPTION_FAILURE_STRING = "EXE_RECEPTION_FAILURE";
|
||||||
|
const char *WRITE_MEMORY_FAILED_STRING = "WRITE_MEMORY_FAILED";
|
||||||
|
const char *SUPV_REPLY_SIZE_MISSMATCH_STRING = "SUPV_REPLY_SIZE_MISSMATCH";
|
||||||
|
const char *SUPV_REPLY_CRC_MISSMATCH_STRING = "SUPV_REPLY_CRC_MISSMATCH";
|
||||||
|
const char *SUPV_UPDATE_PROGRESS_STRING = "SUPV_UPDATE_PROGRESS";
|
||||||
|
const char *HDLC_FRAME_REMOVAL_ERROR_STRING = "HDLC_FRAME_REMOVAL_ERROR";
|
||||||
|
const char *HDLC_CRC_ERROR_STRING = "HDLC_CRC_ERROR";
|
||||||
|
const char *TX_ON_STRING = "TX_ON";
|
||||||
|
const char *TX_OFF_STRING = "TX_OFF";
|
||||||
|
const char *MISSING_PACKET_STRING = "MISSING_PACKET";
|
||||||
|
const char *EXPERIMENT_TIMEDOUT_STRING = "EXPERIMENT_TIMEDOUT";
|
||||||
|
const char *MULTI_PACKET_COMMAND_DONE_STRING = "MULTI_PACKET_COMMAND_DONE";
|
||||||
|
const char *SET_CONFIGFILEVALUE_FAILED_STRING = "SET_CONFIGFILEVALUE_FAILED";
|
||||||
|
const char *GET_CONFIGFILEVALUE_FAILED_STRING = "GET_CONFIGFILEVALUE_FAILED";
|
||||||
|
const char *INSERT_CONFIGFILEVALUE_FAILED_STRING = "INSERT_CONFIGFILEVALUE_FAILED";
|
||||||
|
const char *WRITE_CONFIGFILE_FAILED_STRING = "WRITE_CONFIGFILE_FAILED";
|
||||||
|
const char *READ_CONFIGFILE_FAILED_STRING = "READ_CONFIGFILE_FAILED";
|
||||||
|
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
||||||
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
|
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
||||||
|
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
||||||
|
const char *NO_SD_CARD_ACTIVE_STRING = "NO_SD_CARD_ACTIVE";
|
||||||
|
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 *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 *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";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch ((event & 0xffff)) {
|
switch ((event & 0xFFFF)) {
|
||||||
case (2200):
|
case (2200):
|
||||||
return STORE_SEND_WRITE_FAILED_STRING;
|
return STORE_SEND_WRITE_FAILED_STRING;
|
||||||
case (2201):
|
case (2201):
|
||||||
@ -149,6 +330,8 @@ const char *translateEvents(Event event) {
|
|||||||
return MONITORING_LIMIT_EXCEEDED_STRING;
|
return MONITORING_LIMIT_EXCEEDED_STRING;
|
||||||
case (2810):
|
case (2810):
|
||||||
return MONITORING_AMBIGUOUS_STRING;
|
return MONITORING_AMBIGUOUS_STRING;
|
||||||
|
case (2811):
|
||||||
|
return DEVICE_WANTS_HARD_REBOOT_STRING;
|
||||||
case (4201):
|
case (4201):
|
||||||
return FUSE_CURRENT_HIGH_STRING;
|
return FUSE_CURRENT_HIGH_STRING;
|
||||||
case (4202):
|
case (4202):
|
||||||
@ -199,8 +382,6 @@ const char *translateEvents(Event event) {
|
|||||||
return VALUE_ABOVE_HIGH_LIMIT_STRING;
|
return VALUE_ABOVE_HIGH_LIMIT_STRING;
|
||||||
case (7204):
|
case (7204):
|
||||||
return VALUE_OUT_OF_RANGE_STRING;
|
return VALUE_OUT_OF_RANGE_STRING;
|
||||||
case (7301):
|
|
||||||
return SWITCHING_TM_FAILED_STRING;
|
|
||||||
case (7400):
|
case (7400):
|
||||||
return CHANGING_MODE_STRING;
|
return CHANGING_MODE_STRING;
|
||||||
case (7401):
|
case (7401):
|
||||||
@ -231,6 +412,8 @@ const char *translateEvents(Event event) {
|
|||||||
return RECOVERY_STEP_STRING;
|
return RECOVERY_STEP_STRING;
|
||||||
case (7512):
|
case (7512):
|
||||||
return RECOVERY_DONE_STRING;
|
return RECOVERY_DONE_STRING;
|
||||||
|
case (7600):
|
||||||
|
return HANDLE_PACKET_FAILED_STRING;
|
||||||
case (7900):
|
case (7900):
|
||||||
return RF_AVAILABLE_STRING;
|
return RF_AVAILABLE_STRING;
|
||||||
case (7901):
|
case (7901):
|
||||||
@ -244,19 +427,379 @@ const char *translateEvents(Event event) {
|
|||||||
case (8900):
|
case (8900):
|
||||||
return CLOCK_SET_STRING;
|
return CLOCK_SET_STRING;
|
||||||
case (8901):
|
case (8901):
|
||||||
|
return CLOCK_DUMP_STRING;
|
||||||
|
case (8902):
|
||||||
return CLOCK_SET_FAILURE_STRING;
|
return CLOCK_SET_FAILURE_STRING;
|
||||||
|
case (9100):
|
||||||
|
return TC_DELETION_FAILED_STRING;
|
||||||
case (9700):
|
case (9700):
|
||||||
return TEST_STRING;
|
return TEST_STRING;
|
||||||
case (10600):
|
case (10600):
|
||||||
return CHANGE_OF_SETUP_PARAMETER_STRING;
|
return CHANGE_OF_SETUP_PARAMETER_STRING;
|
||||||
case (11101):
|
case (10800):
|
||||||
|
return STORE_ERROR_STRING;
|
||||||
|
case (10801):
|
||||||
|
return MSG_QUEUE_ERROR_STRING;
|
||||||
|
case (10802):
|
||||||
|
return SERIALIZATION_ERROR_STRING;
|
||||||
|
case (10803):
|
||||||
|
return FILESTORE_ERROR_STRING;
|
||||||
|
case (10804):
|
||||||
|
return FILENAME_TOO_LARGE_ERROR_STRING;
|
||||||
|
case (11200):
|
||||||
|
return SAFE_RATE_VIOLATION_STRING;
|
||||||
|
case (11201):
|
||||||
|
return SAFE_RATE_RECOVERY_STRING;
|
||||||
|
case (11202):
|
||||||
|
return MULTIPLE_RW_INVALID_STRING;
|
||||||
|
case (11203):
|
||||||
|
return MEKF_INVALID_INFO_STRING;
|
||||||
|
case (11204):
|
||||||
|
return MEKF_INVALID_MODE_VIOLATION_STRING;
|
||||||
|
case (11300):
|
||||||
|
return SWITCH_CMD_SENT_STRING;
|
||||||
|
case (11301):
|
||||||
|
return SWITCH_HAS_CHANGED_STRING;
|
||||||
|
case (11302):
|
||||||
|
return SWITCHING_Q7S_DENIED_STRING;
|
||||||
|
case (11303):
|
||||||
|
return FDIR_REACTION_IGNORED_STRING;
|
||||||
|
case (11400):
|
||||||
|
return GPIO_PULL_HIGH_FAILED_STRING;
|
||||||
|
case (11401):
|
||||||
|
return GPIO_PULL_LOW_FAILED_STRING;
|
||||||
|
case (11402):
|
||||||
|
return HEATER_WENT_ON_STRING;
|
||||||
|
case (11403):
|
||||||
|
return HEATER_WENT_OFF_STRING;
|
||||||
|
case (11404):
|
||||||
|
return SWITCH_ALREADY_ON_STRING;
|
||||||
|
case (11405):
|
||||||
|
return SWITCH_ALREADY_OFF_STRING;
|
||||||
|
case (11406):
|
||||||
|
return MAIN_SWITCH_TIMEOUT_STRING;
|
||||||
|
case (11407):
|
||||||
|
return FAULTY_HEATER_WAS_ON_STRING;
|
||||||
|
case (11500):
|
||||||
|
return BURN_PHASE_START_STRING;
|
||||||
|
case (11501):
|
||||||
|
return BURN_PHASE_DONE_STRING;
|
||||||
|
case (11502):
|
||||||
|
return MAIN_SWITCH_ON_TIMEOUT_STRING;
|
||||||
|
case (11503):
|
||||||
|
return MAIN_SWITCH_OFF_TIMEOUT_STRING;
|
||||||
|
case (11504):
|
||||||
|
return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING;
|
||||||
|
case (11505):
|
||||||
|
return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING;
|
||||||
|
case (11506):
|
||||||
|
return DEPL_SA1_GPIO_SWTICH_OFF_FAILED_STRING;
|
||||||
|
case (11507):
|
||||||
|
return DEPL_SA2_GPIO_SWTICH_OFF_FAILED_STRING;
|
||||||
|
case (11508):
|
||||||
|
return AUTONOMOUS_DEPLOYMENT_COMPLETED_STRING;
|
||||||
|
case (11601):
|
||||||
return MEMORY_READ_RPT_CRC_FAILURE_STRING;
|
return MEMORY_READ_RPT_CRC_FAILURE_STRING;
|
||||||
case (11102):
|
case (11602):
|
||||||
return ACK_FAILURE_STRING;
|
return ACK_FAILURE_STRING;
|
||||||
case (11103):
|
case (11603):
|
||||||
return EXE_FAILURE_STRING;
|
return EXE_FAILURE_STRING;
|
||||||
case (11104):
|
case (11604):
|
||||||
return CRC_FAILURE_EVENT_STRING;
|
return MPSOC_HANDLER_CRC_FAILURE_STRING;
|
||||||
|
case (11605):
|
||||||
|
return MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH_STRING;
|
||||||
|
case (11606):
|
||||||
|
return MPSOC_SHUTDOWN_FAILED_STRING;
|
||||||
|
case (11701):
|
||||||
|
return SELF_TEST_I2C_FAILURE_STRING;
|
||||||
|
case (11702):
|
||||||
|
return SELF_TEST_SPI_FAILURE_STRING;
|
||||||
|
case (11703):
|
||||||
|
return SELF_TEST_ADC_FAILURE_STRING;
|
||||||
|
case (11704):
|
||||||
|
return SELF_TEST_PWM_FAILURE_STRING;
|
||||||
|
case (11705):
|
||||||
|
return SELF_TEST_TC_FAILURE_STRING;
|
||||||
|
case (11706):
|
||||||
|
return SELF_TEST_MTM_RANGE_FAILURE_STRING;
|
||||||
|
case (11707):
|
||||||
|
return SELF_TEST_COIL_CURRENT_FAILURE_STRING;
|
||||||
|
case (11708):
|
||||||
|
return INVALID_ERROR_BYTE_STRING;
|
||||||
|
case (11801):
|
||||||
|
return ERROR_STATE_STRING;
|
||||||
|
case (11802):
|
||||||
|
return RESET_OCCURED_STRING;
|
||||||
|
case (11901):
|
||||||
|
return BOOTING_FIRMWARE_FAILED_EVENT_STRING;
|
||||||
|
case (11902):
|
||||||
|
return BOOTING_BOOTLOADER_FAILED_EVENT_STRING;
|
||||||
|
case (12001):
|
||||||
|
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
|
||||||
|
case (12002):
|
||||||
|
return SUPV_UNKNOWN_TM_STRING;
|
||||||
|
case (12003):
|
||||||
|
return SUPV_UNINIMPLEMENTED_TM_STRING;
|
||||||
|
case (12004):
|
||||||
|
return SUPV_ACK_FAILURE_STRING;
|
||||||
|
case (12005):
|
||||||
|
return SUPV_EXE_FAILURE_STRING;
|
||||||
|
case (12006):
|
||||||
|
return SUPV_CRC_FAILURE_EVENT_STRING;
|
||||||
|
case (12007):
|
||||||
|
return SUPV_HELPER_EXECUTING_STRING;
|
||||||
|
case (12008):
|
||||||
|
return SUPV_MPSOC_SHUTDOWN_BUILD_FAILED_STRING;
|
||||||
|
case (12100):
|
||||||
|
return SANITIZATION_FAILED_STRING;
|
||||||
|
case (12101):
|
||||||
|
return MOUNTED_SD_CARD_STRING;
|
||||||
|
case (12300):
|
||||||
|
return SEND_MRAM_DUMP_FAILED_STRING;
|
||||||
|
case (12301):
|
||||||
|
return MRAM_DUMP_FAILED_STRING;
|
||||||
|
case (12302):
|
||||||
|
return MRAM_DUMP_FINISHED_STRING;
|
||||||
|
case (12401):
|
||||||
|
return INVALID_TC_FRAME_STRING;
|
||||||
|
case (12402):
|
||||||
|
return INVALID_FAR_STRING;
|
||||||
|
case (12403):
|
||||||
|
return CARRIER_LOCK_STRING;
|
||||||
|
case (12404):
|
||||||
|
return BIT_LOCK_PDEC_STRING;
|
||||||
|
case (12405):
|
||||||
|
return LOST_CARRIER_LOCK_PDEC_STRING;
|
||||||
|
case (12406):
|
||||||
|
return LOST_BIT_LOCK_PDEC_STRING;
|
||||||
|
case (12407):
|
||||||
|
return TOO_MANY_IRQS_STRING;
|
||||||
|
case (12408):
|
||||||
|
return POLL_SYSCALL_ERROR_PDEC_STRING;
|
||||||
|
case (12409):
|
||||||
|
return WRITE_SYSCALL_ERROR_PDEC_STRING;
|
||||||
|
case (12410):
|
||||||
|
return PDEC_RESET_FAILED_STRING;
|
||||||
|
case (12411):
|
||||||
|
return OPEN_IRQ_FILE_FAILED_STRING;
|
||||||
|
case (12500):
|
||||||
|
return IMAGE_UPLOAD_FAILED_STRING;
|
||||||
|
case (12501):
|
||||||
|
return IMAGE_DOWNLOAD_FAILED_STRING;
|
||||||
|
case (12502):
|
||||||
|
return IMAGE_UPLOAD_SUCCESSFUL_STRING;
|
||||||
|
case (12503):
|
||||||
|
return IMAGE_DOWNLOAD_SUCCESSFUL_STRING;
|
||||||
|
case (12504):
|
||||||
|
return FLASH_WRITE_SUCCESSFUL_STRING;
|
||||||
|
case (12505):
|
||||||
|
return FLASH_READ_SUCCESSFUL_STRING;
|
||||||
|
case (12506):
|
||||||
|
return FLASH_READ_FAILED_STRING;
|
||||||
|
case (12507):
|
||||||
|
return FIRMWARE_UPDATE_SUCCESSFUL_STRING;
|
||||||
|
case (12508):
|
||||||
|
return FIRMWARE_UPDATE_FAILED_STRING;
|
||||||
|
case (12509):
|
||||||
|
return STR_HELPER_READING_REPLY_FAILED_STRING;
|
||||||
|
case (12510):
|
||||||
|
return STR_HELPER_COM_ERROR_STRING;
|
||||||
|
case (12511):
|
||||||
|
return STR_HELPER_NO_REPLY_STRING;
|
||||||
|
case (12512):
|
||||||
|
return STR_HELPER_DEC_ERROR_STRING;
|
||||||
|
case (12513):
|
||||||
|
return POSITION_MISMATCH_STRING;
|
||||||
|
case (12514):
|
||||||
|
return STR_HELPER_FILE_NOT_EXISTS_STRING;
|
||||||
|
case (12515):
|
||||||
|
return STR_HELPER_SENDING_PACKET_FAILED_STRING;
|
||||||
|
case (12516):
|
||||||
|
return STR_HELPER_REQUESTING_MSG_FAILED_STRING;
|
||||||
|
case (12600):
|
||||||
|
return MPSOC_FLASH_WRITE_FAILED_STRING;
|
||||||
|
case (12601):
|
||||||
|
return MPSOC_FLASH_WRITE_SUCCESSFUL_STRING;
|
||||||
|
case (12602):
|
||||||
|
return MPSOC_SENDING_COMMAND_FAILED_STRING;
|
||||||
|
case (12603):
|
||||||
|
return MPSOC_HELPER_REQUESTING_REPLY_FAILED_STRING;
|
||||||
|
case (12604):
|
||||||
|
return MPSOC_HELPER_READING_REPLY_FAILED_STRING;
|
||||||
|
case (12605):
|
||||||
|
return MPSOC_MISSING_ACK_STRING;
|
||||||
|
case (12606):
|
||||||
|
return MPSOC_MISSING_EXE_STRING;
|
||||||
|
case (12607):
|
||||||
|
return MPSOC_ACK_FAILURE_REPORT_STRING;
|
||||||
|
case (12608):
|
||||||
|
return MPSOC_EXE_FAILURE_REPORT_STRING;
|
||||||
|
case (12609):
|
||||||
|
return MPSOC_ACK_INVALID_APID_STRING;
|
||||||
|
case (12610):
|
||||||
|
return MPSOC_EXE_INVALID_APID_STRING;
|
||||||
|
case (12611):
|
||||||
|
return MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING;
|
||||||
|
case (12612):
|
||||||
|
return MPSOC_TM_SIZE_ERROR_STRING;
|
||||||
|
case (12613):
|
||||||
|
return MPSOC_TM_CRC_MISSMATCH_STRING;
|
||||||
|
case (12700):
|
||||||
|
return TRANSITION_BACK_TO_OFF_STRING;
|
||||||
|
case (12701):
|
||||||
|
return NEG_V_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12702):
|
||||||
|
return U_DRO_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12703):
|
||||||
|
return I_DRO_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12704):
|
||||||
|
return U_X8_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12705):
|
||||||
|
return I_X8_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12706):
|
||||||
|
return U_TX_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12707):
|
||||||
|
return I_TX_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12708):
|
||||||
|
return U_MPA_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12709):
|
||||||
|
return I_MPA_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12710):
|
||||||
|
return U_HPA_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12711):
|
||||||
|
return I_HPA_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12800):
|
||||||
|
return TRANSITION_OTHER_SIDE_FAILED_STRING;
|
||||||
|
case (12801):
|
||||||
|
return NOT_ENOUGH_DEVICES_DUAL_MODE_STRING;
|
||||||
|
case (12802):
|
||||||
|
return POWER_STATE_MACHINE_TIMEOUT_STRING;
|
||||||
|
case (12803):
|
||||||
|
return SIDE_SWITCH_TRANSITION_NOT_ALLOWED_STRING;
|
||||||
|
case (13000):
|
||||||
|
return CHILDREN_LOST_MODE_STRING;
|
||||||
|
case (13100):
|
||||||
|
return GPS_FIX_CHANGE_STRING;
|
||||||
|
case (13101):
|
||||||
|
return CANT_GET_FIX_STRING;
|
||||||
|
case (13200):
|
||||||
|
return P60_BOOT_COUNT_STRING;
|
||||||
|
case (13201):
|
||||||
|
return BATT_MODE_STRING;
|
||||||
|
case (13202):
|
||||||
|
return BATT_MODE_CHANGED_STRING;
|
||||||
|
case (13600):
|
||||||
|
return SUPV_UPDATE_FAILED_STRING;
|
||||||
|
case (13601):
|
||||||
|
return SUPV_UPDATE_SUCCESSFUL_STRING;
|
||||||
|
case (13602):
|
||||||
|
return SUPV_CONTINUE_UPDATE_FAILED_STRING;
|
||||||
|
case (13603):
|
||||||
|
return SUPV_CONTINUE_UPDATE_SUCCESSFUL_STRING;
|
||||||
|
case (13604):
|
||||||
|
return TERMINATED_UPDATE_PROCEDURE_STRING;
|
||||||
|
case (13605):
|
||||||
|
return SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL_STRING;
|
||||||
|
case (13606):
|
||||||
|
return SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING;
|
||||||
|
case (13607):
|
||||||
|
return SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING;
|
||||||
|
case (13608):
|
||||||
|
return SUPV_MEM_CHECK_OK_STRING;
|
||||||
|
case (13609):
|
||||||
|
return SUPV_MEM_CHECK_FAIL_STRING;
|
||||||
|
case (13616):
|
||||||
|
return SUPV_SENDING_COMMAND_FAILED_STRING;
|
||||||
|
case (13617):
|
||||||
|
return SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING;
|
||||||
|
case (13618):
|
||||||
|
return SUPV_HELPER_READING_REPLY_FAILED_STRING;
|
||||||
|
case (13619):
|
||||||
|
return SUPV_MISSING_ACK_STRING;
|
||||||
|
case (13620):
|
||||||
|
return SUPV_MISSING_EXE_STRING;
|
||||||
|
case (13621):
|
||||||
|
return SUPV_ACK_FAILURE_REPORT_STRING;
|
||||||
|
case (13622):
|
||||||
|
return SUPV_EXE_FAILURE_REPORT_STRING;
|
||||||
|
case (13623):
|
||||||
|
return SUPV_ACK_INVALID_APID_STRING;
|
||||||
|
case (13624):
|
||||||
|
return SUPV_EXE_INVALID_APID_STRING;
|
||||||
|
case (13625):
|
||||||
|
return ACK_RECEPTION_FAILURE_STRING;
|
||||||
|
case (13626):
|
||||||
|
return EXE_RECEPTION_FAILURE_STRING;
|
||||||
|
case (13627):
|
||||||
|
return WRITE_MEMORY_FAILED_STRING;
|
||||||
|
case (13628):
|
||||||
|
return SUPV_REPLY_SIZE_MISSMATCH_STRING;
|
||||||
|
case (13629):
|
||||||
|
return SUPV_REPLY_CRC_MISSMATCH_STRING;
|
||||||
|
case (13630):
|
||||||
|
return SUPV_UPDATE_PROGRESS_STRING;
|
||||||
|
case (13631):
|
||||||
|
return HDLC_FRAME_REMOVAL_ERROR_STRING;
|
||||||
|
case (13632):
|
||||||
|
return HDLC_CRC_ERROR_STRING;
|
||||||
|
case (13701):
|
||||||
|
return TX_ON_STRING;
|
||||||
|
case (13702):
|
||||||
|
return TX_OFF_STRING;
|
||||||
|
case (13800):
|
||||||
|
return MISSING_PACKET_STRING;
|
||||||
|
case (13801):
|
||||||
|
return EXPERIMENT_TIMEDOUT_STRING;
|
||||||
|
case (13802):
|
||||||
|
return MULTI_PACKET_COMMAND_DONE_STRING;
|
||||||
|
case (13901):
|
||||||
|
return SET_CONFIGFILEVALUE_FAILED_STRING;
|
||||||
|
case (13902):
|
||||||
|
return GET_CONFIGFILEVALUE_FAILED_STRING;
|
||||||
|
case (13903):
|
||||||
|
return INSERT_CONFIGFILEVALUE_FAILED_STRING;
|
||||||
|
case (13904):
|
||||||
|
return WRITE_CONFIGFILE_FAILED_STRING;
|
||||||
|
case (13905):
|
||||||
|
return READ_CONFIGFILE_FAILED_STRING;
|
||||||
|
case (14000):
|
||||||
|
return ALLOC_FAILURE_STRING;
|
||||||
|
case (14001):
|
||||||
|
return REBOOT_SW_STRING;
|
||||||
|
case (14002):
|
||||||
|
return REBOOT_MECHANISM_TRIGGERED_STRING;
|
||||||
|
case (14003):
|
||||||
|
return REBOOT_HW_STRING;
|
||||||
|
case (14004):
|
||||||
|
return NO_SD_CARD_ACTIVE_STRING;
|
||||||
|
case (14005):
|
||||||
|
return VERSION_INFO_STRING;
|
||||||
|
case (14006):
|
||||||
|
return CURRENT_IMAGE_INFO_STRING;
|
||||||
|
case (14007):
|
||||||
|
return REBOOT_COUNTER_STRING;
|
||||||
|
case (14008):
|
||||||
|
return INDIVIDUAL_BOOT_COUNTS_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;
|
||||||
|
case (14106):
|
||||||
|
return PLPCDU_OVERHEATING_STRING;
|
||||||
|
case (14201):
|
||||||
|
return TX_TIMER_EXPIRED_STRING;
|
||||||
|
case (14202):
|
||||||
|
return BIT_LOCK_TX_ON_STRING;
|
||||||
|
case (14300):
|
||||||
|
return POSSIBLE_FILE_CORRUPTION_STRING;
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN_EVENT";
|
return "UNKNOWN_EVENT";
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#ifndef FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_
|
#ifndef FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_
|
||||||
#define FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_
|
#define FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_
|
||||||
|
|
||||||
#include <fsfw/events/Event.h>
|
#include "fsfw/events/Event.h"
|
||||||
|
|
||||||
const char* translateEvents(Event event);
|
const char *translateEvents(Event event);
|
||||||
|
|
||||||
#endif /* FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_ */
|
#endif /* FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_ */
|
||||||
|
@ -16,8 +16,6 @@ enum sourceObjects : uint32_t {
|
|||||||
PUS_SERVICE_23 = 0x51002300,
|
PUS_SERVICE_23 = 0x51002300,
|
||||||
PUS_SERVICE_201 = 0x51020100,
|
PUS_SERVICE_201 = 0x51020100,
|
||||||
|
|
||||||
TM_FUNNEL = 0x52000002,
|
|
||||||
|
|
||||||
/* Test Task */
|
/* Test Task */
|
||||||
|
|
||||||
TEST_TASK = 0x42694269,
|
TEST_TASK = 0x42694269,
|
||||||
@ -26,7 +24,7 @@ enum sourceObjects : uint32_t {
|
|||||||
/* 0x49 ('I') for Communication Interfaces **/
|
/* 0x49 ('I') for Communication Interfaces **/
|
||||||
ARDUINO_COM_IF = 0x49000001,
|
ARDUINO_COM_IF = 0x49000001,
|
||||||
|
|
||||||
DUMMY_COM_IF = 0x49000002
|
DUMMY_COM_IF = 0x49000002,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,23 +1,112 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 31 translations.
|
* Contains 160 translations.
|
||||||
* Generated on: 2021-05-17 19:12:49
|
* Generated on: 2023-03-08 16:44:32
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
#include "systemObjectList.h"
|
|
||||||
|
|
||||||
const char *TEST_TASK_STRING = "TEST_TASK";
|
const char *TEST_TASK_STRING = "TEST_TASK";
|
||||||
|
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
|
||||||
|
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
|
||||||
|
const char *GLOBAL_JSON_CFG_STRING = "GLOBAL_JSON_CFG";
|
||||||
|
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
||||||
const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER";
|
const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER";
|
||||||
|
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
|
||||||
|
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
|
||||||
|
const char *SUS_0_N_LOC_XFYFZM_PT_XF_STRING = "SUS_0_N_LOC_XFYFZM_PT_XF";
|
||||||
|
const char *SUS_1_N_LOC_XBYFZM_PT_XB_STRING = "SUS_1_N_LOC_XBYFZM_PT_XB";
|
||||||
|
const char *SUS_2_N_LOC_XFYBZB_PT_YB_STRING = "SUS_2_N_LOC_XFYBZB_PT_YB";
|
||||||
|
const char *SUS_3_N_LOC_XFYBZF_PT_YF_STRING = "SUS_3_N_LOC_XFYBZF_PT_YF";
|
||||||
|
const char *SUS_4_N_LOC_XMYFZF_PT_ZF_STRING = "SUS_4_N_LOC_XMYFZF_PT_ZF";
|
||||||
|
const char *SUS_5_N_LOC_XFYMZB_PT_ZB_STRING = "SUS_5_N_LOC_XFYMZB_PT_ZB";
|
||||||
|
const char *SUS_6_R_LOC_XFYBZM_PT_XF_STRING = "SUS_6_R_LOC_XFYBZM_PT_XF";
|
||||||
|
const char *SUS_7_R_LOC_XBYBZM_PT_XB_STRING = "SUS_7_R_LOC_XBYBZM_PT_XB";
|
||||||
|
const char *SUS_8_R_LOC_XBYBZB_PT_YB_STRING = "SUS_8_R_LOC_XBYBZB_PT_YB";
|
||||||
|
const char *SUS_9_R_LOC_XBYBZB_PT_YF_STRING = "SUS_9_R_LOC_XBYBZB_PT_YF";
|
||||||
|
const char *SUS_10_N_LOC_XMYBZF_PT_ZF_STRING = "SUS_10_N_LOC_XMYBZF_PT_ZF";
|
||||||
|
const char *SUS_11_R_LOC_XBYMZB_PT_ZB_STRING = "SUS_11_R_LOC_XBYMZB_PT_ZB";
|
||||||
|
const char *RW1_STRING = "RW1";
|
||||||
|
const char *MGM_1_RM3100_HANDLER_STRING = "MGM_1_RM3100_HANDLER";
|
||||||
|
const char *GYRO_1_L3G_HANDLER_STRING = "GYRO_1_L3G_HANDLER";
|
||||||
|
const char *RW2_STRING = "RW2";
|
||||||
|
const char *MGM_2_LIS3_HANDLER_STRING = "MGM_2_LIS3_HANDLER";
|
||||||
|
const char *GYRO_2_ADIS_HANDLER_STRING = "GYRO_2_ADIS_HANDLER";
|
||||||
|
const char *RW3_STRING = "RW3";
|
||||||
|
const char *MGM_3_RM3100_HANDLER_STRING = "MGM_3_RM3100_HANDLER";
|
||||||
|
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 *IMTQ_POLLING_STRING = "IMTQ_POLLING";
|
||||||
|
const char *IMTQ_HANDLER_STRING = "IMTQ_HANDLER";
|
||||||
|
const char *PCDU_HANDLER_STRING = "PCDU_HANDLER";
|
||||||
|
const char *P60DOCK_HANDLER_STRING = "P60DOCK_HANDLER";
|
||||||
|
const char *PDU1_HANDLER_STRING = "PDU1_HANDLER";
|
||||||
|
const char *PDU2_HANDLER_STRING = "PDU2_HANDLER";
|
||||||
|
const char *ACU_HANDLER_STRING = "ACU_HANDLER";
|
||||||
|
const char *BPX_BATT_HANDLER_STRING = "BPX_BATT_HANDLER";
|
||||||
|
const char *PLPCDU_HANDLER_STRING = "PLPCDU_HANDLER";
|
||||||
|
const char *RAD_SENSOR_STRING = "RAD_SENSOR";
|
||||||
|
const char *PLOC_UPDATER_STRING = "PLOC_UPDATER";
|
||||||
|
const char *PLOC_MEMORY_DUMPER_STRING = "PLOC_MEMORY_DUMPER";
|
||||||
|
const char *STR_HELPER_STRING = "STR_HELPER";
|
||||||
|
const char *PLOC_MPSOC_HELPER_STRING = "PLOC_MPSOC_HELPER";
|
||||||
|
const char *AXI_PTME_CONFIG_STRING = "AXI_PTME_CONFIG";
|
||||||
|
const char *PTME_CONFIG_STRING = "PTME_CONFIG";
|
||||||
|
const char *PLOC_MPSOC_HANDLER_STRING = "PLOC_MPSOC_HANDLER";
|
||||||
|
const char *PLOC_SUPERVISOR_HANDLER_STRING = "PLOC_SUPERVISOR_HANDLER";
|
||||||
|
const char *PLOC_SUPERVISOR_HELPER_STRING = "PLOC_SUPERVISOR_HELPER";
|
||||||
|
const char *SCEX_STRING = "SCEX";
|
||||||
|
const char *SOLAR_ARRAY_DEPL_HANDLER_STRING = "SOLAR_ARRAY_DEPL_HANDLER";
|
||||||
|
const char *HEATER_HANDLER_STRING = "HEATER_HANDLER";
|
||||||
|
const char *TMP1075_HANDLER_TCS_0_STRING = "TMP1075_HANDLER_TCS_0";
|
||||||
|
const char *TMP1075_HANDLER_TCS_1_STRING = "TMP1075_HANDLER_TCS_1";
|
||||||
|
const char *TMP1075_HANDLER_PLPCDU_0_STRING = "TMP1075_HANDLER_PLPCDU_0";
|
||||||
|
const char *TMP1075_HANDLER_PLPCDU_1_STRING = "TMP1075_HANDLER_PLPCDU_1";
|
||||||
|
const char *TMP1075_HANDLER_IF_BOARD_STRING = "TMP1075_HANDLER_IF_BOARD";
|
||||||
|
const char *RTD_0_IC3_PLOC_HEATSPREADER_STRING = "RTD_0_IC3_PLOC_HEATSPREADER";
|
||||||
|
const char *RTD_1_IC4_PLOC_MISSIONBOARD_STRING = "RTD_1_IC4_PLOC_MISSIONBOARD";
|
||||||
|
const char *RTD_2_IC5_4K_CAMERA_STRING = "RTD_2_IC5_4K_CAMERA";
|
||||||
|
const char *RTD_3_IC6_DAC_HEATSPREADER_STRING = "RTD_3_IC6_DAC_HEATSPREADER";
|
||||||
|
const char *RTD_4_IC7_STARTRACKER_STRING = "RTD_4_IC7_STARTRACKER";
|
||||||
|
const char *RTD_5_IC8_RW1_MX_MY_STRING = "RTD_5_IC8_RW1_MX_MY";
|
||||||
|
const char *RTD_6_IC9_DRO_STRING = "RTD_6_IC9_DRO";
|
||||||
|
const char *RTD_7_IC10_SCEX_STRING = "RTD_7_IC10_SCEX";
|
||||||
|
const char *RTD_8_IC11_X8_STRING = "RTD_8_IC11_X8";
|
||||||
|
const char *RTD_9_IC12_HPA_STRING = "RTD_9_IC12_HPA";
|
||||||
|
const char *RTD_10_IC13_PL_TX_STRING = "RTD_10_IC13_PL_TX";
|
||||||
|
const char *RTD_11_IC14_MPA_STRING = "RTD_11_IC14_MPA";
|
||||||
|
const char *RTD_12_IC15_ACU_STRING = "RTD_12_IC15_ACU";
|
||||||
|
const char *RTD_13_IC16_PLPCDU_HEATSPREADER_STRING = "RTD_13_IC16_PLPCDU_HEATSPREADER";
|
||||||
|
const char *RTD_14_IC17_TCS_BOARD_STRING = "RTD_14_IC17_TCS_BOARD";
|
||||||
|
const char *RTD_15_IC18_IMTQ_STRING = "RTD_15_IC18_IMTQ";
|
||||||
|
const char *SYRLINKS_HANDLER_STRING = "SYRLINKS_HANDLER";
|
||||||
const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
|
const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
|
||||||
|
const char *DUMMY_COM_IF_STRING = "DUMMY_COM_IF";
|
||||||
|
const char *SCEX_UART_READER_STRING = "SCEX_UART_READER";
|
||||||
|
const char *UART_COM_IF_STRING = "UART_COM_IF";
|
||||||
|
const char *ACS_BOARD_POLLING_TASK_STRING = "ACS_BOARD_POLLING_TASK";
|
||||||
|
const char *RW_POLLING_TASK_STRING = "RW_POLLING_TASK";
|
||||||
|
const char *SPI_RTD_COM_IF_STRING = "SPI_RTD_COM_IF";
|
||||||
|
const char *SUS_POLLING_TASK_STRING = "SUS_POLLING_TASK";
|
||||||
|
const char *CCSDS_PACKET_DISTRIBUTOR_STRING = "CCSDS_PACKET_DISTRIBUTOR";
|
||||||
|
const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR";
|
||||||
|
const char *TCP_TMTC_SERVER_STRING = "TCP_TMTC_SERVER";
|
||||||
|
const char *UDP_TMTC_SERVER_STRING = "UDP_TMTC_SERVER";
|
||||||
|
const char *TCP_TMTC_POLLING_TASK_STRING = "TCP_TMTC_POLLING_TASK";
|
||||||
|
const char *UDP_TMTC_POLLING_TASK_STRING = "UDP_TMTC_POLLING_TASK";
|
||||||
|
const char *FILE_SYSTEM_HANDLER_STRING = "FILE_SYSTEM_HANDLER";
|
||||||
|
const char *SDC_MANAGER_STRING = "SDC_MANAGER";
|
||||||
|
const char *PTME_STRING = "PTME";
|
||||||
|
const char *PDEC_HANDLER_STRING = "PDEC_HANDLER";
|
||||||
|
const char *CCSDS_HANDLER_STRING = "CCSDS_HANDLER";
|
||||||
const char *PUS_SERVICE_3_STRING = "PUS_SERVICE_3";
|
const char *PUS_SERVICE_3_STRING = "PUS_SERVICE_3";
|
||||||
const char *PUS_SERVICE_5_STRING = "PUS_SERVICE_5";
|
const char *PUS_SERVICE_5_STRING = "PUS_SERVICE_5";
|
||||||
const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6";
|
const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6";
|
||||||
const char *PUS_SERVICE_8_STRING = "PUS_SERVICE_8";
|
const char *PUS_SERVICE_8_STRING = "PUS_SERVICE_8";
|
||||||
const char *PUS_SERVICE_23_STRING = "PUS_SERVICE_23";
|
const char *PUS_SERVICE_23_STRING = "PUS_SERVICE_23";
|
||||||
const char *PUS_SERVICE_201_STRING = "PUS_SERVICE_201";
|
const char *PUS_SERVICE_201_STRING = "PUS_SERVICE_201";
|
||||||
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
|
||||||
const char *FSFW_OBJECTS_START_STRING = "FSFW_OBJECTS_START";
|
const char *FSFW_OBJECTS_START_STRING = "FSFW_OBJECTS_START";
|
||||||
const char *PUS_SERVICE_1_VERIFICATION_STRING = "PUS_SERVICE_1_VERIFICATION";
|
const char *PUS_SERVICE_1_VERIFICATION_STRING = "PUS_SERVICE_1_VERIFICATION";
|
||||||
const char *PUS_SERVICE_2_DEVICE_ACCESS_STRING = "PUS_SERVICE_2_DEVICE_ACCESS";
|
const char *PUS_SERVICE_2_DEVICE_ACCESS_STRING = "PUS_SERVICE_2_DEVICE_ACCESS";
|
||||||
@ -25,9 +114,13 @@ const char *PUS_SERVICE_3_HOUSEKEEPING_STRING = "PUS_SERVICE_3_HOUSEKEEPING";
|
|||||||
const char *PUS_SERVICE_5_EVENT_REPORTING_STRING = "PUS_SERVICE_5_EVENT_REPORTING";
|
const char *PUS_SERVICE_5_EVENT_REPORTING_STRING = "PUS_SERVICE_5_EVENT_REPORTING";
|
||||||
const char *PUS_SERVICE_8_FUNCTION_MGMT_STRING = "PUS_SERVICE_8_FUNCTION_MGMT";
|
const char *PUS_SERVICE_8_FUNCTION_MGMT_STRING = "PUS_SERVICE_8_FUNCTION_MGMT";
|
||||||
const char *PUS_SERVICE_9_TIME_MGMT_STRING = "PUS_SERVICE_9_TIME_MGMT";
|
const char *PUS_SERVICE_9_TIME_MGMT_STRING = "PUS_SERVICE_9_TIME_MGMT";
|
||||||
|
const char *PUS_SERVICE_11_TC_SCHEDULER_STRING = "PUS_SERVICE_11_TC_SCHEDULER";
|
||||||
|
const char *PUS_SERVICE_15_TM_STORAGE_STRING = "PUS_SERVICE_15_TM_STORAGE";
|
||||||
const char *PUS_SERVICE_17_TEST_STRING = "PUS_SERVICE_17_TEST";
|
const char *PUS_SERVICE_17_TEST_STRING = "PUS_SERVICE_17_TEST";
|
||||||
const char *PUS_SERVICE_20_PARAMETERS_STRING = "PUS_SERVICE_20_PARAMETERS";
|
const char *PUS_SERVICE_20_PARAMETERS_STRING = "PUS_SERVICE_20_PARAMETERS";
|
||||||
const char *PUS_SERVICE_200_MODE_MGMT_STRING = "PUS_SERVICE_200_MODE_MGMT";
|
const char *PUS_SERVICE_200_MODE_MGMT_STRING = "PUS_SERVICE_200_MODE_MGMT";
|
||||||
|
const char *PUS_SERVICE_201_HEALTH_STRING = "PUS_SERVICE_201_HEALTH";
|
||||||
|
const char *CFDP_PACKET_DISTRIBUTOR_STRING = "CFDP_PACKET_DISTRIBUTOR";
|
||||||
const char *HEALTH_TABLE_STRING = "HEALTH_TABLE";
|
const char *HEALTH_TABLE_STRING = "HEALTH_TABLE";
|
||||||
const char *MODE_STORE_STRING = "MODE_STORE";
|
const char *MODE_STORE_STRING = "MODE_STORE";
|
||||||
const char *EVENT_MANAGER_STRING = "EVENT_MANAGER";
|
const char *EVENT_MANAGER_STRING = "EVENT_MANAGER";
|
||||||
@ -36,19 +129,236 @@ const char *TC_STORE_STRING = "TC_STORE";
|
|||||||
const char *TM_STORE_STRING = "TM_STORE";
|
const char *TM_STORE_STRING = "TM_STORE";
|
||||||
const char *IPC_STORE_STRING = "IPC_STORE";
|
const char *IPC_STORE_STRING = "IPC_STORE";
|
||||||
const char *TIME_STAMPER_STRING = "TIME_STAMPER";
|
const char *TIME_STAMPER_STRING = "TIME_STAMPER";
|
||||||
|
const char *VERIFICATION_REPORTER_STRING = "VERIFICATION_REPORTER";
|
||||||
const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END";
|
const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END";
|
||||||
|
const char *HEATER_0_PLOC_PROC_BRD_STRING = "HEATER_0_PLOC_PROC_BRD";
|
||||||
|
const char *HEATER_1_PCDU_BRD_STRING = "HEATER_1_PCDU_BRD";
|
||||||
|
const char *HEATER_2_ACS_BRD_STRING = "HEATER_2_ACS_BRD";
|
||||||
|
const char *HEATER_3_OBC_BRD_STRING = "HEATER_3_OBC_BRD";
|
||||||
|
const char *HEATER_4_CAMERA_STRING = "HEATER_4_CAMERA";
|
||||||
|
const char *HEATER_5_STR_STRING = "HEATER_5_STR";
|
||||||
|
const char *HEATER_6_DRO_STRING = "HEATER_6_DRO";
|
||||||
|
const char *HEATER_7_HPA_STRING = "HEATER_7_HPA";
|
||||||
|
const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
|
||||||
|
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
|
||||||
|
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
|
||||||
|
const char *RW_ASSY_STRING = "RW_ASSY";
|
||||||
|
const char *CAM_SWITCHER_STRING = "CAM_SWITCHER";
|
||||||
|
const char *SYRLINKS_ASSY_STRING = "SYRLINKS_ASSY";
|
||||||
|
const char *IMTQ_ASSY_STRING = "IMTQ_ASSY";
|
||||||
|
const char *STR_ASSY_STRING = "STR_ASSY";
|
||||||
|
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
||||||
|
const char *PUS_TM_FUNNEL_STRING = "PUS_TM_FUNNEL";
|
||||||
|
const char *CFDP_TM_FUNNEL_STRING = "CFDP_TM_FUNNEL";
|
||||||
|
const char *CFDP_HANDLER_STRING = "CFDP_HANDLER";
|
||||||
|
const char *CFDP_DISTRIBUTOR_STRING = "CFDP_DISTRIBUTOR";
|
||||||
|
const char *EIVE_SYSTEM_STRING = "EIVE_SYSTEM";
|
||||||
|
const char *ACS_SUBSYSTEM_STRING = "ACS_SUBSYSTEM";
|
||||||
|
const char *PL_SUBSYSTEM_STRING = "PL_SUBSYSTEM";
|
||||||
|
const char *TCS_SUBSYSTEM_STRING = "TCS_SUBSYSTEM";
|
||||||
|
const char *COM_SUBSYSTEM_STRING = "COM_SUBSYSTEM";
|
||||||
|
const char *MISC_TM_STORE_STRING = "MISC_TM_STORE";
|
||||||
|
const char *OK_TM_STORE_STRING = "OK_TM_STORE";
|
||||||
|
const char *NOT_OK_TM_STORE_STRING = "NOT_OK_TM_STORE";
|
||||||
|
const char *HK_TM_STORE_STRING = "HK_TM_STORE";
|
||||||
|
const char *CFDP_TM_STORE_STRING = "CFDP_TM_STORE";
|
||||||
|
const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE";
|
||||||
|
const char *THERMAL_TEMP_INSERTER_STRING = "THERMAL_TEMP_INSERTER";
|
||||||
const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE";
|
const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE";
|
||||||
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
|
||||||
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
||||||
|
|
||||||
const char *translateObject(object_id_t object) {
|
const char *translateObject(object_id_t object) {
|
||||||
switch ((object & 0xFFFFFFFF)) {
|
switch ((object & 0xFFFFFFFF)) {
|
||||||
case 0x42694269:
|
case 0x42694269:
|
||||||
return TEST_TASK_STRING;
|
return TEST_TASK_STRING;
|
||||||
case 0x4400AFFE:
|
case 0x43000002:
|
||||||
|
return ACS_CONTROLLER_STRING;
|
||||||
|
case 0x43000003:
|
||||||
|
return CORE_CONTROLLER_STRING;
|
||||||
|
case 0x43000006:
|
||||||
|
return GLOBAL_JSON_CFG_STRING;
|
||||||
|
case 0x43400001:
|
||||||
|
return THERMAL_CONTROLLER_STRING;
|
||||||
|
case 0x44000001:
|
||||||
return DUMMY_HANDLER_STRING;
|
return DUMMY_HANDLER_STRING;
|
||||||
|
case 0x44120006:
|
||||||
|
return MGM_0_LIS3_HANDLER_STRING;
|
||||||
|
case 0x44120010:
|
||||||
|
return GYRO_0_ADIS_HANDLER_STRING;
|
||||||
|
case 0x44120032:
|
||||||
|
return SUS_0_N_LOC_XFYFZM_PT_XF_STRING;
|
||||||
|
case 0x44120033:
|
||||||
|
return SUS_1_N_LOC_XBYFZM_PT_XB_STRING;
|
||||||
|
case 0x44120034:
|
||||||
|
return SUS_2_N_LOC_XFYBZB_PT_YB_STRING;
|
||||||
|
case 0x44120035:
|
||||||
|
return SUS_3_N_LOC_XFYBZF_PT_YF_STRING;
|
||||||
|
case 0x44120036:
|
||||||
|
return SUS_4_N_LOC_XMYFZF_PT_ZF_STRING;
|
||||||
|
case 0x44120037:
|
||||||
|
return SUS_5_N_LOC_XFYMZB_PT_ZB_STRING;
|
||||||
|
case 0x44120038:
|
||||||
|
return SUS_6_R_LOC_XFYBZM_PT_XF_STRING;
|
||||||
|
case 0x44120039:
|
||||||
|
return SUS_7_R_LOC_XBYBZM_PT_XB_STRING;
|
||||||
|
case 0x44120040:
|
||||||
|
return SUS_8_R_LOC_XBYBZB_PT_YB_STRING;
|
||||||
|
case 0x44120041:
|
||||||
|
return SUS_9_R_LOC_XBYBZB_PT_YF_STRING;
|
||||||
|
case 0x44120042:
|
||||||
|
return SUS_10_N_LOC_XMYBZF_PT_ZF_STRING;
|
||||||
|
case 0x44120043:
|
||||||
|
return SUS_11_R_LOC_XBYMZB_PT_ZB_STRING;
|
||||||
|
case 0x44120047:
|
||||||
|
return RW1_STRING;
|
||||||
|
case 0x44120107:
|
||||||
|
return MGM_1_RM3100_HANDLER_STRING;
|
||||||
|
case 0x44120111:
|
||||||
|
return GYRO_1_L3G_HANDLER_STRING;
|
||||||
|
case 0x44120148:
|
||||||
|
return RW2_STRING;
|
||||||
|
case 0x44120208:
|
||||||
|
return MGM_2_LIS3_HANDLER_STRING;
|
||||||
|
case 0x44120212:
|
||||||
|
return GYRO_2_ADIS_HANDLER_STRING;
|
||||||
|
case 0x44120249:
|
||||||
|
return RW3_STRING;
|
||||||
|
case 0x44120309:
|
||||||
|
return MGM_3_RM3100_HANDLER_STRING;
|
||||||
|
case 0x44120313:
|
||||||
|
return GYRO_3_L3G_HANDLER_STRING;
|
||||||
|
case 0x44120350:
|
||||||
|
return RW4_STRING;
|
||||||
|
case 0x44130001:
|
||||||
|
return STAR_TRACKER_STRING;
|
||||||
|
case 0x44130045:
|
||||||
|
return GPS_CONTROLLER_STRING;
|
||||||
|
case 0x44140013:
|
||||||
|
return IMTQ_POLLING_STRING;
|
||||||
|
case 0x44140014:
|
||||||
|
return IMTQ_HANDLER_STRING;
|
||||||
|
case 0x442000A1:
|
||||||
|
return PCDU_HANDLER_STRING;
|
||||||
|
case 0x44250000:
|
||||||
|
return P60DOCK_HANDLER_STRING;
|
||||||
|
case 0x44250001:
|
||||||
|
return PDU1_HANDLER_STRING;
|
||||||
|
case 0x44250002:
|
||||||
|
return PDU2_HANDLER_STRING;
|
||||||
|
case 0x44250003:
|
||||||
|
return ACU_HANDLER_STRING;
|
||||||
|
case 0x44260000:
|
||||||
|
return BPX_BATT_HANDLER_STRING;
|
||||||
|
case 0x44300000:
|
||||||
|
return PLPCDU_HANDLER_STRING;
|
||||||
|
case 0x443200A5:
|
||||||
|
return RAD_SENSOR_STRING;
|
||||||
|
case 0x44330000:
|
||||||
|
return PLOC_UPDATER_STRING;
|
||||||
|
case 0x44330001:
|
||||||
|
return PLOC_MEMORY_DUMPER_STRING;
|
||||||
|
case 0x44330002:
|
||||||
|
return STR_HELPER_STRING;
|
||||||
|
case 0x44330003:
|
||||||
|
return PLOC_MPSOC_HELPER_STRING;
|
||||||
|
case 0x44330004:
|
||||||
|
return AXI_PTME_CONFIG_STRING;
|
||||||
|
case 0x44330005:
|
||||||
|
return PTME_CONFIG_STRING;
|
||||||
|
case 0x44330015:
|
||||||
|
return PLOC_MPSOC_HANDLER_STRING;
|
||||||
|
case 0x44330016:
|
||||||
|
return PLOC_SUPERVISOR_HANDLER_STRING;
|
||||||
|
case 0x44330017:
|
||||||
|
return PLOC_SUPERVISOR_HELPER_STRING;
|
||||||
|
case 0x44330032:
|
||||||
|
return SCEX_STRING;
|
||||||
|
case 0x444100A2:
|
||||||
|
return SOLAR_ARRAY_DEPL_HANDLER_STRING;
|
||||||
|
case 0x444100A4:
|
||||||
|
return HEATER_HANDLER_STRING;
|
||||||
|
case 0x44420004:
|
||||||
|
return TMP1075_HANDLER_TCS_0_STRING;
|
||||||
|
case 0x44420005:
|
||||||
|
return TMP1075_HANDLER_TCS_1_STRING;
|
||||||
|
case 0x44420006:
|
||||||
|
return TMP1075_HANDLER_PLPCDU_0_STRING;
|
||||||
|
case 0x44420007:
|
||||||
|
return TMP1075_HANDLER_PLPCDU_1_STRING;
|
||||||
|
case 0x44420008:
|
||||||
|
return TMP1075_HANDLER_IF_BOARD_STRING;
|
||||||
|
case 0x44420016:
|
||||||
|
return RTD_0_IC3_PLOC_HEATSPREADER_STRING;
|
||||||
|
case 0x44420017:
|
||||||
|
return RTD_1_IC4_PLOC_MISSIONBOARD_STRING;
|
||||||
|
case 0x44420018:
|
||||||
|
return RTD_2_IC5_4K_CAMERA_STRING;
|
||||||
|
case 0x44420019:
|
||||||
|
return RTD_3_IC6_DAC_HEATSPREADER_STRING;
|
||||||
|
case 0x44420020:
|
||||||
|
return RTD_4_IC7_STARTRACKER_STRING;
|
||||||
|
case 0x44420021:
|
||||||
|
return RTD_5_IC8_RW1_MX_MY_STRING;
|
||||||
|
case 0x44420022:
|
||||||
|
return RTD_6_IC9_DRO_STRING;
|
||||||
|
case 0x44420023:
|
||||||
|
return RTD_7_IC10_SCEX_STRING;
|
||||||
|
case 0x44420024:
|
||||||
|
return RTD_8_IC11_X8_STRING;
|
||||||
|
case 0x44420025:
|
||||||
|
return RTD_9_IC12_HPA_STRING;
|
||||||
|
case 0x44420026:
|
||||||
|
return RTD_10_IC13_PL_TX_STRING;
|
||||||
|
case 0x44420027:
|
||||||
|
return RTD_11_IC14_MPA_STRING;
|
||||||
|
case 0x44420028:
|
||||||
|
return RTD_12_IC15_ACU_STRING;
|
||||||
|
case 0x44420029:
|
||||||
|
return RTD_13_IC16_PLPCDU_HEATSPREADER_STRING;
|
||||||
|
case 0x44420030:
|
||||||
|
return RTD_14_IC17_TCS_BOARD_STRING;
|
||||||
|
case 0x44420031:
|
||||||
|
return RTD_15_IC18_IMTQ_STRING;
|
||||||
|
case 0x445300A3:
|
||||||
|
return SYRLINKS_HANDLER_STRING;
|
||||||
case 0x49000001:
|
case 0x49000001:
|
||||||
return ARDUINO_COM_IF_STRING;
|
return ARDUINO_COM_IF_STRING;
|
||||||
|
case 0x49000002:
|
||||||
|
return DUMMY_COM_IF_STRING;
|
||||||
|
case 0x49010006:
|
||||||
|
return SCEX_UART_READER_STRING;
|
||||||
|
case 0x49030003:
|
||||||
|
return UART_COM_IF_STRING;
|
||||||
|
case 0x49060004:
|
||||||
|
return ACS_BOARD_POLLING_TASK_STRING;
|
||||||
|
case 0x49060005:
|
||||||
|
return RW_POLLING_TASK_STRING;
|
||||||
|
case 0x49060006:
|
||||||
|
return SPI_RTD_COM_IF_STRING;
|
||||||
|
case 0x49060007:
|
||||||
|
return SUS_POLLING_TASK_STRING;
|
||||||
|
case 0x50000100:
|
||||||
|
return CCSDS_PACKET_DISTRIBUTOR_STRING;
|
||||||
|
case 0x50000200:
|
||||||
|
return PUS_PACKET_DISTRIBUTOR_STRING;
|
||||||
|
case 0x50000300:
|
||||||
|
return TCP_TMTC_SERVER_STRING;
|
||||||
|
case 0x50000301:
|
||||||
|
return UDP_TMTC_SERVER_STRING;
|
||||||
|
case 0x50000400:
|
||||||
|
return TCP_TMTC_POLLING_TASK_STRING;
|
||||||
|
case 0x50000401:
|
||||||
|
return UDP_TMTC_POLLING_TASK_STRING;
|
||||||
|
case 0x50000500:
|
||||||
|
return FILE_SYSTEM_HANDLER_STRING;
|
||||||
|
case 0x50000550:
|
||||||
|
return SDC_MANAGER_STRING;
|
||||||
|
case 0x50000600:
|
||||||
|
return PTME_STRING;
|
||||||
|
case 0x50000700:
|
||||||
|
return PDEC_HANDLER_STRING;
|
||||||
|
case 0x50000800:
|
||||||
|
return CCSDS_HANDLER_STRING;
|
||||||
case 0x51000300:
|
case 0x51000300:
|
||||||
return PUS_SERVICE_3_STRING;
|
return PUS_SERVICE_3_STRING;
|
||||||
case 0x51000400:
|
case 0x51000400:
|
||||||
@ -61,8 +371,6 @@ const char *translateObject(object_id_t object) {
|
|||||||
return PUS_SERVICE_23_STRING;
|
return PUS_SERVICE_23_STRING;
|
||||||
case 0x51020100:
|
case 0x51020100:
|
||||||
return PUS_SERVICE_201_STRING;
|
return PUS_SERVICE_201_STRING;
|
||||||
case 0x52000002:
|
|
||||||
return TM_FUNNEL_STRING;
|
|
||||||
case 0x53000000:
|
case 0x53000000:
|
||||||
return FSFW_OBJECTS_START_STRING;
|
return FSFW_OBJECTS_START_STRING;
|
||||||
case 0x53000001:
|
case 0x53000001:
|
||||||
@ -77,12 +385,20 @@ const char *translateObject(object_id_t object) {
|
|||||||
return PUS_SERVICE_8_FUNCTION_MGMT_STRING;
|
return PUS_SERVICE_8_FUNCTION_MGMT_STRING;
|
||||||
case 0x53000009:
|
case 0x53000009:
|
||||||
return PUS_SERVICE_9_TIME_MGMT_STRING;
|
return PUS_SERVICE_9_TIME_MGMT_STRING;
|
||||||
|
case 0x53000011:
|
||||||
|
return PUS_SERVICE_11_TC_SCHEDULER_STRING;
|
||||||
|
case 0x53000015:
|
||||||
|
return PUS_SERVICE_15_TM_STORAGE_STRING;
|
||||||
case 0x53000017:
|
case 0x53000017:
|
||||||
return PUS_SERVICE_17_TEST_STRING;
|
return PUS_SERVICE_17_TEST_STRING;
|
||||||
case 0x53000020:
|
case 0x53000020:
|
||||||
return PUS_SERVICE_20_PARAMETERS_STRING;
|
return PUS_SERVICE_20_PARAMETERS_STRING;
|
||||||
case 0x53000200:
|
case 0x53000200:
|
||||||
return PUS_SERVICE_200_MODE_MGMT_STRING;
|
return PUS_SERVICE_200_MODE_MGMT_STRING;
|
||||||
|
case 0x53000201:
|
||||||
|
return PUS_SERVICE_201_HEALTH_STRING;
|
||||||
|
case 0x53001000:
|
||||||
|
return CFDP_PACKET_DISTRIBUTOR_STRING;
|
||||||
case 0x53010000:
|
case 0x53010000:
|
||||||
return HEALTH_TABLE_STRING;
|
return HEALTH_TABLE_STRING;
|
||||||
case 0x53010100:
|
case 0x53010100:
|
||||||
@ -99,12 +415,78 @@ const char *translateObject(object_id_t object) {
|
|||||||
return IPC_STORE_STRING;
|
return IPC_STORE_STRING;
|
||||||
case 0x53500010:
|
case 0x53500010:
|
||||||
return TIME_STAMPER_STRING;
|
return TIME_STAMPER_STRING;
|
||||||
|
case 0x53500020:
|
||||||
|
return VERIFICATION_REPORTER_STRING;
|
||||||
case 0x53ffffff:
|
case 0x53ffffff:
|
||||||
return FSFW_OBJECTS_END_STRING;
|
return FSFW_OBJECTS_END_STRING;
|
||||||
|
case 0x60000000:
|
||||||
|
return HEATER_0_PLOC_PROC_BRD_STRING;
|
||||||
|
case 0x60000001:
|
||||||
|
return HEATER_1_PCDU_BRD_STRING;
|
||||||
|
case 0x60000002:
|
||||||
|
return HEATER_2_ACS_BRD_STRING;
|
||||||
|
case 0x60000003:
|
||||||
|
return HEATER_3_OBC_BRD_STRING;
|
||||||
|
case 0x60000004:
|
||||||
|
return HEATER_4_CAMERA_STRING;
|
||||||
|
case 0x60000005:
|
||||||
|
return HEATER_5_STR_STRING;
|
||||||
|
case 0x60000006:
|
||||||
|
return HEATER_6_DRO_STRING;
|
||||||
|
case 0x60000007:
|
||||||
|
return HEATER_7_HPA_STRING;
|
||||||
|
case 0x73000001:
|
||||||
|
return ACS_BOARD_ASS_STRING;
|
||||||
|
case 0x73000002:
|
||||||
|
return SUS_BOARD_ASS_STRING;
|
||||||
|
case 0x73000003:
|
||||||
|
return TCS_BOARD_ASS_STRING;
|
||||||
|
case 0x73000004:
|
||||||
|
return RW_ASSY_STRING;
|
||||||
|
case 0x73000006:
|
||||||
|
return CAM_SWITCHER_STRING;
|
||||||
|
case 0x73000007:
|
||||||
|
return SYRLINKS_ASSY_STRING;
|
||||||
|
case 0x73000008:
|
||||||
|
return IMTQ_ASSY_STRING;
|
||||||
|
case 0x73000009:
|
||||||
|
return STR_ASSY_STRING;
|
||||||
|
case 0x73000100:
|
||||||
|
return TM_FUNNEL_STRING;
|
||||||
|
case 0x73000101:
|
||||||
|
return PUS_TM_FUNNEL_STRING;
|
||||||
|
case 0x73000102:
|
||||||
|
return CFDP_TM_FUNNEL_STRING;
|
||||||
|
case 0x73000205:
|
||||||
|
return CFDP_HANDLER_STRING;
|
||||||
|
case 0x73000206:
|
||||||
|
return CFDP_DISTRIBUTOR_STRING;
|
||||||
|
case 0x73010000:
|
||||||
|
return EIVE_SYSTEM_STRING;
|
||||||
|
case 0x73010001:
|
||||||
|
return ACS_SUBSYSTEM_STRING;
|
||||||
|
case 0x73010002:
|
||||||
|
return PL_SUBSYSTEM_STRING;
|
||||||
|
case 0x73010003:
|
||||||
|
return TCS_SUBSYSTEM_STRING;
|
||||||
|
case 0x73010004:
|
||||||
|
return COM_SUBSYSTEM_STRING;
|
||||||
|
case 0x73020001:
|
||||||
|
return MISC_TM_STORE_STRING;
|
||||||
|
case 0x73020002:
|
||||||
|
return OK_TM_STORE_STRING;
|
||||||
|
case 0x73020003:
|
||||||
|
return NOT_OK_TM_STORE_STRING;
|
||||||
|
case 0x73020004:
|
||||||
|
return HK_TM_STORE_STRING;
|
||||||
|
case 0x73030000:
|
||||||
|
return CFDP_TM_STORE_STRING;
|
||||||
|
case 0x73500000:
|
||||||
|
return CCSDS_IP_CORE_BRIDGE_STRING;
|
||||||
|
case 0x90000003:
|
||||||
|
return THERMAL_TEMP_INSERTER_STRING;
|
||||||
case 0xCAFECAFE:
|
case 0xCAFECAFE:
|
||||||
return DUMMY_INTERFACE_STRING;
|
return DUMMY_INTERFACE_STRING;
|
||||||
case objects::THERMAL_CONTROLLER:
|
|
||||||
return THERMAL_CONTROLLER_STRING;
|
|
||||||
case 0xFFFFFFFF:
|
case 0xFFFFFFFF:
|
||||||
return NO_OBJECT_STRING;
|
return NO_OBJECT_STRING;
|
||||||
default:
|
default:
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
|
|
||||||
#include <fsfw/objectmanager/SystemObjectIF.h>
|
#include <fsfw/objectmanager/SystemObjectIF.h>
|
||||||
|
|
||||||
const char* translateObject(object_id_t object);
|
const char *translateObject(object_id_t object);
|
||||||
|
|
||||||
#endif /* FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_ */
|
#endif /* FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_ */
|
||||||
|
@ -44,12 +44,11 @@ ReturnValue_t dummy_pst::pst(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0,
|
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
|
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
|
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
|
thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
namespace CLASS_ID {
|
namespace CLASS_ID {
|
||||||
enum {
|
enum {
|
||||||
CLASS_ID_START = COMMON_CLASS_ID_END,
|
CLASS_ID_START = COMMON_CLASS_ID_END,
|
||||||
|
CLASS_ID_END // [EXPORT] : [END]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "InitMission.h"
|
|
||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
#include "fsfw/FSFWVersion.h"
|
#include "fsfw/FSFWVersion.h"
|
||||||
#include "fsfw/controller/ControllerBase.h"
|
#include "fsfw/controller/ControllerBase.h"
|
||||||
@ -11,6 +10,7 @@
|
|||||||
#include "fsfw/modes/ModeMessage.h"
|
#include "fsfw/modes/ModeMessage.h"
|
||||||
#include "fsfw/objectmanager/ObjectManager.h"
|
#include "fsfw/objectmanager/ObjectManager.h"
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
#include "fsfw/tasks/TaskFactory.h"
|
||||||
|
#include "scheduling.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
static const char* COMPILE_PRINTOUT = "Windows";
|
static const char* COMPILE_PRINTOUT = "Windows";
|
||||||
@ -35,7 +35,7 @@ int main(void) {
|
|||||||
<< " BSP HOSTED"
|
<< " BSP HOSTED"
|
||||||
<< " --" << std::endl;
|
<< " --" << std::endl;
|
||||||
|
|
||||||
initmission::initMission();
|
scheduling::initMission();
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
// suspend main thread by sleeping it.
|
// suspend main thread by sleeping it.
|
||||||
|
238
bsp_hosted/scheduling.cpp
Normal file
238
bsp_hosted/scheduling.cpp
Normal file
@ -0,0 +1,238 @@
|
|||||||
|
#include "linux/scheduling.h"
|
||||||
|
|
||||||
|
#include <bsp_hosted/fsfwconfig/pollingsequence/DummyPst.h>
|
||||||
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
|
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
||||||
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
|
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||||
|
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||||
|
#include <fsfw/tasks/PeriodicTaskIF.h>
|
||||||
|
#include <fsfw/tasks/TaskFactory.h>
|
||||||
|
#include <mission/utility/InitMission.h>
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "OBSWConfig.h"
|
||||||
|
#include "ObjectFactory.h"
|
||||||
|
#include "mission/core/scheduling.h"
|
||||||
|
#include "scheduling.h"
|
||||||
|
|
||||||
|
#ifdef LINUX
|
||||||
|
ServiceInterfaceStream sif::debug("DEBUG");
|
||||||
|
ServiceInterfaceStream sif::info("INFO");
|
||||||
|
ServiceInterfaceStream sif::warning("WARNING");
|
||||||
|
ServiceInterfaceStream sif::error("ERROR", false, false, true);
|
||||||
|
#else
|
||||||
|
ServiceInterfaceStream sif::debug("DEBUG", true);
|
||||||
|
ServiceInterfaceStream sif::info("INFO", true);
|
||||||
|
ServiceInterfaceStream sif::warning("WARNING", true);
|
||||||
|
ServiceInterfaceStream sif::error("ERROR", true, false, true);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ObjectManagerIF* objectManager = nullptr;
|
||||||
|
|
||||||
|
void scheduling::initMission() {
|
||||||
|
sif::info << "Building global objects.." << std::endl;
|
||||||
|
/* Instantiate global object manager and also create all objects */
|
||||||
|
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
|
||||||
|
sif::info << "Initializing all objects.." << std::endl;
|
||||||
|
ObjectManager::instance()->initialize();
|
||||||
|
|
||||||
|
/* This function creates and starts all tasks */
|
||||||
|
initTasks();
|
||||||
|
}
|
||||||
|
|
||||||
|
void scheduling::initTasks() {
|
||||||
|
TaskFactory* factory = TaskFactory::instance();
|
||||||
|
if (factory == nullptr) {
|
||||||
|
/* Should never happen ! */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#if OBSW_PRINT_MISSED_DEADLINES == 1
|
||||||
|
void (*missedDeadlineFunc)(void) = TaskFactory::printMissedDeadline;
|
||||||
|
#else
|
||||||
|
void (*missedDeadlineFunc)(void) = nullptr;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* TMTC Distribution */
|
||||||
|
PeriodicTaskIF* tmtcDistributor = factory->createPeriodicTask(
|
||||||
|
"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;
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
result = tmtcDistributor->addComponent(objects::CFDP_DISTRIBUTOR);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "adding CFDP distributor failed" << std::endl;
|
||||||
|
}
|
||||||
|
result = tmtcDistributor->addComponent(objects::UDP_TMTC_SERVER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "adding UDP server failed" << std::endl;
|
||||||
|
}
|
||||||
|
result = tmtcDistributor->addComponent(objects::TCP_TMTC_SERVER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "adding TCP server failed" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
PeriodicTaskIF* udpPollingTask = factory->createPeriodicTask(
|
||||||
|
"UDP_POLLING", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
|
result = udpPollingTask->addComponent(objects::UDP_TMTC_POLLING_TASK);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "Add component UDP Polling failed" << std::endl;
|
||||||
|
}
|
||||||
|
PeriodicTaskIF* tcpPollingTask = factory->createPeriodicTask(
|
||||||
|
"TCP_POLLING", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
|
result = tcpPollingTask->addComponent(objects::TCP_TMTC_POLLING_TASK);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "Add component UDP Polling failed" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
PeriodicTaskIF* pusHighPrio = factory->createPeriodicTask(
|
||||||
|
"PUS_HIGH_PRIO", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "Object add component failed" << std::endl;
|
||||||
|
}
|
||||||
|
result = pusHighPrio->addComponent(objects::EVENT_MANAGER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("EVENT_MGMT", objects::EVENT_MANAGER);
|
||||||
|
}
|
||||||
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS5", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
|
}
|
||||||
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
|
}
|
||||||
|
|
||||||
|
PeriodicTaskIF* pusMedPrio = factory->createPeriodicTask(
|
||||||
|
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||||
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
|
}
|
||||||
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_15_TM_STORAGE);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS15", objects::PUS_SERVICE_15_TM_STORAGE);
|
||||||
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
PeriodicTaskIF* thermalTask = factory->createPeriodicTask(
|
||||||
|
"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);
|
||||||
|
}
|
||||||
|
|
||||||
|
result = thermalTask->addComponent(objects::THERMAL_CONTROLLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
|
||||||
|
}
|
||||||
|
|
||||||
|
FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask(
|
||||||
|
"DUMMY_PST", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
||||||
|
result = dummy_pst::pst(pstTask);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "Failed to add dummy pst to fixed timeslot task" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||||
|
PeriodicTaskIF* cfdpTask = factory->createPeriodicTask(
|
||||||
|
"CFDP Handler", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||||
|
result = cfdpTask->addComponent(objects::CFDP_HANDLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("CFDP Handler", objects::CFDP_HANDLER);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
|
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
|
||||||
|
"PLOC_SUPV_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
|
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
|
||||||
|
}
|
||||||
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
|
||||||
|
|
||||||
|
PeriodicTaskIF* plTask = factory->createPeriodicTask(
|
||||||
|
"PL_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
|
scheduling::addMpsocSupvHandlers(plTask);
|
||||||
|
#if OBSW_ADD_TEST_CODE == 1
|
||||||
|
result = testTask->addComponent(objects::TEST_TASK);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
||||||
|
}
|
||||||
|
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||||
|
|
||||||
|
PeriodicTaskIF* dummyTask = factory->createPeriodicTask(
|
||||||
|
"DUMMY_TASK", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
|
scheduling::scheduleTmpTempSensors(dummyTask);
|
||||||
|
scheduling::scheduleRtdSensors(dummyTask);
|
||||||
|
dummyTask->addComponent(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
||||||
|
dummyTask->addComponent(objects::SUS_1_N_LOC_XBYFZM_PT_XB);
|
||||||
|
dummyTask->addComponent(objects::SUS_2_N_LOC_XFYBZB_PT_YB);
|
||||||
|
dummyTask->addComponent(objects::SUS_3_N_LOC_XFYBZF_PT_YF);
|
||||||
|
dummyTask->addComponent(objects::SUS_4_N_LOC_XMYFZF_PT_ZF);
|
||||||
|
dummyTask->addComponent(objects::SUS_5_N_LOC_XFYMZB_PT_ZB);
|
||||||
|
dummyTask->addComponent(objects::SUS_6_R_LOC_XFYBZM_PT_XF);
|
||||||
|
dummyTask->addComponent(objects::SUS_7_R_LOC_XBYBZM_PT_XB);
|
||||||
|
dummyTask->addComponent(objects::SUS_8_R_LOC_XBYBZB_PT_YB);
|
||||||
|
dummyTask->addComponent(objects::SUS_9_R_LOC_XBYBZB_PT_YF);
|
||||||
|
dummyTask->addComponent(objects::SUS_10_N_LOC_XMYBZF_PT_ZF);
|
||||||
|
dummyTask->addComponent(objects::SUS_11_R_LOC_XBYMZB_PT_ZB);
|
||||||
|
|
||||||
|
sif::info << "Starting tasks.." << std::endl;
|
||||||
|
tmtcDistributor->startTask();
|
||||||
|
udpPollingTask->startTask();
|
||||||
|
tcpPollingTask->startTask();
|
||||||
|
|
||||||
|
pusHighPrio->startTask();
|
||||||
|
pusMedPrio->startTask();
|
||||||
|
|
||||||
|
pstTask->startTask();
|
||||||
|
thermalTask->startTask();
|
||||||
|
dummyTask->startTask();
|
||||||
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
|
supvHelperTask->startTask();
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1 || OBSW_ADD_PLOC_MPSOC == 1
|
||||||
|
plTask->startTask();
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||||
|
cfdpTask->startTask();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_TEST_CODE == 1
|
||||||
|
testTask->startTask();
|
||||||
|
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||||
|
|
||||||
|
sif::info << "Tasks started.." << std::endl;
|
||||||
|
}
|
6
bsp_hosted/scheduling.h
Normal file
6
bsp_hosted/scheduling.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace scheduling {
|
||||||
|
void initMission();
|
||||||
|
void initTasks();
|
||||||
|
}; // namespace scheduling
|
@ -1,5 +1,6 @@
|
|||||||
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp gpioInit.cpp
|
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp gpioInit.cpp
|
||||||
ObjectFactory.cpp RPiSdCardManager.cpp)
|
ObjectFactory.cpp)
|
||||||
|
|
||||||
add_subdirectory(boardconfig)
|
add_subdirectory(boardconfig)
|
||||||
add_subdirectory(boardtest)
|
add_subdirectory(boardtest)
|
||||||
|
add_subdirectory(fsfwconfig)
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
||||||
|
|
||||||
#define OBSW_USE_CCSDS_IP_CORE 0
|
#define OBSW_ADD_CCSDS_IP_CORES 0
|
||||||
// Set to 1 if all telemetry should be sent to the PTME IP Core
|
// Set to 1 if all telemetry should be sent to the PTME IP Core
|
||||||
#define OBSW_TM_TO_PTME 0
|
#define OBSW_TM_TO_PTME 0
|
||||||
// Set to 1 if telecommands are received via the PDEC IP Core
|
// Set to 1 if telecommands are received via the PDEC IP Core
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
#include "fsfw/osal/common/UdpTmTcBridge.h"
|
#include "fsfw/osal/common/UdpTmTcBridge.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <fsfw_hal/linux/uart/UartComIF.h>
|
#include <fsfw_hal/linux/serial/SerialComIF.h>
|
||||||
#include <fsfw_hal/linux/uart/UartCookie.h>
|
#include <fsfw_hal/linux/serial/SerialCookie.h>
|
||||||
|
|
||||||
#include "fsfw_hal/common/gpio/GpioCookie.h"
|
#include "fsfw_hal/common/gpio/GpioCookie.h"
|
||||||
#include "fsfw_hal/devicehandlers/GyroL3GD20Handler.h"
|
#include "fsfw_hal/devicehandlers/GyroL3GD20Handler.h"
|
||||||
@ -82,7 +82,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OBSW_ADD_SCEX_DEVICE == 1
|
#if OBSW_ADD_SCEX_DEVICE == 1
|
||||||
auto* sdcMan = new RPiSdCardManager("/tmp");
|
auto* sdcMan = new DummySdCardManager("/tmp");
|
||||||
createScexComponents(uart::DEV, pwrSwitcher, *sdcMan, true, std::nullopt);
|
createScexComponents(uart::DEV, pwrSwitcher, *sdcMan, true, std::nullopt);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ void ObjectFactory::createTestTasks() {
|
|||||||
#if OBSW_ADD_UART_TEST_CODE == 1
|
#if OBSW_ADD_UART_TEST_CODE == 1
|
||||||
new UartTestClass(objects::UART_TEST);
|
new UartTestClass(objects::UART_TEST);
|
||||||
#else
|
#else
|
||||||
new UartComIF(objects::UART_COM_IF);
|
newSerialComIF(objects::UART_COM_IF);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if RPI_LOOPBACK_TEST_GPIO == 1
|
#if RPI_LOOPBACK_TEST_GPIO == 1
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
#include "RPiSdCardManager.h"
|
|
||||||
|
|
||||||
RPiSdCardManager::RPiSdCardManager(std::string prefix) : prefix(std::move(prefix)) {}
|
|
||||||
|
|
||||||
const std::string& RPiSdCardManager::getCurrentMountPrefix() const { return prefix; }
|
|
||||||
|
|
||||||
bool RPiSdCardManager::isSdCardUsable(sd::SdCard sdCard) { return true; }
|
|
||||||
|
|
||||||
std::optional<sd::SdCard> RPiSdCardManager::getPreferredSdCard() const { return std::nullopt; }
|
|
||||||
|
|
||||||
void RPiSdCardManager::setActiveSdCard(sd::SdCard sdCard) {}
|
|
||||||
|
|
||||||
std::optional<sd::SdCard> RPiSdCardManager::getActiveSdCard() const { return std::nullopt; }
|
|
@ -8,59 +8,67 @@
|
|||||||
|
|
||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
#include "q7sConfig.h"
|
#include "q7sConfig.h"
|
||||||
#include "OBSWVersion.h"
|
|
||||||
|
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
/** All of the following flags should be enabled for mission code */
|
/** All of the following flags should be enabled for mission code */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
#define OBSW_USE_CCSDS_IP_CORE 1
|
#define OBSW_ENABLE_PERIODIC_HK 0
|
||||||
// Set to 1 if all telemetry should be sent to the PTME IP Core
|
#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0
|
||||||
#define OBSW_TM_TO_PTME 0
|
// This switch will cause the SW to command the EIVE system object to safe mode. This will
|
||||||
// Set to 1 if telecommands are received via the PDEC IP Core
|
// trigger a lot of events, so it can make sense to disable this for debugging purposes
|
||||||
#define OBSW_TC_FROM_PDEC 0
|
#define OBSW_COMMAND_SAFE_MODE_AT_STARTUP 1
|
||||||
|
|
||||||
#define OBSW_ENABLE_TIMERS 1
|
|
||||||
#define OBSW_ADD_GOMSPACE_PCDU @OBSW_ADD_GOMSPACE_PCDU@
|
#define OBSW_ADD_GOMSPACE_PCDU @OBSW_ADD_GOMSPACE_PCDU@
|
||||||
#define OBSW_ADD_MGT @OBSW_ADD_MGT@
|
#define OBSW_ADD_MGT @OBSW_ADD_MGT@
|
||||||
#define OBSW_ADD_BPX_BATTERY_HANDLER @OBSW_ADD_BPX_BATTERY_HANDLER@
|
#define OBSW_ADD_BPX_BATTERY_HANDLER @OBSW_ADD_BPX_BATTERY_HANDLER@
|
||||||
#define OBSW_ADD_STAR_TRACKER @OBSW_ADD_STAR_TRACKER@
|
#define OBSW_ADD_STAR_TRACKER @OBSW_ADD_STAR_TRACKER@
|
||||||
#define OBSW_ADD_PLOC_SUPERVISOR 1
|
#define OBSW_ADD_PLOC_SUPERVISOR @OBSW_ADD_PLOC_SUPERVISOR@
|
||||||
#define OBSW_ADD_PLOC_MPSOC 1
|
#define OBSW_ADD_PLOC_MPSOC @OBSW_ADD_PLOC_MPSOC@
|
||||||
#define OBSW_ADD_SUN_SENSORS @OBSW_ADD_SUN_SENSORS@
|
#define OBSW_ADD_SUN_SENSORS @OBSW_ADD_SUN_SENSORS@
|
||||||
#define OBSW_ADD_SUS_BOARD_ASS @OBSW_ADD_SUS_BOARD_ASS@
|
#define OBSW_ADD_SUS_BOARD_ASS @OBSW_ADD_SUS_BOARD_ASS@
|
||||||
#define OBSW_ADD_ACS_BOARD @OBSW_ADD_ACS_BOARD@
|
#define OBSW_ADD_ACS_BOARD @OBSW_ADD_ACS_BOARD@
|
||||||
#define OBSW_ADD_ACS_CTRL @OBSW_ADD_ACS_CTRL@
|
#define OBSW_ADD_ACS_CTRL 1
|
||||||
#define OBSW_ADD_GPS_CTRL @OBSW_ADD_GPS_CTRL@
|
#define OBSW_ADD_GPS_CTRL @OBSW_ADD_GPS_CTRL@
|
||||||
#define OBSW_ADD_TCS_CTRL @OBSW_ADD_TCS_CTRL@
|
#define OBSW_ADD_TCS_CTRL @OBSW_ADD_TCS_CTRL@
|
||||||
#define OBSW_ADD_RW @OBSW_ADD_RW@
|
#define OBSW_ADD_RW @OBSW_ADD_RW@
|
||||||
#define OBSW_ADD_RTD_DEVICES @OBSW_ADD_RTD_DEVICES@
|
#define OBSW_ADD_RTD_DEVICES @OBSW_ADD_RTD_DEVICES@
|
||||||
|
#define OBSW_ADD_SA_DEPL @OBSW_ADD_SA_DEPL@
|
||||||
#define OBSW_ADD_SCEX_DEVICE @OBSW_ADD_SCEX_DEVICE@
|
#define OBSW_ADD_SCEX_DEVICE @OBSW_ADD_SCEX_DEVICE@
|
||||||
|
#define OBSW_ADD_HEATERS @OBSW_ADD_HEATERS@
|
||||||
#define OBSW_ADD_TMP_DEVICES @OBSW_ADD_TMP_DEVICES@
|
#define OBSW_ADD_TMP_DEVICES @OBSW_ADD_TMP_DEVICES@
|
||||||
#define OBSW_ADD_RAD_SENSORS @OBSW_ADD_RAD_SENSORS@
|
#define OBSW_ADD_RAD_SENSORS @OBSW_ADD_RAD_SENSORS@
|
||||||
#define OBSW_ADD_PL_PCDU @OBSW_ADD_PL_PCDU@
|
#define OBSW_ADD_PL_PCDU @OBSW_ADD_PL_PCDU@
|
||||||
#define OBSW_ADD_SYRLINKS @OBSW_ADD_SYRLINKS@
|
#define OBSW_ADD_SYRLINKS @OBSW_ADD_SYRLINKS@
|
||||||
#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0
|
#define OBSW_ADD_CCSDS_IP_CORES @OBSW_ADD_CCSDS_IP_CORES@
|
||||||
#define OBSW_MPSOC_JTAG_BOOT 0
|
// 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
|
||||||
|
#define OBSW_TC_FROM_PDEC @OBSW_TC_FROM_PDEC@
|
||||||
|
|
||||||
// This is a really tricky switch.. It initializes the PCDU switches to their default states
|
// Configuration parameter which causes the core controller to try to keep at least one SD card
|
||||||
// at powerup. I think it would be better
|
// working
|
||||||
// to leave it off for now. It makes testing a lot more difficult and it might mess with
|
#define OBSW_SD_CARD_MUST_BE_ON 1
|
||||||
// something the operators might want to do by giving the software too much intelligence
|
#define OBSW_ENABLE_TIMERS 1
|
||||||
// at the wrong place. The system component might command all the Switches accordingly anyway
|
|
||||||
#define OBSW_INITIALIZE_SWITCHES 0
|
|
||||||
#define OBSW_ENABLE_PERIODIC_HK 0
|
|
||||||
|
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
/** All of the following flags should be disabled for mission code */
|
/** All of the following flags should be disabled for mission code */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
// Use TCP instead of UDP for the TMTC bridge. This allows using the TMTC client locally
|
||||||
|
// 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
|
||||||
|
|
||||||
// Can be used to switch device to NORMAL mode immediately
|
// Can be used to switch device to NORMAL mode immediately
|
||||||
#define OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP 1
|
#define OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP 0
|
||||||
#define OBSW_PRINT_MISSED_DEADLINES 1
|
#define OBSW_PRINT_MISSED_DEADLINES 1
|
||||||
|
|
||||||
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1
|
#define OBSW_MPSOC_JTAG_BOOT 0
|
||||||
#define OBSW_SYRLINKS_SIMULATED 1
|
#define OBSW_STAR_TRACKER_GROUND_CONFIG @OBSW_STAR_TRACKER_GROUND_CONFIG@
|
||||||
|
#define OBSW_SYRLINKS_SIMULATED @OBSW_SYRLINKS_SIMULATED@
|
||||||
#define OBSW_ADD_TEST_CODE 0
|
#define OBSW_ADD_TEST_CODE 0
|
||||||
#define OBSW_ADD_TEST_TASK 0
|
#define OBSW_ADD_TEST_TASK 0
|
||||||
#define OBSW_ADD_TEST_PST 0
|
#define OBSW_ADD_TEST_PST 0
|
||||||
@ -99,6 +107,7 @@
|
|||||||
#define OBSW_PRINT_CORE_HK 0
|
#define OBSW_PRINT_CORE_HK 0
|
||||||
#define OBSW_DEBUG_PDU1 0
|
#define OBSW_DEBUG_PDU1 0
|
||||||
#define OBSW_DEBUG_PDU2 0
|
#define OBSW_DEBUG_PDU2 0
|
||||||
|
#define OBSW_DEBUG_TMP1075 0
|
||||||
#define OBSW_DEBUG_GPS 0
|
#define OBSW_DEBUG_GPS 0
|
||||||
#define OBSW_DEBUG_ACU 0
|
#define OBSW_DEBUG_ACU 0
|
||||||
#define OBSW_DEBUG_SYRLINKS 0
|
#define OBSW_DEBUG_SYRLINKS 0
|
||||||
@ -113,6 +122,7 @@
|
|||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
/** CMake Defines */
|
/** CMake Defines */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
||||||
|
|
||||||
#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@
|
#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@
|
||||||
|
@ -3,24 +3,28 @@
|
|||||||
|
|
||||||
namespace q7s {
|
namespace q7s {
|
||||||
|
|
||||||
static constexpr char SPI_DEFAULT_DEV[] = "/dev/spi-main";
|
static constexpr char SPI_DEFAULT_DEV[] = "/dev/spi_main";
|
||||||
static constexpr uint32_t SPI_MAIN_BUS_LOCK_TIMEOUT = 50;
|
static constexpr uint32_t SPI_MAIN_BUS_LOCK_TIMEOUT = 50;
|
||||||
|
|
||||||
static constexpr char SPI_RW_DEV[] = "/dev/spi-rw";
|
static constexpr char SPI_RW_DEV[] = "/dev/spi_rw";
|
||||||
|
|
||||||
static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-eive";
|
//! I2C bus using an I2C IP core in the programmable logic (PL)
|
||||||
|
static constexpr char I2C_PL_EIVE[] = "/dev/i2c_pl";
|
||||||
|
//! I2C bus using the I2C peripheral of the ARM processing system (PS)
|
||||||
|
static constexpr char I2C_PS_EIVE[] = "/dev/i2c_ps";
|
||||||
|
|
||||||
static constexpr char UART_GNSS_DEV[] = "/dev/gps0";
|
static constexpr char UART_GNSS_DEV[] = "/dev/gps0";
|
||||||
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ul-plmpsoc";
|
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ul_plmpsoc";
|
||||||
static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ul-plsv";
|
static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ploc_supv";
|
||||||
static constexpr char UART_SYRLINKS_DEV[] = "/dev/ul-syrlinks";
|
static constexpr char UART_SYRLINKS_DEV[] = "/dev/ul_syrlinks";
|
||||||
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ul-str";
|
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ul_str";
|
||||||
static constexpr char UART_SCEX_DEV[] = "/dev/ttyS-SCEX";
|
static constexpr char UART_SCEX_DEV[] = "/dev/scex";
|
||||||
|
|
||||||
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio0";
|
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio_pdec_regs";
|
||||||
static constexpr char UIO_PTME[] = "/dev/uio1";
|
static constexpr char UIO_PTME[] = "/dev/uio_ptme";
|
||||||
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio2";
|
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio_pdec_cfg_mem";
|
||||||
static constexpr char UIO_PDEC_RAM[] = "/dev/uio3";
|
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;
|
static constexpr int MAP_ID_PTME_CONFIG = 3;
|
||||||
|
|
||||||
namespace uiomapids {
|
namespace uiomapids {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
// Probably better if this is disabled for mission code. Convenient for development
|
// Probably better if this is disabled for mission code. Convenient for development
|
||||||
#define Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 1
|
#define Q7S_CHECK_FOR_ALREADY_RUNNING_IMG @Q7S_CHECK_FOR_ALREADY_RUNNING_IMG@
|
||||||
|
|
||||||
#define Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST 0
|
#define Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST 0
|
||||||
|
|
||||||
|
@ -75,8 +75,10 @@ ReturnValue_t Q7STestTask::performOneShotAction() {
|
|||||||
if (doTestProtHandler) {
|
if (doTestProtHandler) {
|
||||||
testProtHandler();
|
testProtHandler();
|
||||||
}
|
}
|
||||||
FsOpCodes opCode = FsOpCodes::CREATE_EMPTY_FILE_IN_TMP;
|
if (DO_TEST_FS_HANDLER) {
|
||||||
testFileSystemHandlerDirect(opCode);
|
FsOpCodes opCode = FsOpCodes::CREATE_EMPTY_FILE_IN_TMP;
|
||||||
|
testFileSystemHandlerDirect(opCode);
|
||||||
|
}
|
||||||
return TestTask::performOneShotAction();
|
return TestTask::performOneShotAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <libgpsmm.h>
|
#include <libgpsmm.h>
|
||||||
|
|
||||||
#include "test/testtasks/TestTask.h"
|
#include "test/TestTask.h"
|
||||||
|
|
||||||
class CoreController;
|
class CoreController;
|
||||||
|
|
||||||
@ -18,6 +18,7 @@ class Q7STestTask : public TestTask {
|
|||||||
bool doTestScratchApi = false;
|
bool doTestScratchApi = false;
|
||||||
static constexpr bool DO_TEST_GOMSPACE_API = false;
|
static constexpr bool DO_TEST_GOMSPACE_API = false;
|
||||||
static constexpr bool DO_TEST_GOMSPACE_GET_CONFIG = false;
|
static constexpr bool DO_TEST_GOMSPACE_GET_CONFIG = false;
|
||||||
|
static constexpr bool DO_TEST_FS_HANDLER = false;
|
||||||
bool doTestGpsShm = false;
|
bool doTestGpsShm = false;
|
||||||
bool doTestGpsSocket = false;
|
bool doTestGpsSocket = false;
|
||||||
bool doTestProtHandler = false;
|
bool doTestProtHandler = false;
|
||||||
|
@ -41,19 +41,19 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
uint8_t writeSize = 0;
|
uint8_t writeSize = 0;
|
||||||
|
|
||||||
gpioId_t gpioId = cookie->getChipSelectPin();
|
gpioId_t gpioId = cookie->getChipSelectPin();
|
||||||
GpioIF* gpioIF = comIf->getGpioInterface();
|
GpioIF& gpioIF = comIf->getGpioInterface();
|
||||||
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
|
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
|
||||||
uint32_t timeoutMs = 0;
|
uint32_t timeoutMs = 0;
|
||||||
MutexIF* mutex = comIf->getCsMutex();
|
MutexIF* mutex = comIf->getCsMutex();
|
||||||
cookie->getMutexParams(timeoutType, timeoutMs);
|
cookie->getMutexParams(timeoutType, timeoutMs);
|
||||||
if (mutex == nullptr or gpioIF == nullptr) {
|
if (mutex == nullptr) {
|
||||||
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
|
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
int fileDescriptor = 0;
|
int fileDescriptor = 0;
|
||||||
const std::string& dev = comIf->getSpiDev();
|
const std::string& dev = comIf->getSpiDev();
|
||||||
result = openSpi(dev, O_RDWR, gpioIF, gpioId, mutex, timeoutType, timeoutMs, fileDescriptor);
|
result = openSpi(dev, O_RDWR, &gpioIF, gpioId, mutex, timeoutType, timeoutMs, fileDescriptor);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -75,8 +75,8 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
|
|
||||||
if (write(fileDescriptor, writeBuffer, writeSize) != static_cast<ssize_t>(writeSize)) {
|
if (write(fileDescriptor, writeBuffer, writeSize) != static_cast<ssize_t>(writeSize)) {
|
||||||
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
|
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
|
||||||
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
closeSpi(fileDescriptor, gpioId, &gpioIF, mutex);
|
||||||
return RwHandler::SPI_WRITE_FAILURE;
|
return rws::SPI_WRITE_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Encoding and sending command */
|
/** Encoding and sending command */
|
||||||
@ -100,8 +100,8 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
}
|
}
|
||||||
if (write(fileDescriptor, writeBuffer, writeSize) != static_cast<ssize_t>(writeSize)) {
|
if (write(fileDescriptor, writeBuffer, writeSize) != static_cast<ssize_t>(writeSize)) {
|
||||||
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
|
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
|
||||||
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
closeSpi(fileDescriptor, gpioId, &gpioIF, mutex);
|
||||||
return RwHandler::SPI_WRITE_FAILURE;
|
return rws::SPI_WRITE_FAILURE;
|
||||||
}
|
}
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
@ -112,14 +112,14 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
|
|
||||||
if (write(fileDescriptor, writeBuffer, writeSize) != static_cast<ssize_t>(writeSize)) {
|
if (write(fileDescriptor, writeBuffer, writeSize) != static_cast<ssize_t>(writeSize)) {
|
||||||
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
|
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
|
||||||
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
closeSpi(fileDescriptor, gpioId, &gpioIF, mutex);
|
||||||
return RwHandler::SPI_WRITE_FAILURE;
|
return rws::SPI_WRITE_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t* rxBuf = nullptr;
|
uint8_t* rxBuf = nullptr;
|
||||||
result = comIf->getReadBuffer(cookie->getSpiAddress(), &rxBuf);
|
result = comIf->getReadBuffer(cookie->getSpiAddress(), &rxBuf);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
closeSpi(fileDescriptor, gpioId, &gpioIF, mutex);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,9 +127,9 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
|
|
||||||
// There must be a delay of at least 20 ms after sending the command.
|
// There must be a delay of at least 20 ms after sending the command.
|
||||||
// Delay for 70 ms here and release the SPI bus for that duration.
|
// Delay for 70 ms here and release the SPI bus for that duration.
|
||||||
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
closeSpi(fileDescriptor, gpioId, &gpioIF, mutex);
|
||||||
usleep(RwDefinitions::SPI_REPLY_DELAY);
|
usleep(rws::SPI_REPLY_DELAY);
|
||||||
result = openSpi(dev, O_RDWR, gpioIF, gpioId, mutex, timeoutType, timeoutMs, fileDescriptor);
|
result = openSpi(dev, O_RDWR, &gpioIF, gpioId, mutex, timeoutType, timeoutMs, fileDescriptor);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -139,17 +139,17 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
* However, receiving more than 5 empty frames will be interpreted as an error.
|
* However, receiving more than 5 empty frames will be interpreted as an error.
|
||||||
*/
|
*/
|
||||||
uint8_t byteRead = 0;
|
uint8_t byteRead = 0;
|
||||||
for (int idx = 0; idx < 10; idx++) {
|
for (idx = 0; idx < 10; idx++) {
|
||||||
if (read(fileDescriptor, &byteRead, 1) != 1) {
|
if (read(fileDescriptor, &byteRead, 1) != 1) {
|
||||||
sif::error << "rwSpiCallback::spiCallback: Read failed" << std::endl;
|
sif::error << "rwSpiCallback::spiCallback: Read failed" << std::endl;
|
||||||
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
closeSpi(fileDescriptor, gpioId, &gpioIF, mutex);
|
||||||
return RwHandler::SPI_READ_FAILURE;
|
return rws::SPI_READ_FAILURE;
|
||||||
}
|
}
|
||||||
if (idx == 0) {
|
if (idx == 0) {
|
||||||
if (byteRead != FLAG_BYTE) {
|
if (byteRead != FLAG_BYTE) {
|
||||||
sif::error << "Invalid data, expected start marker" << std::endl;
|
sif::error << "Invalid data, expected start marker" << std::endl;
|
||||||
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
closeSpi(fileDescriptor, gpioId, &gpioIF, mutex);
|
||||||
return RwHandler::NO_START_MARKER;
|
return rws::NO_START_MARKER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,8 +159,8 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
|
|
||||||
if (idx == 9) {
|
if (idx == 9) {
|
||||||
sif::error << "rwSpiCallback::spiCallback: Empty frame timeout" << std::endl;
|
sif::error << "rwSpiCallback::spiCallback: Empty frame timeout" << std::endl;
|
||||||
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
closeSpi(fileDescriptor, gpioId, &gpioIF, mutex);
|
||||||
return RwHandler::NO_REPLY;
|
return rws::NO_REPLY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
byteRead = 0;
|
byteRead = 0;
|
||||||
if (read(fileDescriptor, &byteRead, 1) != 1) {
|
if (read(fileDescriptor, &byteRead, 1) != 1) {
|
||||||
sif::error << "rwSpiCallback::spiCallback: Read failed" << std::endl;
|
sif::error << "rwSpiCallback::spiCallback: Read failed" << std::endl;
|
||||||
result = RwHandler::SPI_READ_FAILURE;
|
result = rws::SPI_READ_FAILURE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
} else if (byteRead == 0x7D) {
|
} else if (byteRead == 0x7D) {
|
||||||
if (read(fileDescriptor, &byteRead, 1) != 1) {
|
if (read(fileDescriptor, &byteRead, 1) != 1) {
|
||||||
sif::error << "rwSpiCallback::spiCallback: Read failed" << std::endl;
|
sif::error << "rwSpiCallback::spiCallback: Read failed" << std::endl;
|
||||||
result = RwHandler::SPI_READ_FAILURE;
|
result = rws::SPI_READ_FAILURE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (byteRead == 0x5E) {
|
if (byteRead == 0x5E) {
|
||||||
@ -199,8 +199,8 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
sif::error << "rwSpiCallback::spiCallback: Invalid substitute" << std::endl;
|
sif::error << "rwSpiCallback::spiCallback: Invalid substitute" << std::endl;
|
||||||
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
closeSpi(fileDescriptor, gpioId, &gpioIF, mutex);
|
||||||
result = RwHandler::INVALID_SUBSTITUTE;
|
result = rws::INVALID_SUBSTITUTE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -217,14 +217,14 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
if (decodedFrameLen == replyBufferSize) {
|
if (decodedFrameLen == replyBufferSize) {
|
||||||
if (read(fileDescriptor, &byteRead, 1) != 1) {
|
if (read(fileDescriptor, &byteRead, 1) != 1) {
|
||||||
sif::error << "rwSpiCallback::spiCallback: Failed to read last byte" << std::endl;
|
sif::error << "rwSpiCallback::spiCallback: Failed to read last byte" << std::endl;
|
||||||
result = RwHandler::SPI_READ_FAILURE;
|
result = rws::SPI_READ_FAILURE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (byteRead != FLAG_BYTE) {
|
if (byteRead != FLAG_BYTE) {
|
||||||
sif::error << "rwSpiCallback::spiCallback: Missing end sign " << static_cast<int>(FLAG_BYTE)
|
sif::error << "rwSpiCallback::spiCallback: Missing end sign " << static_cast<int>(FLAG_BYTE)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
decodedFrameLen--;
|
decodedFrameLen--;
|
||||||
result = RwHandler::MISSING_END_SIGN;
|
result = rws::MISSING_END_SIGN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
|
|
||||||
cookie->setTransferSize(decodedFrameLen);
|
cookie->setTransferSize(decodedFrameLen);
|
||||||
|
|
||||||
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
closeSpi(fileDescriptor, gpioId, &gpioIF, mutex);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE CoreController.cpp InitMission.cpp
|
target_sources(${OBSW_NAME} PRIVATE CoreController.cpp scheduling.cpp
|
||||||
ObjectFactory.cpp)
|
ObjectFactory.cpp WatchdogHandler.cpp)
|
||||||
|
|
||||||
target_sources(${SIMPLE_OBSW_NAME} PRIVATE InitMission.cpp)
|
target_sources(${SIMPLE_OBSW_NAME} PRIVATE scheduling.cpp)
|
||||||
|
@ -3,16 +3,17 @@
|
|||||||
#include <fsfw/events/EventManager.h>
|
#include <fsfw/events/EventManager.h>
|
||||||
#include <fsfw/filesystem/HasFileSystemIF.h>
|
#include <fsfw/filesystem/HasFileSystemIF.h>
|
||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include <fsfw/ipc/QueueFactory.h>
|
||||||
|
#include <fsfw/tasks/TaskFactory.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "commonConfig.h"
|
||||||
#include "OBSWVersion.h"
|
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
#include "fsfw/timemanager/Stopwatch.h"
|
#include "fsfw/timemanager/Stopwatch.h"
|
||||||
#include "fsfw/version.h"
|
#include "fsfw/version.h"
|
||||||
#include "watchdog/definitions.h"
|
#include "watchdog/definitions.h"
|
||||||
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
|
#if OBSW_ADD_TMTC_UDP_SERVER == 1
|
||||||
#include "fsfw/osal/common/UdpTmTcBridge.h"
|
#include "fsfw/osal/common/UdpTmTcBridge.h"
|
||||||
#else
|
#endif
|
||||||
|
#if OBSW_ADD_TMTC_TCP_SERVER == 1
|
||||||
#include "fsfw/osal/common/TcpTmTcServer.h"
|
#include "fsfw/osal/common/TcpTmTcServer.h"
|
||||||
#endif
|
#endif
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@ -31,16 +32,8 @@ xsc::Chip CoreController::CURRENT_CHIP = xsc::Chip::NO_CHIP;
|
|||||||
xsc::Copy CoreController::CURRENT_COPY = xsc::Copy::NO_COPY;
|
xsc::Copy CoreController::CURRENT_COPY = xsc::Copy::NO_COPY;
|
||||||
|
|
||||||
CoreController::CoreController(object_id_t objectId)
|
CoreController::CoreController(object_id_t objectId)
|
||||||
: ExtendedControllerBase(objectId, objects::NO_OBJECT, 5),
|
: ExtendedControllerBase(objectId, 5), opDivider5(5), opDivider10(10), hkSet(this) {
|
||||||
opDivider5(5),
|
|
||||||
opDivider10(10),
|
|
||||||
hkSet(this) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
try {
|
try {
|
||||||
result = initWatchdogFifo();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::warning << "CoreController::CoreController: Watchdog FIFO init failed" << std::endl;
|
|
||||||
}
|
|
||||||
sdcMan = SdCardManager::instance();
|
sdcMan = SdCardManager::instance();
|
||||||
if (sdcMan == nullptr) {
|
if (sdcMan == nullptr) {
|
||||||
sif::error << "CoreController::CoreController: SD card manager invalid!" << std::endl;
|
sif::error << "CoreController::CoreController: SD card manager invalid!" << std::endl;
|
||||||
@ -49,14 +42,27 @@ CoreController::CoreController(object_id_t objectId)
|
|||||||
if (not BLOCKING_SD_INIT) {
|
if (not BLOCKING_SD_INIT) {
|
||||||
sdcMan->setBlocking(false);
|
sdcMan->setBlocking(false);
|
||||||
}
|
}
|
||||||
|
auto sdCard = sdcMan->getPreferredSdCard();
|
||||||
result = initBootCopy();
|
if (not sdCard.has_value()) {
|
||||||
if (result != returnvalue::OK) {
|
sif::error << "CoreController::initializeAfterTaskCreation: "
|
||||||
sif::warning << "CoreController::CoreController: Boot copy init" << std::endl;
|
"Issues getting preferred SD card, setting to 0"
|
||||||
|
<< std::endl;
|
||||||
|
sdCard = sd::SdCard::SLOT_0;
|
||||||
}
|
}
|
||||||
|
sdInfo.active = sdCard.value();
|
||||||
|
sdcMan->setActiveSdCard(sdInfo.active);
|
||||||
|
currMntPrefix = sdcMan->getCurrentMountPrefix();
|
||||||
|
|
||||||
|
getCurrentBootCopy(CURRENT_CHIP, CURRENT_COPY);
|
||||||
|
|
||||||
|
initClockFromTimeFile();
|
||||||
} catch (const std::filesystem::filesystem_error &e) {
|
} catch (const std::filesystem::filesystem_error &e) {
|
||||||
sif::error << "CoreController::CoreController: Failed with exception " << e.what() << std::endl;
|
sif::error << "CoreController::CoreController: Failed with exception " << e.what() << std::endl;
|
||||||
}
|
}
|
||||||
|
// Add script folder to path
|
||||||
|
char *currentEnvPath = getenv("PATH");
|
||||||
|
std::string updatedEnvPath = std::string(currentEnvPath) + ":/home/root/scripts:/usr/local/bin";
|
||||||
|
setenv("PATH", updatedEnvPath.c_str(), true);
|
||||||
sdCardCheckCd.timeOut();
|
sdCardCheckCd.timeOut();
|
||||||
eventQueue = QueueFactory::instance()->createMessageQueue(5, EventMessage::MAX_MESSAGE_SIZE);
|
eventQueue = QueueFactory::instance()->createMessageQueue(5, EventMessage::MAX_MESSAGE_SIZE);
|
||||||
}
|
}
|
||||||
@ -68,6 +74,9 @@ ReturnValue_t CoreController::handleCommandMessage(CommandMessage *message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::performControlOperation() {
|
void CoreController::performControlOperation() {
|
||||||
|
#if OBSW_THREAD_TRACING == 1
|
||||||
|
trace::threadTrace(opCounter, "CORE CTRL");
|
||||||
|
#endif
|
||||||
EventMessage event;
|
EventMessage event;
|
||||||
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == returnvalue::OK;
|
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == returnvalue::OK;
|
||||||
result = eventQueue->receiveMessage(&event)) {
|
result = eventQueue->receiveMessage(&event)) {
|
||||||
@ -78,10 +87,15 @@ void CoreController::performControlOperation() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
performWatchdogControlOperation();
|
|
||||||
sdStateMachine();
|
sdStateMachine();
|
||||||
performMountedSdCardOperations();
|
performMountedSdCardOperations();
|
||||||
if (sdCardCheckCd.hasTimedOut()) {
|
if (sdCardCheckCd.hasTimedOut()) {
|
||||||
|
if (shortSdCardCdCounter < 2) {
|
||||||
|
shortSdCardCdCounter++;
|
||||||
|
}
|
||||||
|
if (shortSdCardCdCounter == 2) {
|
||||||
|
sdCardCheckCd.setTimeout(DEFAULT_SD_CARD_CHECK_TIMEOUT);
|
||||||
|
}
|
||||||
performSdCardCheck();
|
performSdCardCheck();
|
||||||
sdCardCheckCd.resetTimer();
|
sdCardCheckCd.resetTimer();
|
||||||
}
|
}
|
||||||
@ -92,9 +106,9 @@ void CoreController::performControlOperation() {
|
|||||||
|
|
||||||
ReturnValue_t CoreController::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t CoreController::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(core::TEMPERATURE, &tempPoolEntry);
|
||||||
localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(core::PS_VOLTAGE, &psVoltageEntry);
|
||||||
localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(core::PL_VOLTAGE, &plVoltageEntry);
|
||||||
poolManager.subscribeForRegularPeriodicPacket({hkSet.getSid(), false, 10.0});
|
poolManager.subscribeForRegularPeriodicPacket({hkSet.getSid(), false, 10.0});
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
@ -142,21 +156,8 @@ ReturnValue_t CoreController::initialize() {
|
|||||||
|
|
||||||
ReturnValue_t CoreController::initializeAfterTaskCreation() {
|
ReturnValue_t CoreController::initializeAfterTaskCreation() {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
auto sdCard = sdcMan->getPreferredSdCard();
|
|
||||||
if (not sdCard) {
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
sdInfo.active = sdCard.value();
|
|
||||||
if (sdInfo.active == sd::SdCard::NONE) {
|
|
||||||
sif::error << "CoreController::initializeAfterTaskCreation: "
|
|
||||||
"Issues getting preferred SD card, setting to 0"
|
|
||||||
<< std::endl;
|
|
||||||
sdInfo.active = sd::SdCard::SLOT_0;
|
|
||||||
}
|
|
||||||
sdcMan->setActiveSdCard(sdInfo.active);
|
|
||||||
currMntPrefix = sdcMan->getCurrentMountPrefix();
|
|
||||||
if (BLOCKING_SD_INIT) {
|
if (BLOCKING_SD_INIT) {
|
||||||
ReturnValue_t result = initSdCardBlocking();
|
result = initSdCardBlocking();
|
||||||
if (result != returnvalue::OK and result != SdCardManager::ALREADY_MOUNTED) {
|
if (result != returnvalue::OK and result != SdCardManager::ALREADY_MOUNTED) {
|
||||||
sif::warning << "CoreController::CoreController: SD card init failed" << std::endl;
|
sif::warning << "CoreController::CoreController: SD card init failed" << std::endl;
|
||||||
}
|
}
|
||||||
@ -166,19 +167,37 @@ ReturnValue_t CoreController::initializeAfterTaskCreation() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::initialize: Version initialization failed" << std::endl;
|
sif::warning << "CoreController::initialize: Version initialization failed" << std::endl;
|
||||||
}
|
}
|
||||||
// Add script folder to path
|
|
||||||
char *currentEnvPath = getenv("PATH");
|
|
||||||
std::string updatedEnvPath = std::string(currentEnvPath) + ":/home/root/scripts:/usr/local/bin";
|
|
||||||
setenv("PATH", updatedEnvPath.c_str(), true);
|
|
||||||
updateProtInfo();
|
updateProtInfo();
|
||||||
initPrint();
|
return ExtendedControllerBase::initializeAfterTaskCreation();
|
||||||
ExtendedControllerBase::initializeAfterTaskCreation();
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
const uint8_t *data, size_t size) {
|
const uint8_t *data, size_t size) {
|
||||||
switch (actionId) {
|
switch (actionId) {
|
||||||
|
case (ANNOUNCE_VERSION): {
|
||||||
|
uint32_t p1 = (common::OBSW_VERSION_MAJOR << 24) | (common::OBSW_VERSION_MINOR << 16) |
|
||||||
|
(common::OBSW_VERSION_REVISION << 8);
|
||||||
|
uint32_t p2 = 0;
|
||||||
|
if (strcmp("", common::OBSW_VERSION_CST_GIT_SHA1) != 0) {
|
||||||
|
p1 |= 1;
|
||||||
|
auto shaAsStr = std::string(common::OBSW_VERSION_CST_GIT_SHA1);
|
||||||
|
size_t posDash = shaAsStr.find("-");
|
||||||
|
auto gitHash = shaAsStr.substr(posDash + 2, 4);
|
||||||
|
// Only copy first 4 letters of git hash
|
||||||
|
memcpy(&p2, gitHash.c_str(), 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
triggerEvent(VERSION_INFO, p1, p2);
|
||||||
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
|
}
|
||||||
|
case (ANNOUNCE_BOOT_COUNTS): {
|
||||||
|
announceBootCounts();
|
||||||
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
|
}
|
||||||
|
case (ANNOUNCE_CURRENT_IMAGE): {
|
||||||
|
triggerEvent(CURRENT_IMAGE_INFO, CURRENT_CHIP, CURRENT_COPY);
|
||||||
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
|
}
|
||||||
case (LIST_DIRECTORY_INTO_FILE): {
|
case (LIST_DIRECTORY_INTO_FILE): {
|
||||||
return actionListDirectoryIntoFile(actionId, commandedBy, data, size);
|
return actionListDirectoryIntoFile(actionId, commandedBy, data, size);
|
||||||
}
|
}
|
||||||
@ -366,7 +385,7 @@ ReturnValue_t CoreController::sdStateMachine() {
|
|||||||
sdInfo.cycleCount = 0;
|
sdInfo.cycleCount = 0;
|
||||||
return true;
|
return true;
|
||||||
} else if (sdInfo.cycleCount > 4) {
|
} else if (sdInfo.cycleCount > 4) {
|
||||||
sif::warning << "CoreController::sdInitStateMachine: " << opPrintout << " takes too long"
|
sif::warning << "CoreController::sdStateMachine: " << opPrintout << " takes too long"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -378,7 +397,7 @@ ReturnValue_t CoreController::sdStateMachine() {
|
|||||||
// Create updated status file
|
// Create updated status file
|
||||||
result = sdcMan->updateSdCardStateFile();
|
result = sdcMan->updateSdCardStateFile();
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::initialize: Updating SD card state file failed"
|
sif::warning << "CoreController::sdStateMachine: Updating SD card state file failed"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
sdInfo.commandExecuted = true;
|
sdInfo.commandExecuted = true;
|
||||||
@ -586,7 +605,8 @@ ReturnValue_t CoreController::sdCardSetup(sd::SdCard sdCard, sd::SdState targetS
|
|||||||
sif::info << "Unmounting SD card " << sdChar << std::endl;
|
sif::info << "Unmounting SD card " << sdChar << std::endl;
|
||||||
return sdcMan->unmountSdCard(sdCard);
|
return sdcMan->unmountSdCard(sdCard);
|
||||||
} else {
|
} else {
|
||||||
if (std::filesystem::exists(mountString)) {
|
std::error_code e;
|
||||||
|
if (std::filesystem::exists(mountString, e)) {
|
||||||
sif::info << "SD card " << sdChar << " already on and mounted at " << mountString
|
sif::info << "SD card " << sdChar << " already on and mounted at " << mountString
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return SdCardManager::ALREADY_MOUNTED;
|
return SdCardManager::ALREADY_MOUNTED;
|
||||||
@ -673,9 +693,9 @@ ReturnValue_t CoreController::initVersionFile() {
|
|||||||
sif::warning << "CoreController::versionFileInit: Retrieving uname line failed" << std::endl;
|
sif::warning << "CoreController::versionFileInit: Retrieving uname line failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string fullObswVersionString = "OBSW: v" + std::to_string(SW_VERSION) + "." +
|
std::string fullObswVersionString = "OBSW: v" + std::to_string(common::OBSW_VERSION_MAJOR) + "." +
|
||||||
std::to_string(SW_SUBVERSION) + "." +
|
std::to_string(common::OBSW_VERSION_MINOR) + "." +
|
||||||
std::to_string(SW_REVISION);
|
std::to_string(common::OBSW_VERSION_REVISION);
|
||||||
char versionString[16] = {};
|
char versionString[16] = {};
|
||||||
fsfw::FSFW_VERSION.getVersion(versionString, sizeof(versionString));
|
fsfw::FSFW_VERSION.getVersion(versionString, sizeof(versionString));
|
||||||
std::string fullFsfwVersionString = "FSFW: v" + std::string(versionString);
|
std::string fullFsfwVersionString = "FSFW: v" + std::string(versionString);
|
||||||
@ -683,7 +703,8 @@ ReturnValue_t CoreController::initVersionFile() {
|
|||||||
std::string versionFilePath = currMntPrefix + VERSION_FILE;
|
std::string versionFilePath = currMntPrefix + VERSION_FILE;
|
||||||
std::fstream versionFile;
|
std::fstream versionFile;
|
||||||
|
|
||||||
if (not std::filesystem::exists(versionFilePath)) {
|
std::error_code e;
|
||||||
|
if (not std::filesystem::exists(versionFilePath, e)) {
|
||||||
sif::info << "Writing version file " << versionFilePath << ".." << std::endl;
|
sif::info << "Writing version file " << versionFilePath << ".." << std::endl;
|
||||||
versionFile.open(versionFilePath, std::ios_base::out);
|
versionFile.open(versionFilePath, std::ios_base::out);
|
||||||
versionFile << fullObswVersionString << std::endl;
|
versionFile << fullObswVersionString << std::endl;
|
||||||
@ -794,8 +815,9 @@ ReturnValue_t CoreController::actionListDirectoryIntoFile(ActionId_t actionId,
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::initBootCopy() {
|
ReturnValue_t CoreController::initBootCopyFile() {
|
||||||
if (not std::filesystem::exists(CURR_COPY_FILE)) {
|
std::error_code e;
|
||||||
|
if (not std::filesystem::exists(CURR_COPY_FILE, e)) {
|
||||||
// This file is created by the systemd service eive-early-config so this should
|
// This file is created by the systemd service eive-early-config so this should
|
||||||
// not happen normally
|
// not happen normally
|
||||||
std::string cmd = "xsc_boot_copy > " + std::string(CURR_COPY_FILE);
|
std::string cmd = "xsc_boot_copy > " + std::string(CURR_COPY_FILE);
|
||||||
@ -804,8 +826,6 @@ ReturnValue_t CoreController::initBootCopy() {
|
|||||||
utility::handleSystemError(result, "CoreController::initBootCopy");
|
utility::handleSystemError(result, "CoreController::initBootCopy");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getCurrentBootCopy(CURRENT_CHIP, CURRENT_COPY);
|
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -818,36 +838,6 @@ void CoreController::getCurrentBootCopy(xsc::Chip &chip, xsc::Copy ©) {
|
|||||||
copy = static_cast<xsc::Copy>(xscCopy);
|
copy = static_cast<xsc::Copy>(xscCopy);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::initWatchdogFifo() {
|
|
||||||
if (not std::filesystem::exists(watchdog::FIFO_NAME)) {
|
|
||||||
// Still return returnvalue::OK for now
|
|
||||||
sif::info << "Watchdog FIFO " << watchdog::FIFO_NAME << " does not exist, can't initiate"
|
|
||||||
<< " watchdog" << std::endl;
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
// Open FIFO write only and non-blocking to prevent SW from killing itself.
|
|
||||||
watchdogFifoFd = open(watchdog::FIFO_NAME.c_str(), O_WRONLY | O_NONBLOCK);
|
|
||||||
if (watchdogFifoFd < 0) {
|
|
||||||
if (errno == ENXIO) {
|
|
||||||
watchdogFifoFd = RETRY_FIFO_OPEN;
|
|
||||||
sif::info << "eive-watchdog not running. FIFO can not be opened" << std::endl;
|
|
||||||
} else {
|
|
||||||
sif::error << "Opening pipe " << watchdog::FIFO_NAME << " write-only failed with " << errno
|
|
||||||
<< ": " << strerror(errno) << std::endl;
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CoreController::initPrint() {
|
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1
|
|
||||||
if (watchdogFifoFd > 0) {
|
|
||||||
sif::info << "Opened watchdog FIFO successfully.." << std::endl;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t CoreController::actionXscReboot(const uint8_t *data, size_t size) {
|
ReturnValue_t CoreController::actionXscReboot(const uint8_t *data, size_t size) {
|
||||||
if (size < 1) {
|
if (size < 1) {
|
||||||
return HasActionsIF::INVALID_PARAMETERS;
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
@ -933,6 +923,9 @@ ReturnValue_t CoreController::actionReboot(const uint8_t *data, size_t size) {
|
|||||||
ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy,
|
ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy,
|
||||||
bool &protOpPerformed) {
|
bool &protOpPerformed) {
|
||||||
sdcMan->setBlocking(true);
|
sdcMan->setBlocking(true);
|
||||||
|
sdcMan->markUnusable();
|
||||||
|
// Wait two seconds to ensure no one uses the SD cards
|
||||||
|
TaskFactory::delayTask(2000);
|
||||||
// Attempt graceful shutdown by unmounting and switching off SD cards
|
// Attempt graceful shutdown by unmounting and switching off SD cards
|
||||||
sdcMan->switchOffSdCard(sd::SdCard::SLOT_0);
|
sdcMan->switchOffSdCard(sd::SdCard::SLOT_0);
|
||||||
sdcMan->switchOffSdCard(sd::SdCard::SLOT_1);
|
sdcMan->switchOffSdCard(sd::SdCard::SLOT_1);
|
||||||
@ -1128,7 +1121,8 @@ ReturnValue_t CoreController::updateProtInfo(bool regenerateChipStateFile) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (not filesystem::exists(CHIP_STATE_FILE)) {
|
std::error_code e;
|
||||||
|
if (not filesystem::exists(CHIP_STATE_FILE, e)) {
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
ifstream chipStateFile(CHIP_STATE_FILE);
|
ifstream chipStateFile(CHIP_STATE_FILE);
|
||||||
@ -1139,7 +1133,7 @@ ReturnValue_t CoreController::updateProtInfo(bool regenerateChipStateFile) {
|
|||||||
uint8_t lineCounter = 0;
|
uint8_t lineCounter = 0;
|
||||||
string word;
|
string word;
|
||||||
while (getline(chipStateFile, nextLine)) {
|
while (getline(chipStateFile, nextLine)) {
|
||||||
ReturnValue_t result = handleProtInfoUpdateLine(nextLine);
|
result = handleProtInfoUpdateLine(nextLine);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::updateProtInfo: Protection info update failed!" << std::endl;
|
sif::warning << "CoreController::updateProtInfo: Protection info update failed!" << std::endl;
|
||||||
return result;
|
return result;
|
||||||
@ -1195,66 +1189,51 @@ ReturnValue_t CoreController::handleProtInfoUpdateLine(std::string nextLine) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
wordIdx++;
|
wordIdx++;
|
||||||
|
if (wordIdx >= 10) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::performWatchdogControlOperation() {
|
|
||||||
// Only perform each fifth iteration
|
|
||||||
if (watchdogFifoFd != 0 and opDivider5.check()) {
|
|
||||||
if (watchdogFifoFd == RETRY_FIFO_OPEN) {
|
|
||||||
// Open FIFO write only and non-blocking
|
|
||||||
watchdogFifoFd = open(watchdog::FIFO_NAME.c_str(), O_WRONLY | O_NONBLOCK);
|
|
||||||
if (watchdogFifoFd < 0) {
|
|
||||||
if (errno == ENXIO) {
|
|
||||||
watchdogFifoFd = RETRY_FIFO_OPEN;
|
|
||||||
// No printout for now, would be spam
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
sif::error << "Opening pipe " << watchdog::FIFO_NAME << " write-only failed with "
|
|
||||||
<< errno << ": " << strerror(errno) << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sif::info << "Opened " << watchdog::FIFO_NAME << " successfully" << std::endl;
|
|
||||||
} else if (watchdogFifoFd > 0) {
|
|
||||||
// Write to OBSW watchdog FIFO here
|
|
||||||
const char writeChar = 'a';
|
|
||||||
ssize_t writtenBytes = write(watchdogFifoFd, &writeChar, 1);
|
|
||||||
if (writtenBytes < 0) {
|
|
||||||
sif::error << "Errors writing to watchdog FIFO, code " << errno << ": " << strerror(errno)
|
|
||||||
<< std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CoreController::performMountedSdCardOperations() {
|
void CoreController::performMountedSdCardOperations() {
|
||||||
auto mountedSdCardOp = [&](bool &mntSwitch, sd::SdCard sdCard, std::string mntPoint) {
|
auto mountedSdCardOp = [&](sd::SdCard sdCard, std::string mntPoint) {
|
||||||
if (mntSwitch) {
|
if (not performOneShotSdCardOpsSwitch) {
|
||||||
bool sdCardMounted = sdcMan->isSdCardUsable(sdCard);
|
std::ostringstream path;
|
||||||
if (sdCardMounted and not performOneShotSdCardOpsSwitch) {
|
path << mntPoint << "/" << CONF_FOLDER;
|
||||||
std::ostringstream path;
|
std::error_code e;
|
||||||
path << mntPoint << "/" << CONF_FOLDER;
|
if (not std::filesystem::exists(path.str()), e) {
|
||||||
if (not std::filesystem::exists(path.str())) {
|
bool created = std::filesystem::create_directory(path.str(), e);
|
||||||
std::filesystem::create_directory(path.str());
|
if (not created) {
|
||||||
|
sif::error << "Could not create CONF folder at " << path.str() << ": " << e.message()
|
||||||
|
<< std::endl;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
initVersionFile();
|
|
||||||
initClockFromTimeFile();
|
|
||||||
performRebootFileHandling(false);
|
|
||||||
performOneShotSdCardOpsSwitch = true;
|
|
||||||
}
|
}
|
||||||
mntSwitch = false;
|
initVersionFile();
|
||||||
|
ReturnValue_t result = initBootCopyFile();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::warning << "CoreController::CoreController: Boot copy init" << std::endl;
|
||||||
|
}
|
||||||
|
if (not timeFileInitDone) {
|
||||||
|
initClockFromTimeFile();
|
||||||
|
}
|
||||||
|
performRebootFileHandling(false);
|
||||||
}
|
}
|
||||||
|
backupTimeFileHandler();
|
||||||
};
|
};
|
||||||
if (sdInfo.active == sd::SdCard::SLOT_1) {
|
bool someSdCardActive = false;
|
||||||
mountedSdCardOp(sdInfo.mountSwitch.second, sd::SdCard::SLOT_1, config::SD_1_MOUNT_POINT);
|
if (sdInfo.active == sd::SdCard::SLOT_0 and sdcMan->isSdCardUsable(sd::SdCard::SLOT_0)) {
|
||||||
mountedSdCardOp(sdInfo.mountSwitch.first, sd::SdCard::SLOT_0, config::SD_0_MOUNT_POINT);
|
mountedSdCardOp(sd::SdCard::SLOT_0, config::SD_0_MOUNT_POINT);
|
||||||
} else {
|
someSdCardActive = true;
|
||||||
mountedSdCardOp(sdInfo.mountSwitch.first, sd::SdCard::SLOT_0, config::SD_0_MOUNT_POINT);
|
}
|
||||||
mountedSdCardOp(sdInfo.mountSwitch.second, sd::SdCard::SLOT_1, config::SD_1_MOUNT_POINT);
|
if (sdInfo.active == sd::SdCard::SLOT_1 and sdcMan->isSdCardUsable(sd::SdCard::SLOT_1)) {
|
||||||
|
mountedSdCardOp(sd::SdCard::SLOT_1, config::SD_1_MOUNT_POINT);
|
||||||
|
someSdCardActive = true;
|
||||||
|
}
|
||||||
|
if (someSdCardActive) {
|
||||||
|
performOneShotSdCardOpsSwitch = true;
|
||||||
}
|
}
|
||||||
timeFileHandler();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::performSdCardCheck() {
|
ReturnValue_t CoreController::performSdCardCheck() {
|
||||||
@ -1295,18 +1274,31 @@ ReturnValue_t CoreController::performSdCardCheck() {
|
|||||||
if (active.second == sd::SdState::MOUNTED) {
|
if (active.second == sd::SdState::MOUNTED) {
|
||||||
sdCardCheck(sd::SdCard::SLOT_1);
|
sdCardCheck(sd::SdCard::SLOT_1);
|
||||||
}
|
}
|
||||||
|
#if OBSW_SD_CARD_MUST_BE_ON == 1
|
||||||
|
// This is FDIR. The core controller will attempt once to get some SD card working
|
||||||
|
bool someSdCardActive = false;
|
||||||
|
if ((sdInfo.active == sd::SdCard::SLOT_0 and sdcMan->isSdCardUsable(sd::SdCard::SLOT_0)) or
|
||||||
|
(sdInfo.active == sd::SdCard::SLOT_1 and sdcMan->isSdCardUsable(sd::SdCard::SLOT_1))) {
|
||||||
|
someSdCardActive = true;
|
||||||
|
}
|
||||||
|
if (not someSdCardActive and remountAttemptFlag) {
|
||||||
|
triggerEvent(NO_SD_CARD_ACTIVE);
|
||||||
|
initSdCardBlocking();
|
||||||
|
remountAttemptFlag = false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::performRebootFileHandling(bool recreateFile) {
|
void CoreController::performRebootFileHandling(bool recreateFile) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
std::string path = currMntPrefix + REBOOT_FILE;
|
std::string path = currMntPrefix + REBOOT_FILE;
|
||||||
if (not std::filesystem::exists(path) or recreateFile) {
|
std::error_code e;
|
||||||
|
if (not std::filesystem::exists(path, e) or recreateFile) {
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
sif::info << "CoreController::performRebootFileHandling: Recreating reboot file" << std::endl;
|
sif::info << "CoreController::performRebootFileHandling: Recreating reboot file" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
rebootFile.enabled = true;
|
rebootFile.enabled = false;
|
||||||
rebootFile.img00Cnt = 0;
|
rebootFile.img00Cnt = 0;
|
||||||
rebootFile.img01Cnt = 0;
|
rebootFile.img01Cnt = 0;
|
||||||
rebootFile.img10Cnt = 0;
|
rebootFile.img10Cnt = 0;
|
||||||
@ -1344,13 +1336,13 @@ void CoreController::performRebootFileHandling(bool recreateFile) {
|
|||||||
if (rebootFile.bootFlag) {
|
if (rebootFile.bootFlag) {
|
||||||
// Trigger event to inform ground that a reboot was triggered
|
// Trigger event to inform ground that a reboot was triggered
|
||||||
uint32_t p1 = rebootFile.lastChip << 16 | rebootFile.lastCopy;
|
uint32_t p1 = rebootFile.lastChip << 16 | rebootFile.lastCopy;
|
||||||
uint32_t p2 = rebootFile.img00Cnt << 24 | rebootFile.img01Cnt << 16 | rebootFile.img10Cnt << 8 |
|
triggerEvent(REBOOT_MECHANISM_TRIGGERED, p1, 0);
|
||||||
rebootFile.img11Cnt;
|
|
||||||
triggerEvent(REBOOT_MECHANISM_TRIGGERED, p1, p2);
|
|
||||||
// Clear the boot flag
|
// Clear the boot flag
|
||||||
rebootFile.bootFlag = false;
|
rebootFile.bootFlag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
announceBootCounts();
|
||||||
|
|
||||||
if (rebootFile.mechanismNextChip != xsc::NO_CHIP and
|
if (rebootFile.mechanismNextChip != xsc::NO_CHIP and
|
||||||
rebootFile.mechanismNextCopy != xsc::NO_COPY) {
|
rebootFile.mechanismNextCopy != xsc::NO_COPY) {
|
||||||
if (CURRENT_CHIP != rebootFile.mechanismNextChip or
|
if (CURRENT_CHIP != rebootFile.mechanismNextChip or
|
||||||
@ -1743,7 +1735,7 @@ void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::C
|
|||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootFile(rebootFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::timeFileHandler() {
|
ReturnValue_t CoreController::backupTimeFileHandler() {
|
||||||
// Always set time. We could only set it if it is updated by GPS, but then the backup time would
|
// Always set time. We could only set it if it is updated by GPS, but then the backup time would
|
||||||
// become obsolete on GPS problems.
|
// become obsolete on GPS problems.
|
||||||
if (opDivider10.check()) {
|
if (opDivider10.check()) {
|
||||||
@ -1753,14 +1745,14 @@ ReturnValue_t CoreController::timeFileHandler() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::string fileName = currMntPrefix + TIME_FILE;
|
std::string fileName = currMntPrefix + BACKUP_TIME_FILE;
|
||||||
std::ofstream timeFile(fileName);
|
std::ofstream timeFile(fileName);
|
||||||
if (not timeFile.good()) {
|
if (not timeFile.good()) {
|
||||||
sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno)
|
sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl;
|
timeFile << "UNIX SECONDS: " << currentTime.tv_sec + BOOT_OFFSET_SECONDS << std::endl;
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
@ -1768,8 +1760,9 @@ ReturnValue_t CoreController::timeFileHandler() {
|
|||||||
ReturnValue_t CoreController::initClockFromTimeFile() {
|
ReturnValue_t CoreController::initClockFromTimeFile() {
|
||||||
using namespace GpsHyperion;
|
using namespace GpsHyperion;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
std::string fileName = currMntPrefix + TIME_FILE;
|
std::string fileName = currMntPrefix + BACKUP_TIME_FILE;
|
||||||
if (std::filesystem::exists(fileName) and
|
std::error_code e;
|
||||||
|
if (sdcMan->isSdCardUsable(std::nullopt) and std::filesystem::exists(fileName, e) and
|
||||||
((gpsFix == FixMode::UNKNOWN or gpsFix == FixMode::NOT_SEEN) or
|
((gpsFix == FixMode::UNKNOWN or gpsFix == FixMode::NOT_SEEN) or
|
||||||
not utility::timeSanityCheck())) {
|
not utility::timeSanityCheck())) {
|
||||||
ifstream timeFile(fileName);
|
ifstream timeFile(fileName);
|
||||||
@ -1797,6 +1790,7 @@ ReturnValue_t CoreController::initClockFromTimeFile() {
|
|||||||
sif::info << "Setting system time from time files: " << std::put_time(time, "%c %Z")
|
sif::info << "Setting system time from time files: " << std::put_time(time, "%c %Z")
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
timeFileInitDone = true;
|
||||||
return Clock::setClock(¤tTime);
|
return Clock::setClock(¤tTime);
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
@ -1893,7 +1887,8 @@ ReturnValue_t CoreController::executeSwUpdate(SwUpdateSources sourceDir, const u
|
|||||||
prefixPath = path("/tmp");
|
prefixPath = path("/tmp");
|
||||||
}
|
}
|
||||||
path archivePath = prefixPath / path(config::OBSW_UPDATE_ARCHIVE_FILE_NAME);
|
path archivePath = prefixPath / path(config::OBSW_UPDATE_ARCHIVE_FILE_NAME);
|
||||||
if (not exists(archivePath)) {
|
std::error_code e;
|
||||||
|
if (not exists(archivePath, e)) {
|
||||||
return HasFileSystemIF::FILE_DOES_NOT_EXIST;
|
return HasFileSystemIF::FILE_DOES_NOT_EXIST;
|
||||||
}
|
}
|
||||||
ostringstream cmd("tar -xJf", ios::app);
|
ostringstream cmd("tar -xJf", ios::app);
|
||||||
@ -1903,12 +1898,12 @@ ReturnValue_t CoreController::executeSwUpdate(SwUpdateSources sourceDir, const u
|
|||||||
utility::handleSystemError(result, "CoreController::executeAction: SW Update Decompression");
|
utility::handleSystemError(result, "CoreController::executeAction: SW Update Decompression");
|
||||||
}
|
}
|
||||||
path strippedImagePath = prefixPath / path(config::STRIPPED_OBSW_BINARY_FILE_NAME);
|
path strippedImagePath = prefixPath / path(config::STRIPPED_OBSW_BINARY_FILE_NAME);
|
||||||
if (!exists(strippedImagePath)) {
|
if (!exists(strippedImagePath, e)) {
|
||||||
// TODO: Custom returnvalue?
|
// TODO: Custom returnvalue?
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
path obswVersionFilePath = prefixPath / path(config::OBSW_VERSION_FILE_NAME);
|
path obswVersionFilePath = prefixPath / path(config::OBSW_VERSION_FILE_NAME);
|
||||||
if (!exists(obswVersionFilePath)) {
|
if (!exists(obswVersionFilePath, e)) {
|
||||||
// TODO: Custom returnvalue?
|
// TODO: Custom returnvalue?
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
@ -2005,6 +2000,15 @@ bool CoreController::startSdStateMachine(sd::SdCard targetActiveSd, SdCfgMode mo
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CoreController::announceBootCounts() {
|
||||||
|
uint64_t totalBootCount =
|
||||||
|
rebootFile.img00Cnt + rebootFile.img01Cnt + rebootFile.img10Cnt + rebootFile.img11Cnt;
|
||||||
|
uint32_t individualBootCountsP1 = (rebootFile.img00Cnt << 16) | rebootFile.img01Cnt;
|
||||||
|
uint32_t individualBootCountsP2 = (rebootFile.img10Cnt << 16) | rebootFile.img11Cnt;
|
||||||
|
triggerEvent(INDIVIDUAL_BOOT_COUNTS, individualBootCountsP1, individualBootCountsP2);
|
||||||
|
triggerEvent(REBOOT_COUNTER, (totalBootCount >> 32) & 0xffffffff, totalBootCount & 0xffffffff);
|
||||||
|
}
|
||||||
|
|
||||||
bool CoreController::isNumber(const std::string &s) {
|
bool CoreController::isNumber(const std::string &s) {
|
||||||
return !s.empty() && std::find_if(s.begin(), s.end(),
|
return !s.empty() && std::find_if(s.begin(), s.end(),
|
||||||
[](unsigned char c) { return !std::isdigit(c); }) == s.end();
|
[](unsigned char c) { return !std::isdigit(c); }) == s.end();
|
||||||
|
@ -7,10 +7,12 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
#include "CoreDefinitions.h"
|
#include "CoreDefinitions.h"
|
||||||
|
#include "OBSWConfig.h"
|
||||||
#include "bsp_q7s/fs/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
#include "events/subsystemIdRanges.h"
|
#include "events/subsystemIdRanges.h"
|
||||||
#include "fsfw/controller/ExtendedControllerBase.h"
|
#include "fsfw/controller/ExtendedControllerBase.h"
|
||||||
#include "mission/devices/devicedefinitions/GPSDefinitions.h"
|
#include "mission/devices/devicedefinitions/GPSDefinitions.h"
|
||||||
|
#include "mission/trace.h"
|
||||||
|
|
||||||
class Timer;
|
class Timer;
|
||||||
class SdCardManager;
|
class SdCardManager;
|
||||||
@ -56,20 +58,27 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
|
|
||||||
static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
||||||
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
||||||
static constexpr char TIME_FILE_NAME[] = "time.txt";
|
static constexpr char TIME_FILE_NAME[] = "time_backup.txt";
|
||||||
|
|
||||||
const std::string VERSION_FILE =
|
const std::string VERSION_FILE =
|
||||||
"/" + std::string(CONF_FOLDER) + "/" + std::string(VERSION_FILE_NAME);
|
"/" + std::string(CONF_FOLDER) + "/" + std::string(VERSION_FILE_NAME);
|
||||||
const std::string REBOOT_FILE =
|
const std::string REBOOT_FILE =
|
||||||
"/" + std::string(CONF_FOLDER) + "/" + std::string(REBOOT_FILE_NAME);
|
"/" + std::string(CONF_FOLDER) + "/" + std::string(REBOOT_FILE_NAME);
|
||||||
const std::string TIME_FILE = "/" + std::string(CONF_FOLDER) + "/" + std::string(TIME_FILE_NAME);
|
const std::string BACKUP_TIME_FILE =
|
||||||
|
"/" + std::string(CONF_FOLDER) + "/" + std::string(TIME_FILE_NAME);
|
||||||
|
|
||||||
static constexpr char CHIP_0_COPY_0_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi0-nom-rootfs";
|
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_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_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 CHIP_1_COPY_1_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi1-gold-rootfs";
|
||||||
|
|
||||||
|
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 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 SWITCH_REBOOT_FILE_HANDLING = 5;
|
||||||
static constexpr ActionId_t RESET_REBOOT_COUNTERS = 6;
|
static constexpr ActionId_t RESET_REBOOT_COUNTERS = 6;
|
||||||
static constexpr ActionId_t SWITCH_IMG_LOCK = 7;
|
static constexpr ActionId_t SWITCH_IMG_LOCK = 7;
|
||||||
@ -94,7 +103,7 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
static constexpr Event ALLOC_FAILURE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
|
static constexpr Event ALLOC_FAILURE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
|
||||||
//! [EXPORT] : [COMMENT] Software reboot occurred. Can also be a systemd reboot.
|
//! [EXPORT] : [COMMENT] Software reboot occurred. Can also be a systemd reboot.
|
||||||
//! P1: Current Chip, P2: Current Copy
|
//! P1: Current Chip, P2: Current Copy
|
||||||
static constexpr Event REBOOT_SW = event::makeEvent(SUBSYSTEM_ID, 1, severity::MEDIUM);
|
static constexpr Event REBOOT_SW = event::makeEvent(SUBSYSTEM_ID, 1, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] The reboot mechanism was triggered.
|
//! [EXPORT] : [COMMENT] The reboot mechanism was triggered.
|
||||||
//! P1: First 16 bits: Last Chip, Last 16 bits: Last Copy,
|
//! P1: First 16 bits: Last Chip, Last 16 bits: Last Copy,
|
||||||
//! P2: Each byte is the respective reboot count for the slots
|
//! P2: Each byte is the respective reboot count for the slots
|
||||||
@ -102,6 +111,22 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
event::makeEvent(SUBSYSTEM_ID, 2, severity::MEDIUM);
|
event::makeEvent(SUBSYSTEM_ID, 2, severity::MEDIUM);
|
||||||
//! Trying to find a way how to determine that the reboot came from ProASIC3 or PCDU..
|
//! 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);
|
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);
|
||||||
|
|
||||||
CoreController(object_id_t objectId);
|
CoreController(object_id_t objectId);
|
||||||
virtual ~CoreController();
|
virtual ~CoreController();
|
||||||
@ -144,11 +169,9 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
bool sdInitFinished() const;
|
bool sdInitFinished() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static constexpr uint32_t BOOT_OFFSET_SECONDS = 15;
|
||||||
static constexpr MutexIF::TimeoutType TIMEOUT_TYPE = MutexIF::TimeoutType::WAITING;
|
static constexpr MutexIF::TimeoutType TIMEOUT_TYPE = MutexIF::TimeoutType::WAITING;
|
||||||
static constexpr uint32_t MUTEX_TIMEOUT = 20;
|
static constexpr uint32_t MUTEX_TIMEOUT = 20;
|
||||||
// Designated value for rechecking FIFO open
|
|
||||||
static constexpr int RETRY_FIFO_OPEN = -2;
|
|
||||||
int watchdogFifoFd = 0;
|
|
||||||
GpsHyperion::FixMode gpsFix = GpsHyperion::FixMode::UNKNOWN;
|
GpsHyperion::FixMode gpsFix = GpsHyperion::FixMode::UNKNOWN;
|
||||||
|
|
||||||
// States for SD state machine, which is used in non-blocking mode
|
// States for SD state machine, which is used in non-blocking mode
|
||||||
@ -205,7 +228,13 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
|
|
||||||
RebootFile rebootFile = {};
|
RebootFile rebootFile = {};
|
||||||
std::string currMntPrefix;
|
std::string currMntPrefix;
|
||||||
bool performOneShotSdCardOpsSwitch = true;
|
bool timeFileInitDone = false;
|
||||||
|
bool performOneShotSdCardOpsSwitch = false;
|
||||||
|
uint8_t shortSdCardCdCounter = 0;
|
||||||
|
#if OBSW_THREAD_TRACING == 1
|
||||||
|
uint32_t opCounter;
|
||||||
|
#endif
|
||||||
|
Countdown sdCardCheckCd = Countdown(INIT_SD_CARD_CHECK_TIMEOUT);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Index 0: Chip 0 Copy 0
|
* Index 0: Chip 0 Copy 0
|
||||||
@ -217,11 +246,19 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
PeriodicOperationDivider opDivider5;
|
PeriodicOperationDivider opDivider5;
|
||||||
PeriodicOperationDivider opDivider10;
|
PeriodicOperationDivider opDivider10;
|
||||||
|
|
||||||
|
PoolEntry<float> tempPoolEntry = PoolEntry<float>(0.0);
|
||||||
|
PoolEntry<float> psVoltageEntry = PoolEntry<float>(0.0);
|
||||||
|
PoolEntry<float> plVoltageEntry = PoolEntry<float>(0.0);
|
||||||
|
|
||||||
core::HkSet hkSet;
|
core::HkSet hkSet;
|
||||||
|
|
||||||
|
#if OBSW_SD_CARD_MUST_BE_ON == 1
|
||||||
|
bool remountAttemptFlag = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
LocalDataPoolManager& poolManager) override;
|
LocalDataPoolManager& poolManager) override;
|
||||||
Countdown sdCardCheckCd = Countdown(120000);
|
|
||||||
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||||||
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, uint32_t* msToReachTheMode);
|
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, uint32_t* msToReachTheMode);
|
||||||
void performMountedSdCardOperations();
|
void performMountedSdCardOperations();
|
||||||
@ -229,9 +266,8 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
|
|
||||||
ReturnValue_t initClockFromTimeFile();
|
ReturnValue_t initClockFromTimeFile();
|
||||||
ReturnValue_t performSdCardCheck();
|
ReturnValue_t performSdCardCheck();
|
||||||
ReturnValue_t timeFileHandler();
|
ReturnValue_t backupTimeFileHandler();
|
||||||
ReturnValue_t initBootCopy();
|
ReturnValue_t initBootCopyFile();
|
||||||
ReturnValue_t initWatchdogFifo();
|
|
||||||
ReturnValue_t initSdCardBlocking();
|
ReturnValue_t initSdCardBlocking();
|
||||||
bool startSdStateMachine(sd::SdCard targetActiveSd, SdCfgMode mode, MessageQueueId_t commander,
|
bool startSdStateMachine(sd::SdCard targetActiveSd, SdCfgMode mode, MessageQueueId_t commander,
|
||||||
DeviceCommandId_t actionId);
|
DeviceCommandId_t actionId);
|
||||||
@ -256,8 +292,6 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
|
|
||||||
ReturnValue_t gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy, bool& protOpPerformed);
|
ReturnValue_t gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy, bool& protOpPerformed);
|
||||||
|
|
||||||
void performWatchdogControlOperation();
|
|
||||||
|
|
||||||
ReturnValue_t handleProtInfoUpdateLine(std::string nextLine);
|
ReturnValue_t handleProtInfoUpdateLine(std::string nextLine);
|
||||||
int handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect,
|
int handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect,
|
||||||
bool& protOperationPerformed, bool selfChip, bool selfCopy,
|
bool& protOperationPerformed, bool selfChip, bool selfCopy,
|
||||||
@ -268,6 +302,7 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
void setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
void setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||||
bool parseRebootFile(std::string path, RebootFile& file);
|
bool parseRebootFile(std::string path, RebootFile& file);
|
||||||
void rewriteRebootFile(RebootFile file);
|
void rewriteRebootFile(RebootFile file);
|
||||||
|
void announceBootCounts();
|
||||||
void readHkData();
|
void readHkData();
|
||||||
bool isNumber(const std::string& s);
|
bool isNumber(const std::string& s);
|
||||||
};
|
};
|
||||||
|
@ -1,559 +0,0 @@
|
|||||||
#include "bsp_q7s/core/InitMission.h"
|
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
|
||||||
#include <linux/InitMission.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
|
||||||
#include "bsp_q7s/core/ObjectFactory.h"
|
|
||||||
#include "fsfw/objectmanager/ObjectManager.h"
|
|
||||||
#include "fsfw/objectmanager/ObjectManagerIF.h"
|
|
||||||
#include "fsfw/platform.h"
|
|
||||||
#include "fsfw/returnvalues/returnvalue.h"
|
|
||||||
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
|
|
||||||
#include "fsfw/tasks/FixedTimeslotTaskIF.h"
|
|
||||||
#include "fsfw/tasks/PeriodicTaskIF.h"
|
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
|
||||||
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
|
|
||||||
#include "mission/utility/InitMission.h"
|
|
||||||
#include "pollingsequence/pollingSequenceFactory.h"
|
|
||||||
|
|
||||||
/* This is configured for linux without CR */
|
|
||||||
#ifdef PLATFORM_UNIX
|
|
||||||
ServiceInterfaceStream sif::debug("DEBUG");
|
|
||||||
ServiceInterfaceStream sif::info("INFO");
|
|
||||||
ServiceInterfaceStream sif::warning("WARNING");
|
|
||||||
ServiceInterfaceStream sif::error("ERROR");
|
|
||||||
#else
|
|
||||||
ServiceInterfaceStream sif::debug("DEBUG", true);
|
|
||||||
ServiceInterfaceStream sif::info("INFO", true);
|
|
||||||
ServiceInterfaceStream sif::warning("WARNING", true);
|
|
||||||
ServiceInterfaceStream sif::error("ERROR", true, false, true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ObjectManagerIF* objectManager = nullptr;
|
|
||||||
|
|
||||||
void initmission::initMission() {
|
|
||||||
sif::info << "Building global objects.." << std::endl;
|
|
||||||
try {
|
|
||||||
/* Instantiate global object manager and also create all objects */
|
|
||||||
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
|
|
||||||
} catch (const std::invalid_argument& e) {
|
|
||||||
sif::error << "initmission::initMission: Object Construction failed with an "
|
|
||||||
"invalid argument: "
|
|
||||||
<< e.what();
|
|
||||||
std::exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
sif::info << "Initializing all objects.." << std::endl;
|
|
||||||
ObjectManager::instance()->initialize();
|
|
||||||
|
|
||||||
/* This function creates and starts all tasks */
|
|
||||||
initTasks();
|
|
||||||
}
|
|
||||||
|
|
||||||
void initmission::initTasks() {
|
|
||||||
TaskFactory* factory = TaskFactory::instance();
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
if (factory == nullptr) {
|
|
||||||
/* Should never happen ! */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#if OBSW_PRINT_MISSED_DEADLINES == 1
|
|
||||||
void (*missedDeadlineFunc)(void) = TaskFactory::printMissedDeadline;
|
|
||||||
#else
|
|
||||||
void (*missedDeadlineFunc)(void) = nullptr;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
PeriodicTaskIF* coreController = factory->createPeriodicTask(
|
|
||||||
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
|
||||||
result = coreController->addComponent(objects::CORE_CONTROLLER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TMTC Distribution */
|
|
||||||
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
|
|
||||||
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
|
||||||
result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("CCSDS_DISTRIB", objects::CCSDS_PACKET_DISTRIBUTOR);
|
|
||||||
}
|
|
||||||
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_PACKET_DISTRIB", objects::PUS_PACKET_DISTRIBUTOR);
|
|
||||||
}
|
|
||||||
result = tmTcDistributor->addComponent(objects::CFDP_DISTRIBUTOR);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("CFDP_DISTRIBUTOR", objects::CFDP_DISTRIBUTOR);
|
|
||||||
}
|
|
||||||
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("TM_FUNNEL", objects::TM_FUNNEL);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if OBSW_ADD_TCPIP_BRIDGE == 1
|
|
||||||
// TMTC bridge
|
|
||||||
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
|
||||||
"TCPIP_TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
|
||||||
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("TMTC_BRIDGE", objects::TMTC_BRIDGE);
|
|
||||||
}
|
|
||||||
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
|
||||||
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
|
||||||
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("UDP_POLLING", objects::TMTC_POLLING_TASK);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OBSW_USE_CCSDS_IP_CORE == 1
|
|
||||||
PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask(
|
|
||||||
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
|
||||||
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Minimal distance between two received TCs amounts to 0.6 seconds
|
|
||||||
// If a command has not been read before the next one arrives, the old command will be
|
|
||||||
// overwritten by the PDEC.
|
|
||||||
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
|
|
||||||
"PDEC_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
|
||||||
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
|
|
||||||
}
|
|
||||||
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
|
||||||
|
|
||||||
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
|
||||||
PeriodicTaskIF* cfdpTask = factory->createPeriodicTask(
|
|
||||||
"CFDP Handler", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
|
||||||
result = cfdpTask->addComponent(objects::CFDP_HANDLER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("CFDP Handler", objects::CFDP_HANDLER);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
PeriodicTaskIF* acsTask = factory->createPeriodicTask(
|
|
||||||
"ACS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
|
||||||
#if OBSW_ADD_GPS_CTRL == 1
|
|
||||||
result = acsTask->addComponent(objects::GPS_CONTROLLER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("GPS_CTRL", objects::GPS_CONTROLLER);
|
|
||||||
}
|
|
||||||
#endif /* OBSW_ADD_GPS_CTRL */
|
|
||||||
|
|
||||||
#if OBSW_ADD_ACS_CTRL == 1
|
|
||||||
acsTask->addComponent(objects::ACS_CONTROLLER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("ACS_CTRL", objects::ACS_CONTROLLER);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
PeriodicTaskIF* sysTask = factory->createPeriodicTask(
|
|
||||||
"SYS_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
|
||||||
static_cast<void>(sysTask);
|
|
||||||
#if OBSW_ADD_ACS_BOARD == 1
|
|
||||||
result = sysTask->addComponent(objects::ACS_BOARD_ASS);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("ACS_BOARD_ASS", objects::ACS_BOARD_ASS);
|
|
||||||
}
|
|
||||||
#endif /* OBSW_ADD_ACS_HANDLERS */
|
|
||||||
#if OBSW_ADD_RW == 1
|
|
||||||
result = sysTask->addComponent(objects::RW_ASS);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("RW_ASS", objects::RW_ASS);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if OBSW_ADD_SUS_BOARD_ASS == 1
|
|
||||||
result = sysTask->addComponent(objects::SUS_BOARD_ASS);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("SUS_BOARD_ASS", objects::SUS_BOARD_ASS);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OBSW_ADD_RTD_DEVICES == 1
|
|
||||||
PeriodicTaskIF* tcsPollingTask = factory->createPeriodicTask(
|
|
||||||
"TCS_POLLING_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.5, missedDeadlineFunc);
|
|
||||||
result = tcsPollingTask->addComponent(objects::SPI_RTD_COM_IF);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF);
|
|
||||||
}
|
|
||||||
PeriodicTaskIF* tcsTask = factory->createPeriodicTask(
|
|
||||||
"TCS_TASK", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
|
||||||
std::array<object_id_t, EiveMax31855::NUM_RTDS> rtdIds = {
|
|
||||||
objects::RTD_0_IC3_PLOC_HEATSPREADER,
|
|
||||||
objects::RTD_1_IC4_PLOC_MISSIONBOARD,
|
|
||||||
objects::RTD_2_IC5_4K_CAMERA,
|
|
||||||
objects::RTD_3_IC6_DAC_HEATSPREADER,
|
|
||||||
objects::RTD_4_IC7_STARTRACKER,
|
|
||||||
objects::RTD_5_IC8_RW1_MX_MY,
|
|
||||||
objects::RTD_6_IC9_DRO,
|
|
||||||
objects::RTD_7_IC10_SCEX,
|
|
||||||
objects::RTD_8_IC11_X8,
|
|
||||||
objects::RTD_9_IC12_HPA,
|
|
||||||
objects::RTD_10_IC13_PL_TX,
|
|
||||||
objects::RTD_11_IC14_MPA,
|
|
||||||
objects::RTD_12_IC15_ACU,
|
|
||||||
objects::RTD_13_IC16_PLPCDU_HEATSPREADER,
|
|
||||||
objects::RTD_14_IC17_TCS_BOARD,
|
|
||||||
objects::RTD_15_IC18_IMTQ,
|
|
||||||
};
|
|
||||||
|
|
||||||
for (const auto& rtd : rtdIds) {
|
|
||||||
tcsTask->addComponent(rtd, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_WRITE);
|
|
||||||
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_READ);
|
|
||||||
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
tcsTask->addComponent(objects::TCS_BOARD_ASS);
|
|
||||||
#endif /* OBSW_ADD_RTD_DEVICES */
|
|
||||||
|
|
||||||
#if OBSW_ADD_TCS_CTRL == 1
|
|
||||||
tcsTask->addComponent(objects::THERMAL_CONTROLLER);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OBSW_ADD_STAR_TRACKER == 1
|
|
||||||
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
|
|
||||||
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
|
||||||
result = strHelperTask->addComponent(objects::STR_HELPER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("STR_HELPER", objects::STR_HELPER);
|
|
||||||
}
|
|
||||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
|
||||||
|
|
||||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
|
||||||
PeriodicTaskIF* mpsocHelperTask = factory->createPeriodicTask(
|
|
||||||
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
|
||||||
result = mpsocHelperTask->addComponent(objects::PLOC_MPSOC_HELPER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PLOC_MPSOC_HELPER", objects::PLOC_MPSOC_HELPER);
|
|
||||||
}
|
|
||||||
#endif /* OBSW_ADD_PLOC_MPSOC */
|
|
||||||
|
|
||||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
|
||||||
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
|
|
||||||
"PLOC_SUPV_HELPER", 10, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
|
||||||
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
|
|
||||||
}
|
|
||||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
|
|
||||||
|
|
||||||
#if OBSW_TEST_CCSDS_BRIDGE == 1
|
|
||||||
PeriodicTaskIF* ptmeTestTask = factory->createPeriodicTask(
|
|
||||||
"PTME_TEST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
|
||||||
result = ptmeTestTask->addComponent(objects::CCSDS_IP_CORE_BRIDGE);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PTME_TEST", objects::CCSDS_IP_CORE_BRIDGE);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if OBSW_ADD_SCEX_DEVICE == 1
|
|
||||||
PeriodicTaskIF* scexDevHandler;
|
|
||||||
PeriodicTaskIF* scexReaderTask;
|
|
||||||
scheduling::schedulingScex(*factory, scexDevHandler, scexReaderTask);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
std::vector<PeriodicTaskIF*> pusTasks;
|
|
||||||
createPusTasks(*factory, missedDeadlineFunc, pusTasks);
|
|
||||||
std::vector<PeriodicTaskIF*> pstTasks;
|
|
||||||
createPstTasks(*factory, missedDeadlineFunc, pstTasks);
|
|
||||||
|
|
||||||
#if OBSW_ADD_TEST_CODE == 1
|
|
||||||
std::vector<PeriodicTaskIF*> testTasks;
|
|
||||||
createTestTasks(*factory, missedDeadlineFunc, testTasks);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
auto taskStarter = [](std::vector<PeriodicTaskIF*>& taskVector, std::string name) {
|
|
||||||
for (const auto& task : taskVector) {
|
|
||||||
if (task != nullptr) {
|
|
||||||
task->startTask();
|
|
||||||
} else {
|
|
||||||
sif::error << "Task in vector " << name << " is invalid!" << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
sif::info << "Starting tasks.." << std::endl;
|
|
||||||
tmTcDistributor->startTask();
|
|
||||||
|
|
||||||
#if OBSW_ADD_TCPIP_BRIDGE == 1
|
|
||||||
tmtcBridgeTask->startTask();
|
|
||||||
tmtcPollingTask->startTask();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OBSW_USE_CCSDS_IP_CORE == 1
|
|
||||||
ccsdsHandlerTask->startTask();
|
|
||||||
pdecHandlerTask->startTask();
|
|
||||||
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
|
||||||
|
|
||||||
coreController->startTask();
|
|
||||||
|
|
||||||
taskStarter(pstTasks, "PST task vector");
|
|
||||||
taskStarter(pusTasks, "PUS task vector");
|
|
||||||
#if OBSW_ADD_SCEX_DEVICE == 1
|
|
||||||
scexDevHandler->startTask();
|
|
||||||
scexReaderTask->startTask();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OBSW_TEST_CCSDS_BRIDGE == 1
|
|
||||||
ptmeTestTask->startTask();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
|
||||||
cfdpTask->startTask();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OBSW_ADD_STAR_TRACKER == 1
|
|
||||||
strHelperTask->startTask();
|
|
||||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
|
||||||
|
|
||||||
acsTask->startTask();
|
|
||||||
sysTask->startTask();
|
|
||||||
#if OBSW_ADD_RTD_DEVICES == 1
|
|
||||||
tcsPollingTask->startTask();
|
|
||||||
tcsTask->startTask();
|
|
||||||
#endif /* OBSW_ADD_RTD_DEVICES == 1 */
|
|
||||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
|
||||||
supvHelperTask->startTask();
|
|
||||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
|
||||||
|
|
||||||
#if OBSW_ADD_TEST_CODE == 1
|
|
||||||
taskStarter(testTasks, "Test task vector");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
sif::info << "Tasks started.." << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
void initmission::createPstTasks(TaskFactory& factory,
|
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
/* Polling Sequence Table Default */
|
|
||||||
#if OBSW_ADD_SPI_TEST_CODE == 0
|
|
||||||
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
|
|
||||||
"MAIN_SPI", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
|
||||||
result = pst::pstSpi(spiPst);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
|
||||||
sif::warning << "InitMission::initTasks: SPI PST is empty" << std::endl;
|
|
||||||
} else {
|
|
||||||
sif::error << "InitMission::initTasks: Creating SPI PST failed!" << std::endl;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
taskVec.push_back(spiPst);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OBSW_ADD_RW == 1
|
|
||||||
FixedTimeslotTaskIF* rwPstTask = factory.createFixedTimeslotTask(
|
|
||||||
"RW_SPI", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 1.0, missedDeadlineFunc);
|
|
||||||
result = pst::pstSpiRw(rwPstTask);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
|
||||||
sif::warning << "InitMission::initTasks: SPI PST is empty" << std::endl;
|
|
||||||
} else {
|
|
||||||
sif::error << "InitMission::initTasks: Creating SPI PST failed!" << std::endl;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
taskVec.push_back(rwPstTask);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
FixedTimeslotTaskIF* uartPst = factory.createFixedTimeslotTask(
|
|
||||||
"UART_PST", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
|
|
||||||
result = pst::pstUart(uartPst);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
|
||||||
sif::warning << "InitMission::initTasks: UART PST is empty" << std::endl;
|
|
||||||
} else {
|
|
||||||
sif::error << "InitMission::initTasks: Creating UART PST failed!" << std::endl;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
taskVec.push_back(uartPst);
|
|
||||||
}
|
|
||||||
|
|
||||||
FixedTimeslotTaskIF* gpioPst = factory.createFixedTimeslotTask(
|
|
||||||
"GPIO_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.2, missedDeadlineFunc);
|
|
||||||
result = pst::pstGpio(gpioPst);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
|
||||||
sif::warning << "InitMission::initTasks: GPIO PST is empty" << std::endl;
|
|
||||||
} else {
|
|
||||||
sif::error << "InitMission::initTasks: Creating GPIO PST failed!" << std::endl;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
taskVec.push_back(gpioPst);
|
|
||||||
}
|
|
||||||
#if OBSW_ADD_I2C_TEST_CODE == 0
|
|
||||||
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
|
|
||||||
"I2C_PST", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
|
|
||||||
result = pst::pstI2c(i2cPst);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
|
||||||
sif::warning << "InitMission::initTasks: I2C PST is empty" << std::endl;
|
|
||||||
} else {
|
|
||||||
sif::error << "InitMission::initTasks: Creating I2C PST failed!" << std::endl;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
taskVec.push_back(i2cPst);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
|
||||||
FixedTimeslotTaskIF* gomSpacePstTask = factory.createFixedTimeslotTask(
|
|
||||||
"GS_PST_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
|
|
||||||
result = pst::pstGompaceCan(gomSpacePstTask);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
|
||||||
sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
taskVec.push_back(gomSpacePstTask);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void initmission::createPusTasks(TaskFactory& factory,
|
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
/* PUS Services */
|
|
||||||
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
|
|
||||||
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
|
||||||
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_VERIF", objects::PUS_SERVICE_1_VERIFICATION);
|
|
||||||
}
|
|
||||||
taskVec.push_back(pusVerification);
|
|
||||||
|
|
||||||
PeriodicTaskIF* pusEvents = factory.createPeriodicTask(
|
|
||||||
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
|
||||||
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
|
||||||
}
|
|
||||||
result = pusEvents->addComponent(objects::EVENT_MANAGER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
|
||||||
}
|
|
||||||
taskVec.push_back(pusEvents);
|
|
||||||
|
|
||||||
PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
|
|
||||||
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
|
||||||
}
|
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_9", objects::PUS_SERVICE_9_TIME_MGMT);
|
|
||||||
}
|
|
||||||
taskVec.push_back(pusHighPrio);
|
|
||||||
|
|
||||||
PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask(
|
|
||||||
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
|
||||||
|
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
|
||||||
}
|
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
|
||||||
}
|
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_11_TC_SCHEDULER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_11", objects::PUS_SERVICE_11_TC_SCHEDULER);
|
|
||||||
}
|
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_20", objects::PUS_SERVICE_20_PARAMETERS);
|
|
||||||
}
|
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_200", objects::PUS_SERVICE_200_MODE_MGMT);
|
|
||||||
}
|
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_201_HEALTH);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_201", objects::PUS_SERVICE_201_HEALTH);
|
|
||||||
}
|
|
||||||
taskVec.push_back(pusMedPrio);
|
|
||||||
|
|
||||||
PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask(
|
|
||||||
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
|
||||||
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("PUS_17", objects::PUS_SERVICE_17_TEST);
|
|
||||||
}
|
|
||||||
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("ERROR_REPORTER", objects::INTERNAL_ERROR_REPORTER);
|
|
||||||
}
|
|
||||||
taskVec.push_back(pusLowPrio);
|
|
||||||
}
|
|
||||||
|
|
||||||
void initmission::createTestTasks(TaskFactory& factory,
|
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
|
||||||
#if OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
static_cast<void>(result); // supress warning in case it is not used
|
|
||||||
|
|
||||||
PeriodicTaskIF* testTask = factory.createPeriodicTask(
|
|
||||||
"TEST_TASK", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1, missedDeadlineFunc);
|
|
||||||
|
|
||||||
result = testTask->addComponent(objects::TEST_TASK);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if OBSW_ADD_SPI_TEST_CODE == 1
|
|
||||||
result = testTask->addComponent(objects::SPI_TEST);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if OBSW_ADD_I2C_TEST_CODE == 1
|
|
||||||
result = testTask->addComponent(objects::I2C_TEST);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("I2C_TEST", objects::I2C_TEST);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if OBSW_ADD_UART_TEST_CODE == 1
|
|
||||||
result = testTask->addComponent(objects::UART_TEST);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("UART_TEST", objects::UART_TEST);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
taskVec.push_back(testTask);
|
|
||||||
|
|
||||||
#endif // OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
▄ ▄
|
|
||||||
▌▒█ ▄▀▒▌
|
|
||||||
▌▒▒█ ▄▀▒▒▒▐
|
|
||||||
▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐
|
|
||||||
▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐
|
|
||||||
▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌
|
|
||||||
▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒▌
|
|
||||||
▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐
|
|
||||||
▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░░░▒▒▒▀▄▌
|
|
||||||
▌░▒▄██▄▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒▌
|
|
||||||
▌▒▀▐▄█▄█▌▄░▀▒▒░░░░░░░░░░▒▒▒▐
|
|
||||||
▐▒▒▐▀▐▀▒░▄▄▒▄▒▒▒▒▒▒░▒░▒░▒▒▒▒▌
|
|
||||||
▐▒▒▒▀▀▄▄▒▒▒▄▒▒▒▒▒▒▒▒░▒░▒░▒▒▐
|
|
||||||
▌▒▒▒▒▒▒▀▀▀▒▒▒▒▒▒░▒░▒░▒░▒▒▒▌
|
|
||||||
▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒░▒░▒▒▄▒▒▐
|
|
||||||
▀▄▒▒▒▒▒▒▒▒▒▒▒░▒░▒░▒▄▒▒▒▒▌
|
|
||||||
▀▄▒▒▒▒▒▒▒▒▒▒▄▄▄▀▒▒▒▒▄▀
|
|
||||||
▀▄▄▄▄▄▄▀▀▀▒▒▒▒▒▄▄▀
|
|
||||||
▒▒▒▒▒▒▒▒▒▒▀▀
|
|
||||||
**/
|
|
@ -1,6 +1,17 @@
|
|||||||
#include "ObjectFactory.h"
|
#include "ObjectFactory.h"
|
||||||
|
|
||||||
#include <linux/devices/ScexUartReader.h>
|
#include <fsfw/subsystem/Subsystem.h>
|
||||||
|
#include <linux/devices/AcsBoardPolling.h>
|
||||||
|
#include <linux/devices/ImtqPollingTask.h>
|
||||||
|
#include <linux/devices/RwPollingTask.h>
|
||||||
|
#include <mission/devices/GyrL3gCustomHandler.h>
|
||||||
|
#include <mission/devices/MgmLis3CustomHandler.h>
|
||||||
|
#include <mission/devices/MgmRm3100CustomHandler.h>
|
||||||
|
#include <mission/system/fdir/StrFdir.h>
|
||||||
|
#include <mission/system/objects/CamSwitcher.h>
|
||||||
|
#include <mission/system/objects/ImtqAssembly.h>
|
||||||
|
#include <mission/system/objects/StrAssembly.h>
|
||||||
|
#include <mission/system/objects/SyrlinksAssembly.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "bsp_q7s/boardtest/Q7STestTask.h"
|
#include "bsp_q7s/boardtest/Q7STestTask.h"
|
||||||
@ -22,7 +33,8 @@
|
|||||||
#include "linux/boardtest/UartTestClass.h"
|
#include "linux/boardtest/UartTestClass.h"
|
||||||
#include "linux/callbacks/gpioCallbacks.h"
|
#include "linux/callbacks/gpioCallbacks.h"
|
||||||
#include "linux/csp/CspComIF.h"
|
#include "linux/csp/CspComIF.h"
|
||||||
#include "linux/devices/GPSHyperionLinuxController.h"
|
#include "linux/devices/GpsHyperionLinuxController.h"
|
||||||
|
#include "linux/devices/ScexUartReader.h"
|
||||||
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
|
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
|
||||||
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
||||||
#include "linux/devices/ploc/PlocMPSoCHandler.h"
|
#include "linux/devices/ploc/PlocMPSoCHandler.h"
|
||||||
@ -31,22 +43,36 @@
|
|||||||
#include "linux/devices/ploc/PlocSupervisorHandler.h"
|
#include "linux/devices/ploc/PlocSupervisorHandler.h"
|
||||||
#include "linux/devices/startracker/StarTrackerHandler.h"
|
#include "linux/devices/startracker/StarTrackerHandler.h"
|
||||||
#include "linux/devices/startracker/StrHelper.h"
|
#include "linux/devices/startracker/StrHelper.h"
|
||||||
#include "linux/obc/AxiPtmeConfig.h"
|
#include "linux/ipcore/AxiPtmeConfig.h"
|
||||||
#include "linux/obc/PapbVcInterface.h"
|
#include "linux/ipcore/PapbVcInterface.h"
|
||||||
#include "linux/obc/PdecHandler.h"
|
#include "linux/ipcore/PdecHandler.h"
|
||||||
#include "linux/obc/Ptme.h"
|
#include "linux/ipcore/Ptme.h"
|
||||||
#include "linux/obc/PtmeConfig.h"
|
#include "linux/ipcore/PtmeConfig.h"
|
||||||
|
#include "mission/config/configfile.h"
|
||||||
#include "mission/csp/CspCookie.h"
|
#include "mission/csp/CspCookie.h"
|
||||||
#include "mission/system/RwAssembly.h"
|
|
||||||
#include "mission/system/fdir/AcsBoardFdir.h"
|
#include "mission/system/fdir/AcsBoardFdir.h"
|
||||||
#include "mission/system/fdir/GomspacePowerFdir.h"
|
#include "mission/system/fdir/GomspacePowerFdir.h"
|
||||||
#include "mission/system/fdir/RtdFdir.h"
|
#include "mission/system/fdir/RtdFdir.h"
|
||||||
#include "mission/system/fdir/SusFdir.h"
|
#include "mission/system/fdir/SusFdir.h"
|
||||||
#include "mission/system/fdir/SyrlinksFdir.h"
|
#include "mission/system/fdir/SyrlinksFdir.h"
|
||||||
|
#include "mission/system/objects/AcsSubsystem.h"
|
||||||
|
#include "mission/system/objects/RwAssembly.h"
|
||||||
|
#include "mission/system/objects/TcsBoardAssembly.h"
|
||||||
|
#include "mission/system/tree/acsModeTree.h"
|
||||||
|
#include "mission/system/tree/comModeTree.h"
|
||||||
|
#include "mission/system/tree/payloadModeTree.h"
|
||||||
|
#include "mission/system/tree/tcsModeTree.h"
|
||||||
|
#include "mission/utility/GlobalConfigHandler.h"
|
||||||
#include "tmtc/pusIds.h"
|
#include "tmtc/pusIds.h"
|
||||||
#if OBSW_TEST_LIBGPIOD == 1
|
#if OBSW_TEST_LIBGPIOD == 1
|
||||||
#include "linux/boardtest/LibgpiodTest.h"
|
#include "linux/boardtest/LibgpiodTest.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include <mission/devices/GyrAdis1650XHandler.h>
|
||||||
|
#include <mission/devices/ImtqHandler.h>
|
||||||
|
#include <mission/devices/PcduHandler.h>
|
||||||
|
#include <mission/devices/SyrlinksHandler.h>
|
||||||
|
#include <mission/devices/devicedefinitions/rwHelpers.h>
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
|
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
|
||||||
@ -61,46 +87,41 @@
|
|||||||
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
||||||
#include "fsfw_hal/linux/i2c/I2cComIF.h"
|
#include "fsfw_hal/linux/i2c/I2cComIF.h"
|
||||||
#include "fsfw_hal/linux/i2c/I2cCookie.h"
|
#include "fsfw_hal/linux/i2c/I2cCookie.h"
|
||||||
|
#include "fsfw_hal/linux/serial/SerialComIF.h"
|
||||||
|
#include "fsfw_hal/linux/serial/SerialCookie.h"
|
||||||
#include "fsfw_hal/linux/spi/SpiComIF.h"
|
#include "fsfw_hal/linux/spi/SpiComIF.h"
|
||||||
#include "fsfw_hal/linux/spi/SpiCookie.h"
|
#include "fsfw_hal/linux/spi/SpiCookie.h"
|
||||||
#include "fsfw_hal/linux/uart/UartComIF.h"
|
|
||||||
#include "fsfw_hal/linux/uart/UartCookie.h"
|
|
||||||
#include "mission/core/GenericFactory.h"
|
#include "mission/core/GenericFactory.h"
|
||||||
#include "mission/devices/ACUHandler.h"
|
#include "mission/devices/ACUHandler.h"
|
||||||
#include "mission/devices/BpxBatteryHandler.h"
|
#include "mission/devices/BpxBatteryHandler.h"
|
||||||
#include "mission/devices/GyroADIS1650XHandler.h"
|
|
||||||
#include "mission/devices/HeaterHandler.h"
|
#include "mission/devices/HeaterHandler.h"
|
||||||
#include "mission/devices/IMTQHandler.h"
|
|
||||||
#include "mission/devices/Max31865PT1000Handler.h"
|
#include "mission/devices/Max31865PT1000Handler.h"
|
||||||
#include "mission/devices/P60DockHandler.h"
|
#include "mission/devices/P60DockHandler.h"
|
||||||
#include "mission/devices/PCDUHandler.h"
|
|
||||||
#include "mission/devices/PDU1Handler.h"
|
#include "mission/devices/PDU1Handler.h"
|
||||||
#include "mission/devices/PDU2Handler.h"
|
#include "mission/devices/PDU2Handler.h"
|
||||||
#include "mission/devices/PayloadPcduHandler.h"
|
#include "mission/devices/PayloadPcduHandler.h"
|
||||||
#include "mission/devices/RadiationSensorHandler.h"
|
#include "mission/devices/RadiationSensorHandler.h"
|
||||||
#include "mission/devices/RwHandler.h"
|
#include "mission/devices/RwHandler.h"
|
||||||
#include "mission/devices/SolarArrayDeploymentHandler.h"
|
#include "mission/devices/SolarArrayDeploymentHandler.h"
|
||||||
#include "mission/devices/SyrlinksHkHandler.h"
|
|
||||||
#include "mission/devices/Tmp1075Handler.h"
|
#include "mission/devices/Tmp1075Handler.h"
|
||||||
#include "mission/devices/devicedefinitions/GomspaceDefinitions.h"
|
#include "mission/devices/devicedefinitions/GomspaceDefinitions.h"
|
||||||
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
|
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
|
||||||
#include "mission/devices/devicedefinitions/RadSensorDefinitions.h"
|
#include "mission/devices/devicedefinitions/RadSensorDefinitions.h"
|
||||||
#include "mission/devices/devicedefinitions/RwDefinitions.h"
|
|
||||||
#include "mission/devices/devicedefinitions/SyrlinksDefinitions.h"
|
#include "mission/devices/devicedefinitions/SyrlinksDefinitions.h"
|
||||||
#include "mission/devices/devicedefinitions/payloadPcduDefinitions.h"
|
#include "mission/devices/devicedefinitions/payloadPcduDefinitions.h"
|
||||||
#include "mission/system/AcsBoardAssembly.h"
|
#include "mission/system/objects/AcsBoardAssembly.h"
|
||||||
#include "mission/tmtc/CCSDSHandler.h"
|
#include "mission/tmtc/CcsdsIpCoreHandler.h"
|
||||||
#include "mission/tmtc/TmFunnel.h"
|
#include "mission/tmtc/TmFunnelHandler.h"
|
||||||
#include "mission/tmtc/VirtualChannel.h"
|
#include "mission/tmtc/VirtualChannel.h"
|
||||||
|
|
||||||
ResetArgs RESET_ARGS_GNSS;
|
ResetArgs RESET_ARGS_GNSS;
|
||||||
|
|
||||||
void Factory::setStaticFrameworkObjectIds() {
|
void Factory::setStaticFrameworkObjectIds() {
|
||||||
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
|
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
|
||||||
PusServiceBase::PACKET_DESTINATION = objects::TM_FUNNEL;
|
PusServiceBase::PACKET_DESTINATION = objects::PUS_TM_FUNNEL;
|
||||||
|
|
||||||
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
||||||
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
|
CommandingServiceBase::defaultPacketDestination = objects::PUS_TM_FUNNEL;
|
||||||
|
|
||||||
#if OBSW_Q7S_EM == 1
|
#if OBSW_Q7S_EM == 1
|
||||||
DeviceHandlerBase::powerSwitcherId = objects::NO_OBJECT;
|
DeviceHandlerBase::powerSwitcherId = objects::NO_OBJECT;
|
||||||
@ -108,14 +129,6 @@ void Factory::setStaticFrameworkObjectIds() {
|
|||||||
DeviceHandlerBase::powerSwitcherId = objects::PCDU_HANDLER;
|
DeviceHandlerBase::powerSwitcherId = objects::PCDU_HANDLER;
|
||||||
#endif /* OBSW_Q7S_EM == 1 */
|
#endif /* OBSW_Q7S_EM == 1 */
|
||||||
|
|
||||||
#if OBSW_TM_TO_PTME == 1
|
|
||||||
TmFunnel::downlinkDestination = objects::CCSDS_HANDLER;
|
|
||||||
#else
|
|
||||||
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
|
|
||||||
#endif /* OBSW_TM_TO_PTME == 1 */
|
|
||||||
// No storage object for now.
|
|
||||||
TmFunnel::storageDestination = objects::NO_OBJECT;
|
|
||||||
|
|
||||||
LocalDataPoolManager::defaultHkDestination = objects::PUS_SERVICE_3_HOUSEKEEPING;
|
LocalDataPoolManager::defaultHkDestination = objects::PUS_SERVICE_3_HOUSEKEEPING;
|
||||||
|
|
||||||
VerificationReporter::DEFAULT_RECEIVER = objects::PUS_SERVICE_1_VERIFICATION;
|
VerificationReporter::DEFAULT_RECEIVER = objects::PUS_SERVICE_1_VERIFICATION;
|
||||||
@ -124,25 +137,33 @@ void Factory::setStaticFrameworkObjectIds() {
|
|||||||
void ObjectFactory::setStatics() { Factory::setStaticFrameworkObjectIds(); }
|
void ObjectFactory::setStatics() { Factory::setStaticFrameworkObjectIds(); }
|
||||||
|
|
||||||
void ObjectFactory::createTmpComponents() {
|
void ObjectFactory::createTmpComponents() {
|
||||||
I2cCookie* i2cCookieTmp1075tcs1 =
|
std::vector<std::pair<object_id_t, address_t>> tmpDevIds = {{
|
||||||
new I2cCookie(addresses::TMP1075_TCS_1, TMP1075::MAX_REPLY_LENGTH, q7s::I2C_DEFAULT_DEV);
|
{objects::TMP1075_HANDLER_TCS_0, addresses::TMP1075_TCS_0},
|
||||||
I2cCookie* i2cCookieTmp1075tcs2 =
|
{objects::TMP1075_HANDLER_TCS_1, addresses::TMP1075_TCS_1},
|
||||||
new I2cCookie(addresses::TMP1075_TCS_2, TMP1075::MAX_REPLY_LENGTH, q7s::I2C_DEFAULT_DEV);
|
{objects::TMP1075_HANDLER_PLPCDU_0, addresses::TMP1075_PLPCDU_0},
|
||||||
|
// damaged
|
||||||
|
// {objects::TMP1075_HANDLER_PLPCDU_1, addresses::TMP1075_PLPCDU_1},
|
||||||
|
{objects::TMP1075_HANDLER_IF_BOARD, addresses::TMP1075_IF_BOARD},
|
||||||
|
}};
|
||||||
|
std::vector<I2cCookie*> tmpDevCookies;
|
||||||
|
|
||||||
/* Temperature sensors */
|
for (size_t idx = 0; idx < tmpDevIds.size(); idx++) {
|
||||||
Tmp1075Handler* tmp1075Handler_1 =
|
tmpDevCookies.push_back(
|
||||||
new Tmp1075Handler(objects::TMP1075_HANDLER_1, objects::I2C_COM_IF, i2cCookieTmp1075tcs1);
|
new I2cCookie(tmpDevIds[idx].second, TMP1075::MAX_REPLY_LENGTH, q7s::I2C_PS_EIVE));
|
||||||
(void)tmp1075Handler_1;
|
auto* tmpDevHandler =
|
||||||
Tmp1075Handler* tmp1075Handler_2 =
|
new Tmp1075Handler(tmpDevIds[idx].first, objects::I2C_COM_IF, tmpDevCookies[idx]);
|
||||||
new Tmp1075Handler(objects::TMP1075_HANDLER_2, objects::I2C_COM_IF, i2cCookieTmp1075tcs2);
|
tmpDevHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
||||||
(void)tmp1075Handler_2;
|
// TODO: Remove this after TCS subsystem was added
|
||||||
|
// These devices are connected to the 3V3 stack and should be powered permanently. Therefore,
|
||||||
|
// we set them to normal mode immediately here.
|
||||||
|
tmpDevHandler->setModeNormal();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
|
void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF,
|
||||||
SpiComIF** spiMainComIF, I2cComIF** i2cComIF,
|
SerialComIF** uartComIF, SpiComIF** spiMainComIF,
|
||||||
SpiComIF** spiRWComIF) {
|
I2cComIF** i2cComIF) {
|
||||||
if (gpioComIF == nullptr or uartComIF == nullptr or spiMainComIF == nullptr or
|
if (gpioComIF == nullptr or uartComIF == nullptr or spiMainComIF == nullptr) {
|
||||||
spiRWComIF == nullptr) {
|
|
||||||
sif::error << "ObjectFactory::createCommunicationInterfaces: Invalid passed ComIF pointer"
|
sif::error << "ObjectFactory::createCommunicationInterfaces: Invalid passed ComIF pointer"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
@ -151,11 +172,9 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, Ua
|
|||||||
/* Communication interfaces */
|
/* Communication interfaces */
|
||||||
new CspComIF(objects::CSP_COM_IF);
|
new CspComIF(objects::CSP_COM_IF);
|
||||||
*i2cComIF = new I2cComIF(objects::I2C_COM_IF);
|
*i2cComIF = new I2cComIF(objects::I2C_COM_IF);
|
||||||
*uartComIF = new UartComIF(objects::UART_COM_IF);
|
*uartComIF = new SerialComIF(objects::UART_COM_IF);
|
||||||
*spiMainComIF = new SpiComIF(objects::SPI_MAIN_COM_IF, q7s::SPI_DEFAULT_DEV, *gpioComIF);
|
*spiMainComIF = new SpiComIF(objects::SPI_MAIN_COM_IF, q7s::SPI_DEFAULT_DEV, **gpioComIF);
|
||||||
*spiRWComIF = new SpiComIF(objects::SPI_RW_COM_IF, q7s::SPI_RW_DEV, *gpioComIF);
|
//*spiRWComIF = new SpiComIF(objects::SPI_RW_COM_IF, q7s::SPI_RW_DEV, **gpioComIF);
|
||||||
/* Adding gpios for chip select decoding to the gpioComIf */
|
|
||||||
q7s::gpioCallbacks::initSpiCsDecoder(*gpioComIF);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher) {
|
void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher) {
|
||||||
@ -200,8 +219,12 @@ void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchI
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
|
ReturnValue_t ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF,
|
||||||
|
Stack5VHandler& stackHandler) {
|
||||||
using namespace gpio;
|
using namespace gpio;
|
||||||
|
if (gpioComIF == nullptr) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
GpioCookie* gpioCookieRadSensor = new GpioCookie;
|
GpioCookie* gpioCookieRadSensor = new GpioCookie;
|
||||||
std::stringstream consumer;
|
std::stringstream consumer;
|
||||||
consumer << "0x" << std::hex << objects::RAD_SENSOR;
|
consumer << "0x" << std::hex << objects::RAD_SENSOR;
|
||||||
@ -218,19 +241,16 @@ void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
|
|||||||
spi::DEFAULT_MAX_1227_MODE, spi::DEFAULT_MAX_1227_SPEED);
|
spi::DEFAULT_MAX_1227_MODE, spi::DEFAULT_MAX_1227_SPEED);
|
||||||
spiCookieRadSensor->setMutexParams(MutexIF::TimeoutType::WAITING, spi::RAD_SENSOR_CS_TIMEOUT);
|
spiCookieRadSensor->setMutexParams(MutexIF::TimeoutType::WAITING, spi::RAD_SENSOR_CS_TIMEOUT);
|
||||||
auto radSensor = new RadiationSensorHandler(objects::RAD_SENSOR, objects::SPI_MAIN_COM_IF,
|
auto radSensor = new RadiationSensorHandler(objects::RAD_SENSOR, objects::SPI_MAIN_COM_IF,
|
||||||
spiCookieRadSensor, gpioComIF);
|
spiCookieRadSensor, gpioComIF, stackHandler);
|
||||||
static_cast<void>(radSensor);
|
static_cast<void>(radSensor);
|
||||||
// The radiation sensor ADC is powered by the 5V stack connector which should always be on
|
|
||||||
radSensor->setStartUpImmediately();
|
|
||||||
// It's a simple sensor, so just to to normal mode immediately
|
|
||||||
radSensor->setToGoToNormalModeImmediately();
|
|
||||||
#if OBSW_DEBUG_RAD_SENSOR == 1
|
#if OBSW_DEBUG_RAD_SENSOR == 1
|
||||||
radSensor->enablePeriodicDataPrint(true);
|
radSensor->enablePeriodicDataPrint(true);
|
||||||
#endif
|
#endif
|
||||||
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF,
|
void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF,
|
||||||
PowerSwitchIF* pwrSwitcher) {
|
SerialComIF* uartComIF, PowerSwitchIF& pwrSwitcher) {
|
||||||
using namespace gpio;
|
using namespace gpio;
|
||||||
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
||||||
|
|
||||||
@ -333,15 +353,19 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
static_cast<void>(fdir);
|
static_cast<void>(fdir);
|
||||||
|
|
||||||
#if OBSW_ADD_ACS_BOARD == 1
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
|
new AcsBoardPolling(objects::ACS_BOARD_POLLING_TASK, spiComIF, *gpioComIF);
|
||||||
std::string spiDev = q7s::SPI_DEFAULT_DEV;
|
std::string spiDev = q7s::SPI_DEFAULT_DEV;
|
||||||
|
std::array<DeviceHandlerBase*, 8> assemblyChildren;
|
||||||
SpiCookie* spiCookie =
|
SpiCookie* spiCookie =
|
||||||
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
|
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, mgmLis3::MAX_BUFFER_SIZE,
|
||||||
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
||||||
auto mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_MAIN_COM_IF,
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||||
spiCookie, spi::LIS3_TRANSITION_DELAY);
|
auto mgmLis3Handler0 =
|
||||||
|
new MgmLis3CustomHandler(objects::MGM_0_LIS3_HANDLER, objects::ACS_BOARD_POLLING_TASK,
|
||||||
|
spiCookie, spi::LIS3_TRANSITION_DELAY);
|
||||||
fdir = new AcsBoardFdir(objects::MGM_0_LIS3_HANDLER);
|
fdir = new AcsBoardFdir(objects::MGM_0_LIS3_HANDLER);
|
||||||
mgmLis3Handler->setCustomFdir(fdir);
|
mgmLis3Handler0->setCustomFdir(fdir);
|
||||||
static_cast<void>(mgmLis3Handler);
|
assemblyChildren[0] = mgmLis3Handler0;
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
mgmLis3Handler->setStartUpImmediately();
|
mgmLis3Handler->setStartUpImmediately();
|
||||||
mgmLis3Handler->setToGoToNormalMode(true);
|
mgmLis3Handler->setToGoToNormalMode(true);
|
||||||
@ -350,15 +374,15 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
mgmLis3Handler->enablePeriodicPrintouts(true, 10);
|
mgmLis3Handler->enablePeriodicPrintouts(true, 10);
|
||||||
#endif
|
#endif
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
|
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, mgmRm3100::MAX_BUFFER_SIZE,
|
||||||
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
||||||
auto mgmRm3100Handler =
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||||
new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
|
auto mgmRm3100Handler1 =
|
||||||
spi::RM3100_TRANSITION_DELAY);
|
new MgmRm3100CustomHandler(objects::MGM_1_RM3100_HANDLER, objects::ACS_BOARD_POLLING_TASK,
|
||||||
|
spiCookie, spi::RM3100_TRANSITION_DELAY);
|
||||||
fdir = new AcsBoardFdir(objects::MGM_1_RM3100_HANDLER);
|
fdir = new AcsBoardFdir(objects::MGM_1_RM3100_HANDLER);
|
||||||
mgmRm3100Handler->setCustomFdir(fdir);
|
mgmRm3100Handler1->setCustomFdir(fdir);
|
||||||
mgmRm3100Handler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren[1] = mgmRm3100Handler1;
|
||||||
static_cast<void>(mgmRm3100Handler);
|
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
mgmRm3100Handler->setStartUpImmediately();
|
mgmRm3100Handler->setStartUpImmediately();
|
||||||
mgmRm3100Handler->setToGoToNormalMode(true);
|
mgmRm3100Handler->setToGoToNormalMode(true);
|
||||||
@ -366,15 +390,15 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
#if OBSW_DEBUG_ACS == 1
|
#if OBSW_DEBUG_ACS == 1
|
||||||
mgmRm3100Handler->enablePeriodicPrintouts(true, 10);
|
mgmRm3100Handler->enablePeriodicPrintouts(true, 10);
|
||||||
#endif
|
#endif
|
||||||
spiCookie =
|
spiCookie = new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, mgmLis3::MAX_BUFFER_SIZE,
|
||||||
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
|
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
||||||
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||||
mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_MAIN_COM_IF,
|
auto* mgmLis3Handler2 =
|
||||||
spiCookie, spi::LIS3_TRANSITION_DELAY);
|
new MgmLis3CustomHandler(objects::MGM_2_LIS3_HANDLER, objects::ACS_BOARD_POLLING_TASK,
|
||||||
|
spiCookie, spi::LIS3_TRANSITION_DELAY);
|
||||||
fdir = new AcsBoardFdir(objects::MGM_2_LIS3_HANDLER);
|
fdir = new AcsBoardFdir(objects::MGM_2_LIS3_HANDLER);
|
||||||
mgmLis3Handler->setCustomFdir(fdir);
|
mgmLis3Handler2->setCustomFdir(fdir);
|
||||||
mgmLis3Handler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren[2] = mgmLis3Handler2;
|
||||||
static_cast<void>(mgmLis3Handler);
|
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
mgmLis3Handler->setStartUpImmediately();
|
mgmLis3Handler->setStartUpImmediately();
|
||||||
mgmLis3Handler->setToGoToNormalMode(true);
|
mgmLis3Handler->setToGoToNormalMode(true);
|
||||||
@ -383,13 +407,15 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
mgmLis3Handler->enablePeriodicPrintouts(true, 10);
|
mgmLis3Handler->enablePeriodicPrintouts(true, 10);
|
||||||
#endif
|
#endif
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
|
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, mgmRm3100::MAX_BUFFER_SIZE,
|
||||||
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
||||||
mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_MAIN_COM_IF,
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||||
spiCookie, spi::RM3100_TRANSITION_DELAY);
|
auto* mgmRm3100Handler3 =
|
||||||
|
new MgmRm3100CustomHandler(objects::MGM_3_RM3100_HANDLER, objects::ACS_BOARD_POLLING_TASK,
|
||||||
|
spiCookie, spi::RM3100_TRANSITION_DELAY);
|
||||||
fdir = new AcsBoardFdir(objects::MGM_3_RM3100_HANDLER);
|
fdir = new AcsBoardFdir(objects::MGM_3_RM3100_HANDLER);
|
||||||
mgmRm3100Handler->setCustomFdir(fdir);
|
mgmRm3100Handler3->setCustomFdir(fdir);
|
||||||
mgmRm3100Handler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren[3] = mgmRm3100Handler3;
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
mgmRm3100Handler->setStartUpImmediately();
|
mgmRm3100Handler->setStartUpImmediately();
|
||||||
mgmRm3100Handler->setToGoToNormalMode(true);
|
mgmRm3100Handler->setToGoToNormalMode(true);
|
||||||
@ -400,15 +426,15 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
// Commented until ACS board V2 in in clean room again
|
// Commented until ACS board V2 in in clean room again
|
||||||
// Gyro 0 Side A
|
// Gyro 0 Side A
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, ADIS1650X::MAXIMUM_REPLY_SIZE,
|
new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, adis1650x::MAXIMUM_REPLY_SIZE,
|
||||||
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
|
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
|
||||||
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||||
auto adisHandler =
|
auto adisHandler =
|
||||||
new GyroADIS1650XHandler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
|
new GyrAdis1650XHandler(objects::GYRO_0_ADIS_HANDLER, objects::ACS_BOARD_POLLING_TASK,
|
||||||
ADIS1650X::Type::ADIS16505);
|
spiCookie, adis1650x::Type::ADIS16505);
|
||||||
fdir = new AcsBoardFdir(objects::GYRO_0_ADIS_HANDLER);
|
fdir = new AcsBoardFdir(objects::GYRO_0_ADIS_HANDLER);
|
||||||
adisHandler->setCustomFdir(fdir);
|
adisHandler->setCustomFdir(fdir);
|
||||||
adisHandler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren[4] = adisHandler;
|
||||||
static_cast<void>(adisHandler);
|
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
adisHandler->setStartUpImmediately();
|
adisHandler->setStartUpImmediately();
|
||||||
adisHandler->setToGoToNormalModeImmediately();
|
adisHandler->setToGoToNormalModeImmediately();
|
||||||
@ -417,14 +443,15 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
adisHandler->enablePeriodicPrintouts(true, 10);
|
adisHandler->enablePeriodicPrintouts(true, 10);
|
||||||
#endif
|
#endif
|
||||||
// Gyro 1 Side A
|
// Gyro 1 Side A
|
||||||
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
|
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, l3gd20h::MAX_BUFFER_SIZE,
|
||||||
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
||||||
auto gyroL3gHandler = new GyroHandlerL3GD20H(
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||||
objects::GYRO_1_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY);
|
auto gyroL3gHandler1 =
|
||||||
|
new GyrL3gCustomHandler(objects::GYRO_1_L3G_HANDLER, objects::ACS_BOARD_POLLING_TASK,
|
||||||
|
spiCookie, spi::L3G_TRANSITION_DELAY);
|
||||||
fdir = new AcsBoardFdir(objects::GYRO_1_L3G_HANDLER);
|
fdir = new AcsBoardFdir(objects::GYRO_1_L3G_HANDLER);
|
||||||
gyroL3gHandler->setCustomFdir(fdir);
|
gyroL3gHandler1->setCustomFdir(fdir);
|
||||||
gyroL3gHandler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren[5] = gyroL3gHandler1;
|
||||||
static_cast<void>(gyroL3gHandler);
|
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
gyroL3gHandler->setStartUpImmediately();
|
gyroL3gHandler->setStartUpImmediately();
|
||||||
gyroL3gHandler->setToGoToNormalMode(true);
|
gyroL3gHandler->setToGoToNormalMode(true);
|
||||||
@ -434,25 +461,29 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
#endif
|
#endif
|
||||||
// Gyro 2 Side B
|
// Gyro 2 Side B
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, ADIS1650X::MAXIMUM_REPLY_SIZE,
|
new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, adis1650x::MAXIMUM_REPLY_SIZE,
|
||||||
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
|
spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED);
|
||||||
adisHandler = new GyroADIS1650XHandler(objects::GYRO_2_ADIS_HANDLER, objects::SPI_MAIN_COM_IF,
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||||
spiCookie, ADIS1650X::Type::ADIS16505);
|
adisHandler =
|
||||||
|
new GyrAdis1650XHandler(objects::GYRO_2_ADIS_HANDLER, objects::ACS_BOARD_POLLING_TASK,
|
||||||
|
spiCookie, adis1650x::Type::ADIS16505);
|
||||||
fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER);
|
fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER);
|
||||||
adisHandler->setCustomFdir(fdir);
|
adisHandler->setCustomFdir(fdir);
|
||||||
adisHandler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren[6] = adisHandler;
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
adisHandler->setStartUpImmediately();
|
adisHandler->setStartUpImmediately();
|
||||||
adisHandler->setToGoToNormalModeImmediately();
|
adisHandler->setToGoToNormalModeImmediately();
|
||||||
#endif
|
#endif
|
||||||
// Gyro 3 Side B
|
// Gyro 3 Side B
|
||||||
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
|
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, l3gd20h::MAX_BUFFER_SIZE,
|
||||||
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
||||||
gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_MAIN_COM_IF,
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::ACS_BOARD_CS_TIMEOUT);
|
||||||
spiCookie, spi::L3G_TRANSITION_DELAY);
|
auto gyroL3gHandler3 =
|
||||||
|
new GyrL3gCustomHandler(objects::GYRO_3_L3G_HANDLER, objects::ACS_BOARD_POLLING_TASK,
|
||||||
|
spiCookie, spi::L3G_TRANSITION_DELAY);
|
||||||
fdir = new AcsBoardFdir(objects::GYRO_3_L3G_HANDLER);
|
fdir = new AcsBoardFdir(objects::GYRO_3_L3G_HANDLER);
|
||||||
gyroL3gHandler->setCustomFdir(fdir);
|
gyroL3gHandler3->setCustomFdir(fdir);
|
||||||
gyroL3gHandler->setParent(objects::ACS_BOARD_ASS);
|
assemblyChildren[7] = gyroL3gHandler3;
|
||||||
#if OBSW_TEST_ACS == 1
|
#if OBSW_TEST_ACS == 1
|
||||||
gyroL3gHandler->setStartUpImmediately();
|
gyroL3gHandler->setStartUpImmediately();
|
||||||
gyroL3gHandler->setToGoToNormalMode(true);
|
gyroL3gHandler->setToGoToNormalMode(true);
|
||||||
@ -467,21 +498,16 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|||||||
RESET_ARGS_GNSS.gpioComIF = gpioComIF;
|
RESET_ARGS_GNSS.gpioComIF = gpioComIF;
|
||||||
RESET_ARGS_GNSS.waitPeriodMs = 100;
|
RESET_ARGS_GNSS.waitPeriodMs = 100;
|
||||||
auto gpsCtrl =
|
auto gpsCtrl =
|
||||||
new GPSHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
|
new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
|
||||||
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
|
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
|
||||||
|
|
||||||
AcsBoardHelper acsBoardHelper = AcsBoardHelper(
|
ObjectFactory::createAcsBoardAssy(pwrSwitcher, assemblyChildren, gpsCtrl, gpioComIF);
|
||||||
objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER,
|
|
||||||
objects::MGM_3_RM3100_HANDLER, objects::GYRO_0_ADIS_HANDLER, objects::GYRO_1_L3G_HANDLER,
|
|
||||||
objects::GYRO_2_ADIS_HANDLER, objects::GYRO_3_L3G_HANDLER, objects::GPS_CONTROLLER);
|
|
||||||
auto acsAss = new AcsBoardAssembly(objects::ACS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher,
|
|
||||||
acsBoardHelper, gpioComIF);
|
|
||||||
static_cast<void>(acsAss);
|
|
||||||
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
|
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher,
|
void ObjectFactory::createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher,
|
||||||
HealthTableIF* healthTable) {
|
HealthTableIF* healthTable,
|
||||||
|
HeaterHandler*& heaterHandler) {
|
||||||
using namespace gpio;
|
using namespace gpio;
|
||||||
GpioCookie* heaterGpiosCookie = new GpioCookie;
|
GpioCookie* heaterGpiosCookie = new GpioCookie;
|
||||||
GpiodRegularByLineName* gpio = nullptr;
|
GpiodRegularByLineName* gpio = nullptr;
|
||||||
@ -524,22 +550,11 @@ void ObjectFactory::createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwi
|
|||||||
|
|
||||||
gpioIF->addGpios(heaterGpiosCookie);
|
gpioIF->addGpios(heaterGpiosCookie);
|
||||||
|
|
||||||
HeaterHelper helper({{
|
ObjectFactory::createGenericHeaterComponents(*gpioIF, *pwrSwitcher, heaterHandler);
|
||||||
{new HealthDevice(objects::HEATER_0_PLOC_PROC_BRD, MessageQueueIF::NO_QUEUE),
|
|
||||||
gpioIds::HEATER_0},
|
|
||||||
{new HealthDevice(objects::HEATER_1_PCDU_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_1},
|
|
||||||
{new HealthDevice(objects::HEATER_2_ACS_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_2},
|
|
||||||
{new HealthDevice(objects::HEATER_3_OBC_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_3},
|
|
||||||
{new HealthDevice(objects::HEATER_4_CAMERA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_4},
|
|
||||||
{new HealthDevice(objects::HEATER_5_STR, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_5},
|
|
||||||
{new HealthDevice(objects::HEATER_6_DRO, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_6},
|
|
||||||
{new HealthDevice(objects::HEATER_7_HPA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_7},
|
|
||||||
}});
|
|
||||||
new HeaterHandler(objects::HEATER_HANDLER, gpioIF, helper, pwrSwitcher,
|
|
||||||
pcdu::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createSolarArrayDeploymentComponents() {
|
void ObjectFactory::createSolarArrayDeploymentComponents(PowerSwitchIF& pwrSwitcher,
|
||||||
|
GpioIF& gpioIF) {
|
||||||
using namespace gpio;
|
using namespace gpio;
|
||||||
GpioCookie* solarArrayDeplCookie = new GpioCookie;
|
GpioCookie* solarArrayDeplCookie = new GpioCookie;
|
||||||
GpiodRegularByLineName* gpio = nullptr;
|
GpiodRegularByLineName* gpio = nullptr;
|
||||||
@ -552,33 +567,41 @@ void ObjectFactory::createSolarArrayDeploymentComponents() {
|
|||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::SA_DPL_PIN_1, consumer.str(), Direction::OUT,
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::SA_DPL_PIN_1, consumer.str(), Direction::OUT,
|
||||||
Levels::LOW);
|
Levels::LOW);
|
||||||
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA2, gpio);
|
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA2, gpio);
|
||||||
|
ReturnValue_t result = gpioIF.addGpios(solarArrayDeplCookie);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "Adding Solar Array Deployment GPIO cookie failed" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Find out burn time. For now set to 1000 ms.
|
new SolarArrayDeploymentHandler(objects::SOLAR_ARRAY_DEPL_HANDLER, gpioIF, pwrSwitcher,
|
||||||
new SolarArrayDeploymentHandler(objects::SOLAR_ARRAY_DEPL_HANDLER, objects::GPIO_IF,
|
|
||||||
solarArrayDeplCookie, objects::PCDU_HANDLER,
|
|
||||||
pcdu::Switches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
|
pcdu::Switches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
|
||||||
gpioIds::DEPLSA1, gpioIds::DEPLSA2, 1000);
|
gpioIds::DEPLSA1, gpioIds::DEPLSA2, *SdCardManager::instance());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) {
|
void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) {
|
||||||
UartCookie* syrlinksUartCookie =
|
auto* syrlinksUartCookie =
|
||||||
new UartCookie(objects::SYRLINKS_HK_HANDLER, q7s::UART_SYRLINKS_DEV, uart::SYRLINKS_BAUD,
|
new SerialCookie(objects::SYRLINKS_HANDLER, q7s::UART_SYRLINKS_DEV, uart::SYRLINKS_BAUD,
|
||||||
syrlinks::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
|
syrlinks::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
|
||||||
syrlinksUartCookie->setParityEven();
|
syrlinksUartCookie->setParityEven();
|
||||||
|
|
||||||
auto syrlinksFdir = new SyrlinksFdir(objects::SYRLINKS_HK_HANDLER);
|
auto* syrlinksAssy = new SyrlinksAssembly(objects::SYRLINKS_ASSY);
|
||||||
|
syrlinksAssy->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
||||||
|
auto syrlinksFdir = new SyrlinksFdir(objects::SYRLINKS_HANDLER);
|
||||||
auto syrlinksHandler =
|
auto syrlinksHandler =
|
||||||
new SyrlinksHkHandler(objects::SYRLINKS_HK_HANDLER, objects::UART_COM_IF, syrlinksUartCookie,
|
new SyrlinksHandler(objects::SYRLINKS_HANDLER, objects::UART_COM_IF, syrlinksUartCookie,
|
||||||
pcdu::PDU1_CH1_SYRLINKS_12V, syrlinksFdir);
|
pcdu::PDU1_CH1_SYRLINKS_12V, syrlinksFdir);
|
||||||
syrlinksHandler->setPowerSwitcher(pwrSwitcher);
|
syrlinksHandler->setPowerSwitcher(pwrSwitcher);
|
||||||
|
syrlinksHandler->connectModeTreeParent(*syrlinksAssy);
|
||||||
#if OBSW_DEBUG_SYRLINKS == 1
|
#if OBSW_DEBUG_SYRLINKS == 1
|
||||||
syrlinksHandler->setDebugMode(true);
|
syrlinksHandler->setDebugMode(true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
|
void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF& pwrSwitch) {
|
||||||
using namespace gpio;
|
using namespace gpio;
|
||||||
std::stringstream consumer;
|
std::stringstream consumer;
|
||||||
|
auto* camSwitcher =
|
||||||
|
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, pcdu::PDU2_CH8_PAYLOAD_CAMERA);
|
||||||
|
camSwitcher->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
||||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||||
consumer << "0x" << std::hex << objects::PLOC_MPSOC_HANDLER;
|
consumer << "0x" << std::hex << objects::PLOC_MPSOC_HANDLER;
|
||||||
auto gpioConfigMPSoC = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_MPSOC_UART,
|
auto gpioConfigMPSoC = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_MPSOC_UART,
|
||||||
@ -587,13 +610,14 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
|
|||||||
mpsocGpioCookie->addGpio(gpioIds::ENABLE_MPSOC_UART, gpioConfigMPSoC);
|
mpsocGpioCookie->addGpio(gpioIds::ENABLE_MPSOC_UART, gpioConfigMPSoC);
|
||||||
gpioChecker(gpioComIF->addGpios(mpsocGpioCookie), "PLOC MPSoC");
|
gpioChecker(gpioComIF->addGpios(mpsocGpioCookie), "PLOC MPSoC");
|
||||||
auto mpsocCookie =
|
auto mpsocCookie =
|
||||||
new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV, uart::PLOC_MPSOC_BAUD,
|
new SerialCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV, uart::PLOC_MPSOC_BAUD,
|
||||||
mpsoc::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
|
mpsoc::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
|
||||||
mpsocCookie->setNoFixedSizeReply();
|
mpsocCookie->setNoFixedSizeReply();
|
||||||
auto plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER);
|
auto plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER);
|
||||||
new PlocMPSoCHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocCookie,
|
auto* mpsocHandler = new PlocMPSoCHandler(
|
||||||
plocMpsocHelper, Gpio(gpioIds::ENABLE_MPSOC_UART, gpioComIF),
|
objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocCookie, plocMpsocHelper,
|
||||||
objects::PLOC_SUPERVISOR_HANDLER);
|
Gpio(gpioIds::ENABLE_MPSOC_UART, gpioComIF), objects::PLOC_SUPERVISOR_HANDLER);
|
||||||
|
mpsocHandler->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
||||||
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
|
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
|
||||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
consumer << "0x" << std::hex << objects::PLOC_SUPERVISOR_HANDLER;
|
consumer << "0x" << std::hex << objects::PLOC_SUPERVISOR_HANDLER;
|
||||||
@ -603,13 +627,14 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
|
|||||||
supvGpioCookie->addGpio(gpioIds::ENABLE_SUPV_UART, gpioConfigSupv);
|
supvGpioCookie->addGpio(gpioIds::ENABLE_SUPV_UART, gpioConfigSupv);
|
||||||
gpioComIF->addGpios(supvGpioCookie);
|
gpioComIF->addGpios(supvGpioCookie);
|
||||||
auto supervisorCookie =
|
auto supervisorCookie =
|
||||||
new UartCookie(objects::PLOC_SUPERVISOR_HANDLER, q7s::UART_PLOC_SUPERVSIOR_DEV,
|
new SerialCookie(objects::PLOC_SUPERVISOR_HANDLER, q7s::UART_PLOC_SUPERVSIOR_DEV,
|
||||||
uart::PLOC_SUPV_BAUD, supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
|
uart::PLOC_SUPV_BAUD, supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
|
||||||
supervisorCookie->setNoFixedSizeReply();
|
supervisorCookie->setNoFixedSizeReply();
|
||||||
auto supvHelper = new PlocSupvHelper(objects::PLOC_SUPERVISOR_HELPER);
|
auto supvHelper = new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER);
|
||||||
new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF,
|
auto* supvHandler = new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie,
|
||||||
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
|
Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
|
||||||
pcdu::PDU1_CH6_PLOC_12V, supvHelper);
|
pcdu::PDU1_CH6_PLOC_12V, *supvHelper);
|
||||||
|
supvHandler->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
||||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||||
static_cast<void>(consumer);
|
static_cast<void>(consumer);
|
||||||
}
|
}
|
||||||
@ -669,30 +694,28 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF,
|
|||||||
std::array<object_id_t, 4> rwIds = {objects::RW1, objects::RW2, objects::RW3, objects::RW4};
|
std::array<object_id_t, 4> rwIds = {objects::RW1, objects::RW2, objects::RW3, objects::RW4};
|
||||||
std::array<gpioId_t, 4> rwGpioIds = {gpioIds::EN_RW1, gpioIds::EN_RW2, gpioIds::EN_RW3,
|
std::array<gpioId_t, 4> rwGpioIds = {gpioIds::EN_RW1, gpioIds::EN_RW2, gpioIds::EN_RW3,
|
||||||
gpioIds::EN_RW4};
|
gpioIds::EN_RW4};
|
||||||
std::array<RwHandler*, 4> rws = {};
|
std::array<DeviceHandlerBase*, 4> rws = {};
|
||||||
|
new RwPollingTask(objects::RW_POLLING_TASK, q7s::SPI_RW_DEV, *gpioComIF);
|
||||||
for (uint8_t idx = 0; idx < rwCookies.size(); idx++) {
|
for (uint8_t idx = 0; idx < rwCookies.size(); idx++) {
|
||||||
rwCookies[idx] = new SpiCookie(rwCookieParams[idx].first, rwCookieParams[idx].second,
|
rwCookies[idx] = new RwCookie(idx, rwCookieParams[idx].first, rwCookieParams[idx].second,
|
||||||
RwDefinitions::MAX_REPLY_SIZE, spi::RW_MODE, spi::RW_SPEED,
|
rws::MAX_REPLY_SIZE, spi::RW_MODE, spi::RW_SPEED);
|
||||||
&rwSpiCallback::spiCallback, nullptr);
|
auto* rwHandler = new RwHandler(rwIds[idx], objects::RW_POLLING_TASK, rwCookies[idx], gpioComIF,
|
||||||
rws[idx] = new RwHandler(rwIds[idx], objects::SPI_RW_COM_IF, rwCookies[idx], gpioComIF,
|
rwGpioIds[idx], idx);
|
||||||
rwGpioIds[idx]);
|
|
||||||
rwCookies[idx]->setCallbackArgs(rws[idx]);
|
|
||||||
#if OBSW_TEST_RW == 1
|
#if OBSW_TEST_RW == 1
|
||||||
rws[idx]->setStartUpImmediately();
|
rws[idx]->setStartUpImmediately();
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_DEBUG_RW == 1
|
#if OBSW_DEBUG_RW == 1
|
||||||
rws[idx]->setDebugMode(true);
|
rwHandler->setDebugMode(true);
|
||||||
#endif
|
#endif
|
||||||
|
rws[idx] = rwHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
RwHelper rwHelper(rwIds);
|
createRwAssy(*pwrSwitcher, pcdu::Switches::PDU2_CH2_RW_5V, rws, rwIds);
|
||||||
auto* rwAss = new RwAssembly(objects::RW_ASS, objects::NO_OBJECT, pwrSwitcher,
|
|
||||||
pcdu::Switches::PDU2_CH2_RW_5V, rwHelper);
|
|
||||||
static_cast<void>(rwAss);
|
|
||||||
#endif /* OBSW_ADD_RW == 1 */
|
#endif /* OBSW_ADD_RW == 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
|
ReturnValue_t ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF,
|
||||||
|
CcsdsIpCoreHandler** ipCoreHandler) {
|
||||||
using namespace gpio;
|
using namespace gpio;
|
||||||
// GPIO definitions of signals connected to the virtual channel interfaces of the PTME IP Core
|
// GPIO definitions of signals connected to the virtual channel interfaces of the PTME IP Core
|
||||||
GpioCookie* gpioCookiePtmeIp = new GpioCookie;
|
GpioCookie* gpioCookiePtmeIp = new GpioCookie;
|
||||||
@ -749,24 +772,27 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
|
|||||||
AxiPtmeConfig* axiPtmeConfig =
|
AxiPtmeConfig* axiPtmeConfig =
|
||||||
new AxiPtmeConfig(objects::AXI_PTME_CONFIG, q7s::UIO_PTME, q7s::uiomapids::PTME_CONFIG);
|
new AxiPtmeConfig(objects::AXI_PTME_CONFIG, q7s::UIO_PTME, q7s::uiomapids::PTME_CONFIG);
|
||||||
PtmeConfig* ptmeConfig = new PtmeConfig(objects::PTME_CONFIG, axiPtmeConfig);
|
PtmeConfig* ptmeConfig = new PtmeConfig(objects::PTME_CONFIG, axiPtmeConfig);
|
||||||
#if OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT == 1
|
|
||||||
// Set to high value when not sending via syrlinks
|
*ipCoreHandler = new CcsdsIpCoreHandler(objects::CCSDS_HANDLER, objects::PTME,
|
||||||
static const uint32_t TRANSMITTER_TIMEOUT = 86400000; // 1 day
|
objects::CCSDS_PACKET_DISTRIBUTOR, ptmeConfig, gpioComIF,
|
||||||
#else
|
gpioIds::RS485_EN_TX_CLOCK, gpioIds::RS485_EN_TX_DATA);
|
||||||
static const uint32_t TRANSMITTER_TIMEOUT = 900000; // 15 minutes
|
|
||||||
#endif
|
|
||||||
CCSDSHandler* ccsdsHandler = new CCSDSHandler(
|
|
||||||
objects::CCSDS_HANDLER, objects::PTME, objects::CCSDS_PACKET_DISTRIBUTOR, ptmeConfig,
|
|
||||||
gpioComIF, gpioIds::RS485_EN_TX_CLOCK, gpioIds::RS485_EN_TX_DATA, TRANSMITTER_TIMEOUT);
|
|
||||||
VirtualChannel* vc = nullptr;
|
VirtualChannel* vc = nullptr;
|
||||||
vc = new VirtualChannel(ccsds::VC0, common::VC0_QUEUE_SIZE, objects::CCSDS_HANDLER);
|
vc = new VirtualChannel(ccsds::VC0, config::VC0_QUEUE_SIZE, objects::CCSDS_HANDLER);
|
||||||
ccsdsHandler->addVirtualChannel(ccsds::VC0, vc);
|
(*ipCoreHandler)->addVirtualChannel(ccsds::VC0, vc);
|
||||||
vc = new VirtualChannel(ccsds::VC1, common::VC1_QUEUE_SIZE, objects::CCSDS_HANDLER);
|
vc = new VirtualChannel(ccsds::VC1, config::VC1_QUEUE_SIZE, objects::CCSDS_HANDLER);
|
||||||
ccsdsHandler->addVirtualChannel(ccsds::VC1, vc);
|
(*ipCoreHandler)->addVirtualChannel(ccsds::VC1, vc);
|
||||||
vc = new VirtualChannel(ccsds::VC2, common::VC2_QUEUE_SIZE, objects::CCSDS_HANDLER);
|
vc = new VirtualChannel(ccsds::VC2, config::VC2_QUEUE_SIZE, objects::CCSDS_HANDLER);
|
||||||
ccsdsHandler->addVirtualChannel(ccsds::VC2, vc);
|
(*ipCoreHandler)->addVirtualChannel(ccsds::VC2, vc);
|
||||||
vc = new VirtualChannel(ccsds::VC3, common::VC3_QUEUE_SIZE, objects::CCSDS_HANDLER);
|
vc = new VirtualChannel(ccsds::VC3, config::VC3_QUEUE_SIZE, objects::CCSDS_HANDLER);
|
||||||
ccsdsHandler->addVirtualChannel(ccsds::VC3, vc);
|
(*ipCoreHandler)->addVirtualChannel(ccsds::VC3, vc);
|
||||||
|
|
||||||
|
ReturnValue_t result = (*ipCoreHandler)->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error
|
||||||
|
<< "ObjectFactory::createCcsdsComponents: Connecting COM subsystem to CCSDS handler failed"
|
||||||
|
<< std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
GpioCookie* gpioCookiePdec = new GpioCookie;
|
GpioCookie* gpioCookiePdec = new GpioCookie;
|
||||||
consumer.str("");
|
consumer.str("");
|
||||||
consumer << "0x" << std::hex << objects::PDEC_HANDLER;
|
consumer << "0x" << std::hex << objects::PDEC_HANDLER;
|
||||||
@ -775,8 +801,13 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
|
|||||||
Levels::LOW);
|
Levels::LOW);
|
||||||
gpioCookiePdec->addGpio(gpioIds::PDEC_RESET, gpio);
|
gpioCookiePdec->addGpio(gpioIds::PDEC_RESET, gpio);
|
||||||
gpioChecker(gpioComIF->addGpios(gpioCookiePdec), "PDEC");
|
gpioChecker(gpioComIF->addGpios(gpioCookiePdec), "PDEC");
|
||||||
|
struct UioNames uioNames {};
|
||||||
|
uioNames.configMemory = q7s::UIO_PDEC_CONFIG_MEMORY;
|
||||||
|
uioNames.ramMemory = q7s::UIO_PDEC_RAM;
|
||||||
|
uioNames.registers = q7s::UIO_PDEC_REGISTERS;
|
||||||
|
uioNames.irq = q7s::UIO_PDEC_IRQ;
|
||||||
new PdecHandler(objects::PDEC_HANDLER, objects::CCSDS_HANDLER, gpioComIF, gpioIds::PDEC_RESET,
|
new PdecHandler(objects::PDEC_HANDLER, objects::CCSDS_HANDLER, gpioComIF, gpioIds::PDEC_RESET,
|
||||||
q7s::UIO_PDEC_CONFIG_MEMORY, q7s::UIO_PDEC_RAM, q7s::UIO_PDEC_REGISTERS);
|
uioNames);
|
||||||
GpioCookie* gpioRS485Chip = new GpioCookie;
|
GpioCookie* gpioRS485Chip = new GpioCookie;
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_CLOCK, "RS485 Transceiver",
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_CLOCK, "RS485 Transceiver",
|
||||||
Direction::OUT, Levels::LOW);
|
Direction::OUT, Levels::LOW);
|
||||||
@ -792,10 +823,12 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
|
|||||||
Direction::OUT, Levels::LOW);
|
Direction::OUT, Levels::LOW);
|
||||||
gpioRS485Chip->addGpio(gpioIds::RS485_EN_RX_DATA, gpio);
|
gpioRS485Chip->addGpio(gpioIds::RS485_EN_RX_DATA, gpio);
|
||||||
gpioChecker(gpioComIF->addGpios(gpioRS485Chip), "RS485 Transceiver");
|
gpioChecker(gpioComIF->addGpios(gpioRS485Chip), "RS485 Transceiver");
|
||||||
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||||
PowerSwitchIF* pwrSwitcher) {
|
PowerSwitchIF* pwrSwitcher,
|
||||||
|
Stack5VHandler& stackHandler) {
|
||||||
using namespace gpio;
|
using namespace gpio;
|
||||||
// Create all GPIO components first
|
// Create all GPIO components first
|
||||||
GpioCookie* plPcduGpios = new GpioCookie;
|
GpioCookie* plPcduGpios = new GpioCookie;
|
||||||
@ -841,10 +874,9 @@ void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF*
|
|||||||
new SpiCookie(addresses::PLPCDU_ADC, gpioIds::PLPCDU_ADC_CS, plpcdu::MAX_ADC_REPLY_SIZE,
|
new SpiCookie(addresses::PLPCDU_ADC, gpioIds::PLPCDU_ADC_CS, plpcdu::MAX_ADC_REPLY_SIZE,
|
||||||
spi::DEFAULT_MAX_1227_MODE, spi::PL_PCDU_MAX_1227_SPEED);
|
spi::DEFAULT_MAX_1227_MODE, spi::PL_PCDU_MAX_1227_SPEED);
|
||||||
// Create device handler components
|
// Create device handler components
|
||||||
auto plPcduHandler = new PayloadPcduHandler(
|
auto plPcduHandler =
|
||||||
objects::PLPCDU_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, gpioComIF,
|
new PayloadPcduHandler(objects::PLPCDU_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
|
||||||
SdCardManager::instance(), pwrSwitcher, pcdu::Switches::PDU2_CH1_PL_PCDU_BATT_0_14V8,
|
gpioComIF, SdCardManager::instance(), stackHandler, false);
|
||||||
pcdu::Switches::PDU2_CH6_PL_PCDU_BATT_1_14V8, false);
|
|
||||||
spiCookie->setCallbackMode(PayloadPcduHandler::extConvAsTwoCallback, plPcduHandler);
|
spiCookie->setCallbackMode(PayloadPcduHandler::extConvAsTwoCallback, plPcduHandler);
|
||||||
// plPcduHandler->enablePeriodicPrintout(true, 5);
|
// plPcduHandler->enablePeriodicPrintout(true, 5);
|
||||||
// static_cast<void>(plPcduHandler);
|
// static_cast<void>(plPcduHandler);
|
||||||
@ -855,6 +887,7 @@ void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF*
|
|||||||
plPcduHandler->setToGoToNormalModeImmediately(true);
|
plPcduHandler->setToGoToNormalModeImmediately(true);
|
||||||
plPcduHandler->enablePeriodicPrintout(true, 10);
|
plPcduHandler->enablePeriodicPrintout(true, 10);
|
||||||
#endif
|
#endif
|
||||||
|
plPcduHandler->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
|
void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
|
||||||
@ -863,7 +896,7 @@ void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
|
|||||||
new SpiTestClass(objects::SPI_TEST, gpioComIF);
|
new SpiTestClass(objects::SPI_TEST, gpioComIF);
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_I2C_TEST_CODE == 1
|
#if OBSW_ADD_I2C_TEST_CODE == 1
|
||||||
new I2cTestClass(objects::I2C_TEST, q7s::I2C_DEFAULT_DEV);
|
new I2cTestClass(objects::I2C_TEST, q7s::I2C_PL_EIVE);
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_UART_TEST_CODE == 1
|
#if OBSW_ADD_UART_TEST_CODE == 1
|
||||||
// auto* reader= new ScexUartReader(objects::SCEX_UART_READER);
|
// auto* reader= new ScexUartReader(objects::SCEX_UART_READER);
|
||||||
@ -872,23 +905,47 @@ void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
|
void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
|
||||||
UartCookie* starTrackerCookie =
|
auto* strAssy = new StrAssembly(objects::STR_ASSY);
|
||||||
new UartCookie(objects::STAR_TRACKER, q7s::UART_STAR_TRACKER_DEV, uart::STAR_TRACKER_BAUD,
|
strAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
||||||
startracker::MAX_FRAME_SIZE * 2 + 2, UartModes::NON_CANONICAL);
|
auto* starTrackerCookie =
|
||||||
|
new SerialCookie(objects::STAR_TRACKER, q7s::UART_STAR_TRACKER_DEV, uart::STAR_TRACKER_BAUD,
|
||||||
|
startracker::MAX_FRAME_SIZE * 2 + 2, UartModes::NON_CANONICAL);
|
||||||
starTrackerCookie->setNoFixedSizeReply();
|
starTrackerCookie->setNoFixedSizeReply();
|
||||||
StrHelper* strHelper = new StrHelper(objects::STR_HELPER);
|
StrHelper* strHelper = new StrHelper(objects::STR_HELPER);
|
||||||
|
|
||||||
|
const char* paramJsonFile = nullptr;
|
||||||
|
#ifdef EGSE
|
||||||
|
paramJsonFile = "/home/pi/arcsec/json/flight-config.json";
|
||||||
|
#else
|
||||||
|
#if OBSW_STAR_TRACKER_GROUND_CONFIG == 1
|
||||||
|
paramJsonFile = "/mnt/sd0/startracker/ground-config.json";
|
||||||
|
#else
|
||||||
|
paramJsonFile = "/mnt/sd0/startracker/flight-config.json";
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
if (paramJsonFile == nullptr) {
|
||||||
|
sif::error << "No valid Star Tracker parameter JSON file" << std::endl;
|
||||||
|
}
|
||||||
|
auto strFdir = new StrFdir(objects::STAR_TRACKER);
|
||||||
auto starTracker =
|
auto starTracker =
|
||||||
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie,
|
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie,
|
||||||
strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V);
|
paramJsonFile, strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V);
|
||||||
starTracker->setPowerSwitcher(pwrSwitcher);
|
starTracker->setPowerSwitcher(pwrSwitcher);
|
||||||
|
starTracker->connectModeTreeParent(*strAssy);
|
||||||
|
starTracker->setCustomFdir(strFdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
|
void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
|
||||||
I2cCookie* imtqI2cCookie =
|
auto* imtqAssy = new ImtqAssembly(objects::IMTQ_ASSY);
|
||||||
new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, q7s::I2C_DEFAULT_DEV);
|
imtqAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
||||||
auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie,
|
|
||||||
|
new ImtqPollingTask(objects::IMTQ_POLLING);
|
||||||
|
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);
|
pcdu::Switches::PDU1_CH3_MGT_5V);
|
||||||
|
imtqHandler->enableThermalModule(ThermalStateCfg());
|
||||||
imtqHandler->setPowerSwitcher(pwrSwitcher);
|
imtqHandler->setPowerSwitcher(pwrSwitcher);
|
||||||
|
imtqHandler->connectModeTreeParent(*imtqAssy);
|
||||||
static_cast<void>(imtqHandler);
|
static_cast<void>(imtqHandler);
|
||||||
#if OBSW_TEST_IMTQ == 1
|
#if OBSW_TEST_IMTQ == 1
|
||||||
imtqHandler->setStartUpImmediately();
|
imtqHandler->setStartUpImmediately();
|
||||||
@ -900,7 +957,7 @@ void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createBpxBatteryComponent() {
|
void ObjectFactory::createBpxBatteryComponent() {
|
||||||
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
|
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_PL_EIVE);
|
||||||
BpxBatteryHandler* bpxHandler =
|
BpxBatteryHandler* bpxHandler =
|
||||||
new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie);
|
new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie);
|
||||||
bpxHandler->setStartUpImmediately();
|
bpxHandler->setStartUpImmediately();
|
||||||
|
@ -2,11 +2,17 @@
|
|||||||
#define BSP_Q7S_OBJECTFACTORY_H_
|
#define BSP_Q7S_OBJECTFACTORY_H_
|
||||||
|
|
||||||
#include <fsfw/returnvalues/returnvalue.h>
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
|
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
||||||
|
#include <mission/devices/HeaterHandler.h>
|
||||||
|
#include <mission/system/objects/Stack5VHandler.h>
|
||||||
|
#include <mission/tmtc/CcsdsIpCoreHandler.h>
|
||||||
|
#include <mission/tmtc/CfdpTmFunnel.h>
|
||||||
|
#include <mission/tmtc/PusTmFunnel.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class LinuxLibgpioIF;
|
class LinuxLibgpioIF;
|
||||||
class UartComIF;
|
class SerialComIF;
|
||||||
class SpiComIF;
|
class SpiComIF;
|
||||||
class I2cComIF;
|
class I2cComIF;
|
||||||
class PowerSwitchIF;
|
class PowerSwitchIF;
|
||||||
@ -19,25 +25,25 @@ namespace ObjectFactory {
|
|||||||
void setStatics();
|
void setStatics();
|
||||||
void produce(void* args);
|
void produce(void* args);
|
||||||
|
|
||||||
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
|
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, SerialComIF** uartComIF,
|
||||||
SpiComIF** spiMainComIF, I2cComIF** i2cComIF,
|
SpiComIF** spiMainComIF, I2cComIF** i2cComIF);
|
||||||
SpiComIF** spiRwComIF);
|
|
||||||
void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher);
|
void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher);
|
||||||
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||||
PowerSwitchIF* pwrSwitcher);
|
PowerSwitchIF* pwrSwitcher, Stack5VHandler& stackHandler);
|
||||||
void createTmpComponents();
|
void createTmpComponents();
|
||||||
void createRadSensorComponent(LinuxLibgpioIF* gpioComIF);
|
ReturnValue_t createRadSensorComponent(LinuxLibgpioIF* gpioComIF, Stack5VHandler& handler);
|
||||||
void createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF,
|
void createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF, SerialComIF* uartComIF,
|
||||||
PowerSwitchIF* pwrSwitcher);
|
PowerSwitchIF& pwrSwitcher);
|
||||||
void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable);
|
void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable,
|
||||||
|
HeaterHandler*& heaterHandler);
|
||||||
void createImtqComponents(PowerSwitchIF* pwrSwitcher);
|
void createImtqComponents(PowerSwitchIF* pwrSwitcher);
|
||||||
void createBpxBatteryComponent();
|
void createBpxBatteryComponent();
|
||||||
void createStrComponents(PowerSwitchIF* pwrSwitcher);
|
void createStrComponents(PowerSwitchIF* pwrSwitcher);
|
||||||
void createSolarArrayDeploymentComponents();
|
void createSolarArrayDeploymentComponents(PowerSwitchIF& pwrSwitcher, GpioIF& gpioIF);
|
||||||
void createSyrlinksComponents(PowerSwitchIF* pwrSwitcher);
|
void createSyrlinksComponents(PowerSwitchIF* pwrSwitcher);
|
||||||
void createPayloadComponents(LinuxLibgpioIF* gpioComIF);
|
void createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF& pwrSwitcher);
|
||||||
void createReactionWheelComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF* pwrSwitcher);
|
void createReactionWheelComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF* pwrSwitcher);
|
||||||
void createCcsdsComponents(LinuxLibgpioIF* gpioComIF);
|
ReturnValue_t createCcsdsComponents(LinuxLibgpioIF* gpioComIF, CcsdsIpCoreHandler** ipCoreHandler);
|
||||||
void createMiscComponents();
|
void createMiscComponents();
|
||||||
|
|
||||||
void createTestComponents(LinuxLibgpioIF* gpioComIF);
|
void createTestComponents(LinuxLibgpioIF* gpioComIF);
|
||||||
|
87
bsp_q7s/core/WatchdogHandler.cpp
Normal file
87
bsp_q7s/core/WatchdogHandler.cpp
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
#include "WatchdogHandler.h"
|
||||||
|
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <cerrno>
|
||||||
|
#include <cstring>
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
|
#include "fsfw/serviceinterface.h"
|
||||||
|
#include "watchdog/definitions.h"
|
||||||
|
|
||||||
|
WatchdogHandler::WatchdogHandler() {}
|
||||||
|
|
||||||
|
void WatchdogHandler::periodicOperation() {
|
||||||
|
if (watchdogFifoFd != 0) {
|
||||||
|
if (watchdogFifoFd == RETRY_FIFO_OPEN) {
|
||||||
|
// Open FIFO write only and non-blocking
|
||||||
|
watchdogFifoFd = open(watchdog::FIFO_NAME.c_str(), O_WRONLY | O_NONBLOCK);
|
||||||
|
if (watchdogFifoFd < 0) {
|
||||||
|
if (errno == ENXIO) {
|
||||||
|
watchdogFifoFd = RETRY_FIFO_OPEN;
|
||||||
|
// No printout for now, would be spam
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
sif::error << "Opening pipe " << watchdog::FIFO_NAME << " write-only failed with "
|
||||||
|
<< errno << ": " << strerror(errno) << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sif::info << "Opened " << watchdog::FIFO_NAME << " successfully" << std::endl;
|
||||||
|
performStartHandling();
|
||||||
|
} else if (watchdogFifoFd > 0) {
|
||||||
|
// Write to OBSW watchdog FIFO here
|
||||||
|
const char writeChar = watchdog::first::IDLE_CHAR;
|
||||||
|
ssize_t writtenBytes = write(watchdogFifoFd, &writeChar, 1);
|
||||||
|
if (writtenBytes < 0) {
|
||||||
|
sif::error << "Errors writing to watchdog FIFO, code " << errno << ": " << strerror(errno)
|
||||||
|
<< std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t WatchdogHandler::initialize(bool enableWatchdogFunction) {
|
||||||
|
using namespace std::filesystem;
|
||||||
|
this->enableWatchFunction = enableWatchdogFunction;
|
||||||
|
std::error_code e;
|
||||||
|
if (not std::filesystem::exists(watchdog::FIFO_NAME, e)) {
|
||||||
|
// Still return returnvalue::OK for now
|
||||||
|
sif::info << "Watchdog FIFO " << watchdog::FIFO_NAME << " does not exist, can't initiate"
|
||||||
|
<< " watchdog" << std::endl;
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
// Open FIFO write only and non-blocking to prevent SW from killing itself.
|
||||||
|
watchdogFifoFd = open(watchdog::FIFO_NAME.c_str(), O_WRONLY | O_NONBLOCK);
|
||||||
|
if (watchdogFifoFd < 0) {
|
||||||
|
if (errno == ENXIO) {
|
||||||
|
watchdogFifoFd = RETRY_FIFO_OPEN;
|
||||||
|
sif::info << "eive-watchdog not running. FIFO can not be opened" << std::endl;
|
||||||
|
} else {
|
||||||
|
sif::error << "Opening pipe " << watchdog::FIFO_NAME << " write-only failed with " << errno
|
||||||
|
<< ": " << strerror(errno) << std::endl;
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return performStartHandling();
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t WatchdogHandler::performStartHandling() {
|
||||||
|
char startBuf[2];
|
||||||
|
ssize_t writeLen = 1;
|
||||||
|
startBuf[0] = watchdog::first::START_CHAR;
|
||||||
|
if (enableWatchFunction) {
|
||||||
|
writeLen += 1;
|
||||||
|
startBuf[1] = watchdog::second::WATCH_FLAG;
|
||||||
|
}
|
||||||
|
ssize_t writtenBytes = write(watchdogFifoFd, &startBuf, writeLen);
|
||||||
|
if (writtenBytes < 0) {
|
||||||
|
sif::error << "WatchdogHandler: Errors writing to watchdog FIFO, code " << errno << ": "
|
||||||
|
<< strerror(errno) << std::endl;
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
} else if (writtenBytes != writeLen) {
|
||||||
|
sif::warning << "WatchdogHandler: Not all bytes were written, possible error" << std::endl;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
23
bsp_q7s/core/WatchdogHandler.h
Normal file
23
bsp_q7s/core/WatchdogHandler.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#ifndef BSP_Q7S_CORE_WATCHDOGHANDLER_H_
|
||||||
|
#define BSP_Q7S_CORE_WATCHDOGHANDLER_H_
|
||||||
|
|
||||||
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
|
|
||||||
|
class WatchdogHandler {
|
||||||
|
public:
|
||||||
|
WatchdogHandler();
|
||||||
|
|
||||||
|
ReturnValue_t initialize(bool enableWatchFunction);
|
||||||
|
void periodicOperation();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Designated value for rechecking FIFO open
|
||||||
|
static constexpr int RETRY_FIFO_OPEN = -2;
|
||||||
|
|
||||||
|
int watchdogFifoFd = 0;
|
||||||
|
bool enableWatchFunction = false;
|
||||||
|
|
||||||
|
ReturnValue_t performStartHandling();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* BSP_Q7S_CORE_WATCHDOGHANDLER_H_ */
|
612
bsp_q7s/core/scheduling.cpp
Normal file
612
bsp_q7s/core/scheduling.cpp
Normal file
@ -0,0 +1,612 @@
|
|||||||
|
#include "scheduling.h"
|
||||||
|
|
||||||
|
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
||||||
|
#include <fsfw/subsystem/Subsystem.h>
|
||||||
|
#include <linux/scheduling.h>
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include "OBSWConfig.h"
|
||||||
|
#include "bsp_q7s/core/ObjectFactory.h"
|
||||||
|
#include "fsfw/objectmanager/ObjectManager.h"
|
||||||
|
#include "fsfw/objectmanager/ObjectManagerIF.h"
|
||||||
|
#include "fsfw/platform.h"
|
||||||
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
|
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
|
||||||
|
#include "fsfw/tasks/FixedTimeslotTaskIF.h"
|
||||||
|
#include "fsfw/tasks/PeriodicTaskIF.h"
|
||||||
|
#include "fsfw/tasks/TaskFactory.h"
|
||||||
|
#include "mission/core/pollingSeqTables.h"
|
||||||
|
#include "mission/core/scheduling.h"
|
||||||
|
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
|
||||||
|
#include "mission/utility/InitMission.h"
|
||||||
|
|
||||||
|
/* This is configured for linux without CR */
|
||||||
|
#ifdef PLATFORM_UNIX
|
||||||
|
ServiceInterfaceStream sif::debug("DEBUG");
|
||||||
|
ServiceInterfaceStream sif::info("INFO");
|
||||||
|
ServiceInterfaceStream sif::warning("WARNING");
|
||||||
|
ServiceInterfaceStream sif::error("ERROR");
|
||||||
|
#else
|
||||||
|
ServiceInterfaceStream sif::debug("DEBUG", true);
|
||||||
|
ServiceInterfaceStream sif::info("INFO", true);
|
||||||
|
ServiceInterfaceStream sif::warning("WARNING", true);
|
||||||
|
ServiceInterfaceStream sif::error("ERROR", true, false, true);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ObjectManagerIF* objectManager = nullptr;
|
||||||
|
|
||||||
|
void scheduling::initMission() {
|
||||||
|
sif::info << "Building global objects.." << std::endl;
|
||||||
|
try {
|
||||||
|
/* Instantiate global object manager and also create all objects */
|
||||||
|
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
|
||||||
|
} catch (const std::invalid_argument& e) {
|
||||||
|
sif::error << "scheduling::initMission: Object Construction failed with an "
|
||||||
|
"invalid argument: "
|
||||||
|
<< e.what();
|
||||||
|
std::exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
sif::info << "Initializing all objects.." << std::endl;
|
||||||
|
ObjectManager::instance()->initialize();
|
||||||
|
|
||||||
|
/* This function creates and starts all tasks */
|
||||||
|
initTasks();
|
||||||
|
}
|
||||||
|
|
||||||
|
void scheduling::initTasks() {
|
||||||
|
TaskFactory* factory = TaskFactory::instance();
|
||||||
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
if (factory == nullptr) {
|
||||||
|
/* Should never happen ! */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#if OBSW_PRINT_MISSED_DEADLINES == 1
|
||||||
|
void (*missedDeadlineFunc)(void) = TaskFactory::printMissedDeadline;
|
||||||
|
#else
|
||||||
|
void (*missedDeadlineFunc)(void) = nullptr;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_SA_DEPL == 1
|
||||||
|
// Could add this to the core controller but the core controller does so many thing that I would
|
||||||
|
// prefer to have the solar array deployment in a seprate task.
|
||||||
|
PeriodicTaskIF* solarArrayDeplTask = factory->createPeriodicTask(
|
||||||
|
"SOLAR_ARRAY_DEPL", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||||
|
result = solarArrayDeplTask->addComponent(objects::SOLAR_ARRAY_DEPL_HANDLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("SOLAR_ARRAY_DEPL", objects::SOLAR_ARRAY_DEPL_HANDLER);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
PeriodicTaskIF* coreCtrlTask = factory->createPeriodicTask(
|
||||||
|
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||||
|
result = coreCtrlTask->addComponent(objects::CORE_CONTROLLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TMTC Distribution */
|
||||||
|
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
|
||||||
|
"DIST", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
|
#if OBSW_ADD_TCPIP_SERVERS == 1
|
||||||
|
#if OBSW_ADD_TMTC_UDP_SERVER == 1
|
||||||
|
result = tmTcDistributor->addComponent(objects::UDP_TMTC_SERVER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("UDP_TMTC_SERVER", objects::UDP_TMTC_SERVER);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_TMTC_TCP_SERVER == 1
|
||||||
|
result = tmTcDistributor->addComponent(objects::TCP_TMTC_SERVER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("TCP_TMTC_SERVER", objects::TCP_TMTC_SERVER);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("CCSDS_DISTRIB", objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
|
}
|
||||||
|
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_PACKET_DISTRIB", objects::PUS_PACKET_DISTRIBUTOR);
|
||||||
|
}
|
||||||
|
result = tmTcDistributor->addComponent(objects::CFDP_DISTRIBUTOR);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("CFDP_DISTRIBUTOR", objects::CFDP_DISTRIBUTOR);
|
||||||
|
}
|
||||||
|
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("TM_FUNNEL", objects::TM_FUNNEL);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if OBSW_ADD_TCPIP_SERVERS == 1
|
||||||
|
#if OBSW_ADD_TMTC_UDP_SERVER == 1
|
||||||
|
PeriodicTaskIF* udpPollingTask = factory->createPeriodicTask(
|
||||||
|
"UDP_TMTC_POLLING", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
|
result = udpPollingTask->addComponent(objects::UDP_TMTC_POLLING_TASK);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("UDP_POLLING", objects::UDP_TMTC_POLLING_TASK);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_TMTC_TCP_SERVER == 1
|
||||||
|
PeriodicTaskIF* tcpPollingTask = factory->createPeriodicTask(
|
||||||
|
"TCP_TMTC_POLLING", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
|
result = tcpPollingTask->addComponent(objects::TCP_TMTC_POLLING_TASK);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("UDP_POLLING", objects::TCP_TMTC_POLLING_TASK);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
PeriodicTaskIF* genericSysTask = factory->createPeriodicTask(
|
||||||
|
"SYSTEM_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc);
|
||||||
|
result = genericSysTask->addComponent(objects::EIVE_SYSTEM);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("EIVE_SYSTEM", objects::EIVE_SYSTEM);
|
||||||
|
}
|
||||||
|
result = genericSysTask->addComponent(objects::COM_SUBSYSTEM);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("COM_SUBSYSTEM", objects::COM_SUBSYSTEM);
|
||||||
|
}
|
||||||
|
result = genericSysTask->addComponent(objects::SYRLINKS_ASSY);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("SYRLINKS_ASSY", objects::SYRLINKS_ASSY);
|
||||||
|
}
|
||||||
|
result = genericSysTask->addComponent(objects::PL_SUBSYSTEM);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PL_SUBSYSTEM", objects::PL_SUBSYSTEM);
|
||||||
|
}
|
||||||
|
result = genericSysTask->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("ERROR_REPORTER", objects::INTERNAL_ERROR_REPORTER);
|
||||||
|
}
|
||||||
|
result = genericSysTask->addComponent(objects::PUS_SERVICE_17_TEST);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_17", objects::PUS_SERVICE_17_TEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if OBSW_ADD_CCSDS_IP_CORES == 1
|
||||||
|
result = genericSysTask->addComponent(objects::CCSDS_HANDLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Runs in IRQ mode, frequency does not really matter
|
||||||
|
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
|
||||||
|
"PDEC_HANDLER", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
|
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
|
||||||
|
}
|
||||||
|
#endif /* OBSW_ADD_CCSDS_IP_CORE == 1 */
|
||||||
|
|
||||||
|
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||||
|
PeriodicTaskIF* cfdpTask = factory->createPeriodicTask(
|
||||||
|
"CFDP Handler", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||||
|
result = cfdpTask->addComponent(objects::CFDP_HANDLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("CFDP Handler", objects::CFDP_HANDLER);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
PeriodicTaskIF* gpsTask = factory->createPeriodicTask(
|
||||||
|
"GPS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
|
result = gpsTask->addComponent(objects::GPS_CONTROLLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("GPS_CTRL", objects::GPS_CONTROLLER);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
|
PeriodicTaskIF* acsBrdPolling = factory->createPeriodicTask(
|
||||||
|
"ACS_BOARD_POLLING", 85, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
|
result = acsBrdPolling->addComponent(objects::ACS_BOARD_POLLING_TASK);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("ACS_BOARD_POLLING", objects::ACS_BOARD_POLLING_TASK);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_RW == 1
|
||||||
|
PeriodicTaskIF* rwPolling = factory->createPeriodicTask(
|
||||||
|
"RW_POLLING_TASK", 85, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
|
result = rwPolling->addComponent(objects::RW_POLLING_TASK);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("RW_POLLING_TASK", objects::RW_POLLING_TASK);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_MGT == 1
|
||||||
|
PeriodicTaskIF* imtqPolling = factory->createPeriodicTask(
|
||||||
|
"IMTQ_POLLING_TASK", 85, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
|
result = imtqPolling->addComponent(objects::IMTQ_POLLING);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("IMTQ_POLLING_TASK", objects::IMTQ_POLLING);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_SUN_SENSORS == 1
|
||||||
|
PeriodicTaskIF* susPolling = factory->createPeriodicTask(
|
||||||
|
"SUS_POLLING_TASK", 85, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
|
result = susPolling->addComponent(objects::SUS_POLLING_TASK);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("SUS_POLLING_TASK", objects::SUS_POLLING_TASK);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
PeriodicTaskIF* acsSysTask = factory->createPeriodicTask(
|
||||||
|
"ACS_SYS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
|
static_cast<void>(acsSysTask);
|
||||||
|
result = acsSysTask->addComponent(objects::ACS_SUBSYSTEM);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("ACS_SUBSYSTEM", objects::ACS_SUBSYSTEM);
|
||||||
|
}
|
||||||
|
result = acsSysTask->addComponent(objects::IMTQ_ASSY);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("IMTQ_ASSY", objects::IMTQ_ASSY);
|
||||||
|
}
|
||||||
|
result = acsSysTask->addComponent(objects::ACS_BOARD_ASS);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("ACS_BOARD_ASS", objects::ACS_BOARD_ASS);
|
||||||
|
}
|
||||||
|
result = acsSysTask->addComponent(objects::RW_ASSY);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("RW_ASS", objects::RW_ASSY);
|
||||||
|
}
|
||||||
|
result = acsSysTask->addComponent(objects::SUS_BOARD_ASS);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("SUS_BOARD_ASS", objects::SUS_BOARD_ASS);
|
||||||
|
}
|
||||||
|
result = acsSysTask->addComponent(objects::STR_ASSY);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("STR_ASSY", objects::STR_ASSY);
|
||||||
|
}
|
||||||
|
|
||||||
|
PeriodicTaskIF* tcsSystemTask = factory->createPeriodicTask(
|
||||||
|
"TCS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc);
|
||||||
|
scheduling::scheduleRtdSensors(tcsSystemTask);
|
||||||
|
result = tcsSystemTask->addComponent(objects::TCS_SUBSYSTEM);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("TCS_SUBSYSTEM", objects::TCS_SUBSYSTEM);
|
||||||
|
}
|
||||||
|
result = tcsSystemTask->addComponent(objects::TCS_BOARD_ASS);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("TCS_BOARD_ASS", objects::TCS_BOARD_ASS);
|
||||||
|
}
|
||||||
|
#if OBSW_ADD_TCS_CTRL == 1
|
||||||
|
result = tcsSystemTask->addComponent(objects::THERMAL_CONTROLLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
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_STAR_TRACKER == 1
|
||||||
|
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
|
||||||
|
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
|
result = strHelperTask->addComponent(objects::STR_HELPER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("STR_HELPER", objects::STR_HELPER);
|
||||||
|
}
|
||||||
|
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||||
|
|
||||||
|
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||||
|
PeriodicTaskIF* mpsocHelperTask = factory->createPeriodicTask(
|
||||||
|
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
|
result = mpsocHelperTask->addComponent(objects::PLOC_MPSOC_HELPER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PLOC_MPSOC_HELPER", objects::PLOC_MPSOC_HELPER);
|
||||||
|
}
|
||||||
|
#endif /* OBSW_ADD_PLOC_MPSOC */
|
||||||
|
|
||||||
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
|
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
|
||||||
|
"PLOC_SUPV_HELPER", 10, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
|
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
|
||||||
|
}
|
||||||
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
|
||||||
|
|
||||||
|
PeriodicTaskIF* plTask = factory->createPeriodicTask(
|
||||||
|
"PL_TASK", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||||
|
plTask->addComponent(objects::CAM_SWITCHER);
|
||||||
|
scheduling::addMpsocSupvHandlers(plTask);
|
||||||
|
#if OBSW_ADD_SCEX_DEVICE == 1
|
||||||
|
scheduling::scheduleScexDev(plTask);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_SCEX_DEVICE == 1
|
||||||
|
PeriodicTaskIF* scexReaderTask;
|
||||||
|
scheduling::scheduleScexReader(*factory, scexReaderTask);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
std::vector<PeriodicTaskIF*> pusTasks;
|
||||||
|
createPusTasks(*factory, missedDeadlineFunc, pusTasks);
|
||||||
|
std::vector<PeriodicTaskIF*> pstTasks;
|
||||||
|
AcsPstCfg cfg;
|
||||||
|
createPstTasks(*factory, missedDeadlineFunc, pstTasks, cfg);
|
||||||
|
|
||||||
|
#if OBSW_ADD_TEST_CODE == 1
|
||||||
|
#if OBSW_TEST_CCSDS_BRIDGE == 1
|
||||||
|
PeriodicTaskIF* ptmeTestTask = factory->createPeriodicTask(
|
||||||
|
"PTME_TEST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
|
result = ptmeTestTask->addComponent(objects::CCSDS_IP_CORE_BRIDGE);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PTME_TEST", objects::CCSDS_IP_CORE_BRIDGE);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
std::vector<PeriodicTaskIF*> testTasks;
|
||||||
|
createTestTasks(*factory, missedDeadlineFunc, testTasks);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
auto taskStarter = [](std::vector<PeriodicTaskIF*>& taskVector, std::string name) {
|
||||||
|
for (const auto& task : taskVector) {
|
||||||
|
if (task != nullptr) {
|
||||||
|
task->startTask();
|
||||||
|
} else {
|
||||||
|
sif::error << "Task in vector " << name << " is invalid!" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
sif::info << "Starting tasks.." << std::endl;
|
||||||
|
tmTcDistributor->startTask();
|
||||||
|
|
||||||
|
#if OBSW_ADD_TCPIP_SERVERS == 1
|
||||||
|
#if OBSW_ADD_TMTC_UDP_SERVER == 1
|
||||||
|
udpPollingTask->startTask();
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_TMTC_TCP_SERVER == 1
|
||||||
|
tcpPollingTask->startTask();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
genericSysTask->startTask();
|
||||||
|
#if OBSW_ADD_CCSDS_IP_CORES == 1
|
||||||
|
pdecHandlerTask->startTask();
|
||||||
|
#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */
|
||||||
|
|
||||||
|
coreCtrlTask->startTask();
|
||||||
|
#if OBSW_ADD_SA_DEPL == 1
|
||||||
|
solarArrayDeplTask->startTask();
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
|
acsBrdPolling->startTask();
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_MGT == 1
|
||||||
|
imtqPolling->startTask();
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_SUN_SENSORS == 1
|
||||||
|
susPolling->startTask();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
taskStarter(pstTasks, "PST task vector");
|
||||||
|
taskStarter(pusTasks, "PUS task vector");
|
||||||
|
#if OBSW_ADD_SCEX_DEVICE == 1
|
||||||
|
scexReaderTask->startTask();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_TEST_CCSDS_BRIDGE == 1
|
||||||
|
ptmeTestTask->startTask();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||||
|
cfdpTask->startTask();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_STAR_TRACKER == 1
|
||||||
|
strHelperTask->startTask();
|
||||||
|
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||||
|
|
||||||
|
#if OBSW_ADD_RW == 1
|
||||||
|
rwPolling->startTask();
|
||||||
|
#endif
|
||||||
|
gpsTask->startTask();
|
||||||
|
acsSysTask->startTask();
|
||||||
|
if (not tcsSystemTask->isEmpty()) {
|
||||||
|
tcsSystemTask->startTask();
|
||||||
|
}
|
||||||
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
|
supvHelperTask->startTask();
|
||||||
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||||
|
plTask->startTask();
|
||||||
|
|
||||||
|
#if OBSW_ADD_TEST_CODE == 1
|
||||||
|
taskStarter(testTasks, "Test task vector");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
sif::info << "Tasks started.." << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
|
std::vector<PeriodicTaskIF*>& taskVec, AcsPstCfg cfg) {
|
||||||
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
|
#ifdef RELEASE_BUILD
|
||||||
|
static constexpr float acsPstPeriod = 0.4;
|
||||||
|
#else
|
||||||
|
static constexpr float acsPstPeriod = 0.4;
|
||||||
|
#endif
|
||||||
|
FixedTimeslotTaskIF* acsTcsPst = factory.createFixedTimeslotTask(
|
||||||
|
"ACS_TCS_PST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, acsPstPeriod, missedDeadlineFunc);
|
||||||
|
result = pst::pstTcsAndAcs(acsTcsPst, cfg);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
|
sif::warning << "scheduling::initTasks: ACS PST is empty" << std::endl;
|
||||||
|
} else {
|
||||||
|
sif::error << "scheduling::initTasks: Creating ACS PST failed!" << std::endl;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
taskVec.push_back(acsTcsPst);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Polling Sequence Table Default */
|
||||||
|
#if OBSW_ADD_SPI_TEST_CODE == 0
|
||||||
|
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
|
||||||
|
"MAIN_SPI", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
||||||
|
result = pst::pstSpiAndSyrlinks(spiPst);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
|
sif::warning << "scheduling::initTasks: SPI PST is empty" << std::endl;
|
||||||
|
} else {
|
||||||
|
sif::error << "scheduling::initTasks: Creating SPI PST failed!" << std::endl;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
taskVec.push_back(spiPst);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_I2C_TEST_CODE == 0
|
||||||
|
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
|
||||||
|
"I2C_PST", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
|
||||||
|
result = pst::pstI2c(i2cPst);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
|
sif::warning << "scheduling::initTasks: I2C PST is empty" << std::endl;
|
||||||
|
} else {
|
||||||
|
sif::error << "scheduling::initTasks: Creating I2C PST failed!" << std::endl;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
taskVec.push_back(i2cPst);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
||||||
|
FixedTimeslotTaskIF* gomSpacePstTask = factory.createFixedTimeslotTask(
|
||||||
|
"GS_PST_TASK", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
|
||||||
|
result = pst::pstGompaceCan(gomSpacePstTask);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
|
sif::error << "scheduling::initTasks: GomSpace PST initialization failed!" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
taskVec.push_back(gomSpacePstTask);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void scheduling::createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
/* PUS Services */
|
||||||
|
PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
|
||||||
|
"PUS_HIGH_PRIO", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_VERIF", objects::PUS_SERVICE_1_VERIFICATION);
|
||||||
|
}
|
||||||
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
|
}
|
||||||
|
result = pusHighPrio->addComponent(objects::EVENT_MANAGER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
||||||
|
}
|
||||||
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_9", objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
|
}
|
||||||
|
taskVec.push_back(pusHighPrio);
|
||||||
|
|
||||||
|
PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask(
|
||||||
|
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_15_TM_STORAGE);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_15", objects::PUS_SERVICE_15_TM_STORAGE);
|
||||||
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_11_TC_SCHEDULER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_11", objects::PUS_SERVICE_11_TC_SCHEDULER);
|
||||||
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_20", objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_200", objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_201_HEALTH);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_201", objects::PUS_SERVICE_201_HEALTH);
|
||||||
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PUS_2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
|
}
|
||||||
|
taskVec.push_back(pusMedPrio);
|
||||||
|
}
|
||||||
|
|
||||||
|
void scheduling::createTestTasks(TaskFactory& factory,
|
||||||
|
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
|
#if OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
|
||||||
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
static_cast<void>(result); // supress warning in case it is not used
|
||||||
|
|
||||||
|
PeriodicTaskIF* testTask = factory.createPeriodicTask(
|
||||||
|
"TEST_TASK", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1, missedDeadlineFunc);
|
||||||
|
|
||||||
|
result = testTask->addComponent(objects::TEST_TASK);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if OBSW_ADD_SPI_TEST_CODE == 1
|
||||||
|
result = testTask->addComponent(objects::SPI_TEST);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("SPI_TEST", objects::SPI_TEST);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_I2C_TEST_CODE == 1
|
||||||
|
result = testTask->addComponent(objects::I2C_TEST);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("I2C_TEST", objects::I2C_TEST);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_UART_TEST_CODE == 1
|
||||||
|
result = testTask->addComponent(objects::UART_TEST);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("UART_TEST", objects::UART_TEST);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
taskVec.push_back(testTask);
|
||||||
|
|
||||||
|
#endif // OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
▄ ▄
|
||||||
|
▌▒█ ▄▀▒▌
|
||||||
|
▌▒▒█ ▄▀▒▒▒▐
|
||||||
|
▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐
|
||||||
|
▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐
|
||||||
|
▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌
|
||||||
|
▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒▌
|
||||||
|
▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐
|
||||||
|
▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░░░▒▒▒▀▄▌
|
||||||
|
▌░▒▄██▄▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒▌
|
||||||
|
▌▒▀▐▄█▄█▌▄░▀▒▒░░░░░░░░░░▒▒▒▐
|
||||||
|
▐▒▒▐▀▐▀▒░▄▄▒▄▒▒▒▒▒▒░▒░▒░▒▒▒▒▌
|
||||||
|
▐▒▒▒▀▀▄▄▒▒▒▄▒▒▒▒▒▒▒▒░▒░▒░▒▒▐
|
||||||
|
▌▒▒▒▒▒▒▀▀▀▒▒▒▒▒▒░▒░▒░▒░▒▒▒▌
|
||||||
|
▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒░▒░▒▒▄▒▒▐
|
||||||
|
▀▄▒▒▒▒▒▒▒▒▒▒▒░▒░▒░▒▄▒▒▒▒▌
|
||||||
|
▀▄▒▒▒▒▒▒▒▒▒▒▄▄▄▀▒▒▒▒▄▀
|
||||||
|
▀▄▄▄▄▄▄▀▀▀▒▒▒▒▒▄▄▀
|
||||||
|
▒▒▒▒▒▒▒▒▒▒▀▀
|
||||||
|
**/
|
@ -4,20 +4,23 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "fsfw/tasks/definitions.h"
|
#include "fsfw/tasks/definitions.h"
|
||||||
|
#include "mission/core/pollingSeqTables.h"
|
||||||
|
|
||||||
|
using pst::AcsPstCfg;
|
||||||
|
|
||||||
class PeriodicTaskIF;
|
class PeriodicTaskIF;
|
||||||
class TaskFactory;
|
class TaskFactory;
|
||||||
|
|
||||||
namespace initmission {
|
namespace scheduling {
|
||||||
void initMission();
|
void initMission();
|
||||||
void initTasks();
|
void initTasks();
|
||||||
|
|
||||||
void createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
void createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec);
|
std::vector<PeriodicTaskIF*>& taskVec, AcsPstCfg cfg);
|
||||||
void createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
void createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec);
|
std::vector<PeriodicTaskIF*>& taskVec);
|
||||||
void createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
void createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec);
|
std::vector<PeriodicTaskIF*>& taskVec);
|
||||||
}; // namespace initmission
|
}; // namespace scheduling
|
||||||
|
|
||||||
#endif /* BSP_Q7S_INITMISSION_H_ */
|
#endif /* BSP_Q7S_INITMISSION_H_ */
|
@ -1,5 +1,9 @@
|
|||||||
|
#include <bsp_q7s/callbacks/q7sGpioCallbacks.h>
|
||||||
#include <fsfw/health/HealthTableIF.h>
|
#include <fsfw/health/HealthTableIF.h>
|
||||||
#include <fsfw/power/DummyPowerSwitcher.h>
|
#include <fsfw/power/DummyPowerSwitcher.h>
|
||||||
|
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
||||||
|
#include <mission/system/tree/system.h>
|
||||||
|
#include <mission/utility/DummySdCardManager.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "bsp_q7s/core/CoreController.h"
|
#include "bsp_q7s/core/CoreController.h"
|
||||||
@ -12,30 +16,50 @@
|
|||||||
#include "linux/ObjectFactory.h"
|
#include "linux/ObjectFactory.h"
|
||||||
#include "linux/callbacks/gpioCallbacks.h"
|
#include "linux/callbacks/gpioCallbacks.h"
|
||||||
#include "mission/core/GenericFactory.h"
|
#include "mission/core/GenericFactory.h"
|
||||||
|
#include "mission/system/tree/comModeTree.h"
|
||||||
|
|
||||||
void ObjectFactory::produce(void* args) {
|
void ObjectFactory::produce(void* args) {
|
||||||
ObjectFactory::setStatics();
|
ObjectFactory::setStatics();
|
||||||
HealthTableIF* healthTable = nullptr;
|
HealthTableIF* healthTable = nullptr;
|
||||||
ObjectFactory::produceGenericObjects(&healthTable);
|
PusTmFunnel* pusFunnel = nullptr;
|
||||||
|
CfdpTmFunnel* cfdpFunnel = nullptr;
|
||||||
|
ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel,
|
||||||
|
*SdCardManager::instance());
|
||||||
|
|
||||||
LinuxLibgpioIF* gpioComIF = nullptr;
|
LinuxLibgpioIF* gpioComIF = nullptr;
|
||||||
UartComIF* uartComIF = nullptr;
|
SerialComIF* uartComIF = nullptr;
|
||||||
SpiComIF* spiMainComIF = nullptr;
|
SpiComIF* spiMainComIF = nullptr;
|
||||||
I2cComIF* i2cComIF = nullptr;
|
I2cComIF* i2cComIF = nullptr;
|
||||||
SpiComIF* spiRwComIF = nullptr;
|
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF);
|
||||||
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF, &spiRwComIF);
|
/* Adding gpios for chip select decoding to the gpioComIf */
|
||||||
|
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||||
|
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||||
|
|
||||||
// Hardware is usually not connected to EM, so we need to create dummies which replace lower
|
// Hardware is usually not connected to EM, so we need to create dummies which replace lower
|
||||||
// level components.
|
// level components.
|
||||||
dummy::DummyCfg dummyCfg;
|
dummy::DummyCfg dummyCfg;
|
||||||
dummyCfg.addCoreCtrlCfg = false;
|
dummyCfg.addCoreCtrlCfg = false;
|
||||||
dummy::createDummies(dummyCfg);
|
#if OBSW_ADD_SYRLINKS == 1
|
||||||
|
dummyCfg.addSyrlinksDummies = false;
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
||||||
|
dummyCfg.addPowerDummies = false;
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
|
dummyCfg.addAcsBoardDummies = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
PowerSwitchIF* pwrSwitcher = nullptr;
|
||||||
|
#if OBSW_ADD_GOMSPACE_PCDU == 0
|
||||||
|
pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
|
||||||
|
#else
|
||||||
|
createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
dummy::createDummies(dummyCfg, *pwrSwitcher, gpioComIF);
|
||||||
|
|
||||||
new CoreController(objects::CORE_CONTROLLER);
|
new CoreController(objects::CORE_CONTROLLER);
|
||||||
|
|
||||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
|
||||||
PowerSwitchIF* pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
|
|
||||||
|
|
||||||
// Regular FM code, does not work for EM if the hardware is not connected
|
// Regular FM code, does not work for EM if the hardware is not connected
|
||||||
// createPcduComponents(gpioComIF, &pwrSwitcher);
|
// createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||||
// createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
// createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
||||||
@ -43,19 +67,29 @@ void ObjectFactory::produce(void* args) {
|
|||||||
// createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
|
// createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
|
||||||
// createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
|
// createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
|
||||||
// createTmpComponents();
|
// createTmpComponents();
|
||||||
createRadSensorComponent(gpioComIF);
|
// 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);
|
||||||
|
|
||||||
#if OBSW_ADD_ACS_BOARD == 1
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher);
|
createAcsBoardComponents(gpioComIF, uartComIF, *pwrSwitcher);
|
||||||
#endif
|
#endif
|
||||||
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
|
|
||||||
createSolarArrayDeploymentComponents();
|
|
||||||
createPayloadComponents(gpioComIF);
|
|
||||||
|
|
||||||
#if OBSW_ADD_MGT == 1
|
#if OBSW_ADD_MGT == 1
|
||||||
createImtqComponents(pwrSwitcher);
|
createImtqComponents(pwrSwitcher);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_SYRLINKS == 1
|
||||||
|
createSyrlinksComponents(pwrSwitcher);
|
||||||
|
#endif /* OBSW_ADD_SYRLINKS == 1 */
|
||||||
|
|
||||||
|
#if OBSW_ADD_RW == 1
|
||||||
createReactionWheelComponents(gpioComIF, pwrSwitcher);
|
createReactionWheelComponents(gpioComIF, pwrSwitcher);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
|
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
|
||||||
createBpxBatteryComponent();
|
createBpxBatteryComponent();
|
||||||
@ -64,14 +98,24 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#if OBSW_ADD_STAR_TRACKER == 1
|
#if OBSW_ADD_STAR_TRACKER == 1
|
||||||
createStrComponents(pwrSwitcher);
|
createStrComponents(pwrSwitcher);
|
||||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||||
#if OBSW_USE_CCSDS_IP_CORE == 1
|
#if OBSW_ADD_CCSDS_IP_CORES == 1
|
||||||
createCcsdsComponents(gpioComIF);
|
CcsdsIpCoreHandler* ipCoreHandler = nullptr;
|
||||||
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
createCcsdsComponents(gpioComIF, &ipCoreHandler);
|
||||||
|
#if OBSW_TM_TO_PTME == 1
|
||||||
|
ObjectFactory::addTmtcIpCoresToFunnels(*ipCoreHandler, *pusFunnel, *cfdpFunnel);
|
||||||
|
#endif
|
||||||
|
#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */
|
||||||
/* Test Task */
|
/* Test Task */
|
||||||
#if OBSW_ADD_TEST_CODE == 1
|
#if OBSW_ADD_TEST_CODE == 1
|
||||||
createTestComponents(gpioComIF);
|
createTestComponents(gpioComIF);
|
||||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||||
|
#if OBSW_ADD_SCEX_DEVICE == 1
|
||||||
createMiscComponents();
|
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false,
|
||||||
createAcsController();
|
pcdu::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
|
||||||
|
#endif
|
||||||
|
createAcsController(true);
|
||||||
|
HeaterHandler* heaterHandler = nullptr;
|
||||||
|
ObjectFactory::createGenericHeaterComponents(*gpioComIF, *pwrSwitcher, heaterHandler);
|
||||||
|
createThermalController(*heaterHandler);
|
||||||
|
satsystem::init();
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include <bsp_q7s/callbacks/q7sGpioCallbacks.h>
|
||||||
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
@ -10,38 +11,52 @@
|
|||||||
#include "linux/ObjectFactory.h"
|
#include "linux/ObjectFactory.h"
|
||||||
#include "linux/callbacks/gpioCallbacks.h"
|
#include "linux/callbacks/gpioCallbacks.h"
|
||||||
#include "mission/core/GenericFactory.h"
|
#include "mission/core/GenericFactory.h"
|
||||||
|
#include "mission/system/tree/system.h"
|
||||||
|
|
||||||
void ObjectFactory::produce(void* args) {
|
void ObjectFactory::produce(void* args) {
|
||||||
ObjectFactory::setStatics();
|
ObjectFactory::setStatics();
|
||||||
HealthTableIF* healthTable = nullptr;
|
HealthTableIF* healthTable = nullptr;
|
||||||
ObjectFactory::produceGenericObjects(&healthTable);
|
PusTmFunnel* pusFunnel = nullptr;
|
||||||
|
CfdpTmFunnel* cfdpFunnel = nullptr;
|
||||||
|
ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel,
|
||||||
|
*SdCardManager::instance());
|
||||||
|
|
||||||
LinuxLibgpioIF* gpioComIF = nullptr;
|
LinuxLibgpioIF* gpioComIF = nullptr;
|
||||||
UartComIF* uartComIF = nullptr;
|
SerialComIF* uartComIF = nullptr;
|
||||||
SpiComIF* spiMainComIF = nullptr;
|
SpiComIF* spiMainComIF = nullptr;
|
||||||
I2cComIF* i2cComIF = nullptr;
|
I2cComIF* i2cComIF = nullptr;
|
||||||
PowerSwitchIF* pwrSwitcher = nullptr;
|
PowerSwitchIF* pwrSwitcher = nullptr;
|
||||||
SpiComIF* spiRwComIF = nullptr;
|
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF);
|
||||||
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF, &spiRwComIF);
|
/* Adding gpios for chip select decoding to the gpioComIf */
|
||||||
createTmpComponents();
|
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||||
new CoreController(objects::CORE_CONTROLLER);
|
|
||||||
|
|
||||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||||
|
|
||||||
|
new CoreController(objects::CORE_CONTROLLER);
|
||||||
createPcduComponents(gpioComIF, &pwrSwitcher);
|
createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||||
createRadSensorComponent(gpioComIF);
|
auto* stackHandler = new Stack5VHandler(*pwrSwitcher);
|
||||||
createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
|
|
||||||
|
#if OBSW_ADD_RAD_SENSORS == 1
|
||||||
|
createRadSensorComponent(gpioComIF, *stackHandler);
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_SUN_SENSORS == 1
|
||||||
|
createSunSensorComponents(gpioComIF, spiMainComIF, *pwrSwitcher, q7s::SPI_DEFAULT_DEV, true);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if OBSW_ADD_ACS_BOARD == 1
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher);
|
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher);
|
||||||
#endif
|
#endif
|
||||||
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
|
HeaterHandler* heaterHandler;
|
||||||
createSolarArrayDeploymentComponents();
|
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
|
||||||
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
#if OBSW_ADD_TMP_DEVICES == 1
|
||||||
|
createTmpComponents();
|
||||||
|
#endif
|
||||||
|
createSolarArrayDeploymentComponents(*pwrSwitcher, *gpioComIF);
|
||||||
|
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher, *stackHandler);
|
||||||
#if OBSW_ADD_SYRLINKS == 1
|
#if OBSW_ADD_SYRLINKS == 1
|
||||||
createSyrlinksComponents(pwrSwitcher);
|
createSyrlinksComponents(pwrSwitcher);
|
||||||
#endif /* OBSW_ADD_SYRLINKS == 1 */
|
#endif /* OBSW_ADD_SYRLINKS == 1 */
|
||||||
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
|
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
|
||||||
createPayloadComponents(gpioComIF);
|
createPayloadComponents(gpioComIF, *pwrSwitcher);
|
||||||
|
|
||||||
#if OBSW_ADD_MGT == 1
|
#if OBSW_ADD_MGT == 1
|
||||||
createImtqComponents(pwrSwitcher);
|
createImtqComponents(pwrSwitcher);
|
||||||
@ -55,9 +70,13 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#if OBSW_ADD_STAR_TRACKER == 1
|
#if OBSW_ADD_STAR_TRACKER == 1
|
||||||
createStrComponents(pwrSwitcher);
|
createStrComponents(pwrSwitcher);
|
||||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||||
#if OBSW_USE_CCSDS_IP_CORE == 1
|
#if OBSW_ADD_CCSDS_IP_CORES == 1
|
||||||
createCcsdsComponents(gpioComIF);
|
CcsdsIpCoreHandler* ipCoreHandler = nullptr;
|
||||||
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
createCcsdsComponents(gpioComIF, &ipCoreHandler);
|
||||||
|
#if OBSW_TM_TO_PTME == 1
|
||||||
|
addTmtcIpCoresToFunnels(*ipCoreHandler, *pusFunnel, *cfdpFunnel);
|
||||||
|
#endif
|
||||||
|
#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */
|
||||||
|
|
||||||
#if OBSW_ADD_SCEX_DEVICE == 1
|
#if OBSW_ADD_SCEX_DEVICE == 1
|
||||||
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false,
|
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false,
|
||||||
@ -69,6 +88,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||||
|
|
||||||
createMiscComponents();
|
createMiscComponents();
|
||||||
createThermalController();
|
createThermalController(*heaterHandler);
|
||||||
createAcsController();
|
createAcsController(true);
|
||||||
|
satsystem::init();
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ ReturnValue_t FilesystemHelper::checkPath(std::string path) {
|
|||||||
}
|
}
|
||||||
} else if (path.substr(0, sizeof(config::SD_1_MOUNT_POINT)) ==
|
} else if (path.substr(0, sizeof(config::SD_1_MOUNT_POINT)) ==
|
||||||
std::string(config::SD_1_MOUNT_POINT)) {
|
std::string(config::SD_1_MOUNT_POINT)) {
|
||||||
if (!sdcMan->isSdCardUsable(sd::SLOT_0)) {
|
if (!sdcMan->isSdCardUsable(sd::SLOT_1)) {
|
||||||
sif::warning << "FilesystemHelper::checkPath: SD card 1 not mounted" << std::endl;
|
sif::warning << "FilesystemHelper::checkPath: SD card 1 not mounted" << std::endl;
|
||||||
return SD_NOT_MOUNTED;
|
return SD_NOT_MOUNTED;
|
||||||
}
|
}
|
||||||
|
@ -20,17 +20,16 @@
|
|||||||
SdCardManager* SdCardManager::INSTANCE = nullptr;
|
SdCardManager* SdCardManager::INSTANCE = nullptr;
|
||||||
|
|
||||||
SdCardManager::SdCardManager() : SystemObject(objects::SDC_MANAGER), cmdExecutor(256) {
|
SdCardManager::SdCardManager() : SystemObject(objects::SDC_MANAGER), cmdExecutor(256) {
|
||||||
mutex = MutexFactory::instance()->createMutex();
|
sdLock = MutexFactory::instance()->createMutex();
|
||||||
ReturnValue_t result = mutex->lockMutex();
|
prefLock = MutexFactory::instance()->createMutex();
|
||||||
if (result != returnvalue::OK) {
|
defaultLock = MutexFactory::instance()->createMutex();
|
||||||
|
|
||||||
|
MutexGuard mg(prefLock, LOCK_TYPE, OTHER_TIMEOUT, LOCK_CTX);
|
||||||
|
if (mg.getLockResult() != returnvalue::OK) {
|
||||||
sif::error << "SdCardManager::SdCardManager: Mutex lock failed" << std::endl;
|
sif::error << "SdCardManager::SdCardManager: Mutex lock failed" << std::endl;
|
||||||
}
|
}
|
||||||
uint8_t prefSdRaw = 0;
|
uint8_t prefSdRaw = 0;
|
||||||
result = scratch::readNumber(scratch::PREFERED_SDC_KEY, prefSdRaw);
|
ReturnValue_t result = scratch::readNumber(scratch::PREFERED_SDC_KEY, prefSdRaw);
|
||||||
result = mutex->unlockMutex();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::error << "SdCardManager::SdCardManager: Mutex unlock failed" << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == scratch::KEY_NOT_FOUND) {
|
if (result == scratch::KEY_NOT_FOUND) {
|
||||||
@ -38,14 +37,16 @@ SdCardManager::SdCardManager() : SystemObject(objects::SDC_MANAGER), cmdExecutor
|
|||||||
"Preferred SD card not set. Setting to 0"
|
"Preferred SD card not set. Setting to 0"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
setPreferredSdCard(sd::SdCard::SLOT_0);
|
setPreferredSdCard(sd::SdCard::SLOT_0);
|
||||||
sdInfo.pref = sd::SdCard::SLOT_0;
|
scratch::writeNumber(scratch::PREFERED_SDC_KEY, static_cast<uint8_t>(sd::SdCard::SLOT_0));
|
||||||
|
prefSdRaw = sd::SdCard::SLOT_0;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Should not happen.
|
// Should not happen.
|
||||||
// TODO: Maybe trigger event?
|
// TODO: Maybe trigger event?
|
||||||
sif::error << "SdCardManager::SdCardManager: Reading preferred SD card from scratch"
|
sif::error << "SdCardManager::SdCardManager: Reading preferred SD card from scratch"
|
||||||
"buffer failed"
|
"buffer failed"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
sdInfo.pref = sd::SdCard::SLOT_0;
|
prefSdRaw = sd::SdCard::SLOT_0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sdInfo.pref = static_cast<sd::SdCard>(prefSdRaw);
|
sdInfo.pref = static_cast<sd::SdCard>(prefSdRaw);
|
||||||
@ -196,8 +197,9 @@ ReturnValue_t SdCardManager::setSdCardState(sd::SdCard sdCard, bool on) {
|
|||||||
|
|
||||||
ReturnValue_t SdCardManager::getSdCardsStatus(SdStatePair& active) {
|
ReturnValue_t SdCardManager::getSdCardsStatus(SdStatePair& active) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
MutexGuard mg(mutex);
|
MutexGuard mg(sdLock, LOCK_TYPE, SD_LOCK_TIMEOUT, LOCK_CTX);
|
||||||
if (not filesystem::exists(SD_STATE_FILE)) {
|
std::error_code e;
|
||||||
|
if (not filesystem::exists(SD_STATE_FILE, e)) {
|
||||||
return STATUS_FILE_NEXISTS;
|
return STATUS_FILE_NEXISTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +240,8 @@ ReturnValue_t SdCardManager::mountSdCard(sd::SdCard sdCard) {
|
|||||||
mountDev = SD_1_DEV_NAME;
|
mountDev = SD_1_DEV_NAME;
|
||||||
mountPoint = config::SD_1_MOUNT_POINT;
|
mountPoint = config::SD_1_MOUNT_POINT;
|
||||||
}
|
}
|
||||||
if (not filesystem::exists(mountDev)) {
|
std::error_code e;
|
||||||
|
if (not filesystem::exists(mountDev, e)) {
|
||||||
sif::warning << "SdCardManager::mountSdCard: Device file does not exists. Make sure to"
|
sif::warning << "SdCardManager::mountSdCard: Device file does not exists. Make sure to"
|
||||||
" turn on the SD card"
|
" turn on the SD card"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@ -273,7 +276,8 @@ ReturnValue_t SdCardManager::unmountSdCard(sd::SdCard sdCard) {
|
|||||||
} else if (sdCard == sd::SdCard::SLOT_1) {
|
} else if (sdCard == sd::SdCard::SLOT_1) {
|
||||||
mountPoint = config::SD_1_MOUNT_POINT;
|
mountPoint = config::SD_1_MOUNT_POINT;
|
||||||
}
|
}
|
||||||
if (not filesystem::exists(mountPoint)) {
|
std::error_code e;
|
||||||
|
if (not filesystem::exists(mountPoint, e)) {
|
||||||
sif::error << "SdCardManager::unmountSdCard: Default mount point " << mountPoint
|
sif::error << "SdCardManager::unmountSdCard: Default mount point " << mountPoint
|
||||||
<< "does not exist" << std::endl;
|
<< "does not exist" << std::endl;
|
||||||
return UNMOUNT_ERROR;
|
return UNMOUNT_ERROR;
|
||||||
@ -379,7 +383,7 @@ void SdCardManager::processSdStatusLine(std::pair<sd::SdState, sd::SdState>& act
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::optional<sd::SdCard> SdCardManager::getPreferredSdCard() const {
|
std::optional<sd::SdCard> SdCardManager::getPreferredSdCard() const {
|
||||||
MutexGuard mg(mutex);
|
MutexGuard mg(prefLock, LOCK_TYPE, OTHER_TIMEOUT, LOCK_CTX);
|
||||||
auto res = mg.getLockResult();
|
auto res = mg.getLockResult();
|
||||||
if (res != returnvalue::OK) {
|
if (res != returnvalue::OK) {
|
||||||
sif::error << "SdCardManager::getPreferredSdCard: Lock error" << std::endl;
|
sif::error << "SdCardManager::getPreferredSdCard: Lock error" << std::endl;
|
||||||
@ -388,7 +392,7 @@ std::optional<sd::SdCard> SdCardManager::getPreferredSdCard() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SdCardManager::setPreferredSdCard(sd::SdCard sdCard) {
|
ReturnValue_t SdCardManager::setPreferredSdCard(sd::SdCard sdCard) {
|
||||||
MutexGuard mg(mutex);
|
MutexGuard mg(prefLock, LOCK_TYPE, OTHER_TIMEOUT, LOCK_CTX);
|
||||||
if (sdCard == sd::SdCard::BOTH) {
|
if (sdCard == sd::SdCard::BOTH) {
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
@ -400,7 +404,7 @@ ReturnValue_t SdCardManager::updateSdCardStateFile() {
|
|||||||
if (cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING) {
|
if (cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING) {
|
||||||
return CommandExecutor::COMMAND_PENDING;
|
return CommandExecutor::COMMAND_PENDING;
|
||||||
}
|
}
|
||||||
MutexGuard mg(mutex);
|
MutexGuard mg(sdLock, LOCK_TYPE, SD_LOCK_TIMEOUT, LOCK_CTX);
|
||||||
// Use q7hw utility and pipe the command output into the state file
|
// Use q7hw utility and pipe the command output into the state file
|
||||||
std::string updateCmd = "q7hw sd info all > " + std::string(SD_STATE_FILE);
|
std::string updateCmd = "q7hw sd info all > " + std::string(SD_STATE_FILE);
|
||||||
cmdExecutor.load(updateCmd, blocking, printCmdOutput);
|
cmdExecutor.load(updateCmd, blocking, printCmdOutput);
|
||||||
@ -411,9 +415,12 @@ ReturnValue_t SdCardManager::updateSdCardStateFile() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& SdCardManager::getCurrentMountPrefix() const {
|
const char* SdCardManager::getCurrentMountPrefix() const {
|
||||||
MutexGuard mg(mutex);
|
MutexGuard mg(defaultLock, LOCK_TYPE, OTHER_TIMEOUT, LOCK_CTX);
|
||||||
return currentPrefix;
|
if (currentPrefix.has_value()) {
|
||||||
|
return currentPrefix.value().c_str();
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
SdCardManager::OpStatus SdCardManager::checkCurrentOp(Operations& currentOp) {
|
SdCardManager::OpStatus SdCardManager::checkCurrentOp(Operations& currentOp) {
|
||||||
@ -460,7 +467,14 @@ void SdCardManager::setBlocking(bool blocking) { this->blocking = blocking; }
|
|||||||
|
|
||||||
void SdCardManager::setPrintCommandOutput(bool print) { this->printCmdOutput = print; }
|
void SdCardManager::setPrintCommandOutput(bool print) { this->printCmdOutput = print; }
|
||||||
|
|
||||||
bool SdCardManager::isSdCardUsable(sd::SdCard sdCard) {
|
bool SdCardManager::isSdCardUsable(std::optional<sd::SdCard> sdCard) {
|
||||||
|
{
|
||||||
|
MutexGuard mg(defaultLock, LOCK_TYPE, OTHER_TIMEOUT, LOCK_CTX);
|
||||||
|
if (markedUnusable) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SdCardManager::SdStatePair active;
|
SdCardManager::SdStatePair active;
|
||||||
ReturnValue_t result = this->getSdCardsStatus(active);
|
ReturnValue_t result = this->getSdCardsStatus(active);
|
||||||
|
|
||||||
@ -468,20 +482,30 @@ bool SdCardManager::isSdCardUsable(sd::SdCard sdCard) {
|
|||||||
sif::debug << "SdCardManager::isSdCardMounted: Failed to get SD card active state";
|
sif::debug << "SdCardManager::isSdCardMounted: Failed to get SD card active state";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (not sdCard) {
|
||||||
|
if (active.first == sd::MOUNTED or active.second == sd::MOUNTED) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (sdCard == sd::SLOT_0) {
|
if (sdCard == sd::SLOT_0) {
|
||||||
if (active.first == sd::MOUNTED) {
|
if (active.first == sd::MOUNTED) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if (sdCard == sd::SLOT_1) {
|
}
|
||||||
|
if (sdCard == sd::SLOT_1) {
|
||||||
if (active.second == sd::MOUNTED) {
|
if (active.second == sd::MOUNTED) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
sif::debug << "SdCardManager::isSdCardMounted: Unknown SD card specified" << std::endl;
|
if (sdCard == sd::BOTH) {
|
||||||
|
if (active.first == sd::MOUNTED && active.second == sd::MOUNTED) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -489,9 +513,9 @@ bool SdCardManager::isSdCardUsable(sd::SdCard sdCard) {
|
|||||||
ReturnValue_t SdCardManager::isSdCardMountedReadOnly(sd::SdCard sdcard, bool& readOnly) {
|
ReturnValue_t SdCardManager::isSdCardMountedReadOnly(sd::SdCard sdcard, bool& readOnly) {
|
||||||
std::ostringstream command;
|
std::ostringstream command;
|
||||||
if (sdcard == sd::SdCard::SLOT_0) {
|
if (sdcard == sd::SdCard::SLOT_0) {
|
||||||
command << "grep -q '" << config::SD_0_MOUNT_POINT << " vfat ro,' /proc/mounts";
|
command << "grep -q '" << config::SD_0_MOUNT_POINT << " ext4 rw,' /proc/mounts";
|
||||||
} else if (sdcard == sd::SdCard::SLOT_1) {
|
} else if (sdcard == sd::SdCard::SLOT_1) {
|
||||||
command << "grep -q '" << config::SD_1_MOUNT_POINT << " vfat ro,' /proc/mounts";
|
command << "grep -q '" << config::SD_1_MOUNT_POINT << " ext4 rw,' /proc/mounts";
|
||||||
} else {
|
} else {
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
@ -500,18 +524,9 @@ ReturnValue_t SdCardManager::isSdCardMountedReadOnly(sd::SdCard sdcard, bool& re
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = cmdExecutor.execute();
|
result = cmdExecutor.execute();
|
||||||
if (result != returnvalue::OK) {
|
if (result == returnvalue::OK) {
|
||||||
int exitStatus = cmdExecutor.getLastError();
|
|
||||||
if (exitStatus == 1) {
|
|
||||||
readOnly = false;
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
auto& readVec = cmdExecutor.getReadVector();
|
|
||||||
size_t readLen = strnlen(readVec.data(), readVec.size());
|
|
||||||
if (readLen == 0) {
|
|
||||||
readOnly = false;
|
readOnly = false;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
@ -550,7 +565,7 @@ ReturnValue_t SdCardManager::performFsck(sd::SdCard sdcard, bool printOutput, in
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SdCardManager::setActiveSdCard(sd::SdCard sdCard) {
|
void SdCardManager::setActiveSdCard(sd::SdCard sdCard) {
|
||||||
MutexGuard mg(mutex);
|
MutexGuard mg(defaultLock, LOCK_TYPE, OTHER_TIMEOUT, LOCK_CTX);
|
||||||
sdInfo.active = sdCard;
|
sdInfo.active = sdCard;
|
||||||
if (sdInfo.active == sd::SdCard::SLOT_0) {
|
if (sdInfo.active == sd::SdCard::SLOT_0) {
|
||||||
currentPrefix = config::SD_0_MOUNT_POINT;
|
currentPrefix = config::SD_0_MOUNT_POINT;
|
||||||
@ -560,6 +575,14 @@ void SdCardManager::setActiveSdCard(sd::SdCard sdCard) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::optional<sd::SdCard> SdCardManager::getActiveSdCard() const {
|
std::optional<sd::SdCard> SdCardManager::getActiveSdCard() const {
|
||||||
MutexGuard mg(mutex);
|
MutexGuard mg(defaultLock, LOCK_TYPE, OTHER_TIMEOUT, LOCK_CTX);
|
||||||
|
if (markedUnusable) {
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
return sdInfo.active;
|
return sdInfo.active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SdCardManager::markUnusable() {
|
||||||
|
MutexGuard mg(defaultLock, LOCK_TYPE, OTHER_TIMEOUT, LOCK_CTX);
|
||||||
|
markedUnusable = true;
|
||||||
|
}
|
||||||
|
@ -187,7 +187,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
|
|||||||
* @param prefSdCardPtr
|
* @param prefSdCardPtr
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
const std::string& getCurrentMountPrefix() const override;
|
const char* getCurrentMountPrefix() const override;
|
||||||
|
|
||||||
OpStatus checkCurrentOp(Operations& currentOp);
|
OpStatus checkCurrentOp(Operations& currentOp);
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
|
|||||||
*
|
*
|
||||||
* @return true if mounted, otherwise false
|
* @return true if mounted, otherwise false
|
||||||
*/
|
*/
|
||||||
bool isSdCardUsable(sd::SdCard sdCard) override;
|
bool isSdCardUsable(std::optional<sd::SdCard> sdCard) override;
|
||||||
|
|
||||||
ReturnValue_t isSdCardMountedReadOnly(sd::SdCard sdcard, bool& readOnly);
|
ReturnValue_t isSdCardMountedReadOnly(sd::SdCard sdcard, bool& readOnly);
|
||||||
|
|
||||||
@ -214,13 +214,22 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
|
|||||||
|
|
||||||
ReturnValue_t performFsck(sd::SdCard sdcard, bool printOutput, int& linuxError);
|
ReturnValue_t performFsck(sd::SdCard sdcard, bool printOutput, int& linuxError);
|
||||||
|
|
||||||
|
void markUnusable();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CommandExecutor cmdExecutor;
|
CommandExecutor cmdExecutor;
|
||||||
Operations currentOp = Operations::IDLE;
|
Operations currentOp = Operations::IDLE;
|
||||||
bool blocking = false;
|
bool blocking = false;
|
||||||
bool sdCardActive = true;
|
bool sdCardActive = true;
|
||||||
bool printCmdOutput = true;
|
bool printCmdOutput = true;
|
||||||
MutexIF* mutex = nullptr;
|
bool markedUnusable = false;
|
||||||
|
MutexIF* sdLock = nullptr;
|
||||||
|
MutexIF* prefLock = nullptr;
|
||||||
|
MutexIF* defaultLock = nullptr;
|
||||||
|
static constexpr MutexIF::TimeoutType LOCK_TYPE = MutexIF::TimeoutType::WAITING;
|
||||||
|
static constexpr uint32_t SD_LOCK_TIMEOUT = 250;
|
||||||
|
static constexpr uint32_t OTHER_TIMEOUT = 20;
|
||||||
|
static constexpr char LOCK_CTX[] = "SdCardManager";
|
||||||
|
|
||||||
SdCardManager();
|
SdCardManager();
|
||||||
|
|
||||||
@ -229,7 +238,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
|
|||||||
void processSdStatusLine(SdStatePair& active, std::string& line, uint8_t& idx,
|
void processSdStatusLine(SdStatePair& active, std::string& line, uint8_t& idx,
|
||||||
sd::SdCard& currentSd);
|
sd::SdCard& currentSd);
|
||||||
|
|
||||||
std::string currentPrefix;
|
std::optional<std::string> currentPrefix;
|
||||||
|
|
||||||
static SdCardManager* INSTANCE;
|
static SdCardManager* INSTANCE;
|
||||||
};
|
};
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
std::filesystem::path fshelpers::getPrefixedPath(SdCardManager &man,
|
std::filesystem::path fshelpers::getPrefixedPath(SdCardManager &man,
|
||||||
std::filesystem::path pathWihtoutPrefix) {
|
std::filesystem::path pathWihtoutPrefix) {
|
||||||
auto prefix = man.getCurrentMountPrefix();
|
auto prefix = man.getCurrentMountPrefix();
|
||||||
|
if (prefix == nullptr) {
|
||||||
|
return pathWihtoutPrefix;
|
||||||
|
}
|
||||||
auto resPath = prefix / pathWihtoutPrefix;
|
auto resPath = prefix / pathWihtoutPrefix;
|
||||||
return resPath;
|
return resPath;
|
||||||
}
|
}
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
* @brief This is the main program for the target hardware.
|
* @brief This is the main program for the target hardware.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int main(void) {
|
int main(int argc, char* argv[]) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
#if Q7S_SIMPLE_MODE == 0
|
#if Q7S_SIMPLE_MODE == 0
|
||||||
return obsw::obsw();
|
return obsw::obsw(argc, argv);
|
||||||
#else
|
#else
|
||||||
return simple::simple();
|
return simple::simple();
|
||||||
#endif
|
#endif
|
||||||
|
@ -1 +1 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE scratchApi.cpp)
|
target_sources(${OBSW_NAME} PRIVATE scratchApi.cpp LocalParameterHandler.cpp)
|
||||||
|
41
bsp_q7s/memory/LocalParameterHandler.cpp
Normal file
41
bsp_q7s/memory/LocalParameterHandler.cpp
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#include "LocalParameterHandler.h"
|
||||||
|
|
||||||
|
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||||
|
|
||||||
|
LocalParameterHandler::LocalParameterHandler(std::string sdRelativeName, SdCardMountedIF* sdcMan)
|
||||||
|
: NVMParameterBase(), sdRelativeName(sdRelativeName), sdcMan(sdcMan) {}
|
||||||
|
|
||||||
|
LocalParameterHandler::~LocalParameterHandler() {}
|
||||||
|
|
||||||
|
ReturnValue_t LocalParameterHandler::initialize() {
|
||||||
|
ReturnValue_t result = updateFullName();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
result = readJsonFile();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t LocalParameterHandler::writeJsonFile() {
|
||||||
|
ReturnValue_t result = updateFullName();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return NVMParameterBase::writeJsonFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t LocalParameterHandler::updateFullName() {
|
||||||
|
std::string mountPrefix;
|
||||||
|
auto activeSd = sdcMan->getActiveSdCard();
|
||||||
|
if (activeSd and sdcMan->isSdCardUsable(activeSd.value())) {
|
||||||
|
mountPrefix = sdcMan->getCurrentMountPrefix();
|
||||||
|
} else {
|
||||||
|
return SD_NOT_READY;
|
||||||
|
}
|
||||||
|
std::string fullname = mountPrefix + "/" + sdRelativeName;
|
||||||
|
NVMParameterBase::setFullName(fullname);
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
106
bsp_q7s/memory/LocalParameterHandler.h
Normal file
106
bsp_q7s/memory/LocalParameterHandler.h
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
#ifndef BSP_Q7S_MEMORY_LOCALPARAMETERHANDLER_H_
|
||||||
|
#define BSP_Q7S_MEMORY_LOCALPARAMETERHANDLER_H_
|
||||||
|
|
||||||
|
#include <mission/memory/NvmParameterBase.h>
|
||||||
|
#include <mission/memory/SdCardMountedIF.h>
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Class to handle persistent parameters
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class LocalParameterHandler : public NVMParameterBase {
|
||||||
|
public:
|
||||||
|
static constexpr uint8_t INTERFACE_ID = CLASS_ID::LOCAL_PARAM_HANDLER;
|
||||||
|
|
||||||
|
static constexpr ReturnValue_t SD_NOT_READY = returnvalue::makeCode(INTERFACE_ID, 0);
|
||||||
|
/**
|
||||||
|
* @brief Constructor
|
||||||
|
*
|
||||||
|
* @param sdRelativeName Absolute name of json file relative to mount
|
||||||
|
* directory
|
||||||
|
* of SD card. E.g. conf/example.json
|
||||||
|
* @param sdcMan Pointer to SD card manager
|
||||||
|
*/
|
||||||
|
LocalParameterHandler(std::string sdRelativeName, SdCardMountedIF* sdcMan);
|
||||||
|
virtual ~LocalParameterHandler();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Will initialize the local parameter handler
|
||||||
|
*
|
||||||
|
* @return OK if successful, otherwise error return value
|
||||||
|
*/
|
||||||
|
ReturnValue_t initialize();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Function to add parameter to json file. If the json file does
|
||||||
|
* not yet exist it will be created here.
|
||||||
|
*
|
||||||
|
* @param key The string to identify the parameter
|
||||||
|
* @param value The value to set for this parameter
|
||||||
|
*
|
||||||
|
* @return OK if successful, otherwise error return value
|
||||||
|
*
|
||||||
|
* @details The function will add the parameter only if it is not already
|
||||||
|
* present in the json file
|
||||||
|
*/
|
||||||
|
template <typename T>
|
||||||
|
ReturnValue_t addParameter(std::string key, T value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Function will update a parameter which already exists in the json
|
||||||
|
* file
|
||||||
|
*
|
||||||
|
* @param key The unique string to identify the parameter to update
|
||||||
|
* @param value The new new value to set
|
||||||
|
*
|
||||||
|
* @return OK if successful, otherwise error return value
|
||||||
|
*/
|
||||||
|
template <typename T>
|
||||||
|
ReturnValue_t updateParameter(std::string key, T value);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Name relative to mount point of SD card where parameters will be stored
|
||||||
|
std::string sdRelativeName;
|
||||||
|
|
||||||
|
SdCardMountedIF* sdcMan;
|
||||||
|
|
||||||
|
virtual ReturnValue_t writeJsonFile();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function sets the name of the json file dependent on the
|
||||||
|
* currently active SD card
|
||||||
|
*
|
||||||
|
* @return OK if successful, otherwise error return value
|
||||||
|
*/
|
||||||
|
ReturnValue_t updateFullName();
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
inline ReturnValue_t LocalParameterHandler::addParameter(std::string key, T value) {
|
||||||
|
ReturnValue_t result = insertValue(key, value);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
result = writeJsonFile();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
inline ReturnValue_t LocalParameterHandler::updateParameter(std::string key, T value) {
|
||||||
|
ReturnValue_t result = setValue(key, value);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
result = writeJsonFile();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* BSP_Q7S_MEMORY_LOCALPARAMETERHANDLER_H_ */
|
100
bsp_q7s/obsw.cpp
100
bsp_q7s/obsw.cpp
@ -1,23 +1,34 @@
|
|||||||
#include "obsw.h"
|
#include "obsw.h"
|
||||||
|
|
||||||
|
#include <pwd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
#include "bsp_q7s/core/WatchdogHandler.h"
|
||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
#include "core/InitMission.h"
|
#include "core/scheduling.h"
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
#include "fsfw/tasks/TaskFactory.h"
|
||||||
#include "fsfw/version.h"
|
#include "fsfw/version.h"
|
||||||
|
#include "mission/acsDefs.h"
|
||||||
|
#include "mission/system/tree/system.h"
|
||||||
#include "q7sConfig.h"
|
#include "q7sConfig.h"
|
||||||
#include "watchdog/definitions.h"
|
#include "watchdog/definitions.h"
|
||||||
|
|
||||||
static int OBSW_ALREADY_RUNNING = -2;
|
static constexpr int OBSW_ALREADY_RUNNING = -2;
|
||||||
#if OBSW_Q7S_EM == 0
|
#if OBSW_Q7S_EM == 0
|
||||||
static const char* DEV_STRING = "Xiphos Q7S FM";
|
static const char* DEV_STRING = "Xiphos Q7S FM";
|
||||||
#else
|
#else
|
||||||
static const char* DEV_STRING = "Xiphos Q7S EM";
|
static const char* DEV_STRING = "Xiphos Q7S EM";
|
||||||
#endif
|
#endif
|
||||||
int obsw::obsw() {
|
|
||||||
|
WatchdogHandler WATCHDOG_HANDLER;
|
||||||
|
|
||||||
|
int obsw::obsw(int argc, char* argv[]) {
|
||||||
using namespace fsfw;
|
using namespace fsfw;
|
||||||
std::cout << "-- EIVE OBSW --" << std::endl;
|
std::cout << "-- EIVE OBSW --" << std::endl;
|
||||||
std::cout << "-- Compiled for Linux (" << DEV_STRING << ") --" << std::endl;
|
std::cout << "-- Compiled for Linux (" << DEV_STRING << ") --" << std::endl;
|
||||||
@ -26,9 +37,10 @@ int obsw::obsw() {
|
|||||||
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
|
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
|
||||||
|
|
||||||
#if Q7S_CHECK_FOR_ALREADY_RUNNING_IMG == 1
|
#if Q7S_CHECK_FOR_ALREADY_RUNNING_IMG == 1
|
||||||
|
std::error_code e;
|
||||||
// Check special file here. This file is created or deleted by the eive-watchdog application
|
// Check special file here. This file is created or deleted by the eive-watchdog application
|
||||||
// or systemd service!
|
// or systemd service!
|
||||||
if (std::filesystem::exists(watchdog::RUNNING_FILE_NAME)) {
|
if (std::filesystem::exists(watchdog::RUNNING_FILE_NAME, e)) {
|
||||||
sif::warning << "File " << watchdog::RUNNING_FILE_NAME
|
sif::warning << "File " << watchdog::RUNNING_FILE_NAME
|
||||||
<< " exists so the software might "
|
<< " exists so the software might "
|
||||||
"already be running. Check if obsw systemd service has been stopped."
|
"already be running. Check if obsw systemd service has been stopped."
|
||||||
@ -36,11 +48,85 @@ int obsw::obsw() {
|
|||||||
return OBSW_ALREADY_RUNNING;
|
return OBSW_ALREADY_RUNNING;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
initmission::initMission();
|
|
||||||
|
// Delay the boot if applicable.
|
||||||
|
bootDelayHandling();
|
||||||
|
|
||||||
|
bool initWatchFunction = false;
|
||||||
|
std::string fullExecPath = argv[0];
|
||||||
|
if (fullExecPath.find("/usr/bin") != std::string::npos) {
|
||||||
|
initWatchFunction = true;
|
||||||
|
}
|
||||||
|
ReturnValue_t result = WATCHDOG_HANDLER.initialize(initWatchFunction);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
std::cerr << "Initiating EIVE watchdog handler failed" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
scheduling::initMission();
|
||||||
|
|
||||||
|
// Command the EIVE system to safe mode
|
||||||
|
#if OBSW_COMMAND_SAFE_MODE_AT_STARTUP == 1
|
||||||
|
commandEiveSystemToSafe();
|
||||||
|
#else
|
||||||
|
announceAllModes();
|
||||||
|
#endif
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
/* Suspend main thread by sleeping it. */
|
WATCHDOG_HANDLER.periodicOperation();
|
||||||
TaskFactory::delayTask(5000);
|
TaskFactory::delayTask(2000);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void obsw::bootDelayHandling() {
|
||||||
|
const char* homedir = nullptr;
|
||||||
|
homedir = getenv("HOME");
|
||||||
|
if (homedir == nullptr) {
|
||||||
|
homedir = getpwuid(getuid())->pw_dir;
|
||||||
|
}
|
||||||
|
std::filesystem::path bootDelayFile = std::filesystem::path(homedir) / "boot_delay_secs.txt";
|
||||||
|
std::error_code e;
|
||||||
|
// Init delay handling.
|
||||||
|
if (std::filesystem::exists(bootDelayFile, e)) {
|
||||||
|
std::ifstream ifile(bootDelayFile);
|
||||||
|
std::string lineStr;
|
||||||
|
unsigned int bootDelaySecs = 0;
|
||||||
|
unsigned int line = 0;
|
||||||
|
// Try to reas delay seconds from file.
|
||||||
|
while (std::getline(ifile, lineStr)) {
|
||||||
|
std::istringstream iss(lineStr);
|
||||||
|
if (!(iss >> bootDelaySecs)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
line++;
|
||||||
|
}
|
||||||
|
if (line == 0) {
|
||||||
|
// If the file is empty, assume default of 6 seconds
|
||||||
|
bootDelaySecs = 6;
|
||||||
|
}
|
||||||
|
std::cout << "Delaying OBSW start for " << bootDelaySecs << " seconds" << std::endl;
|
||||||
|
TaskFactory::delayTask(bootDelaySecs * 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void obsw::commandEiveSystemToSafe() {
|
||||||
|
auto sysQueueId = satsystem::EIVE_SYSTEM.getCommandQueue();
|
||||||
|
CommandMessage msg;
|
||||||
|
ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, 0);
|
||||||
|
ReturnValue_t result =
|
||||||
|
MessageQueueSenderIF::sendMessage(sysQueueId, &msg, MessageQueueIF::NO_QUEUE, false);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "Sending safe mode command to EIVE system failed" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void obsw::announceAllModes() {
|
||||||
|
auto sysQueueId = satsystem::EIVE_SYSTEM.getCommandQueue();
|
||||||
|
CommandMessage msg;
|
||||||
|
ModeMessage::setModeAnnounceMessage(msg, true);
|
||||||
|
ReturnValue_t result =
|
||||||
|
MessageQueueSenderIF::sendMessage(sysQueueId, &msg, MessageQueueIF::NO_QUEUE, false);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "Sending safe mode command to EIVE system failed" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -3,8 +3,12 @@
|
|||||||
|
|
||||||
namespace obsw {
|
namespace obsw {
|
||||||
|
|
||||||
int obsw();
|
int obsw(int argc, char* argv[]);
|
||||||
|
|
||||||
};
|
void bootDelayHandling();
|
||||||
|
void commandEiveSystemToSafe();
|
||||||
|
void announceAllModes();
|
||||||
|
|
||||||
|
}; // namespace obsw
|
||||||
|
|
||||||
#endif /* BSP_Q7S_CORE_OBSW_H_ */
|
#endif /* BSP_Q7S_CORE_OBSW_H_ */
|
||||||
|
@ -107,7 +107,7 @@ void initmission::initTasks() {
|
|||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||||
|
|
||||||
#if OBSW_USE_CCSDS_IP_CORE == 1
|
#if OBSW_ADD_CCSDS_IP_CORES == 1
|
||||||
PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask(
|
PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask(
|
||||||
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
|
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
|
||||||
@ -124,7 +124,7 @@ void initmission::initTasks() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
|
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */
|
||||||
|
|
||||||
auto taskStarter = [](std::vector<PeriodicTaskIF*>& taskVector, std::string name) {
|
auto taskStarter = [](std::vector<PeriodicTaskIF*>& taskVector, std::string name) {
|
||||||
for (const auto& task : taskVector) {
|
for (const auto& task : taskVector) {
|
||||||
@ -140,10 +140,10 @@ void initmission::initTasks() {
|
|||||||
tmtcDistributor->startTask();
|
tmtcDistributor->startTask();
|
||||||
tmtcBridgeTask->startTask();
|
tmtcBridgeTask->startTask();
|
||||||
tmtcPollingTask->startTask();
|
tmtcPollingTask->startTask();
|
||||||
#if OBSW_USE_CCSDS_IP_CORE == 1
|
#if OBSW_ADD_CCSDS_IP_CORE == 1
|
||||||
pdecHandlerTask->startTask();
|
pdecHandlerTask->startTask();
|
||||||
ccsdsHandlerTask->startTask();
|
ccsdsHandlerTask->startTask();
|
||||||
#endif /* #if OBSW_USE_CCSDS_IP_CORE == 1 */
|
#endif /* #if OBSW_ADD_CCSDS_IP_CORE == 1 */
|
||||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
supvHelperTask->startTask();
|
supvHelperTask->startTask();
|
||||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
/** All of the following flags should be enabled for mission code */
|
/** All of the following flags should be enabled for mission code */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
#define OBSW_USE_CCSDS_IP_CORE 0
|
#define OBSW_ADD_CCSDS_IP_CORE 0
|
||||||
// Set to 1 if all telemetry should be sent to the PTME IP Core
|
// Set to 1 if all telemetry should be sent to the PTME IP Core
|
||||||
#define OBSW_TM_TO_PTME 0
|
#define OBSW_TM_TO_PTME 0
|
||||||
// Set to 1 if telecommands are received via the PDEC IP Core
|
// Set to 1 if telecommands are received via the PDEC IP Core
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
#include "fsfw/tmtcservices/PusServiceBase.h"
|
#include "fsfw/tmtcservices/PusServiceBase.h"
|
||||||
#include "fsfw_hal/linux/i2c/I2cComIF.h"
|
#include "fsfw_hal/linux/i2c/I2cComIF.h"
|
||||||
#include "fsfw_hal/linux/i2c/I2cCookie.h"
|
#include "fsfw_hal/linux/i2c/I2cCookie.h"
|
||||||
#include "fsfw_hal/linux/uart/UartComIF.h"
|
#include "fsfw_hal/linux/serial/SerialComIF.h"
|
||||||
#include "fsfw_hal/linux/uart/UartCookie.h"
|
#include "fsfw_hal/linux/serial/SerialCookie.h"
|
||||||
#include "fsfw_hal/common/gpio/GpioCookie.h"
|
#include "fsfw_hal/common/gpio/GpioCookie.h"
|
||||||
#include "linux/ObjectFactory.h"
|
#include "linux/ObjectFactory.h"
|
||||||
#include "linux/devices/ploc/PlocMPSoCHandler.h"
|
#include "linux/devices/ploc/PlocMPSoCHandler.h"
|
||||||
@ -59,7 +59,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
ObjectFactory::produceGenericObjects();
|
ObjectFactory::produceGenericObjects();
|
||||||
|
|
||||||
LinuxLibgpioIF* gpioComIF = new LinuxLibgpioIF(objects::GPIO_IF);;
|
LinuxLibgpioIF* gpioComIF = new LinuxLibgpioIF(objects::GPIO_IF);;
|
||||||
new UartComIF(objects::UART_COM_IF);
|
newSerialComIF(objects::UART_COM_IF);
|
||||||
|
|
||||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||||
UartCookie* mpsocUartCookie = new UartCookie(objects::PLOC_MPSOC_HANDLER, te0720_1cfa::MPSOC_UART,
|
UartCookie* mpsocUartCookie = new UartCookie(objects::PLOC_MPSOC_HANDLER, te0720_1cfa::MPSOC_UART,
|
||||||
|
6
clone-submodules-no-privlibs.sh
Executable file
6
clone-submodules-no-privlibs.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
root="$(pwd)"
|
||||||
|
ln -s "$root/hooks" "$root/.git/hooks"
|
||||||
|
|
||||||
|
git submodule update --init fsfw thirdparty/rapidcsv thirdparty/lwgps thirdparty/json
|
@ -21,10 +21,13 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(RELEASE_BUILD 1 PARENT_SCOPE)
|
||||||
|
|
||||||
if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
|
if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
|
||||||
message(STATUS
|
message(STATUS
|
||||||
"Building Debug application with flags: ${CMAKE_C_FLAGS_DEBUG}"
|
"Building Debug application with flags: ${CMAKE_C_FLAGS_DEBUG}"
|
||||||
)
|
)
|
||||||
|
set(RELEASE_BUILD 0 PARENT_SCOPE)
|
||||||
elseif(${CMAKE_BUILD_TYPE} MATCHES "RelWithDebInfo")
|
elseif(${CMAKE_BUILD_TYPE} MATCHES "RelWithDebInfo")
|
||||||
message(STATUS
|
message(STATUS
|
||||||
"Building Release (Debug) application with "
|
"Building Release (Debug) application with "
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# 2. Major version
|
# 2. Major version
|
||||||
# 3. Minor version
|
# 3. Minor version
|
||||||
# 4. Revision
|
# 4. Revision
|
||||||
# 5. git SHA hash and commits since tag
|
# 5. (Optional) git SHA hash and commits since tag when applicable
|
||||||
function(determine_version_with_git)
|
function(determine_version_with_git)
|
||||||
include(GetGitRevisionDescription)
|
include(GetGitRevisionDescription)
|
||||||
git_describe(VERSION ${ARGN})
|
git_describe(VERSION ${ARGN})
|
||||||
@ -22,7 +22,9 @@ function(determine_version_with_git)
|
|||||||
list(APPEND GIT_INFO ${_VERSION_MAJOR})
|
list(APPEND GIT_INFO ${_VERSION_MAJOR})
|
||||||
list(APPEND GIT_INFO ${_VERSION_MINOR})
|
list(APPEND GIT_INFO ${_VERSION_MINOR})
|
||||||
list(APPEND GIT_INFO ${_VERSION_PATCH})
|
list(APPEND GIT_INFO ${_VERSION_PATCH})
|
||||||
list(APPEND GIT_INFO ${VERSION_SHA1})
|
if(NOT VERSION_SHA1 STREQUAL VERSION)
|
||||||
|
list(APPEND GIT_INFO ${VERSION_SHA1})
|
||||||
|
endif()
|
||||||
set(GIT_INFO ${GIT_INFO} PARENT_SCOPE)
|
set(GIT_INFO ${GIT_INFO} PARENT_SCOPE)
|
||||||
message(STATUS "eive | Set git version info into GIT_INFO from the git tag ${VERSION}")
|
message(STATUS "eive | Set git version info into GIT_INFO from the git tag ${VERSION}")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
@ -22,24 +22,38 @@ def main():
|
|||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Processing arguments for CMake build configuration."
|
description="Processing arguments for CMake build configuration."
|
||||||
)
|
)
|
||||||
parser.add_argument("-o", "--osal", type=str, choices=["freertos", "linux", "rtems", "host"],
|
|
||||||
help="FSFW OSAL. Valid arguments: host, linux, rtems, freertos")
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-b", "--buildtype", type=str, choices=["debug", "release", "size", "reldeb"],
|
"-o",
|
||||||
|
"--osal",
|
||||||
|
type=str,
|
||||||
|
choices=["freertos", "linux", "rtems", "host"],
|
||||||
|
help="FSFW OSAL. Valid arguments: host, linux, rtems, freertos",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-b",
|
||||||
|
"--buildtype",
|
||||||
|
type=str,
|
||||||
|
choices=["debug", "release", "size", "reldeb"],
|
||||||
help="CMake build type. Valid arguments: debug, release, size, reldeb (Release with Debug "
|
help="CMake build type. Valid arguments: debug, release, size, reldeb (Release with Debug "
|
||||||
"Information)", default="debug"
|
"Information)",
|
||||||
|
default="debug",
|
||||||
)
|
)
|
||||||
parser.add_argument("-l", "--builddir", type=str, help="Specify build directory.")
|
parser.add_argument("-l", "--builddir", type=str, help="Specify build directory.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-g", "--generator", type=str, help="CMake Generator", choices=['make', 'ninja']
|
"-g", "--generator", type=str, help="CMake Generator", choices=["make", "ninja"]
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-d", "--defines",
|
"-d",
|
||||||
|
"--defines",
|
||||||
help="Additional custom defines passed to CMake (supply without -D prefix!)",
|
help="Additional custom defines passed to CMake (supply without -D prefix!)",
|
||||||
nargs="*", type=str
|
nargs="*",
|
||||||
|
type=str,
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-t", "--target-bsp", type=str, help="Target BSP, combination of architecture and machine"
|
"-t",
|
||||||
|
"--target-bsp",
|
||||||
|
type=str,
|
||||||
|
help="Target BSP, combination of architecture and machine",
|
||||||
)
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
@ -59,13 +73,13 @@ def main():
|
|||||||
if args.generator is None:
|
if args.generator is None:
|
||||||
generator_cmake_arg = ""
|
generator_cmake_arg = ""
|
||||||
else:
|
else:
|
||||||
if args.generator == 'make':
|
if args.generator == "make":
|
||||||
if os.name == 'nt':
|
if os.name == "nt":
|
||||||
generator_cmake_arg = '-G "MinGW Makefiles"'
|
generator_cmake_arg = '-G "MinGW Makefiles"'
|
||||||
else:
|
else:
|
||||||
generator_cmake_arg = '-G "Unix Makefiles"'
|
generator_cmake_arg = '-G "Unix Makefiles"'
|
||||||
elif args.generator == 'ninja':
|
elif args.generator == "ninja":
|
||||||
generator_cmake_arg = '-G Ninja'
|
generator_cmake_arg = "-G Ninja"
|
||||||
else:
|
else:
|
||||||
generator_cmake_arg = args.generator
|
generator_cmake_arg = args.generator
|
||||||
|
|
||||||
@ -79,7 +93,7 @@ def main():
|
|||||||
cmake_build_type = "RelWithDebInfo"
|
cmake_build_type = "RelWithDebInfo"
|
||||||
|
|
||||||
if args.target_bsp is not None:
|
if args.target_bsp is not None:
|
||||||
cmake_target_cfg_cmd = f"-DTGT_BSP=\"{args.target_bsp}\""
|
cmake_target_cfg_cmd = f'-DTGT_BSP="{args.target_bsp}"'
|
||||||
else:
|
else:
|
||||||
cmake_target_cfg_cmd = ""
|
cmake_target_cfg_cmd = ""
|
||||||
|
|
||||||
@ -92,10 +106,12 @@ def main():
|
|||||||
build_folder = cmake_build_type
|
build_folder = cmake_build_type
|
||||||
if args.builddir is not None:
|
if args.builddir is not None:
|
||||||
build_folder = args.builddir
|
build_folder = args.builddir
|
||||||
|
|
||||||
build_path = source_location + os.path.sep + build_folder
|
build_path = source_location + os.path.sep + build_folder
|
||||||
if os.path.isdir(build_path):
|
if os.path.isdir(build_path):
|
||||||
remove_old_dir = input(f"{build_folder} folder already exists. Remove old directory? [y/n]: ")
|
remove_old_dir = input(
|
||||||
|
f"{build_folder} folder already exists. Remove old directory? [y/n]: "
|
||||||
|
)
|
||||||
if str(remove_old_dir).lower() in ["yes", "y", 1]:
|
if str(remove_old_dir).lower() in ["yes", "y", 1]:
|
||||||
remove_old_dir = True
|
remove_old_dir = True
|
||||||
else:
|
else:
|
||||||
@ -109,17 +125,19 @@ def main():
|
|||||||
print(f"Navigating into build directory: {build_path}")
|
print(f"Navigating into build directory: {build_path}")
|
||||||
os.chdir(build_folder)
|
os.chdir(build_folder)
|
||||||
|
|
||||||
cmake_command = f"cmake {generator_cmake_arg} -DFSFW_OSAL=\"{osal}\" " \
|
cmake_command = (
|
||||||
f"-DCMAKE_BUILD_TYPE=\"{cmake_build_type}\" {cmake_target_cfg_cmd} " \
|
f'cmake {generator_cmake_arg} -DFSFW_OSAL="{osal}" '
|
||||||
f"{define_string} {source_location}"
|
f'-DCMAKE_BUILD_TYPE="{cmake_build_type}" {cmake_target_cfg_cmd} '
|
||||||
|
f"{define_string} {source_location}"
|
||||||
|
)
|
||||||
# Remove redundant spaces
|
# Remove redundant spaces
|
||||||
cmake_command = ' '.join(cmake_command.split())
|
cmake_command = " ".join(cmake_command.split())
|
||||||
print("Running CMake command: ")
|
print("Running CMake command: ")
|
||||||
print(f"\" {cmake_command} \"")
|
print(f'" {cmake_command} "')
|
||||||
os.system(cmake_command)
|
os.system(cmake_command)
|
||||||
print("-- CMake configuration done. --")
|
print("-- CMake configuration done. --")
|
||||||
|
|
||||||
|
|
||||||
def rm_build_dir(path: str):
|
def rm_build_dir(path: str):
|
||||||
# On windows the permissions of the build directory may have been set to read-only. If this
|
# On windows the permissions of the build directory may have been set to read-only. If this
|
||||||
# is the case the permissions are changed before trying to delete the directory.
|
# is the case the permissions are changed before trying to delete the directory.
|
||||||
@ -134,7 +152,9 @@ def determine_source_location() -> str:
|
|||||||
index += 1
|
index += 1
|
||||||
os.chdir("..")
|
os.chdir("..")
|
||||||
if index >= 5:
|
if index >= 5:
|
||||||
print("Error: Could not find source directory (determined by looking for fsfw folder!)")
|
print(
|
||||||
|
"Error: Could not find source directory (determined by looking for fsfw folder!)"
|
||||||
|
)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
return os.getcwd()
|
return os.getcwd()
|
||||||
|
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cfg_script_name="cmake-build-cfg.py"
|
cfg_script_name="cmake-build-cfg.py"
|
||||||
init_dir=$(pwd)
|
init_dir=$(pwd)
|
||||||
|
root_dir=""
|
||||||
if [ -z "${EIVE_OBSW_ROOT}" ]; then
|
if [ -z "${EIVE_OBSW_ROOT}" ]; then
|
||||||
counter=0
|
counter=0
|
||||||
while [ ${counter} -lt 5 ]
|
while [ ${counter} -lt 5 ]
|
||||||
do
|
do
|
||||||
cd ..
|
cd ..
|
||||||
if [ -f ${cfg_script_name} ];then
|
if [ -f ${cfg_script_name} ];then
|
||||||
|
root_dir=$(realpath "../..")
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
counter=$((counter=counter + 1))
|
counter=$((counter=counter + 1))
|
||||||
@ -18,6 +20,7 @@ if [ -z "${EIVE_OBSW_ROOT}" ]; then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
|
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
|
||||||
|
root_dir=${EIVE_OBSW_ROOT}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build_generator="make"
|
build_generator="make"
|
||||||
@ -34,4 +37,5 @@ echo "Running command (without the leading +):"
|
|||||||
set -x # Print command
|
set -x # Print command
|
||||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}"
|
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}"
|
||||||
# Use this if commands are added which should not be printed
|
# Use this if commands are added which should not be printed
|
||||||
# set +x
|
set +x
|
||||||
|
cd ${root_dir}/${builddir}
|
||||||
|
@ -7,6 +7,7 @@ if [ -z "${EIVE_OBSW_ROOT}" ]; then
|
|||||||
do
|
do
|
||||||
cd ..
|
cd ..
|
||||||
if [ -f ${cfg_script_name} ];then
|
if [ -f ${cfg_script_name} ];then
|
||||||
|
root_dir=$(realpath "../..")
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
counter=$((counter=counter + 1))
|
counter=$((counter=counter + 1))
|
||||||
@ -20,7 +21,7 @@ else
|
|||||||
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
|
cfg_script_name="${EIVE_OBSW_ROOT}/cmake/scripts/${cfg_script_name}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build_generator="Unix Makefiles"
|
build_generator="make"
|
||||||
os_fsfw="host"
|
os_fsfw="host"
|
||||||
builddir="cmake-build-release"
|
builddir="cmake-build-release"
|
||||||
if [ "${OS}" = "Windows_NT" ]; then
|
if [ "${OS}" = "Windows_NT" ]; then
|
||||||
@ -34,4 +35,5 @@ echo "Running command (without the leading +):"
|
|||||||
set -x # Print command
|
set -x # Print command
|
||||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -l "${builddir}"
|
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -l "${builddir}"
|
||||||
# Use this if commands are added which should not be printed
|
# Use this if commands are added which should not be printed
|
||||||
# set +x
|
set +x
|
||||||
|
cd ${root_dir}/${builddir}
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
#ifndef COMMON_CONFIG_OBSWVERSION_H_
|
|
||||||
#define COMMON_CONFIG_OBSWVERSION_H_
|
|
||||||
|
|
||||||
const char* const SW_NAME = "eive";
|
|
||||||
|
|
||||||
#define SW_VERSION 1
|
|
||||||
#define SW_SUBVERSION 12
|
|
||||||
#define SW_REVISION 1
|
|
||||||
|
|
||||||
#endif /* COMMON_CONFIG_OBSWVERSION_H_ */
|
|
@ -4,6 +4,8 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include "fsfw/version.h"
|
#include "fsfw/version.h"
|
||||||
|
|
||||||
|
#cmakedefine RELEASE_BUILD
|
||||||
|
|
||||||
#cmakedefine RASPBERRY_PI
|
#cmakedefine RASPBERRY_PI
|
||||||
#cmakedefine XIPHOS_Q7S
|
#cmakedefine XIPHOS_Q7S
|
||||||
#cmakedefine BEAGLEBONEBLACK
|
#cmakedefine BEAGLEBONEBLACK
|
||||||
@ -17,13 +19,7 @@ debugging. */
|
|||||||
#define OBSW_ADD_LWGPS_TEST 0
|
#define OBSW_ADD_LWGPS_TEST 0
|
||||||
|
|
||||||
// Disable this for mission code. It allows exchanging TMTC packets via the Ethernet port
|
// Disable this for mission code. It allows exchanging TMTC packets via the Ethernet port
|
||||||
#define OBSW_ADD_TCPIP_BRIDGE 1
|
#define OBSW_ADD_TCPIP_SERVERS 1
|
||||||
|
|
||||||
// Use TCP instead of UDP for the TMTC bridge. This allows using the TMTC client locally
|
|
||||||
// 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_USE_TMTC_TCP_BRIDGE 1
|
|
||||||
|
|
||||||
#define OBSW_ADD_CFDP_COMPONENTS 1
|
#define OBSW_ADD_CFDP_COMPONENTS 1
|
||||||
|
|
||||||
@ -42,14 +38,6 @@ extern const fsfw::Version OBSW_VERSION;
|
|||||||
|
|
||||||
extern const uint16_t PUS_PACKET_ID;
|
extern const uint16_t PUS_PACKET_ID;
|
||||||
extern const uint16_t CFDP_PACKET_ID;
|
extern const uint16_t CFDP_PACKET_ID;
|
||||||
|
|
||||||
static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50;
|
|
||||||
static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4;
|
|
||||||
static constexpr uint8_t VC0_QUEUE_SIZE = 50;
|
|
||||||
static constexpr uint8_t VC1_QUEUE_SIZE = 50;
|
|
||||||
static constexpr uint8_t VC2_QUEUE_SIZE = 50;
|
|
||||||
static constexpr uint8_t VC3_QUEUE_SIZE = 50;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* COMMON_CONFIG_COMMONCONFIG_H_ */
|
#endif /* COMMON_CONFIG_COMMONCONFIG_H_ */
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
#ifndef COMMON_CONFIG_DEVCONF_H_
|
#ifndef COMMON_CONFIG_DEVCONF_H_
|
||||||
#define COMMON_CONFIG_DEVCONF_H_
|
#define COMMON_CONFIG_DEVCONF_H_
|
||||||
|
|
||||||
|
#include <fsfw_hal/linux/serial/SerialCookie.h>
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
#include "commonConfig.h"
|
||||||
#include "fsfw/timemanager/clockDefinitions.h"
|
#include "fsfw/timemanager/clockDefinitions.h"
|
||||||
|
#include "fsfw_hal/linux/serial/SerialCookie.h"
|
||||||
#include "fsfw_hal/linux/spi/spiDefinitions.h"
|
#include "fsfw_hal/linux/spi/spiDefinitions.h"
|
||||||
#include "fsfw_hal/linux/uart/UartCookie.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPI configuration will be contained here to let the device handlers remain independent
|
* SPI configuration will be contained here to let the device handlers remain independent
|
||||||
@ -45,20 +48,29 @@ static constexpr spi::SpiModes DEFAULT_ADIS16507_MODE = spi::SpiModes::MODE_3;
|
|||||||
static constexpr uint32_t RW_SPEED = 300'000;
|
static constexpr uint32_t RW_SPEED = 300'000;
|
||||||
static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0;
|
static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0;
|
||||||
|
|
||||||
static constexpr dur_millis_t RTD_CS_TIMEOUT = 50;
|
#ifdef RELEASE_BUILD
|
||||||
|
static constexpr uint8_t CS_FACTOR = 1;
|
||||||
|
#else
|
||||||
|
static constexpr uint8_t CS_FACTOR = 3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static constexpr dur_millis_t RTD_CS_TIMEOUT = 50 * CS_FACTOR;
|
||||||
static constexpr uint32_t RTD_SPEED = 2'000'000;
|
static constexpr uint32_t RTD_SPEED = 2'000'000;
|
||||||
static constexpr spi::SpiModes RTD_MODE = spi::SpiModes::MODE_3;
|
static constexpr spi::SpiModes RTD_MODE = spi::SpiModes::MODE_3;
|
||||||
|
|
||||||
|
static constexpr dur_millis_t SUS_CS_TIMEOUT = 50 * CS_FACTOR;
|
||||||
|
static constexpr dur_millis_t ACS_BOARD_CS_TIMEOUT = 50 * CS_FACTOR;
|
||||||
|
|
||||||
} // namespace spi
|
} // namespace spi
|
||||||
|
|
||||||
namespace uart {
|
namespace uart {
|
||||||
|
|
||||||
static constexpr size_t HYPERION_GPS_REPLY_MAX_BUFFER = 1024;
|
static constexpr size_t HYPERION_GPS_REPLY_MAX_BUFFER = 1024;
|
||||||
static constexpr UartBaudRate SYRLINKS_BAUD = UartBaudRate::RATE_38400;
|
static constexpr UartBaudRate SYRLINKS_BAUD = UartBaudRate::RATE_38400;
|
||||||
static constexpr UartBaudRate SCEX_BAUD = UartBaudRate::RATE_57600;
|
static constexpr UartBaudRate SCEX_BAUD = UartBaudRate::RATE_115200;
|
||||||
static constexpr UartBaudRate GNSS_BAUD = UartBaudRate::RATE_9600;
|
static constexpr UartBaudRate GNSS_BAUD = UartBaudRate::RATE_9600;
|
||||||
static constexpr UartBaudRate PLOC_MPSOC_BAUD = UartBaudRate::RATE_115200;
|
static constexpr UartBaudRate PLOC_MPSOC_BAUD = UartBaudRate::RATE_115200;
|
||||||
static constexpr UartBaudRate PLOC_SUPV_BAUD = UartBaudRate::RATE_115200;
|
static constexpr UartBaudRate PLOC_SUPV_BAUD = UartBaudRate::RATE_921600;
|
||||||
static constexpr UartBaudRate STAR_TRACKER_BAUD = UartBaudRate::RATE_921600;
|
static constexpr UartBaudRate STAR_TRACKER_BAUD = UartBaudRate::RATE_921600;
|
||||||
|
|
||||||
} // namespace uart
|
} // namespace uart
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
namespace addresses {
|
namespace addresses {
|
||||||
/* Logical addresses have uint32_t datatype */
|
/* Logical addresses have uint32_t datatype */
|
||||||
enum logicalAddresses : address_t {
|
enum LogicAddress : address_t {
|
||||||
PCDU,
|
PCDU,
|
||||||
|
|
||||||
MGM_0_LIS3 = objects::MGM_0_LIS3_HANDLER,
|
MGM_0_LIS3 = objects::MGM_0_LIS3_HANDLER,
|
||||||
@ -43,11 +43,14 @@ enum logicalAddresses : address_t {
|
|||||||
DUMMY_GPS1 = 131,
|
DUMMY_GPS1 = 131,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum i2cAddresses : address_t {
|
enum I2cAddress : address_t {
|
||||||
BPX_BATTERY = 0x07,
|
BPX_BATTERY = 0x07,
|
||||||
IMTQ = 0x10,
|
IMTQ = 0x10,
|
||||||
TMP1075_TCS_1 = 0x48,
|
TMP1075_TCS_0 = 0x48,
|
||||||
TMP1075_TCS_2 = 0x49,
|
TMP1075_TCS_1 = 0x49,
|
||||||
|
TMP1075_PLPCDU_0 = 0x4A,
|
||||||
|
TMP1075_PLPCDU_1 = 0x4B,
|
||||||
|
TMP1075_IF_BOARD = 0x4C,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum spiAddresses : address_t {
|
enum spiAddresses : address_t {
|
@ -12,7 +12,7 @@ enum Switchers : uint8_t {
|
|||||||
HEATER_4_CAMERA,
|
HEATER_4_CAMERA,
|
||||||
HEATER_5_STR,
|
HEATER_5_STR,
|
||||||
HEATER_6_DRO,
|
HEATER_6_DRO,
|
||||||
HEATER_7_HPA,
|
HEATER_7_S_BAND,
|
||||||
NUMBER_OF_SWITCHES
|
NUMBER_OF_SWITCHES
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,57 @@ static constexpr uint8_t LIVE_TM = 0;
|
|||||||
static constexpr uint32_t MAX_PATH_SIZE = 100;
|
static constexpr uint32_t MAX_PATH_SIZE = 100;
|
||||||
static constexpr uint32_t MAX_FILENAME_SIZE = 50;
|
static constexpr uint32_t MAX_FILENAME_SIZE = 50;
|
||||||
|
|
||||||
|
static constexpr uint32_t SA_DEPL_INIT_BUFFER_SECS = 120;
|
||||||
|
// Burn time for autonomous deployment
|
||||||
|
static constexpr uint32_t SA_DEPL_BURN_TIME_SECS = 180;
|
||||||
|
static constexpr uint32_t SA_DEPL_WAIT_TIME_SECS = 45 * 60;
|
||||||
|
// HW constraints (current limit) mean that the GPIO channels need to be switched on in alternation
|
||||||
|
static constexpr uint32_t LEGACY_SA_DEPL_CHANNEL_ALTERNATION_INTERVAL_SECS = 5;
|
||||||
|
// Maximum allowed burn time allowed by the software.
|
||||||
|
static constexpr uint32_t SA_DEPL_MAX_BURN_TIME = 180;
|
||||||
|
|
||||||
|
static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50;
|
||||||
|
static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4;
|
||||||
|
static constexpr uint8_t VC0_QUEUE_SIZE = 80;
|
||||||
|
static constexpr uint8_t VC1_QUEUE_SIZE = 80;
|
||||||
|
static constexpr uint8_t VC2_QUEUE_SIZE = 50;
|
||||||
|
static constexpr uint8_t VC3_QUEUE_SIZE = 50;
|
||||||
|
|
||||||
|
static constexpr uint32_t MAX_PUS_FUNNEL_QUEUE_DEPTH = 100;
|
||||||
|
|
||||||
|
static constexpr uint32_t MAX_STORED_CMDS_UDP = 120;
|
||||||
|
static constexpr uint32_t MAX_STORED_CMDS_TCP = 150;
|
||||||
|
|
||||||
|
namespace spiSched {
|
||||||
|
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_1_SUS_READ_MS = 15;
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_2_SENSOR_READ_MS = 30;
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_3_READ_IMTQ_MGM_MS = 43;
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_4_ACS_CTRL_MS = 45;
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_5_ACTUATOR_MS = 55;
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_6_IMTQ_BLOCK_2_MS = 105;
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_RTD = 150;
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_7_RW_READ_MS = 300;
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_8_PLPCDU_MS = 320;
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_9_RAD_SENS_MS = 340;
|
||||||
|
|
||||||
|
// 15 ms for FM
|
||||||
|
static constexpr float SCHED_BLOCK_1_PERIOD = static_cast<float>(SCHED_BLOCK_1_SUS_READ_MS) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_2_PERIOD =
|
||||||
|
static_cast<float>(SCHED_BLOCK_2_SENSOR_READ_MS) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_3_PERIOD =
|
||||||
|
static_cast<float>(SCHED_BLOCK_3_READ_IMTQ_MGM_MS) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_4_PERIOD = static_cast<float>(SCHED_BLOCK_4_ACS_CTRL_MS) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_5_PERIOD = static_cast<float>(SCHED_BLOCK_5_ACTUATOR_MS) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_6_PERIOD =
|
||||||
|
static_cast<float>(SCHED_BLOCK_6_IMTQ_BLOCK_2_MS) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_RTD_PERIOD = static_cast<float>(SCHED_BLOCK_RTD) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_7_PERIOD = static_cast<float>(SCHED_BLOCK_7_RW_READ_MS) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_8_PERIOD = static_cast<float>(SCHED_BLOCK_8_PLPCDU_MS) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_9_PERIOD = static_cast<float>(SCHED_BLOCK_9_RAD_SENS_MS) / 400.0;
|
||||||
|
|
||||||
|
} // namespace spiSched
|
||||||
|
|
||||||
} // namespace config
|
} // namespace config
|
||||||
|
|
||||||
#endif /* COMMON_CONFIG_DEFINITIONS_H_ */
|
#endif /* COMMON_CONFIG_DEFINITIONS_H_ */
|
||||||
|
@ -35,6 +35,10 @@ enum : uint8_t {
|
|||||||
SYRLINKS = 137,
|
SYRLINKS = 137,
|
||||||
SCEX_HANDLER = 138,
|
SCEX_HANDLER = 138,
|
||||||
CONFIGHANDLER = 139,
|
CONFIGHANDLER = 139,
|
||||||
|
CORE = 140,
|
||||||
|
TCS_CONTROLLER = 141,
|
||||||
|
COM_SUBSYSTEM = 142,
|
||||||
|
PERSISTENT_TM_STORE = 143,
|
||||||
COMMON_SUBSYSTEM_ID_END
|
COMMON_SUBSYSTEM_ID_END
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -8,14 +8,20 @@ enum commonObjects : uint32_t {
|
|||||||
/* First Byte 0x50-0x52 reserved for PUS Services **/
|
/* First Byte 0x50-0x52 reserved for PUS Services **/
|
||||||
CCSDS_PACKET_DISTRIBUTOR = 0x50000100,
|
CCSDS_PACKET_DISTRIBUTOR = 0x50000100,
|
||||||
PUS_PACKET_DISTRIBUTOR = 0x50000200,
|
PUS_PACKET_DISTRIBUTOR = 0x50000200,
|
||||||
TMTC_BRIDGE = 0x50000300,
|
TCP_TMTC_SERVER = 0x50000300,
|
||||||
TMTC_POLLING_TASK = 0x50000400,
|
UDP_TMTC_SERVER = 0x50000301,
|
||||||
|
TCP_TMTC_POLLING_TASK = 0x50000400,
|
||||||
|
UDP_TMTC_POLLING_TASK = 0x50000401,
|
||||||
FILE_SYSTEM_HANDLER = 0x50000500,
|
FILE_SYSTEM_HANDLER = 0x50000500,
|
||||||
SDC_MANAGER = 0x50000550,
|
SDC_MANAGER = 0x50000550,
|
||||||
PTME = 0x50000600,
|
PTME = 0x50000600,
|
||||||
PDEC_HANDLER = 0x50000700,
|
PDEC_HANDLER = 0x50000700,
|
||||||
CCSDS_HANDLER = 0x50000800,
|
CCSDS_HANDLER = 0x50000800,
|
||||||
|
|
||||||
|
/* 0x49 ('I') for Communication Interfaces **/
|
||||||
|
UART_COM_IF = 0x49030003,
|
||||||
|
SCEX_UART_READER = 0x49010006,
|
||||||
|
|
||||||
/* 0x43 ('C') for Controllers */
|
/* 0x43 ('C') for Controllers */
|
||||||
THERMAL_CONTROLLER = 0x43400001,
|
THERMAL_CONTROLLER = 0x43400001,
|
||||||
ACS_CONTROLLER = 0x43000002,
|
ACS_CONTROLLER = 0x43000002,
|
||||||
@ -38,9 +44,14 @@ enum commonObjects : uint32_t {
|
|||||||
STAR_TRACKER = 0x44130001,
|
STAR_TRACKER = 0x44130001,
|
||||||
GPS_CONTROLLER = 0x44130045,
|
GPS_CONTROLLER = 0x44130045,
|
||||||
|
|
||||||
|
IMTQ_POLLING = 0x44140013,
|
||||||
IMTQ_HANDLER = 0x44140014,
|
IMTQ_HANDLER = 0x44140014,
|
||||||
TMP1075_HANDLER_1 = 0x44420004,
|
TMP1075_HANDLER_TCS_0 = 0x44420004,
|
||||||
TMP1075_HANDLER_2 = 0x44420005,
|
TMP1075_HANDLER_TCS_1 = 0x44420005,
|
||||||
|
TMP1075_HANDLER_PLPCDU_0 = 0x44420006,
|
||||||
|
TMP1075_HANDLER_PLPCDU_1 = 0x44420007,
|
||||||
|
TMP1075_HANDLER_IF_BOARD = 0x44420008,
|
||||||
|
|
||||||
PCDU_HANDLER = 0x442000A1,
|
PCDU_HANDLER = 0x442000A1,
|
||||||
P60DOCK_HANDLER = 0x44250000,
|
P60DOCK_HANDLER = 0x44250000,
|
||||||
PDU1_HANDLER = 0x44250001,
|
PDU1_HANDLER = 0x44250001,
|
||||||
@ -107,10 +118,15 @@ enum commonObjects : uint32_t {
|
|||||||
SUS_5_N_LOC_XFYMZB_PT_ZB = 0x44120037,
|
SUS_5_N_LOC_XFYMZB_PT_ZB = 0x44120037,
|
||||||
SUS_11_R_LOC_XBYMZB_PT_ZB = 0x44120043,
|
SUS_11_R_LOC_XBYMZB_PT_ZB = 0x44120043,
|
||||||
|
|
||||||
SYRLINKS_HK_HANDLER = 0x445300A3,
|
SYRLINKS_HANDLER = 0x445300A3,
|
||||||
|
// might be obsolete, was not used in Q7S FM SW
|
||||||
|
// CCSDS_IP_CORE_BRIDGE = 0x73500000,
|
||||||
|
|
||||||
/* 0x49 ('I') for Communication Interfaces */
|
/* 0x49 ('I') for Communication Interfaces */
|
||||||
SPI_RTD_COM_IF = 0x49020006,
|
ACS_BOARD_POLLING_TASK = 0x49060004,
|
||||||
|
RW_POLLING_TASK = 0x49060005,
|
||||||
|
SPI_RTD_COM_IF = 0x49060006,
|
||||||
|
SUS_POLLING_TASK = 0x49060007,
|
||||||
|
|
||||||
// 0x60 for other stuff
|
// 0x60 for other stuff
|
||||||
HEATER_0_PLOC_PROC_BRD = 0x60000000,
|
HEATER_0_PLOC_PROC_BRD = 0x60000000,
|
||||||
@ -126,9 +142,30 @@ enum commonObjects : uint32_t {
|
|||||||
ACS_BOARD_ASS = 0x73000001,
|
ACS_BOARD_ASS = 0x73000001,
|
||||||
SUS_BOARD_ASS = 0x73000002,
|
SUS_BOARD_ASS = 0x73000002,
|
||||||
TCS_BOARD_ASS = 0x73000003,
|
TCS_BOARD_ASS = 0x73000003,
|
||||||
RW_ASS = 0x73000004,
|
RW_ASSY = 0x73000004,
|
||||||
CFDP_HANDLER = 0x73000005,
|
CAM_SWITCHER = 0x73000006,
|
||||||
CFDP_DISTRIBUTOR = 0x73000006
|
SYRLINKS_ASSY = 0x73000007,
|
||||||
|
IMTQ_ASSY = 0x73000008,
|
||||||
|
STR_ASSY = 0x73000009,
|
||||||
|
EIVE_SYSTEM = 0x73010000,
|
||||||
|
ACS_SUBSYSTEM = 0x73010001,
|
||||||
|
PL_SUBSYSTEM = 0x73010002,
|
||||||
|
TCS_SUBSYSTEM = 0x73010003,
|
||||||
|
COM_SUBSYSTEM = 0x73010004,
|
||||||
|
|
||||||
|
TM_FUNNEL = 0x73000100,
|
||||||
|
PUS_TM_FUNNEL = 0x73000101,
|
||||||
|
CFDP_TM_FUNNEL = 0x73000102,
|
||||||
|
CFDP_HANDLER = 0x73000205,
|
||||||
|
CFDP_DISTRIBUTOR = 0x73000206,
|
||||||
|
MISC_TM_STORE = 0x73020001,
|
||||||
|
OK_TM_STORE = 0x73020002,
|
||||||
|
NOT_OK_TM_STORE = 0x73020003,
|
||||||
|
HK_TM_STORE = 0x73020004,
|
||||||
|
CFDP_TM_STORE = 0x73030000,
|
||||||
|
|
||||||
|
// Other stuff
|
||||||
|
THERMAL_TEMP_INSERTER = 0x90000003,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,9 +35,15 @@ enum commonClassIds : uint8_t {
|
|||||||
SA_DEPL_HANDLER, // SADPL
|
SA_DEPL_HANDLER, // SADPL
|
||||||
MPSOC_RETURN_VALUES_IF, // MPSOCRTVIF
|
MPSOC_RETURN_VALUES_IF, // MPSOCRTVIF
|
||||||
SUPV_RETURN_VALUES_IF, // SPVRTVIF
|
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
|
||||||
COMMON_CLASS_ID_END // [EXPORT] : [END]
|
COMMON_CLASS_ID_END // [EXPORT] : [END]
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* COMMON_CONFIG_COMMONCLASSIDS_H_ */
|
#endif /* COMMON_CONFIG_COMMONCLASSIDS_H_ */
|
||||||
|
@ -12,6 +12,7 @@ enum Ids {
|
|||||||
PUS_SERVICE_8 = 8,
|
PUS_SERVICE_8 = 8,
|
||||||
PUS_SERVICE_9 = 9,
|
PUS_SERVICE_9 = 9,
|
||||||
PUS_SERVICE_11 = 11,
|
PUS_SERVICE_11 = 11,
|
||||||
|
PUS_SERVICE_15 = 15,
|
||||||
PUS_SERVICE_17 = 17,
|
PUS_SERVICE_17 = 17,
|
||||||
PUS_SERVICE_19 = 19,
|
PUS_SERVICE_19 = 19,
|
||||||
PUS_SERVICE_20 = 20,
|
PUS_SERVICE_20 = 20,
|
||||||
|
@ -1,21 +1,30 @@
|
|||||||
target_sources(
|
target_sources(
|
||||||
${LIB_DUMMIES}
|
${LIB_DUMMIES}
|
||||||
PUBLIC TemperatureSensorsDummy.cpp
|
PUBLIC TemperatureSensorInserter.cpp
|
||||||
SusDummy.cpp
|
SusDummy.cpp
|
||||||
BpxDummy.cpp
|
BpxDummy.cpp
|
||||||
ComIFDummy.cpp
|
ComIFDummy.cpp
|
||||||
ComCookieDummy.cpp
|
ComCookieDummy.cpp
|
||||||
RwDummy.cpp
|
RwDummy.cpp
|
||||||
|
Max31865Dummy.cpp
|
||||||
StarTrackerDummy.cpp
|
StarTrackerDummy.cpp
|
||||||
SyrlinksDummy.cpp
|
SyrlinksDummy.cpp
|
||||||
ImtqDummy.cpp
|
ImtqDummy.cpp
|
||||||
AcuDummy.cpp
|
AcuDummy.cpp
|
||||||
PduDummy.cpp
|
PduDummy.cpp
|
||||||
P60DockDummy.cpp
|
P60DockDummy.cpp
|
||||||
|
SaDeploymentDummy.cpp
|
||||||
|
GpsDhbDummy.cpp
|
||||||
|
GpsCtrlDummy.cpp
|
||||||
GyroAdisDummy.cpp
|
GyroAdisDummy.cpp
|
||||||
GyroL3GD20Dummy.cpp
|
GyroL3GD20Dummy.cpp
|
||||||
MgmLIS3MDLDummy.cpp
|
MgmLIS3MDLDummy.cpp
|
||||||
PlPcduDummy.cpp
|
PlPcduDummy.cpp
|
||||||
|
ExecutableComIfDummy.cpp
|
||||||
|
ScexDummy.cpp
|
||||||
CoreControllerDummy.cpp
|
CoreControllerDummy.cpp
|
||||||
|
PlocMpsocDummy.cpp
|
||||||
|
PlocSupervisorDummy.cpp
|
||||||
helpers.cpp
|
helpers.cpp
|
||||||
MgmRm3100Dummy.cpp)
|
MgmRm3100Dummy.cpp
|
||||||
|
Tmp1075Dummy.cpp)
|
||||||
|
@ -6,8 +6,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
CoreControllerDummy::CoreControllerDummy(object_id_t objectId)
|
CoreControllerDummy::CoreControllerDummy(object_id_t objectId) : ExtendedControllerBase(objectId) {}
|
||||||
: ExtendedControllerBase(objectId, objects::NO_OBJECT) {}
|
|
||||||
|
|
||||||
ReturnValue_t CoreControllerDummy::initialize() {
|
ReturnValue_t CoreControllerDummy::initialize() {
|
||||||
static bool done = false;
|
static bool done = false;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <fsfw/controller/ExtendedControllerBase.h>
|
#include <fsfw/controller/ExtendedControllerBase.h>
|
||||||
#include <mission/devices/devicedefinitions/SusDefinitions.h>
|
#include <mission/devices/devicedefinitions/susMax1227Helpers.h>
|
||||||
|
|
||||||
class CoreControllerDummy : public ExtendedControllerBase {
|
class CoreControllerDummy : public ExtendedControllerBase {
|
||||||
public:
|
public:
|
||||||
|
27
dummies/ExecutableComIfDummy.cpp
Normal file
27
dummies/ExecutableComIfDummy.cpp
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#include <dummies/ExecutableComIfDummy.h>
|
||||||
|
|
||||||
|
ExecutableComIfDummy::ExecutableComIfDummy(object_id_t objectId) : SystemObject(objectId) {}
|
||||||
|
|
||||||
|
ReturnValue_t ExecutableComIfDummy::initializeInterface(CookieIF *cookie) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t ExecutableComIfDummy::sendMessage(CookieIF *cookie, const uint8_t *sendData,
|
||||||
|
size_t sendLen) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t ExecutableComIfDummy::getSendSuccess(CookieIF *cookie) { return returnvalue::OK; }
|
||||||
|
|
||||||
|
ReturnValue_t ExecutableComIfDummy::requestReceiveMessage(CookieIF *cookie, size_t requestLen) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t ExecutableComIfDummy::performOperation(uint8_t operationCode) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t ExecutableComIfDummy::readReceivedMessage(CookieIF *cookie, uint8_t **buffer,
|
||||||
|
size_t *size) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
21
dummies/ExecutableComIfDummy.h
Normal file
21
dummies/ExecutableComIfDummy.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#ifndef DUMMIES_EXECUTABLECOMIFDUMMY_H_
|
||||||
|
#define DUMMIES_EXECUTABLECOMIFDUMMY_H_
|
||||||
|
|
||||||
|
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
||||||
|
#include <fsfw/objectmanager/SystemObject.h>
|
||||||
|
#include <fsfw/tasks/ExecutableObjectIF.h>
|
||||||
|
|
||||||
|
class ExecutableComIfDummy : public ExecutableObjectIF,
|
||||||
|
public DeviceCommunicationIF,
|
||||||
|
public SystemObject {
|
||||||
|
public:
|
||||||
|
ExecutableComIfDummy(object_id_t objectId);
|
||||||
|
ReturnValue_t performOperation(uint8_t operationCode = 0) override;
|
||||||
|
ReturnValue_t initializeInterface(CookieIF *cookie) override;
|
||||||
|
ReturnValue_t sendMessage(CookieIF *cookie, const uint8_t *sendData, size_t sendLen) override;
|
||||||
|
ReturnValue_t getSendSuccess(CookieIF *cookie) override;
|
||||||
|
ReturnValue_t requestReceiveMessage(CookieIF *cookie, size_t requestLen) override;
|
||||||
|
ReturnValue_t readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* DUMMIES_EXECUTABLECOMIFDUMMY_H_ */
|
36
dummies/GpsCtrlDummy.cpp
Normal file
36
dummies/GpsCtrlDummy.cpp
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#include "GpsCtrlDummy.h"
|
||||||
|
|
||||||
|
GpsCtrlDummy::GpsCtrlDummy(object_id_t objectId)
|
||||||
|
: ExtendedControllerBase(objectId, 20), gpsSet(this) {}
|
||||||
|
|
||||||
|
ReturnValue_t GpsCtrlDummy::handleCommandMessage(CommandMessage* message) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GpsCtrlDummy::performControlOperation() {}
|
||||||
|
|
||||||
|
ReturnValue_t GpsCtrlDummy::checkModeCommand(Mode_t mode, Submode_t submode,
|
||||||
|
uint32_t* msToReachTheMode) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
LocalPoolDataSetBase* GpsCtrlDummy::getDataSetHandle(sid_t sid) { return &gpsSet; }
|
||||||
|
|
||||||
|
ReturnValue_t GpsCtrlDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
|
LocalDataPoolManager& poolManager) {
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::ALTITUDE, new PoolEntry<double>({537222.3469}, true));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::LONGITUDE, new PoolEntry<double>({-8.8579}, true));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::LATITUDE, new PoolEntry<double>({49.5952}, true));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::SPEED, new PoolEntry<double>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::YEAR, new PoolEntry<uint16_t>({2023}, true));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::MONTH, new PoolEntry<uint8_t>({5}, true));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::DAY, new PoolEntry<uint8_t>({16}, true));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::HOURS, new PoolEntry<uint8_t>({1}, true));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::MINUTES, new PoolEntry<uint8_t>({0}, true));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::SECONDS, new PoolEntry<uint8_t>({0}, true));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::UNIX_SECONDS, new PoolEntry<uint32_t>({1684191600}, true));
|
||||||
|
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>());
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
23
dummies/GpsCtrlDummy.h
Normal file
23
dummies/GpsCtrlDummy.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#ifndef DUMMIES_GPSCTRLDUMMY_H_
|
||||||
|
#define DUMMIES_GPSCTRLDUMMY_H_
|
||||||
|
|
||||||
|
#include <fsfw/controller/ExtendedControllerBase.h>
|
||||||
|
#include <mission/devices/devicedefinitions/GPSDefinitions.h>
|
||||||
|
|
||||||
|
class GpsCtrlDummy : public ExtendedControllerBase {
|
||||||
|
public:
|
||||||
|
GpsCtrlDummy(object_id_t objectId);
|
||||||
|
|
||||||
|
private:
|
||||||
|
GpsPrimaryDataset gpsSet;
|
||||||
|
|
||||||
|
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
||||||
|
void performControlOperation() override;
|
||||||
|
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
|
||||||
|
uint32_t* msToReachTheMode) override;
|
||||||
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
|
LocalDataPoolManager& poolManager) override;
|
||||||
|
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* DUMMIES_GPSCTRLDUMMY_H_ */
|
58
dummies/GpsDhbDummy.cpp
Normal file
58
dummies/GpsDhbDummy.cpp
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#include <dummies/GpsDhbDummy.h>
|
||||||
|
#include <mission/devices/devicedefinitions/GPSDefinitions.h>
|
||||||
|
|
||||||
|
GpsDhbDummy::GpsDhbDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
|
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||||
|
|
||||||
|
GpsDhbDummy::~GpsDhbDummy() {}
|
||||||
|
|
||||||
|
void GpsDhbDummy::doStartUp() {}
|
||||||
|
|
||||||
|
void GpsDhbDummy::doShutDown() {}
|
||||||
|
|
||||||
|
ReturnValue_t GpsDhbDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||||
|
return NOTHING_TO_SEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t GpsDhbDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
||||||
|
return NOTHING_TO_SEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t GpsDhbDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
|
const uint8_t *commandData,
|
||||||
|
size_t commandDataLen) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t GpsDhbDummy::scanForReply(const uint8_t *start, size_t len,
|
||||||
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t GpsDhbDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GpsDhbDummy::fillCommandAndReplyMap() {}
|
||||||
|
|
||||||
|
uint32_t GpsDhbDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
|
||||||
|
|
||||||
|
ReturnValue_t GpsDhbDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
|
LocalDataPoolManager &poolManager) {
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::LATITUDE, new PoolEntry<double>({0.0}, 1));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::LONGITUDE, new PoolEntry<double>({0.0}, 1));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::ALTITUDE, new PoolEntry<double>({0.0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::SPEED, new PoolEntry<double>({7684.2}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::SATS_IN_USE, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::SATS_IN_VIEW, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::YEAR, new PoolEntry<uint16_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::MONTH, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::DAY, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::HOURS, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::MINUTES, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::SECONDS, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::UNIX_SECONDS, new PoolEntry<uint32_t>({0}));
|
||||||
|
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
33
dummies/GpsDhbDummy.h
Normal file
33
dummies/GpsDhbDummy.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#ifndef DUMMIES_GPSDHBDUMMY_H_
|
||||||
|
#define DUMMIES_GPSDHBDUMMY_H_
|
||||||
|
|
||||||
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
|
|
||||||
|
class GpsDhbDummy : public DeviceHandlerBase {
|
||||||
|
public:
|
||||||
|
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
|
||||||
|
static const DeviceCommandId_t PERIODIC_REPLY = 2;
|
||||||
|
|
||||||
|
static const uint8_t SIMPLE_COMMAND_DATA = 1;
|
||||||
|
static const uint8_t PERIODIC_REPLY_DATA = 2;
|
||||||
|
|
||||||
|
GpsDhbDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
|
||||||
|
virtual ~GpsDhbDummy();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void doStartUp() override;
|
||||||
|
void doShutDown() override;
|
||||||
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData,
|
||||||
|
size_t commandDataLen) override;
|
||||||
|
ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||||
|
size_t *foundLen) override;
|
||||||
|
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
|
||||||
|
void fillCommandAndReplyMap() override;
|
||||||
|
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||||
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
|
LocalDataPoolManager &poolManager) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* DUMMIES_GPSDHBDUMMY_H_ */
|
@ -1,6 +1,6 @@
|
|||||||
#include "GyroAdisDummy.h"
|
#include "GyroAdisDummy.h"
|
||||||
|
|
||||||
#include "mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h"
|
#include <mission/devices/devicedefinitions/gyroAdisHelpers.h>
|
||||||
|
|
||||||
GyroAdisDummy::GyroAdisDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
GyroAdisDummy::GyroAdisDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
: DeviceHandlerBase(objectId, comif, comCookie), dataset(this) {}
|
: DeviceHandlerBase(objectId, comif, comCookie), dataset(this) {}
|
||||||
@ -40,6 +40,13 @@ uint32_t GyroAdisDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { r
|
|||||||
|
|
||||||
ReturnValue_t GyroAdisDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t GyroAdisDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(ADIS1650X::TEMPERATURE, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(adis1650x::ANG_VELOC_X, new PoolEntry<double>({-0.5}, true));
|
||||||
|
localDataPoolMap.emplace(adis1650x::ANG_VELOC_Y, new PoolEntry<double>({0.2}, true));
|
||||||
|
localDataPoolMap.emplace(adis1650x::ANG_VELOC_Z, new PoolEntry<double>({-1.2}, true));
|
||||||
|
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}));
|
||||||
|
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
#define DUMMIES_GYROADISDUMMY_H_
|
#define DUMMIES_GYROADISDUMMY_H_
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
|
#include <mission/devices/devicedefinitions/gyroAdisHelpers.h>
|
||||||
#include "mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h"
|
|
||||||
|
|
||||||
class GyroAdisDummy : public DeviceHandlerBase {
|
class GyroAdisDummy : public DeviceHandlerBase {
|
||||||
public:
|
public:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "GyroL3GD20Dummy.h"
|
#include "GyroL3GD20Dummy.h"
|
||||||
|
|
||||||
#include "fsfw_hal/devicehandlers/devicedefinitions/GyroL3GD20Definitions.h"
|
#include <fsfw_hal/devicehandlers/devicedefinitions/gyroL3gHelpers.h>
|
||||||
|
|
||||||
GyroL3GD20Dummy::GyroL3GD20Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
GyroL3GD20Dummy::GyroL3GD20Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||||
@ -40,9 +40,9 @@ uint32_t GyroL3GD20Dummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
|
|||||||
|
|
||||||
ReturnValue_t GyroL3GD20Dummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t GyroL3GD20Dummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_X, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(l3gd20h::ANG_VELOC_X, new PoolEntry<float>({1.2}, true));
|
||||||
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Y, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(l3gd20h::ANG_VELOC_Y, new PoolEntry<float>({-0.1}, true));
|
||||||
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Z, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(l3gd20h::ANG_VELOC_Z, new PoolEntry<float>({0.7}, true));
|
||||||
localDataPoolMap.emplace(L3GD20H::TEMPERATURE, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(l3gd20h::TEMPERATURE, new PoolEntry<float>({0.0}));
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#include "ImtqDummy.h"
|
#include "ImtqDummy.h"
|
||||||
|
|
||||||
#include <mission/devices/devicedefinitions/IMTQHandlerDefinitions.h>
|
#include <mission/devices/devicedefinitions/imtqHelpers.h>
|
||||||
|
|
||||||
ImtqDummy::ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
ImtqDummy::ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||||
|
|
||||||
ImtqDummy::~ImtqDummy() {}
|
ImtqDummy::~ImtqDummy() = default;
|
||||||
|
|
||||||
void ImtqDummy::doStartUp() {}
|
void ImtqDummy::doStartUp() {}
|
||||||
|
|
||||||
@ -38,6 +38,10 @@ uint32_t ImtqDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { retur
|
|||||||
|
|
||||||
ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry<int16_t>({0}));
|
localDataPoolMap.emplace(imtq::MCU_TEMPERATURE, new PoolEntry<int16_t>({0}));
|
||||||
return returnvalue::OK;
|
localDataPoolMap.emplace(imtq::MGM_CAL_NT, new PoolEntry<float>({0.0, 0.0, 0.0}));
|
||||||
|
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}));
|
||||||
|
return DeviceHandlerBase::initializeLocalDataPool(localDataPoolMap, poolManager);
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ class ImtqDummy : public DeviceHandlerBase {
|
|||||||
static const uint8_t PERIODIC_REPLY_DATA = 2;
|
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);
|
||||||
virtual ~ImtqDummy();
|
~ImtqDummy() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void doStartUp() override;
|
void doStartUp() override;
|
||||||
|
45
dummies/Max31865Dummy.cpp
Normal file
45
dummies/Max31865Dummy.cpp
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#include "Max31865Dummy.h"
|
||||||
|
|
||||||
|
using namespace returnvalue;
|
||||||
|
|
||||||
|
Max31865Dummy::Max31865Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
|
: DeviceHandlerBase(objectId, comif, comCookie), set(this, EiveMax31855::EXCHANGE_SET_ID) {}
|
||||||
|
void Max31865Dummy::doStartUp() { setMode(MODE_ON); }
|
||||||
|
void Max31865Dummy::doShutDown() { setMode(_MODE_POWER_DOWN); }
|
||||||
|
ReturnValue_t Max31865Dummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||||
|
return NOTHING_TO_SEND;
|
||||||
|
}
|
||||||
|
ReturnValue_t Max31865Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return OK; }
|
||||||
|
ReturnValue_t Max31865Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
|
const uint8_t *commandData,
|
||||||
|
size_t commandDataLen) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
ReturnValue_t Max31865Dummy::scanForReply(const uint8_t *start, size_t len,
|
||||||
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
ReturnValue_t Max31865Dummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
void Max31865Dummy::fillCommandAndReplyMap() {}
|
||||||
|
uint32_t Max31865Dummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 0; }
|
||||||
|
ReturnValue_t Max31865Dummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
|
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::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;
|
||||||
|
}
|
||||||
|
|
||||||
|
LocalPoolDataSetBase *Max31865Dummy::getDataSetHandle(sid_t sid) { return &set; }
|
||||||
|
Max31865Dummy::Max31865Dummy(object_id_t objectId, CookieIF *cookie)
|
||||||
|
: DeviceHandlerBase(objectId, objects::DUMMY_COM_IF, cookie),
|
||||||
|
set(this, EiveMax31855::EXCHANGE_SET_ID) {}
|
33
dummies/Max31865Dummy.h
Normal file
33
dummies/Max31865Dummy.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#ifndef EIVE_OBSW_MAX31865DUMMY_H
|
||||||
|
#define EIVE_OBSW_MAX31865DUMMY_H
|
||||||
|
|
||||||
|
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||||
|
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
|
||||||
|
|
||||||
|
class Max31865Dummy : public DeviceHandlerBase {
|
||||||
|
public:
|
||||||
|
Max31865Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
|
||||||
|
Max31865Dummy(object_id_t objectId, CookieIF *comCookie);
|
||||||
|
|
||||||
|
void setTemperature(float temperature);
|
||||||
|
|
||||||
|
private:
|
||||||
|
MAX31865::PrimarySet set;
|
||||||
|
|
||||||
|
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;
|
||||||
|
LocalPoolDataSetBase *getDataSetHandle(sid_t sid) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // EIVE_OBSW_MAX31865DUMMY_H
|
@ -1,6 +1,6 @@
|
|||||||
#include "MgmLIS3MDLDummy.h"
|
#include "MgmLIS3MDLDummy.h"
|
||||||
|
|
||||||
#include "fsfw_hal/devicehandlers/devicedefinitions/MgmLIS3HandlerDefs.h"
|
#include <fsfw_hal/devicehandlers/devicedefinitions/mgmLis3Helpers.h>
|
||||||
|
|
||||||
MgmLIS3MDLDummy::MgmLIS3MDLDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
MgmLIS3MDLDummy::MgmLIS3MDLDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
: DeviceHandlerBase(objectId, comif, comCookie), dataset(this) {}
|
: DeviceHandlerBase(objectId, comif, comCookie), dataset(this) {}
|
||||||
@ -40,6 +40,8 @@ uint32_t MgmLIS3MDLDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
|
|||||||
|
|
||||||
ReturnValue_t MgmLIS3MDLDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t MgmLIS3MDLDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(MGMLIS3MDL::TEMPERATURE_CELCIUS, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(mgmLis3::TEMPERATURE_CELCIUS, new PoolEntry<float>({0.0}));
|
||||||
|
localDataPoolMap.emplace(mgmLis3::FIELD_STRENGTHS,
|
||||||
|
new PoolEntry<float>({1.02, 0.56, -0.78}, true));
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
#define DUMMIES_MGMLIS3MDLDUMMY_H_
|
#define DUMMIES_MGMLIS3MDLDUMMY_H_
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
|
#include <fsfw_hal/devicehandlers/devicedefinitions/mgmLis3Helpers.h>
|
||||||
#include "fsfw_hal/devicehandlers/devicedefinitions/MgmLIS3HandlerDefs.h"
|
|
||||||
|
|
||||||
class MgmLIS3MDLDummy : public DeviceHandlerBase {
|
class MgmLIS3MDLDummy : public DeviceHandlerBase {
|
||||||
public:
|
public:
|
||||||
@ -17,7 +16,7 @@ class MgmLIS3MDLDummy : public DeviceHandlerBase {
|
|||||||
virtual ~MgmLIS3MDLDummy();
|
virtual ~MgmLIS3MDLDummy();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MGMLIS3MDL::MgmPrimaryDataset dataset;
|
mgmLis3::MgmPrimaryDataset dataset;
|
||||||
void doStartUp() override;
|
void doStartUp() override;
|
||||||
void doShutDown() override;
|
void doShutDown() override;
|
||||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
@ -36,5 +36,7 @@ uint32_t MgmRm3100Dummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
|
|||||||
|
|
||||||
ReturnValue_t MgmRm3100Dummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
ReturnValue_t MgmRm3100Dummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
LocalDataPoolManager& poolManager) {
|
LocalDataPoolManager& poolManager) {
|
||||||
return OK;
|
localDataPoolMap.emplace(mgmRm3100::FIELD_STRENGTHS,
|
||||||
|
new PoolEntry<float>({0.87, -0.95, 0.11}, true));
|
||||||
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#ifndef DUMMIES_MGMRM3100DUMMY_H_
|
#ifndef DUMMIES_MGMRM3100DUMMY_H_
|
||||||
#define DUMMIES_MGMRM3100DUMMY_H_
|
#define DUMMIES_MGMRM3100DUMMY_H_
|
||||||
|
|
||||||
|
#include <fsfw_hal/devicehandlers/devicedefinitions/mgmRm3100Helpers.h>
|
||||||
|
|
||||||
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||||
#include "fsfw_hal/devicehandlers/devicedefinitions/MgmRM3100HandlerDefs.h"
|
|
||||||
|
|
||||||
class MgmRm3100Dummy : public DeviceHandlerBase {
|
class MgmRm3100Dummy : public DeviceHandlerBase {
|
||||||
public:
|
public:
|
||||||
@ -10,7 +11,7 @@ class MgmRm3100Dummy : public DeviceHandlerBase {
|
|||||||
virtual ~MgmRm3100Dummy();
|
virtual ~MgmRm3100Dummy();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RM3100::Rm3100PrimaryDataset dataset;
|
mgmRm3100::Rm3100PrimaryDataset dataset;
|
||||||
void doStartUp() override;
|
void doStartUp() override;
|
||||||
void doShutDown() override;
|
void doShutDown() override;
|
||||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
||||||
|
|
||||||
PduDummy::PduDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
PduDummy::PduDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
: DeviceHandlerBase(objectId, comif, comCookie),
|
||||||
|
coreHk(this, static_cast<uint32_t>(P60System::SetIds::CORE)) {}
|
||||||
|
|
||||||
PduDummy::~PduDummy() {}
|
PduDummy::~PduDummy() {}
|
||||||
|
|
||||||
@ -38,5 +39,7 @@ uint32_t PduDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return
|
|||||||
ReturnValue_t PduDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t PduDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(PDU::pool::PDU_TEMPERATURE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(PDU::pool::PDU_TEMPERATURE, new PoolEntry<float>({0}));
|
||||||
|
localDataPoolMap.emplace(PDU::pool::PDU_VOLTAGES, &pduVoltages);
|
||||||
|
localDataPoolMap.emplace(PDU::pool::PDU_CURRENTS, &pduCurrents);
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
|
|
||||||
|
#include "mission/devices/devicedefinitions/GomspaceDefinitions.h"
|
||||||
|
|
||||||
class PduDummy : public DeviceHandlerBase {
|
class PduDummy : public DeviceHandlerBase {
|
||||||
public:
|
public:
|
||||||
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
|
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
|
||||||
@ -15,6 +17,10 @@ class PduDummy : public DeviceHandlerBase {
|
|||||||
virtual ~PduDummy();
|
virtual ~PduDummy();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
PDU::PduCoreHk coreHk;
|
||||||
|
PoolEntry<int16_t> pduVoltages = PoolEntry<int16_t>(9);
|
||||||
|
PoolEntry<int16_t> pduCurrents = PoolEntry<int16_t>(9);
|
||||||
|
|
||||||
void doStartUp() override;
|
void doStartUp() override;
|
||||||
void doShutDown() override;
|
void doShutDown() override;
|
||||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
42
dummies/PlocMpsocDummy.cpp
Normal file
42
dummies/PlocMpsocDummy.cpp
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#include "PlocMpsocDummy.h"
|
||||||
|
|
||||||
|
PlocMpsocDummy::PlocMpsocDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
|
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||||
|
|
||||||
|
PlocMpsocDummy::~PlocMpsocDummy() {}
|
||||||
|
|
||||||
|
void PlocMpsocDummy::doStartUp() {}
|
||||||
|
|
||||||
|
void PlocMpsocDummy::doShutDown() {}
|
||||||
|
|
||||||
|
ReturnValue_t PlocMpsocDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||||
|
return NOTHING_TO_SEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocMpsocDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
||||||
|
return NOTHING_TO_SEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocMpsocDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
|
const uint8_t *commandData,
|
||||||
|
size_t commandDataLen) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocMpsocDummy::scanForReply(const uint8_t *start, size_t len,
|
||||||
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocMpsocDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PlocMpsocDummy::fillCommandAndReplyMap() {}
|
||||||
|
|
||||||
|
uint32_t PlocMpsocDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
|
||||||
|
|
||||||
|
ReturnValue_t PlocMpsocDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
|
LocalDataPoolManager &poolManager) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user