Skip to content

Commit

Permalink
Add overwrite field to SaveFile, ExportRegion (#97)
Browse files Browse the repository at this point in the history
* Add overwrite field to SaveFile

* Increment major version in index

* Add overwrite field to ExportRegion

* add overwrite confirm required flag

* update docs

---------

Co-authored-by: yuhsuan <[email protected]>
Co-authored-by: Adrianna Pińska <[email protected]>
  • Loading branch information
3 people authored Aug 19, 2024
1 parent eff1b21 commit deaaf0a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
4 changes: 4 additions & 0 deletions control/export_region.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ message ExportRegion {
string directory = 5;
// Optional file name of server file
string file = 6;
// Optional overwrite existing file
bool overwrite = 7;
}

// EXPORT_REGION_ACK
Expand All @@ -32,4 +34,6 @@ message ExportRegionAck {
string message = 2;
// File contents for client export (one line per string)
repeated string contents = 3;
// Request for overwrite confirmation
bool overwrite_confirmation_required = 4;
}
3 changes: 3 additions & 0 deletions docs/src/changelog.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ Changelog
* - ``28.15.0``
- 23/05/24
- Added :carta:ref:`RemoteFileRequest` and :carta:ref:`RemoteFileResponse` messages.
* - ``29.0.0``
- 26/06/24
- Added ``overwrite`` to :carta:ref:`SaveFile` and :carta:ref:`ExportRegion` messages.

Versioning
----------
Expand Down
8 changes: 4 additions & 4 deletions docs/src/index.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
CARTA Interface Control Document
================================

:Date: 03 July 2024
:Date: 11 June 2024
:Authors: Angus Comrie, Rob Simmonds and the CARTA development team
:Version: 28.15.0
:ICD Version Integer: 28
:CARTA Target: Version 4.0
:Version: 29.0.0
:ICD Version Integer: 29
:CARTA Target: Version 5.0

.. include:: changelog.rst.txt

Expand Down
16 changes: 16 additions & 0 deletions docs/src/messages.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,10 @@ Backend responds with :carta:refc:`EXPORT_REGION_ACK`
- string
-
- Optional file name of server file
* - overwrite
- bool
-
- Optional overwrite existing file

.. carta:class:: carta-b2f exportregionack
Expand Down Expand Up @@ -691,6 +695,10 @@ Response for :carta:refc:`EXPORT_REGION` to indicate success and file contents i
- string
- repeated
- File contents for client export (one line per string)
* - overwrite_confirmation_required
- bool
-
- Request for overwrite confirmation

.. carta:class:: carta-f2b fileinforequest
Expand Down Expand Up @@ -2356,6 +2364,10 @@ Source file: `request/save_file.proto <https://github.com/CARTAvis/carta-protobu
- double
-
- Set the rest frequency (Hz) of the image
* - overwrite
- bool
-
- Overwrite existing image

.. carta:class:: carta-f2b savefileack
Expand Down Expand Up @@ -2389,6 +2401,10 @@ Source file: `request/save_file.proto <https://github.com/CARTAvis/carta-protobu
- string
-
-
* - overwrite_confirmation_required
- bool
-
- Request for overwrite confirmation

.. carta:class:: carta-f2b scriptingrequest
Expand Down
4 changes: 4 additions & 0 deletions request/save_file.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ message SaveFile {
bool keep_degenerate = 8;
// Set the rest frequency (Hz) of the image
double rest_freq = 9;
// Overwrite existing image
bool overwrite = 10;
}

message SaveFileAck {
sfixed32 file_id = 1;
bool success = 2;
string message = 3;
// Request for overwrite confirmation
bool overwrite_confirmation_required = 4;
}

0 comments on commit deaaf0a

Please sign in to comment.