[Next] [Previous] [Up] [Top] [Contents] [Index]

5.3 ODEV Messages and Their Parameters

5.3.9 OAlloc

#define OAlloc				'Oall'

typedef struct { Ptr values; Ptr attribs; short count; long refNum; } OAllocParams;

Ptr values; In - a pointer to be used with get_stim_value() to get the string representation of the stimulus or stimuli. (see "11.5.3 Event Stimuli and Attributes")

Ptr attribs; In - a pointer to be used with the get_attribs() family of functions to get attribute values for the event. (see "11.5.3 Event Stimuli and Attributes")

int count; In - the number of stimuli for this event. (see "5.2.2 Multiple Stimulus Values")

long refNum; Out - a unique reference number to this stimulus created by the ODEV. This number will be used by the ODEV Manager and Trial Manager when refering to this set of stimuli and attributes in the future.

This is the message that interprets the stimulus-specific parts of an event definition in the script and allocates the necessary structures to keep track of the stimulus internally. When it receives this message, the ODEV should extract the stimulus values from the values parameter using get_stim_value(), and extract the attributes for each value from attribs using get_attribs() and its relatives, and using them allocate the necessary data structures such that from now on, when other parts of PsyScope want to refer to the stimulus or stimuli for this event, they only need use the refNum passed back in response to this action. The value of refNum may be anything as long as it uniquely identifies this stimulus.

PSYX Programmer's Manual - 24 AUG 95
[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with CERN WebMaker