Class in Zendir.Classes | Inherits from UniverseBehaviour

Declaration

class DataStorageUnit;

Description

The Data Storage Unit is the fundamental memory component for storing binary data within the simulation. It provides a byte-level storage container with pointer-based access, enabling spacecraft systems to store, retrieve, and delete data during operations. The unit models realistic onboard memory with capacity constraints, data persistence across simulation saves, and bit-flip error injection for radiation environment studies.


Properties

DeclaredDescription
AllocatedThe total amount of bytes that has been allocated within thedata storage unit. This is not the capacity if all data has notbeen allocated yet.
CapacityThe total amount of bytes stored within the data storage unit.This is the total amount of memory used by the data storage unitbut not the total amount allocated at any point in time.
ChunksThe total number of individual write chunks that exist withinthe data storage unit. Each write operation will create a chunkthat can be referenced by the pointer, holding the data.
LockedA flag that indicates whether the data storage unit is locked.If the unit is locked, no data can be modified or added to the unit.
InheritedDescription
IsEnabledIs true if the object is currently enabled.
NameThe display name or tag of this object.
ParentThe currently attached parent object (if any).

Methods

DeclaredDescription
DeleteAllDeletes and clears all data within the data storage unit.This will delete all access memory and reset the buffer.
FlipBitsLoops through the data and checks to see if any bits flip.Since this is a probability based outcome, each byte has adefined probability that a bit within the byte can be flipped
InheritedDescription
FindParentWithIDReturns an attached parent that satisfies the specified ID.
FindParentWithTypeReturns an attached parent that satisfies the specified type.
FindRootWithIDReturns a root object that satisfies the specified ID.
FindRootWithTypeReturns a root object that satisfies the specified type.