-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNotes.txt
63 lines (54 loc) · 2.88 KB
/
Notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
class: utility, classify events
classtab: a table
debie (6.2): entry point
health: health monitoring task (periodic), in HandleHealthMonitoring resp. HealthMonitoringTask
hw_if: init of hardware?
measure: aquisition
msg_ctrl: WaitMail OS functionality (wait for mailbox message, simulated)
su_ctrl: Sensor Unit Control (simulated)
taskctrl: Task scheduling control (simulated)
tc_hand: Telecommand ISR
telem: Telemetry ISR
6.3. DAS: task and interrupt management; triggers
Triggers (ISR)
TcHandler <=> tc_hand . TC_InterruptService (fills mailbox using Send_ISR_Mail)
TmHandler <=> telem . TM_InterruptService (fills mailbox using Send_ISR_Mail),
HitTriggerTask (waits for hit-trigger interrupt event using WaitInterrupt) <=> measure
TelecommandExecutionTask (waits for mail from T[cm]Handler using WaitMail) <=> tc_hand . TelecommandExecutionTask
HealthMonitoringTask (period) <=> health
AquisitionTask (waits for mail from HitTriggerTask using WaitMail) <=> measure
JOP Model (rough idea, for now put everything in Runnables):
TcHandler: Runnable registered as interrupt handler for TC Interrupt
TmHandler: Runnable registered as interrupt handler for TM Interrupt
HtHandler: triggers particle hit software event
HitTriggerTask: SwEvent (HT Interrupt, similar to BoundAsyncEventHandler, see RtThreadImpl#blockForEvent)
TelecommandExecutionTask: SwEvent (MailBox)
AquisitionTask: SwEvent (MailBox)
HealthMonitoringTask: RtThread (periodic)
General Notes on problematic translation steps:
* We have no unsigned data type in Java, and therefore need to carefully
check whether taking the signed variant (for byte/int) is correct.
As a consequence, the translation of primitive types is not an automated
task; depending on whether we want to save memory, and whether overflow may
occur (or not), different choices are preferable.
Mailbox implementation:
* public abstract class debie.support.Mailbox
* sendTaskMail(message, timeout)
* Changes to C implementation: mailbox id is implicit
* waitMail()
* Changes to C implementation: fields from incoming_mail_t *message are implicit
* fields from incoming_mail_t
* public class debie.harness.HarnessMailbox extends Mailbox
* uses same (static) mechanisms as C implementation
EventRecord implementation:
* computing checksums and copying records needs A LOT of code if each field is
addressed seperately. Maybe we should use some internal magic for this stuff.
Maybe ask the SCJ Gurus?
EventQueue (Telecommand) implementation:
* RecordEvent: in C, interrupts are disabled here; for now, no thread safety
in Java. Eventually, we should use monitors.
ScienceData:
* Science Data is shared data; access needs to be protected (e.g., by monitors).
In the Java version all data in 'ordinary' memory (that is, we
do not distinguish between internal/external memory).
Telecommand implementation: