| Customize Help
| Save Settings

MappAllocDefault



Function Map
Synopsis
Allocate default MIL objects.
Syntax
void MappAllocDefault(
MIL_INT InitFlag, //in
MIL_ID *ContextAppIdPtr, //out
MIL_ID *SysIdPtr, //out
MIL_ID *DispIdPtr, //out
MIL_ID *DigIdPtr, //out
MIL_ID *ImageBufIdPtr //out
)
Description

MappAllocDefault() is implemented as a macro. This macro can allocate and set up the requested MIL objects using the defaults specified during allocation and using the MILConfig utility. This macro can allocate and initialize a MIL application context, and allocate the default MIL system. On this system, MappAllocDefault() can allocate the default digitizer and display, and allocate and clear a default displayable image buffer.

The installation customizes the default setup. After installation, if you want to review or change the default settings of MappAllocDefault(), use the MILConfig utility.

Note, if allocating the default digitizer and the default DCF, selected using the MILConfig utility, is for a 3-band color (RGB) camera, then the default image buffer will be 3-band if allocated; otherwise, it will be 1-band if allocated. The size of a default image buffer is 640x480, in pixels.

Note, upon execution of this function, a default 2D graphics context is automatically allocated. This default 2D graphics context can be used in MIL function calls by specifying M_DEFAULT wherever a 2D graphics context identifier is required.

When you have finished using the allocated MIL objects, you must free them using MappFreeDefault(). With multiple threads, you must free the allocated application context (using MappFreeDefault()) in the thread in which it was allocated.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
InitFlag

Specifies the type of initialization setup to perform and is used principally to initialize the default system. This parameter can be set to one of the following:

function map For specifying the type of initialization setup
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_COMPLETE.

Click to summarize M_COMPLETE +

Specifies to initialize the system completely; the system is initialized to its default state and any required resident software is downloaded. At least one complete initialization is necessary after you power-up your system.

(summarize)
Combination value for the values listed in For specifying the type of initialization setup.

You can add the following value to the above-mentioned value to specify a cluster node value without using a cluster manager.

function map For specifying a cluster node value
Click to summarizeCombination value Description
Click to summarize

Specifies a cluster node value when none is specified with a cluster manager. A Distributed MIL publishing application requires a cluster node value that identifies the publishing application. If you have not specified a cluster manager for this application, ensure that each publishing application in the cluster has a unique, non-zero value.

Note that a cluster manager automatically assigns a cluster node value to an application. It is the recommended method of managing cluster node values.

(summarize)
Parameters

Specifies the cluster node value.

Value > 0

Specifies the cluster node value.

ContextAppIdPtr

Specifies the address of the variable in which to write the application context identifier. Upon execution of this function, the application context is allocated and its identifier returned. Instead of using MappAllocDefault(), you can use MappAlloc() to allocate an application context. Note, an application context must be allocated to allocate any other object in MIL.

SysIdPtr

Specifies the address of the variable in which to write the system identifier. Upon execution of this function, the default system is allocated and its identifier returned. Instead of using MappAllocDefault(), you can use MsysAlloc() to allocate a system. MappAlloc() will also allocate a default Host system. Note, a system must be allocated to allocate any other objects on it (display, digitizer or data buffers).

DispIdPtr

Specifies the address of the variable in which to write the identifier of the default display. If this parameter is set to M_NULL, a display is not allocated; otherwise, the default display is allocated and its identifier returned.

DigIdPtr

Specifies the address of the variable in which to write the identifier of the default digitizer. If this parameter is set to M_NULL, a digitizer is not allocated; otherwise, the default digitizer is allocated and its identifier returned.

ImageBufIdPtr

Specifies the address of the variable in which to write the identifier of the default image buffer. If this parameter is set to M_NULL, an image buffer is not allocated; otherwise, the default image buffer is allocated and its identifier returned. It is then cleared and displayed on the system's display screen.

Examples

For example, a typical setup for Matrox Radient board in its power-up state with one input device and one default image buffer (full-screen size) selected on the default display is:

MappAllocDefault(M_COMPLETE, &Application, &System, &Display, &Digitizer, &ImageBuffer);

If, for example, you don't need to acquire data from the camera but want to perform the rest of the above setup, you would make the following call:

MappAllocDefault(M_COMPLETE, &Application, &System, &Display, M_NULL, &ImageBuffer);
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
DEFAULT COMPLETE DISP