11.5 Run-Time Utilities
char *GetParamString(short index);
This function gets the string form of an action parameter. It takes an index as passed in theparams
parameter to thepGetProcParams
message.
short GetCurTrialNum(void);
Returns the number of the currently running trial.
short GetExpEventNum(char *name,short trial_num);
This function takes the name of an event in a particular trial and returns its event number. Will trigger an error message to be displayed if the event doesn't exist in the given trial.
long GetIMSEventType(short trial, short event);
Returns the event type of the given event in the given trial. This number can be converted to a PSYX ID withODEVtypeToPSYX()
.
long GetIMSEventStim(short trial, short event);
Returns the stimulus refNum of the given event in the given trial.
long GetIMSEventDuration(short trial, short event);
Returns the duration of the given event in the given trial.
void GetIMSEventStartRef(short trial, short event_num, short *rel_to, long *delay, short *dep);
Given a trial number and event number, it returns the startRef of the event. It returns the event on which it is dependent inrel_to
, the delay after the relative event indelay
, and the dependency_type (BEGIN_WITH
, orBEGIN_AFTER
) indep
.
long ODEVtypeToPSYX(short odev);
Takes an ODEV Manager event type as returned byGetIMSEventType()
and converts it to the ID of the PSYX which implements it.
short DataGetNumConditions(void);
Gets the total number of different conditions in the experiment.
short DataGetNumTrials(void);
Gets the total number of trials in the experiment.
char *DataGetConditionString(short trial);
Given a trial number, returns the name of the condition for that trial.
short DataGetConditionNum(short trial);
Given a trial number, returns the number of the condition for that trial.
short DataGetNumEvents(short trial);
Returns the total number of events in the given trial
short DataGetTrialStatus(short trial);
Returns the status of the given trial as one of the following:
enum { TRIAL_NOT_RUN = 0, TRIAL_INITIALIZED, TRIAL_ABORTED, TRIAL_RAN };char *DataGetEventStimString(short trial, short event, char *buf);
Constructs and returns, in buf, the stimulus string of the given event in the given trial.
char *DataGetEventTag(short t, short e);
Returns the tag of the given event in the given trial.
char *DataGetEventName(short t, short e);
Returns the name of the given event in the given trial.
char *DataGetResponseLabel(short label);
Returns the string form of the given response label.
long DataGetActualOnset(short t, short e);
Returns the actual onset time in ms of the given event relative to the start of the given trial.
long DataGetActualDuration(short t, short e);
Returns the actual duration of the given event in the given trial.
long GetVariableByName(char *name);
Returns an identifier for the given Trial Manager Variable name, to be used with the other Trial Manager Variable functions given below.
char *GetVariableName(long var);
Returns the name of the Trial Manager Variable given its identifier.
char *GetVariableValueAsString(long var);
Returns the value of the given Trial Manager Variable as a string.
char *GetIDEVNames(char *str);
Returns the names of all the connected IDEVs concatenated together in str and separated by spaces.
char *GetIDEVDataFieldNames(char *delimiter,char *str);
Returns the names of all the fields of all the IDEV data buffers, concatenated together in str and separated by the string specified in delimiter.
char *GetIDEVsDataString(Ptr dataRec,char *delimiter,char *str);
Given the IDEVData field of a DataRecord struct, it constructs the string representation of the values of all the fields in str. The fields are separated by the string in delimiter.
long GetIDEVsTotalDataSize(void);
Gets the combined size of all the data buffers for all the connected IDEVs.
Generated with CERN WebMaker