Click here to show toolbars of the Web Online Help System: show toolbars |
Table: | For specifying the system event to hook |
+ combination: | For specifying the UART upon which the system event occurs |
+ combination: | For specifying the timer to which to hook the function |
+ combination: | For specifying that the function should be unhooked |
MIL_ID SysId, | //in |
MIL_INT HookType, | //in |
MIL_SYS_HOOK_FUNCTION_PTR HookHandlerPtr, | //in |
void *UserDataPtr | //in-out |
This function allows you to attach or detach a user-defined function to a specified system event. Once a hook-handler function is defined and hooked to an event, it is automatically called when the event occurs.
You can hook more than one function to an event by making separate calls to MsysHookFunction() for each function that you want to hook. MIL automatically chains and keeps an internal list of all these hooked functions. When a function is hooked, this new function is added to the end of the list. When the event happens, all user-defined functions in the list will be executed in the same order that they were hooked to the event. You can also remove any function from the list; in this case, MIL preserves the order of the remaining functions in the list.
You can obtain more information about the event from within the hook handler function using MsysGetHookInfo().
Note that functions hooked to an event execute on a distinct thread. This permits the functions to run concurrently from the operation that fired the event and from functions hooked to other events. Although there is a small queue to permit a certain amount of overlap, hooked functions should not take longer to execute than the period in which two of their associated events can occur. You cannot determine the instance of the event that fired the function.
Specifies the identifier of the system on which to hook a function.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description |
MIL system-specific tooltip (‡) |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||||||||||||
![]() ![]() |
Specifies the default Host system of the current MIL application. |
‡ | a | b | c | e | f | g | h | j | l | m | o | p | r | s | t | ||||||||||||||||||||||
![]() ![]() |
Specifies a valid system identifier, previously allocated using MsysAlloc(). |
‡ | a | b | c | e | f | g | h | j | l | m | o | p | r | s | t |
Specifies the system event to which to hook the function. This parameter can be set to one of the following values.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description |
MIL system-specific tooltip (‡) |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||||||||||||
![]() ![]() |
Hooks the function to the presence of the camera. |
‡ | c | o | s | ||||||||||||||||||||||||||||||||||
![]() ![]() |
Hooks the function to the event that occurs when an I/O signal changes in accordance with its specified interrupt mode, set using MsysControl() with M_IO_INTERRUPT_ACTIVATION. |
‡ | a | b | e | f | g | h | t | ||||||||||||||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
[This is
only applicable to Matrox 4Sight-X, Matrox 4Sight GP/GPm, and
Matrox Supersight platforms]
The system must be a Host system allocated on the Matrox 4Sight GPm or Matrox Supersight platform. |
‡ | a | |||||||||||||||||||||||||||||||||||||
![]() ![]() |
Hooks the function to the event that occurs when the specified timer completes. |
‡ | t | ||||||||||||||||||||||||||||||||||||
![]() ![]() |
Hooks the function to the event that occurs when the specified timer starts its active period (after the timer delay). |
‡ | t | ||||||||||||||||||||||||||||||||||||
![]() ![]() |
Hooks the function to the event that occurs when the specified UART receives data. |
‡ | g | j | l | m | p | r | |||||||||||||||||||||||||||||||
![]() ![]() |
Hooks the function to the event that occurs when the Watchdog warning timer is not reset before the specified interval expires. |
‡ | g | h |
You can add the following value to the above-mentioned value to set the UART upon which the system event occurs.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description |
MIL system-specific tooltip (‡) |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||||||||||||
![]() ![]() |
Specifies the UART upon which the system event occurs. |
‡ | g | j | l | m | p | r | |||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies a UART, where n is from 0 to 3. |
‡ | g | j | l | m | p | r | ||||||||||||||||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
There is 1 UART available on Matrox Morphis. |
‡ | g | |||||||||||||||||||||||||||||||||||||
There are 4 UARTs available on Matrox Solios eA/XA Quad, 2 on Matrox Solios eA/XA dual, and 1 on Matrox Solios eA/XA single. |
‡ | l | |||||||||||||||||||||||||||||||||||||
There are 2 UARTs are available on Matrox Solios eCL/XCL dual-Base/single-Medium operating in dual-Base mode, and 1 is available on Matrox Solios eCL/XCL-B, eCL/XCL-F, and eCL/XCL dual-Base/single-Medium operating in single-Medium mode. |
‡ | j | m | p | r | ||||||||||||||||||||||||||||||||||
There are 2 UARTS available on Matrox Radient eCL-DB and eCL-DF, 3 on Matrox Radient eCL-QB, and 1 on Matrox Radient eCL-SF. |
‡ | j | p | r |
You must add the following value to the above-mentioned values to specify the timer to which to hook the function.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description |
MIL system-specific tooltip (‡) |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||||||||||||
![]() ![]() |
Specifies the timer to hook. |
‡ | t |
You can add the following value to the above-mentioned values to specify that the function should be unhooked.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description |
MIL system-specific tooltip (‡) |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||||||||||||
![]() ![]() |
Unhooks a hooked function. |
‡ | a | b | c | e | f | g | h | j | l | m | o | p | r | s | t |
Specifies the address of the function that should be called when the specified event occurs. The hook-handler function must be declared as follows:
Type of system event hooked.
Event identifier to pass to MsysGetHookInfo() when inquiring about the hooked event.
Specifies the user data pointer passed to MsysHookFunction().
Upon successful completion, the hook-handler function should return M_NULL. Note, MIL_SYS_HOOK_FUNCTION_PTR and MFTYPE are reserved MIL predefined types for functions and data pointers.
Specifies the address of the user data that you want to make available to the hook-handler function. This address is passed to the hook-handler function, through its UserDataPtr parameter, when the specified event occurs. Set this parameter to M_NULL if not used.
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |