Module: partitionedStorageUnit¶
Executive Summary¶
The PartitionedStorageUnit class is a model of storage unit functionality that aims to split up the storage unit into “partitions” or buffers, just as a flight storage system would, for each data type (instrument 1, instrument 2, telemetry, etc). This module considers:
- Integrated net input data of the attached dataNodes at a partitioned level. 
- The sum of the data inside of the partitioned storage unit. 
- The storage unit’s maximum storage capacity as defined by the - storageCapacityattribute.
Integration of the net input data is performed with a simple Euler method for each partition.
\(Data_{stored} = (baudRate) (t_{current} - t_{previous})\)
Module Assumptions and Limitations¶
See Module: dataStorageUnitBase class for inherited assumption and limitations.
Message Connection Descriptions¶
This module only uses the input and output messages of the Module: dataStorageUnitBase base class.
User Guide¶
To set up this module users must create a PartitionedStorageUnit instance:
storageUnit = partitionedStorageUnit.PartitionedStorageUnit()
storageUnit.ModelTag = "storageUnit"
In addition to the variables that must be set for the Module: dataStorageUnitBase base class, this module requires the storageCapacity attribute to be specified.  The total data stored in the storageUnit will be limited to not exceed this capacity value:
storageUnit.storageCapacity = 1E5 # Given in bits
The next step is to attach one or more DataNodeUsageMsgPayload instances to it using the addDataNodeToModel() method:
storageUnit.addDataNodeToModel(dataMsg)
Then, the names of the partitions need to be added to the storageUnit using:
storageUnit.addPartition("partitionName")
For more information on how to set up and use this module, see the simple data system example scenarioDataDemo.
- 
class PartitionedStorageUnit : public DataStorageUnitBase¶
- #include <partitionedStorageUnit.h>partioned storage unit class Public Functions - 
PartitionedStorageUnit()¶
- The constructor creates a partitionedStorageUnit instance with zero stored data - Returns
- void; 
 
 - 
~PartitionedStorageUnit()¶
- Destructor. - Returns
- void 
 
 - 
void addPartition(std::string dataName)¶
- Adds a partition to the storageUnit - Parameters
- dataName – 
- Returns
- void 
 
 Private Functions - 
void customReset(uint64_t CurrentClock) override¶
- Custom reset function. - Parameters
- currentClock – 
- Returns
- void 
 
 
- 
PartitionedStorageUnit()¶