Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit f66bfb5

Browse files
committed
Link to ccsds library 0.3.0, added index on parameter table for generation time, graphical updates
1 parent 1982212 commit f66bfb5

5 files changed

Lines changed: 41 additions & 6 deletions

File tree

eu.dariolucia.reatmetric.driver.spacecraft/src/main/java/eu/dariolucia/reatmetric/driver/spacecraft/services/impl/OnboardOperationsSchedulingService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
/**
4141
* This class implements the ECSS PUS 11 command scheduling service (limited to 11,4 and 11,3 commands).
4242
* TODO: support for 11,1, 11,2 and status report (minimal capability set) to be implemented
43+
* TODO: restore from archived state
4344
*/
4445
public class OnboardOperationsSchedulingService extends AbstractPacketService<OnboardOperationsSchedulingServiceConfiguration> {
4546

eu.dariolucia.reatmetric.persist/src/main/resources/schema.ddl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,6 @@ CREATE TABLE ACTIVITY_REPORT_DATA_TABLE (
102102
ActivityOccurrenceId BIGINT REFERENCES ACTIVITY_OCCURRENCE_DATA_TABLE(UniqueId),
103103
AdditionalData BLOB,
104104
PRIMARY KEY (UniqueId)
105-
)
105+
)
106+
-- SEPARATOR
107+
CREATE INDEX PARAMETER_DATA_TABLE_IDX1 ON PARAMETER_DATA_TABLE (GenerationTime ASC)

eu.dariolucia.reatmetric.ui/src/main/java/eu/dariolucia/reatmetric/ui/controller/ActivityDataViewController.java

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ public class ActivityDataViewController extends AbstractDisplayController implem
8686
@FXML
8787
protected Button printBtn;
8888

89+
// Remove button
90+
@FXML
91+
protected Button removeBtn;
92+
8993
// Progress indicator for data retrieval
9094
@FXML
9195
protected ProgressIndicator progressIndicator;
@@ -459,6 +463,7 @@ protected void selectTimeButtonSelected(ActionEvent e) {
459463
this.dateTimePopup.getScene().getRoot().getStylesheets().add(getClass().getResource("/eu/dariolucia/reatmetric/ui/fxml/css/MainView.css").toExternalForm());
460464
this.dateTimePopup.show(this.liveTgl.getScene().getWindow());
461465
}
466+
e.consume();
462467
}
463468

464469
@FXML
@@ -471,48 +476,55 @@ protected void liveToggleSelected(ActionEvent e) {
471476
stopSubscription();
472477
updateSelectTime();
473478
}
479+
e.consume();
474480
}
475481

476482
@FXML
477483
protected void goToStart(ActionEvent e) {
478484
if (isProcessingAvailable()) {
479485
moveToTime(Instant.EPOCH, RetrievalDirection.TO_FUTURE, 1, this.dataItemFilterController.getSelectedFilter());
480486
}
487+
e.consume();
481488
}
482489

483490
@FXML
484491
protected void goBackOne(ActionEvent e) {
485492
if (isProcessingAvailable()) {
486493
fetchRecords(1, RetrievalDirection.TO_PAST);
487494
}
495+
e.consume();
488496
}
489497

490498
@FXML
491499
protected void goBackFast(ActionEvent e) {
492500
if (isProcessingAvailable()) {
493501
fetchRecords(getNumVisibleRow(), RetrievalDirection.TO_PAST);
494502
}
503+
e.consume();
495504
}
496505

497506
@FXML
498507
protected void goToEnd(ActionEvent e) {
499508
if (isProcessingAvailable()) {
500509
moveToTime(Instant.ofEpochSecond(3600*24*365*1000L), RetrievalDirection.TO_PAST, getNumVisibleRow() * 2, this.dataItemFilterController.getSelectedFilter());
501510
}
511+
e.consume();
502512
}
503513

504514
@FXML
505515
protected void goForwardOne(ActionEvent e) {
506516
if (isProcessingAvailable()) {
507517
fetchRecords(1, RetrievalDirection.TO_FUTURE);
508518
}
519+
e.consume();
509520
}
510521

