|
| | DtSnapshotManager (DtCgf *cgf) |
| |
| virtual | ~DtSnapshotManager () |
| |
| virtual bool | init () |
| |
| virtual void | tick () |
| |
| virtual void | setSimTime (double) |
| |
| virtual void | setSnapshotsEnabled (bool flag) |
| |
| virtual bool | snapshotsEnabled () const |
| |
| virtual void | setSnapshotPeriod (double period) |
| |
| virtual double | snapshotPeriod () const |
| |
| virtual void | setCheckpointPeriod (double period) |
| |
| virtual double | checkpointPeriod () const |
| |
| virtual void | setNumberOfSnapshotsToKeep (int) |
| |
| virtual int | numberOfSnapshotsToKeep () const |
| |
| virtual void | setPauseCleanup (bool) |
| |
| bool | pauseCleanup () const |
| |
| virtual void | clear (bool allButBase=false) |
| |
| virtual bool | isBaseSnapshot (DtInMemorySnapshotPtr) const |
| |
| virtual bool | findScenarioFragment (const DtString &scenarioName, const DtString &runId, double simTime, DtScenario &scenario) const |
| |
| virtual DtInMemorySnapshotPtr | takeSnapshot (bool isPeriodic=false, bool makeBase=false) |
| |
| virtual void | saveCheckpoint (DtInMemorySnapshotPtr ptr) |
| |
| virtual void | rollbackToSimTime (double simTime) |
| |
| virtual void | rollbackTo (DtInMemorySnapshotPtr, const DtUUID &scenarioRunId=DtUUID::nullUUID()) |
| |
| virtual void | clearOutStaleSnapshots () |
| |
| virtual DtInMemorySnapshotPtr | snapshotFor (int id) const |
| |
| virtual void | setSnapshotHeartbeatTime (double d) |
| |
| virtual double | snapshotHeartbeatTime () const |
| |
| virtual void | setCheckpointsEnabled (bool) |
| |
| virtual bool | checkpointsEnabled () const |
| |
| virtual void | sendCurrentSnapshots () |
| |
| virtual bool | saveSnapshot (const DtFilename &saveFolder, DtCompressedFileTransporter &tr, DtIfSaveScenario *msg, const DtScenario *currentScenario, const DtSimulationAddress &requestor) |
| |
| virtual DtInMemorySnapshotPtr | snapshotClosestToSimTime (double simTime, const DtString &checkpointName="", const DtString &runId="") const |
| |
| virtual void | removeSnapshotsAfter (double simTime) |
| |
| virtual bool | hasSnapshots () const |
| |
| virtual void | clearAllSnapshots () |
| |
| DtCgf * | cgf () const |
| |
| virtual unsigned int | numberOfSaveJobsQueued () const |
| |
| virtual unsigned int | maxQueuedSaveJobsBeforeSkip () const |
| |
| virtual void | setMaxQueuedSaveJobsBeforeSkip (unsigned int) |
| |
| DtSnapshotManager::DtSnapshotManager |
( |
DtCgf * |
cgf | ) |
|
| virtual DtSnapshotManager::~DtSnapshotManager |
( |
| ) |
|
|
virtual |
| virtual bool DtSnapshotManager::init |
( |
| ) |
|
|
virtual |
| virtual void DtSnapshotManager::tick |
( |
| ) |
|
|
virtual |
| virtual void DtSnapshotManager::setSimTime |
( |
double |
| ) |
|
|
virtual |
Sets current simulation time so internal variable for heartbeat and snapshot can be initialized appropriately.
| virtual void DtSnapshotManager::setSnapshotsEnabled |
( |
bool |
flag | ) |
|
|
virtual |
| virtual bool DtSnapshotManager::snapshotsEnabled |
( |
| ) |
const |
|
virtual |
| virtual void DtSnapshotManager::setSnapshotPeriod |
( |
double |
period | ) |
|
|
virtual |
| virtual double DtSnapshotManager::snapshotPeriod |
( |
| ) |
const |
|
virtual |
| virtual void DtSnapshotManager::setCheckpointPeriod |
( |
double |
period | ) |
|
|
virtual |
| virtual double DtSnapshotManager::checkpointPeriod |
( |
| ) |
const |
|
virtual |
| virtual void DtSnapshotManager::setNumberOfSnapshotsToKeep |
( |
int |
| ) |
|
|
virtual |
Number of periodic snapshots to keep around. 0 means keep all.
| virtual int DtSnapshotManager::numberOfSnapshotsToKeep |
( |
| ) |
const |
|
virtual |
| virtual void DtSnapshotManager::setPauseCleanup |
( |
bool |
| ) |
|
|
virtual |
Pauses cleanup of snapshotss. Use when rolling back just to be sure the rollback snapshot is not mistakenly cleaned up.
| bool DtSnapshotManager::pauseCleanup |
( |
| ) |
const |
|
inline |
| virtual void DtSnapshotManager::clear |
( |
bool |
allButBase = false | ) |
|
|
virtual |
Returns true if this is the base snapshot.
Given the name and run id and sim time, find a scenario that closely matches. If no run id is given will use the most reccent run id under that scenario name.
Snapshots at the current point. Will not effect the periodic snapshot timing. If makeBase is true makes this snapshot the new "base" snapshot (which is one the front-end can rewind to by a single click). If makeBase is true and periodic is also true, periodic will be turned to non-periodic.
| virtual void DtSnapshotManager::rollbackToSimTime |
( |
double |
simTime | ) |
|
|
virtual |
Rolls back the snapshot to the current simulation time. Note that this is only good for this cgf. In a multiple cgf environment calling this method will have unpredictable, and possibly buggy, results.
Rolls back to the given in memory snapshot. If supplied, the new scenario run id.
| virtual void DtSnapshotManager::clearOutStaleSnapshots |
( |
| ) |
|
|
virtual |
Clears out snapshots that are not within the window of snapshot keeping.
Returns the in memory snapshot for this id.
| virtual void DtSnapshotManager::setSnapshotHeartbeatTime |
( |
double |
d | ) |
|
|
virtual |
Sets the tim to send out all the snapshots. Default is 2 seconds or the periodic snapshot time, whichever is greater.
| virtual double DtSnapshotManager::snapshotHeartbeatTime |
( |
| ) |
const |
|
virtual |
| virtual void DtSnapshotManager::setCheckpointsEnabled |
( |
bool |
| ) |
|
|
virtual |
| virtual bool DtSnapshotManager::checkpointsEnabled |
( |
| ) |
const |
|
virtual |
| virtual void DtSnapshotManager::sendCurrentSnapshots |
( |
| ) |
|
|
virtual |
Sends the current snapshots out.
Saves the closest snapshot of the given sim time to save. If none exists returns false.
Returns the snapshot closest to the given sim time. If checkpointName is given (and optional runId) will return a new in memory snapshot of the file on disk.
| virtual void DtSnapshotManager::removeSnapshotsAfter |
( |
double |
simTime | ) |
|
|
virtual |
Removes all snapshots after the given simulation time.
| virtual bool DtSnapshotManager::hasSnapshots |
( |
| ) |
const |
|
virtual |
Returns true if there are snapshots in the manager.
| virtual void DtSnapshotManager::clearAllSnapshots |
( |
| ) |
|
|
virtual |
Clears out all snapshots. If there is no scenario loaded also closes terrain.
| DtCgf* DtSnapshotManager::cgf |
( |
| ) |
const |
|
inline |
| virtual unsigned int DtSnapshotManager::numberOfSaveJobsQueued |
( |
| ) |
const |
|
virtual |
| virtual unsigned int DtSnapshotManager::maxQueuedSaveJobsBeforeSkip |
( |
| ) |
const |
|
virtual |
| virtual void DtSnapshotManager::setMaxQueuedSaveJobsBeforeSkip |
( |
unsigned |
int | ) |
|
|
virtual |
Keep at 0 to allow all jobs to be queued. Default is 10.
| static void DtSnapshotManager::clearAllSnapshotsCallback |
( |
DtSimMessage * |
, |
|
|
void * |
|
|
) |
| |
|
staticprotected |
Will tell all locally vrf simulated object so be ready for reinitialize, delete all the objects.
| static void DtSnapshotManager::settingConsumerCallback |
( |
const DtSettingsObject * |
settingsObject, |
|
|
void * |
usr |
|
) |
| |
|
staticprotected |
| static void DtSnapshotManager::checkpointOperationCallback |
( |
DtSimMessage * |
, |
|
|
void * |
|
|
) |
| |
|
staticprotected |
| virtual void DtSnapshotManager::processCheckpointOperation |
( |
DtSimMessage * |
| ) |
|
|
protectedvirtual |
| static void DtSnapshotManager::requestSnapshots |
( |
DtSimMessage * |
, |
|
|
void * |
|
|
) |
| |
|
staticprotected |
| virtual void DtSnapshotManager::processSnapshotsRequest |
( |
DtSimMessage * |
| ) |
|
|
protectedvirtual |
| static void DtSnapshotManager::requestCheckpointFiles |
( |
DtSimMessage * |
, |
|
|
void * |
|
|
) |
| |
|
staticprotected |
| virtual void DtSnapshotManager::processCheckpointFilesRequest |
( |
DtSimMessage * |
| ) |
|
|
protectedvirtual |
| static void DtSnapshotManager::rollbackToSnapshot |
( |
DtSimMessage * |
, |
|
|
void * |
|
|
) |
| |
|
staticprotected |
| virtual void DtSnapshotManager::processRollbackToSnapshot |
( |
DtSimMessage * |
| ) |
|
|
protectedvirtual |
| virtual void DtSnapshotManager::finishSavingSnapshots |
( |
| ) |
|
|
protectedvirtual |
Any snapshot runs that are done save here.
| virtual void DtSnapshotManager::deleteCheckpoint |
( |
const DtString & |
scenarioName, |
|
|
const DtString & |
runId, |
|
|
double |
simTime |
|
) |
| |
|
protectedvirtual |
If the runId is non null and simTime is -1 will delete the entire runId folder. If runId is null will delete the entire scenarioRun folder. If simTime is not -1 will only delete the scenario file that is close to the sim time. This will only delete files in the particular folder for this back-end address. If the directory is empty will delete the directory as well.
| virtual void DtSnapshotManager::setMetaDataToCheckpoint |
( |
const DtString & |
scenarioName, |
|
|
const DtString & |
runId, |
|
|
const std::map< DtString, DtString > & |
displayName |
|
) |
| |
|
protectedvirtual |
Writes to the meta data file the contents of the reader/writer key value pair – note this will replace and/or add. It will not remove. Quotes will be replaced by a special marker so that the reader/writer reading can proceess correctly.
Sends a message back with the file name the scenario name and data of key FILECOUNT that has the number of checkpoint files. If not files exist will still return count of 0.
| virtual void DtSnapshotManager::sendCheckpointRun |
( |
unsigned |
long | ) |
|
|
protectedvirtual |
Sends off checkpoint run information if the checkpointing system for periodic checkpointing is enabled. If not will send off an empty packed.
| virtual DtFilename DtSnapshotManager::scenarioFilenameFromScenario |
( |
const DtScenario & |
scenario | ) |
const |
|
protectedvirtual |
| virtual DtFilename DtSnapshotManager::strippedPath |
( |
const DtFilename & |
fullName | ) |
const |
|
protectedvirtual |
| DtCgf* DtSnapshotManager::myCgf |
|
protected |
| bool DtSnapshotManager::myPeriodicSnapshotsEnabled |
|
protected |
| double DtSnapshotManager::mySnapshotPeriod |
|
protected |
| double DtSnapshotManager::myLastSnapshotHeartbeat |
|
protected |
| double DtSnapshotManager::mySnapshotHeartbeatTime |
|
protected |
| int DtSnapshotManager::myNumberOfSnapshotsToKeep |
|
protected |
| int DtSnapshotManager::myNextSnapshotId |
|
mutableprotected |
| int DtSnapshotManager::myLastSnapshotStep |
|
protected |
| Snapshots DtSnapshotManager::myPeriodicSnapshots |
|
protected |
| bool DtSnapshotManager::mySnapshotsModified |
|
protected |
| bool DtSnapshotManager::myPauseCleanup |
|
protected |
| bool DtSnapshotManager::myCheckpointsEnabled |
|
protected |
| double DtSnapshotManager::myCheckpointPeriod |
|
protected |
| int DtSnapshotManager::myLastCheckpointStep |
|
protected |
| int DtSnapshotManager::myMaxQueuedSaveJobsBeforeSkip = 10 |
|
protected |
The documentation for this class was generated from the following file:
- /data/exports/nrhent7-1/nightly/docs/vrForces.vrf5-3-branch/include/vrfcgf/snapshotManager.h