| Customize Help
| Save Settings

MmeasAllocContext



Function Map
Synopsis
Allocate a measurement context.
Syntax
MIL_ID MmeasAllocContext(
MIL_ID SystemId, //in
MIL_INT64 ControlFlag, //in
MIL_ID *ContextIdPtr //out
)
Description

This function allocates a measurement context on the specified system. MIL uses a measurement context to control the behavior of measurement operations (MmeasFindMarker() and MmeasCalculate()). You can modify the settings of a measurement context with MmeasControl(). When you no longer require a measurement context, release its memory using MmeasFree().

MIL allows you to specify M_DEFAULT as the identifier of the measurement context, when using MmeasFindMarker(), MmeasCalculate(), and MmeasInquire(); therefore, you need not call MmeasAllocContext(). However, you cannot specify M_DEFAULT as the identifier of the measurement context if want to modify it using MmeasControl(); to modify a measurement context, you must actually allocate it using MmeasAllocContext().

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 system on which the to allocate the measurement context.

This parameter should be set to one of the following values:

function map For specifying the system identifier
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().

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

ContextIdPtr

Specifies the address of the variable in which the measurement context identifier is to be written. If allocation fails, M_NULL is written as the identifier. Since the MmeasAllocContext() function also returns the marker identifier, you can set this parameter to M_NULL.

Return value
The returned value is the measurement context identifier if the allocation is successful. If allocation fails, M_NULL is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib; milmeas.lib.
DLL Requires mil.dll; milmeas.dll.
DEFAULT HOST