| MIL 10 Reference
| Customize Help
| Save Settings

MappControlObject



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Control a MIL object setting for a Distributed MIL publishing application.
Syntax
void MappControlObject(
MIL_ID ContextAppId, //in
MIL_ID ObjectId, //in
MIL_INT64 ControlType, //in
MIL_DOUBLE ControlValue //in
)
Description

This function controls settings for the MIL objects in a publishing application within the Distributed MIL monitoring configuration. You can set the read/write access and the name of each MIL object on the specified application.

When compiling C code in 64-bit mode, MappControlObject() internally calls the MIL_INT64 version of this function (MappControlObjectInt64()). If you need to pass floating-point values, call the MIL_DOUBLE version of this function (MappControlObjectDouble()).
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
ContextAppId

Specifies the identifier of the application context to use.

function map For specifying the application context
CollapseValue Description
Collapse M_DEFAULT

Specifies the current application context.

Collapse Application Context Identifier

Specifies the application context identifier.

Typically specifying an application context identifier is used to specify a remote application on a remote computer. However, it can be used for a remote application on the local computer, or the current application. When you explicitly specify the current application, it is equivalent to specifying M_DEFAULT.

(summarize)
ObjectId

Specifies the identifier of the MIL object to control.

ControlType

Specifies the type of MIL object setting to control.

See the Parameter associations section for possible values that can be specified.

ControlValue

Specifies the MIL object setting's new value.

See the Parameter associations section for possible values that can be specified.

The tables below list possible values for the ControlType and ControlValue parameters.

The following ControlType and corresponding ControlValue parameter settings are used to control the access of remote MIL objects.

function map For controlling the access of remote MIL objects
CollapseControlType Description
ControlValue
Collapse M_DMIL_PUBLISH

Controls a MIL object's remote access rights. If you set a MIL object to M_READ_ONLY or M_READ_WRITE, a monitoring application will be able to access that MIL object once a connection has been established MappOpenConnection() between the monitoring and publishing applications.

Note that the access rights of all MIL objects in a given publishing application cannot be greater than that application's permission level specified in MappControl() with M_DMIL_CONNECTION.

(summarize)
Collapse M_NO

Specifies that the MIL object will not be visible.

Collapse M_READ_ONLY

Specifies that the MIL object can only be used as a source or to be inquired.

A MIL object can only be set to M_READ_ONLY if M_DMIL_CONNECTION is set to either M_DMIL_CONTROL or M_DMIL_MONITOR.

(summarize)
Collapse M_READ_WRITE

Specifies that the MIL object can be used as a destination or can be controlled by MIL functions.

A MIL object can only be set to M_READ_WRITE if M_DMIL_CONNECTION is set to M_DMIL_CONTROL.

(summarize)

The following ControlType and corresponding ControlValue parameter settings are used to associate a name to a MIL object.

function map For associating a name to a MIL object
CollapseControlType Description
ControlValue
Collapse M_OBJECT_NAME

Specifies a name to associate with a MIL object. INQ

(summarize)
Collapse
M_PTR_TO_DOUBLE(
MIL_CONST_TEXT_PTR * String
)

Casts the address of the string identifying the specified object's name, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE.

(summarize)
Parameters

This parameter specifies the string whose address to cast.

MIL_TEXT("ObjectName") 1

Specifies the name to associate with the MIL object.

1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().

Type-specific versions of the function
void MappControlObjectDouble (MIL_ID ContextAppId, MIL_ID ObjectId, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
Parameters

ContextAppId

See ContextAppId of the main function for a description.

ObjectId

See ObjectId of the main function for a description.

ControlType

See ControlType of the main function for a description.

ControlValue

See ControlValue of the main function for a description.

void MappControlObjectInt64 (MIL_ID ContextAppId, MIL_ID ObjectId, MIL_INT64 ControlType, MIL_INT64 ControlValue)
Parameters

ContextAppId

See ContextAppId of the main function for a description.

ObjectId

See ObjectId of the main function for a description.

ControlType

See ControlType of the main function for a description.

ControlValue

See ControlValue of the main function for a description.

Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
DEFAULT DMIL PUBLISH NO READ ONLY READ WRITE OBJECT NAME