Skip to content

Persistence

getPersistModes

cModes = getPersistModes()

Returns a cell array of the allowed persistence modes settable from the API.

Returns Type Values
cModes cell strings of allowed persistence modes. Can be 'Last', 'Best', or 'Fresh'

Example

Retrieve allowed persistence modes.

persist_modes = syn.getPersistModes()
persist_modes = syn.getPersistModes()

getPersistMode

sMode = getPersistMode()

Returns the current persistence mode.

Returns Type Values
sMode string current persistence mode. Can be 'Last', 'Best', 'Fresh', or 'User'

Example

Retrieve allowed persistence modes.

persist_mode = syn.getPersistMode()
persist_mode = syn.getPersistMode()

setPersistMode

bSuccess = setPersistMode(sMode)

Sets the current persistence mode.

Note

Synapse must be in Idle mode for this to work.

Inputs Type Values
sMode string persistence mode to change to. Can be 'Last', 'Best', or 'Fresh'
Returns
bSuccess boolean 0 (fail), 1 (success)

Example

Set persistence to 'Fresh' before entering run mode.

syn.setPersistMode('Fresh')

syn.setModeStr('Preview')
syn.setPersistMode('Fresh')

syn.setModeStr('Preview')