MIL_ID SysId, | //in |
MIL_ID EventId, | //in |
MIL_INT64 InquireType, | //in |
void *UserVarPtr | //out |
This function allows you to get information about the event that caused the hook function to be called. MsysGetHookInfo() should only be called within the scope of a system hook-handler function (see MsysHookFunction()).
Specifies the system event identifier received by the hook-handler function (see MsysHookFunction()).
Specifies the type of information about which to inquire.
See the Parameter associations section for possible values that can be specified.
Specifies the address in which to write the requested information.
See the Parameter associations section for possible values that can be returned.
The tables below list possible values for the InquireType parameter and possible values returned to the UserVarPtr parameter.
The following allows you to retrieve information about various system hook event. Unless otherwise specified, you can retrieve these information types if you call this function from within a function hooked to any system event using MsysHookFunction().
Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_INT.
For retrieving information about a
general system hook event
|
|||||||||||||||||||||||||||||||||||||||
InquireType |
Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_GRAB_TRIGGER_MISSED |
Retrieves the number of missed triggers occurring on timer 2. (more details...) |
† | f | ||||||||||||||||||||||||||||||||||||
Value |
Specifies the number of missed triggers. |
† | f |
The following allows you to retrieve information about a camera-specific event. The following information types are only available if MsysGetHookInfo() was called from a function hooked to a GenICam event using M_CAMERA_PRESENT. In addition, the GenICam event must be enabled using MdigControlFeature(), and the message channel must be supported by your camera.
Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_INT.
For inquiring about a camera-specific
event
|
|||||||||||||||||||||||||||||||||||||||
InquireType | Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_CAMERA_PRESENT |
Retrieves whether a camera has been added or re-connected to the system. (more details...) |
† | c | o | s | ||||||||||||||||||||||||||||||||||
M_FALSE |
Specifies that a camera has been added or re-connected to the system. |
† | c | o | s | ||||||||||||||||||||||||||||||||||
M_TRUE |
Specifies that a camera has been removed from the system. |
† | c | o | s | ||||||||||||||||||||||||||||||||||
M_GC_IP_ADDRESS_STRING |
Retrieves the IP address (IPv4) of the camera that generated the M_CAMERA_PRESENT event. (more details...) |
† | c | s | |||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: array of type MIL_TEXT_CHAR |
† | c | s | |||||||||||||||||||||||||||||||||||
MIL_TEXT("nnn.nnn.nnn.nnn") 1 |
Specifies the IP address of the camera as a string. (more details...) |
† | c | s | |||||||||||||||||||||||||||||||||||
M_GC_IP_ADDRESS_STRING_SIZE |
Inquires the length of the string returned by M_GC_IP_ADDRESS_STRING. (more details...) |
† | c | s | |||||||||||||||||||||||||||||||||||
Value |
Specifies the length of the string, including the terminating null character ("\0"). |
† | c | s | |||||||||||||||||||||||||||||||||||
M_GC_MAC_ADDRESS_STRING |
Retrieves the MAC address of the camera that generated the M_CAMERA_PRESENT event. (more details...) |
† | c | s | |||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: array of type MIL_TEXT_CHAR |
† | c | s | |||||||||||||||||||||||||||||||||||
MIL_TEXT("nn-nn-nn-nn-nn-nn") 1 |
Specifies the MAC address of the camera, as a string. (more details...) |
† | c | s | |||||||||||||||||||||||||||||||||||
M_GC_MAC_ADDRESS_STRING_SIZE |
Inquires the length of the string returned by M_GC_MAC_ADDRESS_STRING. (more details...) |
† | c | s | |||||||||||||||||||||||||||||||||||
Value |
Specifies the length of the string, including the terminating null character ("\0"). |
† | c | s | |||||||||||||||||||||||||||||||||||
M_GC_UNIQUE_ID_STRING |
Inquires the unique identifier for your camera. (more details...) |
† | c | o | s | ||||||||||||||||||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
This is the camera's MAC address. |
† | c | s | ||||||||||||||||||||||||||||||||||||
This is the camera's global unique identifier (GUID). |
† | o | |||||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: array of type MIL_TEXT_CHAR |
† | c | o | s | ||||||||||||||||||||||||||||||||||
MIL_TEXT("nnnnnnnnnnnn") 1 |
Specifies the unique identifier, as a string. (more details...) |
† | c | o | s | ||||||||||||||||||||||||||||||||||
M_GC_UNIQUE_ID_STRING_SIZE |
Inquires the size of the string containing the unique identifier for your camera. (more details...) |
† | c | o | s | ||||||||||||||||||||||||||||||||||
Value |
Specifies the number of characters in the string. |
† | c | o | s | ||||||||||||||||||||||||||||||||||
M_GC_USER_NAME |
Retrieves the user-defined name of the camera that generated the M_CAMERA_PRESENT event. (more details...) |
† | c | o | s | ||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: array of type MIL_TEXT_CHAR |
† | c | o | s | ||||||||||||||||||||||||||||||||||
MIL_TEXT("CameraName") 1 |
Specifies the name of the camera. |
† | c | o | s | ||||||||||||||||||||||||||||||||||
M_GC_USER_NAME_SIZE |
Inquires the length of the string returned by M_GC_USER_NAME. (more details...) |
† | c | o | s | ||||||||||||||||||||||||||||||||||
Value |
Specifies the length of the string, including the terminating null character ("\0"). |
† | c | o | s | ||||||||||||||||||||||||||||||||||
M_NUMBER |
Retrieves the system-assigned digitizer device number associated with the camera that generated an M_CAMERA_PRESENT event. (more details...) |
† | c | o | s | ||||||||||||||||||||||||||||||||||
Value |
Specifies the digitizer device number. |
† | c | o | s | ||||||||||||||||||||||||||||||||||
M_TIME_STAMP |
Retrieves the operating system's time stamp at the point which the event generated a service request. (more details...) |
† | c | o | s | ||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: MIL_DOUBLE |
† | c | o | s | ||||||||||||||||||||||||||||||||||
Value |
Specifies operating system's time stamp, in secs. |
† | c | o | s |
1 If the value was passed in a variable, it won't be returned enclosed in MIL_TEXT().
The following allows you to retrieve information about an I/O change event. The following information types are only available if MsysGetHookInfo() was called from a function hooked to an event using M_IO_CHANGE.
If more than one input signal triggers an interrupt at the same time, the hook-handler function (or chain of hook-handler functions) is called for each input signal that generated an interrupt. As a result, any and all user-specified function(s) hooked using MsysHookFunction() with M_IO_CHANGE will be executed for each interrupt.
Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_INT.
For inquiring about an I/O change
event
|
|||||||||||||||||||||||||||||||||||||||
InquireType |
Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_IO_INTERRUPT_SOURCE |
[This is
only applicable to Matrox 4Sight GP platform]
Retrieves the input signal that triggered the hook function. (more details...) |
† | a | e | f | g | h | ||||||||||||||||||||||||||||||||
M_AUX_IOn |
Specifies that auxiliary signal n triggered the hook function, where n is the number of the auxiliary signal. |
† | a | e | f | g | h | ||||||||||||||||||||||||||||||||
M_IO_STATUS |
Retrieves the state of the input signal that generated the interrupt. (more details...) |
† | a | e | f | g | h | ||||||||||||||||||||||||||||||||
M_OFF |
Specifies that the I/O signal is off. |
† | a | e | f | g | h | ||||||||||||||||||||||||||||||||
M_ON |
Specifies that the I/O signal is on. |
† | a | e | f | g | h |
The following allows you to retrieve information about a reference latch event. The following information types are only available if using a latch that has previously saved the time or counter value upon a hardware event and using MsysHookFunction() with any hook event.
Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_INT.
For inquiring about a reference latch
value
|
|||||||||||||||||||||||||||||||||||||||
InquireType |
Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_REFERENCE_LATCH_VALUE + |
[This is
only applicable to Matrox 4Sight GP platform]
Retrieves the last timestamp or counter value stored by the specified latch. (more details...) |
† | a | ||||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: MIL_INT64 |
† | a | ||||||||||||||||||||||||||||||||||||
Value |
Specifies the last timestamp or counter value stored by the specified latch. |
† | a |
You must add the following value to the above-mentioned value to specify which of the I/O command lists to use.
For specifying the I/O command list to
use
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
M_IO_COMMAND_LISTn + |
Specifies to inquire about I/O command list n, where n is either 1 or 2. (more details...) |
† | a |
You must add the following value to the above-mentioned value to specify which latch to inquire about.
For specifying the latch to
inquire
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
M_LATCHn |
Specifies to inquire about latch n, where n is a number from 0 to 4. (more details...) |
† | a |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |