MdispAlloc()函数

Synopsis

Allocate a display.

Format

MIL_ID MdispAlloc(SystemId, DispNum, DispFormat, InitFlag, DisplayIdPtr)

MIL_ID SystemId; System identifier
long DispNum; Display number
char *DispFormat; Display format name or file name
long InitFlag; Initialization flag
MIL_ID *DisplayIdPtr; Storage location for the display identifier

Description

This function allocates a display on the specified system so that it can be used by subsequent MIL display functions.

A display on the target system must be allocated in order to display an image buffer.

When you have completely finished using a display, you should free it, using MdispFree.

The SystemId parameter specifies the system on which the display is allocated. This parameter must be given a valid system identifier.

The DispNum parameter specifies the number (or rank) of the display that is required. This parameter can be set to one of the following:

M_DEFAULT Default display (the same as M_DEV0).
M_DEV0 The first display on the specified system.
…,
M_DEV15 The sixteenth display on the specified system.

The DispFormat parameter specifies the name of the display format or the name of the file in which the display format is to be found. Depending on the target system, different display formats can be supported. See the appendix in this manual that applies to your specific board, the read.me file of the MIL drivers, or the user guide of your specific board for the valid values. This parameter can also be set to M_DEFAULT or M_DISPLAY_SETUP, which indicates that MIL should use the display format specified in the milsetup.h file.

The InitFlag parameter specifies the type of initialization you want to perform on the display. This parameter should be set to M_DEFAULT unless otherwise specified in the appendix that applies to your specific board.

The DisplayIdPtr parameter specifies the address of the variable in which the display identifier is to be written. Since the MdispAlloc function also returns the display identifier, you can set this parameter to M_NULL . If allocation fails, M_NULL is written as the identifier.

Return value

The returned value is the display identifier. If allocation fails, M_NULL is returned.

See also

MdispFree, MappAllocDefault

《MdispAlloc()函数》上有3条评论

评论已关闭。