Table: | For specifying the UserVarPtr's data type |
+ combination: | For specifying the length of the array |
MIL_ID BufId, | //in |
MIL_INT64 ControlType, | //in |
MIL_CONST_TEXT_PTR FeatureName, | //in |
MIL_INT64 UserVarType, | //in |
const void *UserVarPtr | //in |
This function allows you to directly control various GenICam standard feature naming convention (SFNC) features and manufacturer-specific features of buffers. For more information, refer to Using Matrox GenTL Consumer driver with MIL.
The features described in this function are primarily available to set existing settings using MIL code or to set information from which you can build your own interface for the GenTL buffer's description file (XML). MIL provides two versions of an interface that you can use to interactively inquire the buffer's features. At design-time, you can use Matrox Intellicam's Feature Browser. At runtime, you can launch Matrox Feature Browser, using MbufControl() with M_GC_FEATURE_BROWSER. Both versions of Matrox Feature Browser provide a list of available feature names and associated possible values, as well as code snippets with the MIL functions and MIL constants associated with the settings selected; you can copy the code snippets to your MIL application code.
To inquire a buffer-specific feature, use MbufInquireFeature().
Specifies the identifier of the buffer to control. This parameter must be given a valid buffer identifier, previously allocated using MbufAlloc...().
Specifies the type of information to control for the specified feature.
See the Parameter associations section for possible values that can be specified.
Specifies the name of the buffer feature to control.
For specifying the name of the feature
|
|||||||||||||||||||||||||||||||||||||||
Value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
MIL_TEXT("FeatureName") 1 |
Specifies the name of the feature. Note that the feature name is case-sensitive. Refer to the GenTL library's documentation for a list of the features available. (summarize)Specifies the name of the feature. (more details...) |
‡ | v |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
Specifies the data type of the address pointed to by the UserVarPtr parameter. If not setting the feature's value (using M_FEATURE_VALUE), set this parameter to M_DEFAULT.
Note that, in the case of a string (or a multi-byte register), the size of the array passed to the UserVarPtr parameter must be equal to or larger than the returned information; otherwise an application crash will occur.
For specifying the UserVarPtr's data
type
|
|||||||||||||||||||||||||||||||||||||||
Value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
M_TYPE_BOOLEAN |
Specifies that UserVarPtr is passed an address of type MIL_BOOL. |
‡ | v | ||||||||||||||||||||||||||||||||||||
M_TYPE_DOUBLE |
Specifies that UserVarPtr is passed an address of type MIL_DOUBLE. |
‡ | v | ||||||||||||||||||||||||||||||||||||
M_TYPE_INT64 |
Specifies that UserVarPtr is passed an address of type MIL_DOUBLE. |
‡ | v | ||||||||||||||||||||||||||||||||||||
M_TYPE_STRING + |
Specifies that UserVarPtr is passed an address of type MIL_TEXT_CHAR. You must specify a combination value from the following table: Specifies that UserVarPtr is passed an address of type MIL_TEXT_CHAR. (more details...) |
‡ | v | ||||||||||||||||||||||||||||||||||||
M_TYPE_UINT8 + |
Specifies that UserVarPtr is passed an address of type MIL_UINT8. You must specify a combination value from the following table: Specifies that UserVarPtr is passed an address of type MIL_UINT8. (more details...) |
‡ | v |
You must add the following value to the above-mentioned values to specify the length of the array.
For specifying the length of the array
|
||||||||||||||||||||||||||||||||||||||||||
Combination value | Description |
MIL system-specific tooltip (‡) |
||||||||||||||||||||||||||||||||||||||||
Specifies the length of the array. (summarize)Specifies the length of the array. (more details...) |
‡ | ‡ | v | v | ||||||||||||||||||||||||||||||||||||||
Parameters | ||||||||||||||||||||||||||||||||||||||||||
Sets the length, in bytes. |
Specifies the address of the variable in which to write the value of the feature.
See the Parameter associations section for possible values that can be specified.
The table below lists possible values for the ControlType and UserVarPtr parameters.
To determine the data type of the FeatureName specified, use MbufInquireFeature() with M_FEATURE_VALUE.
For specifying the type of information about the
feature to set and the data type returned
|
|||||||||||||||||||||||||||||||||||||||
|
Description | MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
UserVarPtr | |||||||||||||||||||||||||||||||||||||||
M_FEATURE_CHANGE_HOOK |
Sets whether to enable an event to occur when the value of the specified feature changes. Once enabled, use MbufHookFunction() with M_FEATURE_CHANGE to hook a specified function to the feature change event. Repeat for each feature that you want to enable a feature change event. Alternatively, to enable an event to occur when the value of any feature changes and at the same time hook a function to any feature change, use MbufHookFunction() with M_FEATURE_CHANGE + M_ALL. Within the hook function, use MbufGetHookInfo() with M_GC_FEATURE_CHANGE_NAME to retrieve the name of the feature that caused the event. (summarize)Sets whether to enable an event to occur when the value of the specified feature changes. (more details...) |
‡ | v | ||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
‡ | v | ||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies that no event is generated when the value of the specified feature changes. This is the default value. (summarize)Specifies that no event is generated when the value of the specified feature changes. (more details...) |
‡ | v | ||||||||||||||||||||||||||||||||||||
M_ENABLE |
Specifies that an event is generated when the value of the specified feature changes. |
‡ | v | ||||||||||||||||||||||||||||||||||||
M_FEATURE_EXECUTE |
Sets that the specified command feature must be executed. (summarize)Sets that the specified command feature must be executed. (more details...) |
‡ | v | ||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: Set this parameter to
M_NULL
Data type info: Data
type: Set this parameter to
M_NULL
|
‡ | v | ||||||||||||||||||||||||||||||||||||
M_FEATURE_MAX |
Specifies to set the feature to its maximum value. (summarize)Specifies to set the feature to its maximum value. (more details...) |
‡ | v | ||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
| Set this parameter to
M_NULL MORE
Data type info: Data
type: address of a MIL_DOUBLE
| Set this parameter to
M_NULL MORE
|
‡ | v | ||||||||||||||||||||||||||||||||||||
M_FEATURE_MIN |
Specifies to set the feature to its minimum value. (summarize)Specifies to set the feature to its minimum value. (more details...) |
‡ | v | ||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
| address of a
MIL_INT64 MORE
Data type info: Data
type: address of a MIL_DOUBLE
| address of a
MIL_INT64 MORE
|
‡ | v | ||||||||||||||||||||||||||||||||||||
M_FEATURE_VALUE |
Sets the current value of the feature. (summarize)Sets the current value of the feature. (more details...) |
‡ | v | ||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_BOOL
| address of a MIL_DOUBLE
| address of a MIL_INT64
| array of type MIL_UINT8 [optionally,
in C++: a reference to a constant std::vector<MIL_UINT8>
] | array of type
MIL_TEXT_CHAR [optionally, in C++: MIL_STRING ]
MORE
Data type info: Data
type: address of a MIL_BOOL
| address of a MIL_DOUBLE
| address of a MIL_INT64
| array of type MIL_UINT8 [optionally,
in C++: a reference to a constant std::vector<MIL_UINT8>
] | array of type
MIL_TEXT_CHAR [optionally, in C++: MIL_STRING ]
MORE
|
‡ | v |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |