Skip to main content

MsysGetHookInfo

BoardSupported
Host SystemPartial
V4L2Partial
Clarity UHDPartial
Concord PoEPartial
GenTLPartial
GevIQPartial
GigE VisionPartial
IndioPartial
Iris GTXPartial
Radient eV-CLNo
Rapixo CLNo
Rapixo CoFPartial
Rapixo CXPPartial
USB3 VisionPartial

Get information about a hook event.

Syntax

AIL_INT MsysGetHookInfo(
AIL_ID SysId, //in
AIL_ID EventId, //in
AIL_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).

Parameters

SysId (in, AIL_ID)

Specifies the identifier of the system.

For the system identifier

ValueDescription
M_DEFAULT_HOSTSpecifies the default Host system of the current Aurora Imaging Library application.
System identifierSpecifies a valid system identifier, previously allocated using MsysAlloc.

EventId (in, AIL_ID)

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

InquireType (in, AIL_INT64)

Specifies the type of information about which to inquire.

UserVarPtr *(out, void)

Specifies the address in which to write the requested information.

Parameter Associations

For retrieving information about a camera-specific event

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 withM_CAMERA_PRESENT.


M_CAMERA_PRESENT

Board availability: Clarity UHD, GevIQ, GigE Vision, Host System, Iris GTX, Rapixo CXP, Rapixo CoF, USB3 Vision

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

ValueDescription
M_FALSESpecifies that a camera has been removed from the system.
M_TRUESpecifies that a camera has been added or re-connected to the system.

M_GC_REMOTE_IP_ADDRESS_STRING

Board availability: GevIQ, GigE Vision

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

ValueDescription
"nnn.nnn.nnn.nnn"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.

M_GC_REMOTE_MAC_ADDRESS_STRING

Board availability: GevIQ, GigE Vision

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

ValueDescription
"nn-nn-nn-nn-nn-nn"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.

M_GC_UNIQUE_ID_STRING

Board availability: GevIQ, GigE Vision, Host System, Iris GTX, USB3 Vision

Retrieves the unique identifier for your camera.

System specific

Board(s)Note
GevIQ, GigE VisionThis is the camera's MAC address.
USB3 VisionThis is the camera's global unique identifier (GUID).
ValueDescription
"nnnnnnnnnnnn"Specifies the unique identifier, as a string. The string is expressed in hexadecimal.

M_GC_USER_NAME

Board availability: GevIQ, GigE Vision, Host System, Iris GTX, USB3 Vision

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

ValueDescription
"CameraName"Specifies the name of the camera.

M_NUMBER

Board availability: Clarity UHD, GenTL, GevIQ, GigE Vision, Host System, Iris GTX, Rapixo CXP, Rapixo CoF, USB3 Vision, V4L2

Retrieves the device number of the digitizer to which a camera has been connected or disconnected from, causing an M_CAMERA_PRESENT event.

ValueDescription
M_DEFAULTSpecifies the default board.
M_DEVnSpecifies the device number (rank) of the board.
"BoardIdentifierString"Specifies the user-defined name of the board.
M_GENTL_PRODUCERSpecifies the GenTL Producer (library) for which to allocate this Aurora Imaging Library GenTL system.
0 <= Value <= 127Specifies the index.

M_TIME_STAMP

Board availability: Concord PoE, GenTL, GevIQ, GigE Vision, Host System, Indio, Iris GTX, USB3 Vision, V4L2

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.

ValueDescription
ValueSpecifies operating system's time stamp, in sec.

Combination Constants — For identifying the instance of the GenTL library to use

Essential.

Usage: You must add one of the following values to the above-mentioned values to identify the GenTL library for which an Aurora Imaging Library GenTL system was allocated.

All third-party proprietary GenTL libraries installed on your computer are sorted and indexed by Aurora Imaging Library. Use the GenTL Producer index number to identify the library that your Aurora Imaging Library system should use to communicate with the hardware devices on the specified transportation layer. These libraries are indexed and sorted for reference by Aurora Imaging Library (the GenTL Consumer). In all cases, the same number and type of libraries should be installed on every computer that will run your application; the order in which they are installed, however, is not important. To determine the number of GenTL libraries installed on your computer, use MappInquire with M_GENTL_PRODUCER_COUNT or use the General Default Values page of the Aurora Imaging Configurator utility.

Board availability: GenTL, V4L2

ValueDescription
M_GENTL_PRODUCERSpecifies the GenTL Producer (library) for which this Aurora Imaging Library GenTL system was allocated.

For retrieving information about a timer start or timer end event

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.

Board availability: Concord PoE, Host System, Indio, Iris GTX


M_TIMER_INDEX

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

System specific

Board(s)Note
Host SystemThis constant is only available on a Host system if the Host system was previously allocated on a Zebra 4Sight EV6/EV7. It is not available on Zebra 4Sight XV6/XV7.
ValueDescription
ValueSpecifies the value of the index of the timer.

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.

