MIL_ID ObjectId, | //in |
MIL_INT64 ControlType, | //in |
MIL_DOUBLE ControlValue | //in |
This function controls the settings of a MIL object. You can control the read/write properties of a remote MIL object and associate information with a MIL object. You can also control MIL message mailboxes and HTTP servers.
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().
Specifies the type of MIL object setting to control.
See the Parameter associations section for possible values that can be specified.
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.
For controlling the access of remote MIL
objects
|
|||||||||||||||||||||||||||||||||||||||
ControlType | Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
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)Controls a MIL object's remote access rights. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NO |
Specifies that the MIL object will not be visible. This is the default value. (summarize)Specifies that the MIL object will not be visible. (more details...) |
||||||||||||||||||||||||||||||||||||||
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)Specifies that the MIL object can only be used as a source or to be inquired. (more details...) |
||||||||||||||||||||||||||||||||||||||
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)Specifies that the MIL object can be used as a destination or can be controlled by MIL functions. (more details...) |
The following ControlType and corresponding ControlValue parameter settings are used to control whether the object is accessible using MILweb.
For controlling the access of MILweb
objects
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_WEB_PUBLISH |
Sets whether the object is accessible using MILweb. This setting is only supported for message mailboxes and MILweb displays (allocated using MdispAlloc() with M_WEB). It is not supported for objects allocated on a DMIL remote system. This setting requires MIL driver update 47 (or later). (summarize)Sets whether the object is accessible using MILweb. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NO |
Specifies that the object is not accessible using MILweb. This is the default value. (summarize)Specifies that the object is not accessible using MILweb. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_READ_ONLY |
Specifies that the object can be read from by a MILweb client application. A MIL object can only be set to M_READ_ONLY if M_WEB_CONNECTION is set to M_ENABLE. (summarize)Specifies that the object can be read from by a MILweb client application. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_READ_WRITE |
Specifies that the object can be read from and written to by a MILweb client application. A MIL object can only be set to M_READ_WRITE if M_WEB_CONNECTION is set to M_ENABLE. (summarize)Specifies that the object can be read from and written to by a MILweb client application. (more details...) |
The following ControlType and corresponding ControlValue parameter settings are used to associate information to a MIL object.
For associating a MIL object with
information
|
|||||||||||||||||||||||||||||||||||||||
ControlType | Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_OBJECT_NAME |
Sets the name to associate with a MIL object. INQ (summarize)Sets the name to associate with a MIL object. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Casts the address of the string identifying the specified object's name, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (summarize)Casts the address of the string identifying the specified object's name, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the string whose address to cast. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_OBJECT_USER_DATA_PTR |
Sets the address of the user data to associate with a MIL object. This is useful, for example, to associate specific data to the different buffers passed to MdigProcess(). When used with DMIL, the user data pointer is stored locally in the process doing MobjControl. INQ (summarize)Sets the address of the user data to associate with a MIL object. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Casts the address of the specified user data, from a void * to a MIL_DOUBLE. (summarize)Casts the address of the specified user data, from a void * to a MIL_DOUBLE. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the address of the user data. |
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.
For controlling message mailboxes
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_QUEUE_FULL_MODE |
Sets the behavior of the queue when the message limit is attained. INQ (summarize)Sets the behavior of the queue when the message limit is attained. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_WRITE_TIMEOUT. |
||||||||||||||||||||||||||||||||||||||
M_ERROR |
Specifies that a MIL error is generated when the message limit is attained. |
||||||||||||||||||||||||||||||||||||||
M_WRITE_TIMEOUT |
Specifies to wait for the write timeout to elapse. |
||||||||||||||||||||||||||||||||||||||
M_QUEUE_SIZE |
Sets the number of messages the queue can hold. INQ (summarize)Sets the number of messages the queue can hold. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 100 messages. |
||||||||||||||||||||||||||||||||||||||
Value > 0 |
Specifies the number of messages the queue can hold. |
||||||||||||||||||||||||||||||||||||||
M_READ_TIMEOUT |
Sets the amount of time to wait for a read operation. INQ (summarize)Sets the amount of time to wait for a read operation. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_INFINITE. |
||||||||||||||||||||||||||||||||||||||
M_INFINITE |
Specifies that the read operation waits indefinitely. |
||||||||||||||||||||||||||||||||||||||
Value > 0 |
Specifies the amount of time to wait, in msecs. |
||||||||||||||||||||||||||||||||||||||
M_RESET |
Resets the message mailbox by removing all messages. (summarize)Resets the message mailbox by removing all messages. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default behavior. |
||||||||||||||||||||||||||||||||||||||
M_WRITE_TIMEOUT |
Sets the amount of time to wait for a write operation. INQ (summarize)Sets the amount of time to wait for a write operation. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_INFINITE. |
||||||||||||||||||||||||||||||||||||||
M_INFINITE |
Specifies that the write operation waits indefinitely. |
||||||||||||||||||||||||||||||||||||||
Value > 0 |
Specifies the amount of time to wait, in msecs. |
The following ControlType and corresponding ControlValue parameter settings are used to control MIL HTTP server objects allocated using MobjAlloc() with M_HTTP_SERVER.
For controlling HTTP servers
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_HTTP_ADDRESS |
Sets the web address (URL) with which the MIL HTTP server can be accessed in a web browser. This setting requires MIL driver update 47 (or later). INQ (summarize)Sets the web address (URL) with which the MIL HTTP server can be accessed in a web browser. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Casts the address of the string identifying the specified object's name, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (summarize)Casts the address of the string identifying the specified object's name, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the string whose address to cast. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_HTTP_PORT |
Sets the port on which the MIL HTTP server listens for incoming connections. If you specified a port number using M_HTTP_ADDRESS, this must be the same port. For increased security, you should ensure that remote computers on the internet cannot access this port of the local computer. This setting requires MIL driver update 47 (or later). INQ (summarize)Sets the port on which the MIL HTTP server listens for incoming connections. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
0 <= Value <=66535 |
Specifies the port number. This port must not be used by any other application (including third-party applications) running on the local computer. The default value is 8080. (summarize)Specifies the port number. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HTTP_ROOT_DIRECTORY |
Sets the path of the folder on the local computer in which the files hosted by the MIL HTTP server are stored (for example, HTML and JavaScript files). All files in this folder (and its subfolders) are made available to connected computers when the HTTP server is enabled (using M_HTTP_START). You should typically ensure that there are no sensitive files in this folder (or its subfolders). There is no default directory; you must manually set a directory before enabling the HTTP server. This setting requires MIL driver update 47 (or later). INQ (summarize)Sets the path of the folder on the local computer in which the files hosted by the MIL HTTP server are stored (for example, HTML and JavaScript files). INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Casts the address of the string identifying the specified object's name, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (summarize)Casts the address of the string identifying the specified object's name, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the string whose address to cast. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_HTTP_START |
Enables the MIL HTTP server. MIL HTTP servers are intended to be run on a segmented LAN that has no internet/WAN access; MIL HTTP servers offer no internal security mechanisms. When a MIL HTTP server is enabled, you should typically ensure that your network administrator configures your network to prevent incoming connections from the internet to the computer running your MIL application (and from any other devices on your network that do not need access). If this is not possible, at a minimum, you should block incoming connections from the internet to the listening port of the HTTP server. You can inquire which port is used for this purpose, using MobjInquire() with M_HTTP_PORT. This setting requires MIL driver update 47 (or later). (summarize)Enables the MIL HTTP server. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HTTP_STOP |
Disables the MIL HTTP server. This setting requires MIL driver update 47 (or later). (summarize)Disables the MIL HTTP server. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
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. |
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. |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |