Class in Zendir.Classes | Inherits from UniverseBehaviour

Declaration

class DataStorageUnit;

Description

The data storage unit is the smallest unit of memory that can be stored on an object. The unit is able to store bytes and save and load these bytes between simulations. Bytes can also be released using reference pointers which can be created between the data storage unit and other objects.


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
DestroyRemoves the current object from the simulation.
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.