-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use IPC interaction mode in the test system
- Loading branch information
1 parent
3d0867c
commit a4a567d
Showing
4 changed files
with
49 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
# @author = "[email protected]" | ||
# @project = "Test System" | ||
|
||
behavior "Tracing" | ||
nominal case "Start event" | ||
TRACE_START @ init as start | ||
# Should be the first event in the log | ||
NOT PRECEDED BY *@* | ||
AND start.internal.trace_recorder.id = 1 | ||
AND start.internal.trace_recorder.event_count = 6 | ||
AND start.internal.trace_recorder.nonce = 1 | ||
AND start.internal.trace_recorder.object_handle = 2 | ||
AND start.internal.trace_recorder.type = "TRACE_START" | ||
AND start.timeline.internal.trace_recorder.kernel.port = "FreeRTOS" | ||
AND start.timeline.internal.trace_recorder.protocol = "streaming" | ||
end | ||
end | ||
|
||
# @type = "task-resources" | ||
behavior "Task Scheduling Resource Usage" | ||
when "a stats event is logged for a task" | ||
|
@@ -69,31 +84,41 @@ behavior "Control Cycle" | |
adc @ Sensor | ||
end | ||
|
||
recovery case "a higher priority context is activated" | ||
nominal case "program execution follows the control cycle expectations" | ||
adc | ||
FOLLOWED BY | ||
QUEUE_SEND @ Sensor (_.queue = "adc_queue") | ||
FOLLOWED BY | ||
TASK_READY @ Sensor (_.task != "Actuator") as other_task | ||
QUEUE_RECEIVE @ Actuator (_.queue = "adc_queue") | ||
FOLLOWED BY | ||
TASK_ACTIVATE @ * (_.timeline.name = other_task.task AND _.priority > 2) | ||
pwm @ Actuator as pwm | ||
FOLLOWED BY | ||
QUEUE_SEND @ Actuator (_.queue = "comms_queue") | ||
FOLLOWED BY | ||
QUEUE_RECEIVE @ Comms (_.queue = "comms_queue") | ||
FOLLOWED BY | ||
comms_tx @ Comms (_.adc = adc.measurement AND _.pwm = pwm.value) | ||
end | ||
|
||
recovery case "task is suspended" | ||
adc | ||
FOLLOWED BY | ||
TASK_READY @ Sensor | ||
FOLLOWED BY | ||
warn @ Sensor (_.formatted_string = "Called vTaskSuspend") | ||
end | ||
|
||
recovery case "a higher priority context is activated" | ||
adc | ||
FOLLOWED BY | ||
QUEUE_SEND @ Sensor (_.queue = "adc_queue") | ||
FOLLOWED BY | ||
TASK_READY @ Sensor (_.task = "Actuator") | ||
FOLLOWED BY | ||
TASK_ACTIVATE @ Actuator | ||
FOLLOWED BY | ||
TASK_READY @ Actuator (_.task != "Actuator") as other_task | ||
TASK_READY @ Sensor (_.task != "Actuator") as other_task | ||
FOLLOWED BY | ||
TASK_ACTIVATE @ * (_.timeline.name = other_task.task AND _.priority > 2) | ||
end | ||
|
||
nominal case "program execution follows the control cycle expectations" | ||
recovery case "another higher priority context is activated" | ||
adc | ||
FOLLOWED BY | ||
QUEUE_SEND @ Sensor (_.queue = "adc_queue") | ||
|
@@ -102,26 +127,8 @@ behavior "Control Cycle" | |
FOLLOWED BY | ||
TASK_ACTIVATE @ Actuator | ||
FOLLOWED BY | ||
QUEUE_RECEIVE @ Actuator (_.queue = "adc_queue") | ||
FOLLOWED BY | ||
pwm @ Actuator as pwm | ||
FOLLOWED BY | ||
QUEUE_SEND @ Actuator (_.queue = "comms_queue") | ||
FOLLOWED BY | ||
TASK_READY @ Actuator (_.task = "Comms") | ||
FOLLOWED BY | ||
TASK_ACTIVATE @ Comms | ||
FOLLOWED BY | ||
QUEUE_RECEIVE @ Comms (_.queue = "comms_queue") | ||
TASK_READY @ Actuator (_.task != "Actuator") as other_task | ||
FOLLOWED BY | ||
comms_tx @ Comms (_.adc = adc.measurement AND _.pwm = pwm.value) | ||
end | ||
end | ||
|
||
behavior "Tracing" | ||
nominal case "Start event" | ||
TRACE_START @ init (_.internal.trace_recorder.id = 1 AND _.internal.trace_recorder.event_count = 6) | ||
# Should be the first event in the log | ||
NOT PRECEDED BY *@* | ||
TASK_ACTIVATE @ * (_.timeline.name = other_task.task AND _.priority > 2) | ||
end | ||
end |