| Customize Help
| Save Settings

MbufAllocContainer



Function Map
Synopsis
Allocate a container.
Syntax
MIL_ID MbufAllocContainer(
MIL_ID SystemId, //in
MIL_INT64 Attribute, //in
MIL_INT64 ControlFlag, //in
MIL_ID *ContainerBufIdPtr //out
)
Description

This function allocates a container on the specified system. A container is a data object that stores related buffers, referred to as the container's buffer components. By default, a container is empty. Components are automatically added to a container, when you grab into it or use it as a destination of a supported function. You can also add components to a container using MbufAllocComponent().

A buffer component can be any type of buffer that can be allocated using MbufAlloc...(). The component type indicates what type of data is stored in that component. For example, a component with the component type M_COMPONENT_INTENSITY contains an intensity map.

After allocating a container, we recommend that you check if the operation was successful, using MappGetError(), or by verifying that the container identifier returned is not M_NULL.

When a container is no longer required, release it, using MbufFree(). This will also release all components of the container.

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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
SystemId INQ

Specifies the MIL system on which to allocate the container. This parameter should be set to one of the following values:

function map For specifying the MIL system
Click to summarizeValue Description
Click to summarize M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Click to summarize MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

Attribute INQ

Specifies the container usage.

This attribute is one of the factors used to determine whether a container can be used for a specific purpose. This attribute will also be automatically applied to all image buffer components added to the container.

The values in the tables below can be added together to specify multiple attributes. For example, to allocate a container for both grabbing and display, specify M_GRAB + M_DISP.

function map For specifying the container usage
Click to summarizeValue Description MIL system-specific
tooltip (‡)
Click to summarize M_DISP

Specifies that image buffer components of the container can be displayed, and that the container can become 3D-displayable. You can inquire whether a container is currently 3D-displayable using MbufInquireContainer() with M_3D_DISPLAYABLE.

(summarize)
a c
M10
g h i j k
M10
l m o p r
U27
t
U28
u
U36
v y
U75
aa
Click to summarize M_GRAB

Specifies that the image buffer components of the container can be used to grab data, and that the container itself can be used to grab data.

a c
U85
o
Click to summarize M_PROC

Specifies that image buffer components of the container can be processed, and that the container can become 3D-processable. You can inquire whether a container is currently 3D-processable using MbufInquireContainer() with M_3D_PROCESSABLE.

(summarize)
a c
M10
g h i j k
M10
l m o p r
U27
t
U28
u
U36
v y
U75
aa
ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

ContainerBufIdPtr

Specifies the address of the variable in which to write the container identifier. Since the MbufAllocContainer() function also returns the container 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 container identifier. If allocation fails, M_NULL is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
DEFAULT HOST DISP GRAB PROC