MasterScan  Lab_Matlab_control Master Branch
List of all members | Properties and Events | Methods | Protected Methods | Static Methods
topsTaskHelper Class Reference
Inheritance diagram for topsTaskHelper:
Inheritance graph
[legend]

Properties and Events

Property theObject
 Class topsTaskHelper. More...
 
Property removeCopy = true
 Flag to remove copy from treeNode (see start)
 
Property ensembleObjectNames
 Keep track of the names of the objects in the ensemble.
 
Property ensembleObjectClasses
 Keep track of the classes of objects in the ensemble.
 
 sync
 For time synchronization.
 
 topsBindings
 Below are properties used to bind the helper to a topsTreeNode Defaults are defined in the constructor method.
 
- Properties and Events inherited from topsFoundation
Property name = ''
 a string name to indentify the object
 
Property clockFunction =@topsClock
 clock function, to standardize
 

Methods

self topsTaskHelper (varargin)
 Specs to use when looking for a copy. More...
 
theObject parse (self, name, fevalable, settings, commonSettings, unmatched)
 Parse constructor specs to make theObject – possibly recursive if making multiple objects and putting them into an ensemble. More...
 
 start (self, treeNode)
 start More...
 
 finish (self, treeNode)
 finish More...
 
 startTrial (self, treeNode)
 Function to prepare for use, called before each trial. More...
 
 finishTrial (self, treeNode)
 Finish trial method – should overload in subclass if needed.
 
 setProperty (self, varargin)
 Set property. More...
 
synchronizedTime getSynchronizedTime (self, unSynchronizedTime, useScreen)
 % getSyncronizedTime More...
 
 saveSynchronizedTime (self, unSynchronizedTime, useScreen, task, eventTag)
 % saveSyncronizedTime More...
 
- Methods inherited from topsFoundation
self topsFoundation (name)
 Constuct with name optional. More...
 
fig gui (self)
 Open a GUI to view object details. More...
 
guiPanel (self, varargin)
 Make a topsDetailPanel with details about this object. More...
 

Protected Methods

 callFevalables (self, fevalables)
 Utility to call a list of fevalables.
 

Static Methods

static synchronizationData getSynchronizationData (helperName, varargin)
 Get synchroniztion data from the current topsDataLog and make a maxtrix with columns: referenceTime offset. More...
 
static helpers makeHelpers (constructor, varargin)
 Utility to make helpers. More...
 
- Static Methods inherited from topsFoundation
static c index cellAdd (c, item, index)
 Add an item to a cell array. More...
 
static selector cellContains (c, item)
 Does a cell array conatin an item? More...
 
static c cellRemoveItem (c, item)
 Remove an item from a cell array. More...
 
static c cellRemoveElement (c, index)
 Remove indexed elements from a cell array. More...
 
static index selector findStructName (s, name)
 Where is the given name in the given struct array? More...
 

Constructor

◆ topsTaskHelper()

self topsTaskHelper ( varargin  )

Specs to use when looking for a copy.

Construct the helper with standard specs Varargin is list of optional property/value pairs: 'name' ... string name 'fevalable' ... Fevalable ({<fcn> <args>}) used to create the helper 'settings' ... Struct of property values to set to this helper 'commonSettings' ... Struct of property values to set to all sub-helpers 'prepare' ... Cell arrray of fevalables for the prepare call list 'synchronize' ... fevalable to get helper time 'start', ... Cell array of fevalables to add to the topsTreeNode's start call list. Automatically adds the helper as the first arg to each fevalable. 'finish' ... like start, but for the finish call list 'bindingNames' ... Cell array of names of struct fields to find helpers to share with the given helper object via its "bindHelpers" method OTHERWISE ... other name/spec pairs

Methods

◆ parse()

theObject parse ( self  ,
name  ,
fevalable  ,
settings  ,
commonSettings  ,
unmatched   
)

Parse constructor specs to make theObject – possibly recursive if making multiple objects and putting them into an ensemble.

Arguments: name ... string name of the helper object fevalable ... optional fevalable to make the object settings ... struct of property/value pairs commonSettings ... struct of property/value pairs common to all objects unmatched ... structs of settings for ensemble objects Returns: theObject ... a helper object

◆ start()

start ( self  ,
treeNode   
)

start

Called at task start

◆ finish()

finish ( self  ,
treeNode   
)

finish

Called at task finish

◆ startTrial()

startTrial ( self  ,
treeNode   
)

Function to prepare for use, called before each trial.

Just runs through the call list added using "prepare"

◆ setProperty()

setProperty ( self  ,
varargin   
)

Set property.

Args are: for ensemble: property, value, index otherwise: property, value

◆ getSynchronizedTime()

synchronizedTime getSynchronizedTime ( self  ,
unSynchronizedTime  ,
useScreen   
)

% getSyncronizedTime

Utility for getting an appropriately synchronized time unSynchronizedTime ... the raw time value useScreen ... flag, whether or not to use the dotsTheScreen reference time (i.e., for screen drawing)

◆ saveSynchronizedTime()

saveSynchronizedTime ( self  ,
unSynchronizedTime  ,
useScreen  ,
task  ,
eventTag   
)

% saveSyncronizedTime

Utility for getting an appropriately synchronized time unSynchronizedTime ... the raw time value useScreen ... flag, whether or not to use the dotsTheScreen reference time (i.e., for screen drawing) task ... the calling topsTreeNodeTask eventTag ... string used to store timing information in trial struct. Assumes that the current trialData struct has an entry called <eventTag>.

◆ getSynchronizationData()

static synchronizationData getSynchronizationData ( helperName  ,
varargin   
)
static

Get synchroniztion data from the current topsDataLog and make a maxtrix with columns: referenceTime offset.

Arguments: helperName ... string name of the helper object being synchronized varargin ... (optional) string name of topsDataFile

◆ makeHelpers()

static helpers makeHelpers ( constructor  ,
varargin   
)
static

Utility to make helpers.

Arguments: constructor ... string name that might be a topsTaskHelper<name> varargin ... args sent to topsTaskHelper constructor. The first argument is an optional struct to unpack (each field is recursively sent back), plus additional property/value pairs Returns: struct with fields named for the created helpers

Properties and Events

◆ theObject

Property theObject

Class topsTaskHelper.

Standard interface for adding snow-dots "helper" objects to a topsTreeNode The helper object


The documentation for this class was generated from the following file: