Skip to content

Commit

Permalink
Added description of setDataBuffer to .rst files and ReleaseNotes
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzzoQM committed Nov 22, 2023
1 parent 228265c commit b57d356
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/source/Support/bskReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Version |release|
use spherical harmonics and loads them from a file with a single command. Similarly, the methods ``usePolyhedralGravityModel``
and ``usePointMassGravityModel`` have been added.
- Fixed examples and tests to run even when Basilisk is built with ``--vizInterface False``.
- Added a new method ``setDataBuffer()`` to :ref:`simpleStorageUnit` and :ref:`partitionedStorageUnit` to add or remove data from specified partitions.

Version 2.2.0 (June 28, 2023)
-----------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ Executive Summary
-----------------
DataStorageUnitBase is a base class that is used generate a standard interface and list of features for modules that store simulated onboard data. This class is used by other modules as a parent class and cannot be instantiated by itself. All Basilisk data storage modules based on this DataStorageUnitBase inherit the following common properties:

1. Writes out a :ref:`DataStorageStatusMsgPayload` containing the sum of the current stored data (in bits), the storage capacity (bits), the current net data rate (in baud), an array of char array containing the names of the stored data (ex. Instrument 1, Instrument 2), and an array of doubles containing the stored data associated with each type (bits).
1. Writes out a :ref:`DataStorageStatusMsgPayload` containing the sum of the current stored data (in bits), the storage capacity (bits), the current net data rate (in baud), an array of char array containing the names of the stored data (ex. Instrument 1, Instrument 2), and an array of integers containing the stored data associated with each type (bits).
2. Allows for multiple :ref:`DataNodeUsageMsgPayload` corresponding to individual :ref:`dataNodeBase` instances to be subscribed to using the ``addDataNodeToModel(msg)`` method.
3. Iterates through attached :ref:`DataNodeUsageMsgPayload` instances, integrates the data for each data node, and adds it to its respective entry using ``integrateDataStatus()`` method, which may be overwritten in child classes.
4. Loops through the vector of storedData to sum the total amount of data contained within the storage unit.
5. Add or remove data from specified partitions using ``setDataBuffer()`` method.

Core functionality is wrapped in the ``integrateDataStatus`` protected virtual void method, which computes the amount of data stored in a storage unit on a module basis. This base class automatically implements a partitioned storage unit (different data buffers for each device). See :ref:`simpleStorageUnit` for an example of how this functionality can be overwritten.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ Then, the names of the partitions need to be added to the storageUnit using::

storageUnit.addPartition("partitionName")

The ``setDataBuffer()`` method can be used to add or remove a given amount of data from specified partitions::

storageUnit.setDataBuffer(["partitionName","anotherPartitionName"], [1E4, -1E4]) # Given in bits

For more information on how to set up and use this module, see the simple data system example :ref:`scenarioDataDemo`.
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ The next step is to attach one or more :ref:`DataNodeUsageMsgPayload` instances

storageUnit.addDataNodeToModel(dataMsg)

The method ``setDataBuffer()`` can be used to add or remove a specific amount of data from the storage unit::

storageUnit.setDataBuffer(1E4) # Given in bits

For more information on how to set up and use this module, see the simple data system example :ref:`scenarioDataDemo`.

0 comments on commit b57d356

Please sign in to comment.