511522
@FXML
512523
protected void goForwardFast(ActionEvent e) {
513524
if (isProcessingAvailable()) {
514525
fetchRecords(getNumVisibleRow(), RetrievalDirection.TO_FUTURE);
515526
}
527+
e.consume();
516528
}
517529

518530
protected void fetchRecords(int n, RetrievalDirection direction) {
@@ -567,6 +579,7 @@ protected void filterButtonSelected(ActionEvent e) {
567579
this.filterPopup.getScene().getRoot().getStylesheets().add(getClass().getResource("/eu/dariolucia/reatmetric/ui/fxml/css/MainView.css").toExternalForm());
568580
this.filterPopup.show(this.displayTitledPane.getScene().getWindow());
569581
}
582+
e.consume();
570583
}
571584

572585
protected void moveToTime(Instant selectedTime, RetrievalDirection direction, int n, ActivityOccurrenceDataFilter currentFilter) {
@@ -665,9 +678,7 @@ private void markProgressBusy() {
665678
}
666679

667680
private void markProgressReady() {
668-
Platform.runLater(() -> {
669-
this.progressIndicator.setVisible(false);
670-
});
681+
Platform.runLater(() -> this.progressIndicator.setVisible(false));
671682
}
672683

673684
private boolean isProcessingAvailable() {
@@ -725,7 +736,7 @@ private void onDragDropped(DragEvent event) {
725736
}
726737

727738
@FXML
728-
public void onPurgeMenuItem(ActionEvent actionEvent) {
739+
public void onPurgeMenuItem(ActionEvent event) {
729740
List<TreeItem<ActivityOccurrenceDataWrapper>> selected = this.dataItemTableView.getSelectionModel().getSelectedItems();
730741
boolean confirm = DialogUtils.confirm("Purge activity occurrences", null, "If you continue, the monitoring of the selected occurrences will stop and the occurrences will be removed " +
731742
"from the processing model. Do you want to purge the selected occurrences?");
@@ -743,6 +754,18 @@ public void onPurgeMenuItem(ActionEvent actionEvent) {
743754
e.printStackTrace();
744755
}
745756
});
757+
event.consume();
758+
}
759+
760+
@FXML
761+
public void removeButtonSelected(ActionEvent event) {
762+
boolean confirm = DialogUtils.confirm("Remove activity occurrences", null, "If you continue, the display will be cleared from the currently displayed activity occurrences. " +
763+
"Do you want to continue?");
764+
if(!confirm) {
765+
return;
766+
}
767+
this.dataItemTableView.getRoot().getChildren().remove(0, this.dataItemTableView.getRoot().getChildren().size());
768+
event.consume();
746769
}
747770

748771
@Override

eu.dariolucia.reatmetric.ui/src/main/resources/eu/dariolucia/reatmetric/ui/fxml/ActivityDataView.fxml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@
6666
</ImageView>
6767
</graphic>
6868
</Button>
69+
<Button fx:id="removeBtn" mnemonicParsing="false" onAction="#removeButtonSelected">
70+
<graphic>
71+
<ImageView pickOnBounds="true" preserveRatio="true">
72+
<image>
73+
<Image url="@/eu/dariolucia/reatmetric/ui/fxml/images/16px/trash.svg.png" />
74+
</image>
75+
</ImageView>
76+
</graphic>
77+
</Button>
6978
</items>
7079
</ToolBar>
7180
<TreeTableView fx:id="dataItemTableView" fixedCellSize="20.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="1.0" onDragDropped="#onDragDropped" onDragEntered="#onDragEntered" onDragExited="#onDragExited" onDragOver="#onDragOver" VBox.vgrow="ALWAYS">

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<derby.version>10.15.1.3</derby.version>
6565
<jdbc.version>19.3.0.0</jdbc.version>
6666
<graalvm.version>19.3.0</graalvm.version>
67-
<ccsds.version>0.3.0-SNAPSHOT</ccsds.version>
67+
<ccsds.version>0.3.0</ccsds.version>
6868
<controlsfx.version>11.0.1</controlsfx.version>
6969
<!-- Maven plugin versions -->
7070
<maven.jacoco.version>0.8.2</maven.jacoco.version>

0 commit comments

Comments
 (0)