You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DpWriter shrink container buffer after processing (#4904)
* Add unit tests for shrinking processed buffer
* Update DpWriter to shrink processed buffers after processing
* Formatting
* Updated DpWriter to use the dataSize in the container header to shrink the container size
* Update DpWriter SDD with container shrinking steps
* Re-run formatting
* Reset container structure iff the container was processed. Remove cast comment
* Fixed DpWriter formatting
---------
Co-authored-by: M Starch <LeStarch@googlemail.com>
Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com>
Copy file name to clipboardExpand all lines: Svc/DpWriter/docs/sdd.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ SVC-DPWRITER-003 | On receiving a data product container _C_, `Svc::DpWriter` sh
35
35
SVC-DPWRITER-004 | On receiving an `Fw::Buffer`_B_, and after performing any requested processing on _B_, `Svc::DpWriter` shall write _B_ to disk. | The purpose of `DpWriter` is to write data products to the disk. | Unit Test
36
36
SVC-DPWRITER-005 | `Svc::DpWriter` shall provide a port for notifying other components that data products have been written. | This requirement allows `Svc::DpCatalog` or a similar component to update its catalog in real time. | Unit Test
37
37
SVC-DPWRITER-006 | `Svc::DpManager` shall provide telemetry that reports the number of buffers received, the number of data products written, the number of bytes written, the number of failed writes, and the number of errors. | This requirement establishes the telemetry interface for the component. | Unit test
38
+
SVC-DPWRITER-007 | On receiving an `Fw::Buffer`_B_, and after performing any requested processing on _B_, `Svc::DpWriter` shall re-parse the container header and shrink the size of the product. | Allows processing interfaces to compress data products and communicate that compressed state back to `Svc::DpWriter`. | Unit Test
38
39
39
40
## 3. Design
40
41
@@ -125,6 +126,10 @@ It does the following:
125
126
`procBufferSendOut` at port number `N`, passing in `B`.
126
127
This step updates the memory pointed to by `B` in place.
127
128
129
+
1. Re-parse the container header pointed to by `B`. If necessary,
130
+
shrink the size of the `B` buffer to be consistent with the data
131
+
size in the updated container header.
132
+
128
133
1. Write `B` to a file, using the format described in the [**File
129
134
Format**](#file_format) section. For the time stamp, use the time
0 commit comments