Click here to show toolbars of the Web Online Help System: show toolbars
 

| Customize Help
| Save Settings

MobjControl



Function Map
Synopsis
Control a MIL object setting for a Distributed MIL publishing application.
Syntax
void MobjControl(
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.

Note that when using a C compiler (not a C++ or other compiler) in 64-bit mode, MobjControl() internally calls the MIL_DOUBLE version of this function (MobjControlDouble()). If you need to pass integer values, call the MIL_INT64 version of this function (MobjControlInt64()).
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
ObjectId

Specifies the identifier of the MIL object to control. The MIL object can be a MIL utility object (allocated using MobjAlloc()) or any other MIL object, except for MIL objects allocated using MfuncAlloc().

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
Click to summarizeControlType Description
ControlValue
Click to summarize 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. INQ

(summarize)
Click to summarize M_NO

Specifies that the MIL object will not be visible.

Click to summarize 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)
Click to summarize 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
Click to summarizeControlType Description
ControlValue
Click to summarize M_OBJECT_NAME

Specifies a name to associate with a MIL object. INQ

(summarize)
Click to summarize
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().

The following ControlType and corresponding ControlValue parameter settings are used to control message mailbox objects allocated using MobjAlloc() with M_MESSAGE_MAILBOX.

function map For controlling message mailboxes
Click to summarize
ControlType
Description
ControlValue
Click to summarize M_QUEUE_FULL_MODE

Sets the behavior of the queue when the message limit is attained. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_WRITE_TIMEOUT.

Click to summarize M_ERROR

Specifies that a MIL error is generated when the message limit is attained.

Click to summarize M_WRITE_TIMEOUT

Specifies to wait for the write timeout to elapse.

Click to summarize M_QUEUE_SIZE

Sets the number of messages the queue can hold. INQ

(summarize)
Click to summarize M_DEFAULT

Specifies the default value; the default value is 100 messages.

Click to summarize Value > 0

Specifies the number of messages the queue can hold.

Click to summarize M_READ_TIMEOUT

Sets the amount of time to wait for a read operation. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_INFINITE.

Click to summarize M_INFINITE

Specifies that the read operation waits indefinitely.

Click to summarize Value > 0

Specifies the amount of time to wait, in msecs.

Click to summarize M_RESET

Resets the message mailbox by removing all messages.

(summarize)
Click to summarize M_DEFAULT

Specifies the default behavior.

Click to summarize M_WRITE_TIMEOUT

Sets the amount of time to wait for a write operation. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_INFINITE.

Click to summarize M_INFINITE

Specifies that the write operation waits indefinitely.

Click to summarize Value > 0

Specifies the amount of time to wait, in msecs.

Type specific versions of the function when using a C compiler under 64-bit
void MobjControlDouble (MIL_ID ObjectId, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
Parameters

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 MobjControlInt64 (MIL_ID ObjectId, MIL_INT64 ControlType, MIL_INT64 ControlValue)
Parameters

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.
DMIL PUBLISH NO READ ONLY READ WRITE OBJECT NAME QUEUE FULL MODE DEFAULT ERROR WRITE TIMEOUT QUEUE SIZE DEFAULT READ TIMEOUT DEFAULT INFINITE RESET DEFAULT WRITE TIMEOUT DEFAULT INFINITE