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

| Customize Help
| Save Settings

MsysGetHookInfo



Function Map
Synopsis
Get information about a hook event.
Syntax
MIL_INT MsysGetHookInfo(
MIL_ID SysId, //in
MIL_ID EventId, //in
MIL_INT64 InquireType, //in
void *UserVarPtr //out
)
Description

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()).

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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
SysId

Specifies the identifier of the system.

function map For the system identifier
Click to summarizeValue Description MIL system-specific
tooltip (‡)
Click to summarize M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

a c e f g h o s t
Click to summarize MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

a c e f g h o s t
EventId

Specifies the system event identifier received by the hook-handler function (see MsysHookFunction()).

InquireType

Specifies the type of information about which to inquire.

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

UserVarPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_TEXT_CHAR
  • MIL_DOUBLE
  • MIL_INT
  • MIL_INT64

Specifies the address in which to write the requested information.

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

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().

function map For retrieving information about a general system hook event
Click to summarizeInquireType Description MIL system-specific
tooltip (‡)
UserVarPtr
- Possible values returned
Click to summarize M_GRAB_TRIGGER_MISSED

Retrieves the number of missed triggers occurring on timer 2.

(summarize)
f t
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
f t
Click to summarize Value

Specifies the number of missed triggers.

f t

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 system event using MsysHookFunction() with M_CAMERA_PRESENT.

function map For retrieving information about a camera-specific event
Click to summarizeInquireType Description MIL system-specific
tooltip (‡)
UserVarPtr
- Possible values returned
Click to summarize M_CAMERA_PRESENT

Retrieves whether a camera has been added or re-connected to the system.

(summarize)
a c o s t
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a c o s t
Click to summarize M_FALSE

Specifies that a camera has been added or re-connected to the system.

a c o s t
Click to summarize M_TRUE

Specifies that a camera has been removed from the system.

a c o s t
Click to summarize M_GC_IP_ADDRESS_STRING

Retrieves the IP address (IPv4) of the camera that generated the M_CAMERA_PRESENT event.

(summarize)
c s
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: array of type MIL_TEXT_CHAR (more details...)
c s
Click to summarize MIL_TEXT("nnn.nnn.nnn.nnn") 1

Specifies the IP address of the camera as a string. The address string is expressed in dotted decimal notation, where each dotted decimal value (nnn) is a number between 0 and 255.

(summarize)
c s
Click to summarize M_GC_IP_ADDRESS_STRING_SIZE

Inquires the length of the string returned by M_GC_IP_ADDRESS_STRING.

(summarize)
c s
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
c s
Click to summarize Value

Specifies the length of the string, including the terminating null character ("\0").

c s
Click to summarize M_GC_MAC_ADDRESS_STRING

Retrieves the MAC address of the camera that generated the M_CAMERA_PRESENT event.

(summarize)
c s
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: array of type MIL_TEXT_CHAR (more details...)
c s
Click to summarize MIL_TEXT("nn-nn-nn-nn-nn-nn") 1

Specifies the MAC address of the camera, as a string. The address string is expressed in hexadecimal pairs, where each pair (nn) is a hexadecimal number between 00 and FF.

(summarize)
c s
Click to summarize M_GC_MAC_ADDRESS_STRING_SIZE

Inquires the length of the string returned by M_GC_MAC_ADDRESS_STRING.

(summarize)
c s
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
c s
Click to summarize Value

Specifies the length of the string, including the terminating null character ("\0").

c s
Click to summarize M_GC_UNIQUE_ID_STRING

Inquires the unique identifier for your camera.

(summarize)
a c o s t
MIL system specific

This is the camera's MAC address.

c s

This is the camera's global unique identifier (GUID).

o
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: array of type MIL_TEXT_CHAR (more details...)
a c o s t
Click to summarize MIL_TEXT("nnnnnnnnnnnn") 1

Specifies the unique identifier, as a string. The string is expressed in hexadecimal.

(summarize)
a c o s t
Click to summarize M_GC_UNIQUE_ID_STRING_SIZE

Inquires the size of the string containing the unique identifier for your camera.

(summarize)
a c o s t
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a c o s t
Click to summarize Value

Specifies the number of characters in the string.

a c o s t
Click to summarize M_GC_USER_NAME

Retrieves the user-defined name of the camera that generated the M_CAMERA_PRESENT event.

(summarize)
a c o s t
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: array of type MIL_TEXT_CHAR (more details...)
a c o s t
Click to summarize MIL_TEXT("CameraName") 1

Specifies the name of the camera.

a c o s t
Click to summarize M_GC_USER_NAME_SIZE

Inquires the length of the string returned by M_GC_USER_NAME.

(summarize)
a c o s t
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a c o s t
Click to summarize Value

Specifies the length of the string, including the terminating null character ("\0").

a c o s t
Click to summarize M_NUMBER

Retrieves the system-assigned digitizer device number associated with the camera that generated an M_CAMERA_PRESENT event.

(summarize)
a c o s t
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a c o s t
Click to summarize Value

Specifies the digitizer device number.

a c o s t
Click to summarize M_TIME_STAMP

Retrieves the operating system's time stamp at the point which the event generated a service request. The time stamp is generated by the operating system's performance counter. Time stamps can be used to see if a frame has been missed since the last time stamp.