System specific

Board(s)Note
Host SystemThis constant is only available on a Host system if the Host system was previously allocated on a Zebra 4Sight EV6/EV7. It is not available on Zebra 4Sight XV6/XV7.
ValueDescription
ValueSpecifies the current value of the timer, in nsec.

Combination Constants — For specifying the timer to inquire about

Essential.

Usage: You must add one of the following values to the above-mentioned values to specify the timer to inquire about.

Board availability: Concord PoE, Host System, Indio, Iris GTX

ValueDescription
M_TIMERnSpecifies the timer to inquire about.

For retrieving information about an I/O change event

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.

Board availability: Concord PoE, Host System, Indio, Iris GTX


M_IO_INTERRUPT_SOURCE

Retrieves the input signal that triggered the hook function. See the Aurora Imaging Library Hardware-specific Notes for a listing of available auxiliary signals and their corresponding numbers in Aurora Imaging Library.

System specific

Board(s)Note
Host SystemThis constant is only available on a Host system if the Host system was previously allocated on a Zebra 4Sight EV6/EV7. It is not available on Zebra 4Sight XV6/XV7.
ValueDescription
M_AUX_IOnSpecifies that auxiliary signal n triggered the hook function, where n is the number of the auxiliary signal.

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.

ValueDescription
M_OFFSpecifies that the I/O signal is off.
M_ONSpecifies that the I/O signal is on.

For retrieving information about a data latch value

The following allows you to retrieve information about a data latch event. The following information types are only available if using a latch that has previously saved the time, I/O command list counter, or rotary decoder position counter value upon a hardware event.


M_REFERENCE_LATCH_VALUE

Board availability: Concord PoE, Host System, Indio, Iris GTX

Retrieves the last timestamp or counter value stored by the specified latch, associated with the specified I/O command list. This setting is available in functions hooked to any type of event.

System specific

Board(s)Note
Host SystemThis constant is only available on a Host system if the Host system was previously allocated on a Zebra 4Sight EV6/EV7. It is not available on Zebra 4Sight XV6/XV7.
ValueDescription
ValueSpecifies the last timestamp or counter value stored by the specified latch, associated with the specified command list.

M_SYS_DATA_LATCH_VALUE

Board availability: Host System

Retrieves the last rotary decoder position counter value stored by the specified latch, associated with the rotary decoders of the system. > Note: This setting is only available if MsysGetHookInfo was called from a function hooked to an event using M_TIMER_START, M_TIMER_END, or M_IO_CHANGE.

System specific

Board(s)Note
System specificThis constant is only available on a Host system if the Host system was previously allocated on a Zebra 4Sight EV6/EV7. It is not available on Zebra 4Sight XV6/XV7.
ValueDescription
ValueSpecifies the last rotary decoder position counter value stored by the specified latch, associated with the rotary decoders of the system.

Combination Constants — For specifying the I/O command list to use

Essential, cannot be used alone.

Usage: You must add one of the following values to the above-mentioned values to specify which of the I/O command lists to use.

Board availability: Concord PoE, Host System, Indio, Iris GTX

ValueDescription
M_IO_COMMAND_LISTnSpecifies to inquire about I/O command list n.

Combination Constants — For specifying the latch to inquire

Essential, cannot be used alone.

Usage: You must add one of the following values to the above-mentioned values to specify which latch to inquire about.

Board availability: Concord PoE, Host System, Indio, Iris GTX

ValueDescription
M_LATCHnSpecifies to inquire about latch n.

For retrieving information from a GenTL feature change event

The following allows you to retrieve information from a GenTL feature change event. These information types are only available if MsysGetHookInfo was called from a function hooked to GenICam feature change event using MsysHookFunction with M_FEATURE_CHANGE.

Board availability: GenTL, V4L2


M_GC_FEATURE_CHANGE_NAME

Retrieves the name of the GenTL feature that changed. This information type is only available ifMsysGetHookInfo is used from a function hooked to GenTL feature change events using MsysHookFunction with M_FEATURE_CHANGE.

ValueDescription
ValueSpecifies the feature name.

Combination Constants — For getting the string size

Optional.

Usage: You can add one of the following values to the above-mentioned values to get the string's length.

Board availability: GenTL, GigE Vision, Host System, Iris GTX, USB3 Vision, V4L2

M_STRING_SIZE

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

Return Value

Type: AIL_INT

The returned value is M_NULL if successful. If the operation fails, a non-null (!M_NULL) value is returned.

This constant is only available on a Host system if the Host system was previously allocated on a Zebra 4Sight EV6/EV7. It is not available on Zebra 4Sight XV6/XV7.

For Zebra 4Sight EV6/EV7, n can be either 1 or 2.

For Zebra 4Sight EV6/EV7, n is a number from 1 to 4, unless used with M_SYS_DATA_LATCH_VALUE (in which case,n is a number from 1 to 2).

Copyright © 2026 Zebra Technologies.