3 callback function interface definition, Callback function interface definition – KEYENCE LJ-V7000 Series User Manual

Page 22

Advertising
background image

22

LJ-V7000_COM_RM_E

8.3

Callback function interface definition

Format

void (*pCallBack)(

BYTE* pBuffer, DWORD dwSize, DWORD dwCount, DWORD dwNotify, DWORD
dwUser);

Parameters

pBuffer(in)

A pointer to the buffer that stores the profile data.
The profile data is stored in this buffer with "LJV7IF_PROFILE_HEADER - signed 32-bit
profile data - LJV7IF_PROFILE_FOOTER" as a single unit of profile data, and only the
number of profiles that could be acquired (dwCount) are returned.

dwSize(in)

The size in BYTEs per single unit of the profile "LJV7IF_PROFILE_HEADER - signed 32-
bit profile data - LJV7IF_PROFILE_FOOTER" contained in pBuffer.

dwCount(in)

The number of profiles stored in pBuffer.

dwNotify(in)

Notification of an interruption in high-speed communication or a break in batch
measurements.
For details, see "8.3.1 Supplement".

dwUser(in)

User information set when high-speed communication was initialized.

Return
value

None

Explanation

When using the high-speed communication function, this callback function is called when
data is received and when there is a change in the communication state.
This callback function is called from a thread other than the main thread.
Take care to only implement storing profile data in a thread save buffer in the callback
function. As the thread used to call the callback function is the same as the thread used to
receive data, the processing time of the callback function affects the speed at which data
is received, and may stop communication from being performed properly in some
environments. Refer to the sample program for details.
Profile data is stored in 0.01 μm units.

Advertising