(summarize)
a c o s t
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
a c o s t
Click to summarize Value

Specifies operating system's time stamp, in secs.

a c o s t

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 a timer event. The following information types are only available if MsysGetHookInfo() was called from a function hooked to an event using M_TIMER_START or M_TIMER_END.

function map For retrieving information about a timer start or timer end event
Click to summarizeInquireType Description MIL system-specific
tooltip (‡)
UserVarPtr
- Possible values returned
Click to summarize M_TIMER_INDEX

Retrieves the index value of the timer that generated an M_TIMER_END or an M_TIMER_START event.

(summarize)
t
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
t
Click to summarize Value

Specifies the value of the index of the timer.

t
Click to summarize M_TIMER_VALUE +

Retrieves the value of the specified timer.

This is typically used with a timer end event (set using MsysHookFunction() with M_TIMER_END). Note that, if used with a timer start event (M_TIMER_START), it will return 0.

To inquire the value of the timer that caused the event, use M_TIMER_INDEX to learn which timer to inquire.


You must specify a combination value from the following table:
(summarize)
t
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
t
Click to summarize Value

Specifies the current value of the timer, in nsecs.

t
Combination value for M_TIMER_VALUE.

You must add the following value to the above-mentioned value to specify the timer to inquire about.

function map For specifying the timer to inquire about
Click to summarizeCombination value Description MIL system-specific
tooltip (‡)
Click to summarize M_TIMERn

Specifies the timer to inquire about.

t

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.

function map For retrieving information about an I/O change event
Click to summarizeInquireType Description MIL system-specific
tooltip (‡)
UserVarPtr
- Possible values returned
Click to summarize M_IO_INTERRUPT_SOURCE

Retrieves the input signal that triggered the hook function.

See the MIL Hardware-specific Notes for a listing of available auxiliary signals and their corresponding numbers in MIL.

(summarize)
a e f g h t
MIL system specific
[This is only applicable to Matrox 4Sight GP/GPm platform]

This constant is only available on a Host system if the Host system has been allocated on a Matrox 4Sight GPm.

a
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a e f g h t
Click to summarize 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 t
Click to summarize M_IO_STATUS

Retrieves the state of the input signal that generated the interrupt. The returned value reflects the state of the input signal at the time of the interrupt.

(summarize)
a e f g h t
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a e f g h t
Click to summarize M_OFF

Specifies that the I/O signal is off.

a e f g h t
Click to summarize M_ON

Specifies that the I/O signal is on.

a e f g h t

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.

function map For retrieving information about a reference latch value
Click to summarizeInquireType Description MIL system-specific
tooltip (‡)
UserVarPtr
- Possible values returned
Click to summarize M_REFERENCE_LATCH_VALUE +

Retrieves the last timestamp or counter value stored by the specified latch.


You must specify a combination value from the following table:
(summarize)
a t
MIL system specific
[This is only applicable to Matrox 4Sight GP/GPm platform]

This is only available on Matrox 4Sight GPm with MIL 10 Update 26 installed.

a
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT64
a t
Click to summarize Value

Specifies the last timestamp or counter value stored by the specified latch.

a t
Combination value for M_REFERENCE_LATCH_VALUE.

You must add the following value to the above-mentioned value to specify which of the I/O command lists to use.

function map For specifying the I/O command list to use
Click to summarizeCombination value Description MIL system-specific
tooltip (‡)
Click to summarize M_IO_COMMAND_LISTn +

Specifies to inquire about I/O command list n.


You must specify a combination value from the following table:
(summarize)
a t
MIL system specific
[This is only applicable to Matrox 4Sight GP/GPm platform]

This is only available on Matrox 4Sight GPm with MIL 10 Update 26 installed.

For Matrox 4Sight GPm n is a number from 1 to 2.

a

For Matrox Iris GTR, n must be 1.

t
Combination value for M_IO_COMMAND_LISTn.

You must add the following value to the above-mentioned value to specify which latch to inquire about.

function map For specifying the latch to inquire
Click to summarizeCombination value Description MIL system-specific
tooltip (‡)
Click to summarize M_LATCHn

Specifies to inquire about latch n.

(summarize)
a t
MIL system specific
[This is only applicable to Matrox 4Sight GP/GPm platform]

This is only available on Matrox 4Sight GPm with MIL 10 Update 26 installed.

For Matrox 4Sight GPm, n is a number from 0 to 4.

a

For Matrox Iris GTR, n is a number from 1 to 2.

t
Return value
The returned value is M_NULL if successful. If the operation fails, a non-null (!M_NULL) value is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
DEFAULT HOST GRAB TRIGGER MISSED CAMERA PRESENT FALSE TRUE GC IP ADDRESS STRING GC IP ADDRESS STRING SIZE GC MAC ADDRESS STRING GC MAC ADDRESS STRING SIZE GC UNIQUE ID STRING GC UNIQUE ID STRING SIZE GC USER NAME GC USER NAME SIZE NUMBER TIME STAMP TIMER INDEX TIMER VALUE TIMERn IO INTERRUPT SOURCE AUX IOn IO STATUS OFF ON REFERENCE LATCH VALUE IO COMMAND LISTn LATCHn M_TIMERn M_AUX_IOn M_IO_COMMAND_LISTn M_LATCHn