Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
MSP430-DemoSat
Commits
0e34b973
Commit
0e34b973
authored
Jul 23, 2020
by
Rafal Babski
Browse files
fixed incorred PUS-1 telemetry in PUS-2 register load TC
parent
5815ad9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
demo-sat/work/payloadmanager/SDL/src/payloadmanager.pr
View file @
0e34b973
...
...
@@ -17,31 +17,6 @@ process Payloadmanager;
-- auxilary
dcl hal_success T_Boolean := false;
/* CIF ENDTEXT */
/* CIF procedure (416, 584), (233, 35) */
procedure execute_register_load_instruction;
/* CIF TEXT (161, 110), (388, 140) */
-- Text area for declarations and comments
fpar
in instruction DistributeARegisterLoadCommand_Type,
in/out operation_success T_Boolean;
/* CIF ENDTEXT */
/* CIF START (895, 208), (70, 35) */
START;
/* CIF decision (864, 263), (131, 50) */
decision operation_success;
/* CIF ANSWER (769, 333), (70, 24) */
(true):
/* CIF task (583, 377), (441, 35) */
task payload_data := instruction.registerData.register_address_display_data;
/* CIF PROCEDURECALL (635, 432), (336, 35) */
call oled_load_register(payload_data, operation_success);
/* CIF ANSWER (1035, 333), (70, 24) */
(false):
enddecision;
/* CIF return (912, 483), (35, 35) */
return ;
endprocedure;
/* CIF procedure (766, 482), (184, 35) */
procedure execute_onoff_instruction;
/* CIF TEXT (52, 53), (394, 140) */
...
...
@@ -59,9 +34,9 @@ process Payloadmanager;
(true):
/* CIF decision (614, 247), (212, 50) */
decision instruction.onOffDeviceAddress;
/* CIF ANSWER (57
1
, 317), (207, 24) */
/* CIF ANSWER (57
0
, 317), (207, 24) */
(on_off_device_address_display):
/* CIF decision (59
7
, 361), (156, 50) */
/* CIF decision (59
6
, 361), (156, 50) */
decision payload_data_enabled;
/* CIF ANSWER (531, 431), (70, 24) */
(true):
...
...
@@ -72,7 +47,7 @@ process Payloadmanager;
/* CIF task (752, 475), (199, 35) */
task payload_data_enabled := true;
enddecision;
/* CIF PROCEDURECALL (4
70
, 526), (409, 35) */
/* CIF PROCEDURECALL (4
69
, 526), (409, 35) */
call oled_set_data_enable(payload_data_enabled, operation_success);
/* CIF ANSWER (963, 317), (70, 24) */
ELSE:
...
...
@@ -83,61 +58,35 @@ process Payloadmanager;
/* CIF return (748, 592), (35, 35) */
return ;
endprocedure;
/* CIF procedure (416, 584), (233, 35) */
procedure execute_register_load_instruction;
/* CIF TEXT (161, 110), (388, 140) */
-- Text area for declarations and comments
fpar
in instruction DistributeARegisterLoadCommand_Type,
in/out operation_success T_Boolean;
/* CIF ENDTEXT */
/* CIF START (895, 208), (70, 35) */
START;
/* CIF decision (864, 263), (131, 50) */
decision operation_success;
/* CIF ANSWER (769, 333), (70, 24) */
(true):
/* CIF task (583, 377), (441, 35) */
task payload_data := instruction.registerData.register_address_display_data;
/* CIF PROCEDURECALL (635, 432), (336, 35) */
call oled_load_register(payload_data, operation_success);
/* CIF ANSWER (1035, 333), (70, 24) */
(false):
enddecision;
/* CIF return (912, 483), (35, 35) */
return ;
endprocedure;
/* CIF START (917, 10), (70, 35) */
START;
/* CIF NEXTSTATE (890, 60), (125, 35) */
NEXTSTATE PayloadDisabled;
/* CIF state (1108, 373), (121, 35) */
state PayloadEnabled;
/* CIF input (1059, 428), (219, 35) */
input command_on_off(param_on_off);
/* CIF task (1100, 483), (137, 35) */
task hal_success := true;
/* CIF task (911, 533), (516, 56) */
task for instruction in param_on_off.instructionsToDistributeAnOnoffDeviceCommand:
call execute_onoff_instruction(instruction, hal_success);
endfor;
/* CIF decision (1123, 609), (91, 50) */
decision hal_success;
/* CIF ANSWER (819, 679), (70, 24) */
(true):
/* CIF task (659, 723), (389, 88) */
task param_execution_report := execution_report_success : {
successfulStartOfExecutionNotificationNotification {
requestID request_id_distribute_on_off_device_command
}
};
/* CIF ANSWER (1260, 679), (70, 24) */
(false):
/* CIF task (1061, 723), (468, 104) */
task param_execution_report := execution_report_failed : {
failedStartOfExecutionNotificationNotification {
requestID request_id_distribute_on_off_device_command,
failureNoticeData failure_notice_code_invalid_address : invalid_address
}
};
enddecision;
/* CIF PROCEDURECALL (1024, 843), (289, 35) */
call report_execution(param_execution_report);
/* CIF NEXTSTATE (1108, 893), (121, 35) */
NEXTSTATE PayloadEnabled;
endstate;
/* CIF state (1689, 412), (125, 35) */
state PayloadDisabled;
/* CIF input (1600, 467), (304, 35) */
input command_register_load(param_register_load);
/* CIF task (1540, 522), (425, 104) */
task param_execution_report := execution_report_failed : {
failedStartOfExecutionNotificationNotification {
requestID request_id_distribute_register_load_command,
failureNoticeData failure_notice_code_invalid_state : disabled
}
};
/* CIF PROCEDURECALL (1608, 647), (289, 35) */
call report_execution(param_execution_report);
/* CIF NEXTSTATE (1690, 702), (125, 35) */
NEXTSTATE PayloadDisabled;
endstate;
/* CIF state (2564, 23), (121, 35) */
state PayloadEnabled;
/* CIF input (2473, 78), (304, 35) */
...
...
@@ -159,7 +108,7 @@ endfor;
/* CIF task (1976, 487), (389, 88) */
task param_execution_report := execution_report_success : {
successfulStartOfExecutionNotificationNotification {
requestID request_id_distribute_
on_off_device
_command
requestID request_id_distribute_
register_load
_command
}
};
/* CIF ANSWER (2576, 443), (70, 24) */
...
...
@@ -167,7 +116,7 @@ endfor;
/* CIF task (2377, 487), (468, 104) */
task param_execution_report := execution_report_failed : {
failedStartOfExecutionNotificationNotification {
requestID request_id_distribute_
on_off_device
_command,
requestID request_id_distribute_
register_load
_command,
failureNoticeData failure_notice_code_invalid_address : invalid_address
}
};
...
...
@@ -187,6 +136,52 @@ endfor;
/* CIF NEXTSTATE (2565, 691), (121, 35) */
NEXTSTATE PayloadEnabled;
endstate;
/* CIF state (98, 722), (121, 35) */
state PayloadEnabled;
/* CIF input (64, 777), (190, 35) */
input trigger_gather_payload_hk;
/* CIF task (0, 832), (319, 88) */
task param_hk_data := {
payload_enabled true,
payload_data_enabled payload_data_enabled,
payload_data payload_data
};
/* CIF PROCEDURECALL (43, 940), (233, 35) */
call payload_hk_store(param_hk_data);
/* CIF NEXTSTATE (97, 990), (125, 35) */
NEXTSTATE PayloadEnabled;
endstate;
/* CIF state (426, 717), (125, 35) */
state PayloadDisabled;
/* CIF input (394, 772), (190, 35) */
input trigger_gather_payload_hk;
/* CIF task (330, 827), (319, 88) */
task param_hk_data := {
payload_enabled false,
payload_data_enabled payload_data_enabled,
payload_data payload_data
};
/* CIF PROCEDURECALL (373, 978), (233, 35) */
call payload_hk_store(param_hk_data);
/* CIF NEXTSTATE (427, 1033), (125, 35) */
NEXTSTATE PayloadDisabled;
endstate;
/* CIF state (1807, 19), (125, 35) */
state PayloadDisabled;
/* CIF input (1760, 74), (219, 35) */
input command_on_off(param_on_off);
/* CIF task (1657, 129), (425, 111) */
task param_execution_report := execution_report_failed : {
failedStartOfExecutionNotificationNotification {
requestID request_id_distribute_on_off_device_command,
failureNoticeData failure_notice_code_invalid_state : disabled
}
};
/* CIF PROCEDURECALL (1725, 260), (289, 35) */
call report_execution(param_execution_report);
/* CIF NEXTSTATE (1807, 315), (125, 35) */
NEXTSTATE PayloadDisabled;
endstate;
/* CIF state (2038, 720), (226, 35) */
state PayloadEnabled,PayloadDisabled;
/* CIF input (2012, 775), (277, 35) */
...
...
@@ -205,60 +200,65 @@ endfor;
NEXTSTATE PayloadEnabled;
/* CIF ANSWER (2234, 900), (70, 24) */
(false):
/* CIF task (216
4
, 944), (209, 35) */
/* CIF task (216
5
, 944), (209, 35) */
task payload_data_enabled := false;
/* CIF task (220
4
, 999), (129, 35) */
/* CIF task (220
5
, 999), (129, 35) */
task payload_data := 0;
/* CIF PROCEDURECALL (214
6
, 1049), (244, 35) */
/* CIF PROCEDURECALL (214
7
, 1049), (244, 35) */
call oled_turn_on_off(false, hal_success);
/* CIF NEXTSTATE (220
6
, 1104), (125, 35) */
/* CIF NEXTSTATE (220
7
, 1104), (125, 35) */
NEXTSTATE PayloadDisabled;
enddecision;
endstate;
/* CIF state (1
807, 19
), (125, 35) */
/* CIF state (1
689, 412
), (125, 35) */
state PayloadDisabled;
/* CIF input (1
7
60,
7
4), (
219
, 35) */
input command_
on_off(param_on_off
);
/* CIF task (1
657, 129
), (425, 1
11
) */
/* CIF input (16
0
0, 4
67
), (
304
, 35) */
input command_
register_load(param_register_load
);
/* CIF task (1
540, 522
), (425, 1
04
) */
task param_execution_report := execution_report_failed : {
failedStartOfExecutionNotificationNotification {
requestID request_id_distribute_
on_off_device
_command,
requestID request_id_distribute_
register_load
_command,
failureNoticeData failure_notice_code_invalid_state : disabled
}
};
/* CIF PROCEDURECALL (1
725, 260
), (289, 35) */
/* CIF PROCEDURECALL (1
608, 647
), (289, 35) */
call report_execution(param_execution_report);
/* CIF NEXTSTATE (1807, 315), (125, 35) */
NEXTSTATE PayloadDisabled;
endstate;
/* CIF state (426, 717), (125, 35) */
state PayloadDisabled;
/* CIF input (394, 772), (190, 35) */
input trigger_gather_payload_hk;
/* CIF task (330, 827), (319, 88) */
task param_hk_data := {
payload_enabled false,
payload_data_enabled payload_data_enabled,
payload_data payload_data
};
/* CIF PROCEDURECALL (373, 978), (233, 35) */
call payload_hk_store(param_hk_data);
/* CIF NEXTSTATE (427, 1033), (125, 35) */
/* CIF NEXTSTATE (1690, 702), (125, 35) */
NEXTSTATE PayloadDisabled;
endstate;
/* CIF state (
98, 722
), (121, 35) */
/* CIF state (
1108, 373
), (121, 35) */
state PayloadEnabled;
/* CIF input (64, 777), (190, 35) */
input trigger_gather_payload_hk;
/* CIF task (0, 832), (319, 88) */
task param_hk_data := {
payload_enabled true,
payload_data_enabled payload_data_enabled,
payload_data payload_data
/* CIF input (1059, 428), (219, 35) */
input command_on_off(param_on_off);
/* CIF task (1100, 483), (137, 35) */
task hal_success := true;
/* CIF task (911, 533), (516, 56) */
task for instruction in param_on_off.instructionsToDistributeAnOnoffDeviceCommand:
call execute_onoff_instruction(instruction, hal_success);
endfor;
/* CIF decision (1123, 609), (91, 50) */
decision hal_success;
/* CIF ANSWER (819, 679), (70, 24) */
(true):
/* CIF task (659, 723), (389, 88) */
task param_execution_report := execution_report_success : {
successfulStartOfExecutionNotificationNotification {
requestID request_id_distribute_on_off_device_command
}
};
/* CIF PROCEDURECALL (43, 940), (233, 35) */
call payload_hk_store(param_hk_data);
/* CIF NEXTSTATE (97, 990), (125, 35) */
/* CIF ANSWER (1260, 679), (70, 24) */
(false):
/* CIF task (1061, 723), (468, 104) */
task param_execution_report := execution_report_failed : {
failedStartOfExecutionNotificationNotification {
requestID request_id_distribute_on_off_device_command,
failureNoticeData failure_notice_code_invalid_address : invalid_address
}
};
enddecision;
/* CIF PROCEDURECALL (1024, 843), (289, 35) */
call report_execution(param_execution_report);
/* CIF NEXTSTATE (1108, 893), (121, 35) */
NEXTSTATE PayloadEnabled;
endstate;
endprocess Payloadmanager;
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment