ANY-maze Help > The ANY-maze reference > ANY-maze plug-ins > Plug-in API reference > AME_TESTDATA structure

AME_TESTDATA structure

Contains information about a test that is about to start. This record is pointed at by the lParam of an AME_TESTSTART message.

Syntax

  

  

typedef struct {

  DWORD    AnimalNum;

  char     AnimalID[80];

  DWORD    TrialNum;

  RECT     ApparatusRect;

  double   Scaling;

  LPVOID   Settings;

  DWORD    SettingsSize;

  LPVOID   Context;

}AME_TESTDATA, *LPAME_TESTDATA;

  

Members

AnimalNum

The number of the animal about to be tested.

AnimalID

This is the ID of the animal about to be tested. If the protocol does not specify that it is using animal IDs, then this will simply be a string representation of AnimalNum, otherwise it will be the ID the user has specified for this animal.

Note: If the protocol does use animal IDs, but the user has not entered an ID for this animal, then the AnimalID is the AnimalNum preceded by a # sign.

TrialNum

This is the number of this trial for this animal. Trial numbers start at 1.

ApparatusRect

This is a Windows RECT structure which holds the coordinates of a rectangle that exactly encloses the apparatus.

The coordinate system has its origin in the top, left of the video source showing the apparatus.

Scaling

This value allows you to scale from pixels to millimetres (or vice versa).

Given a value in pixels, its value in millimetres is pixels / scaling.

Given a value in millimetres, its value in pixels is mm * scaling.

Settings

This points at a buffer which holds the plug-in's settings. If the settings have never been set, the buffer pointed to by this field will be filled with zeros. See AME_EDITSETTINGS for more details about settings.

SettingsSize

This is the size of the buffer pointed to by the Settings field. The size is in bytes.

Context

This is a return value.

You can set this value to anything you want - it will be passed back to you in AME_POSN, AME_TESTEND and AME_TESTABORT messages. Typically, this value is the address of a record structure which your plug-in allocates during AME_TESTSTART processing, and which holds details and context data for the analysis the plug-in will perform.

Note that you don't have to use this field. If your plug-in has no need for a context record, then you can simply ignore this field.

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T1023