Advanced LAN Bypass User Manual
40
3.7.12
Scan event thread init/detach
3.7.12.1
lbp_err lbp_scan_event_init(scan_thread_parameters para)
Initializes the scan event thread (the user must configure the parameters).
The scan event thread will detect the events of all segments. If there is an event
change in any segment, the thread will call the callback which the user completes the
parameter, para. The callback will get two inputs: one is the segment number and the
other one is the latest event. The period_100ms variable determines the sleep time
of a thread between two scanning operation.
The parameter is a structure in liblbpcu.h:
Returns 0 on success or -1 in the event of an error.
3.7.12.2
lbp_err lbp_scan_event_detach()
Stops and detaches the scan event thread.
Returns 0 on success or -1 in the event of an error.
Table 3.50: API Function "lbp_get_master_led" Error Codes
Name
Error Code
LBP_ERR_INTERFACE_OPEN
0x89
LBP_ERR_FW_NRDY
0x8A
LBP_ERR_FW_CS
0x8B
LBP_ERR_PARAM_OUT_OF_BOUND
0x93
LBP_ERR_PARAM_NULL_POINTER
0x94
LBP_ERR_LBP_INIT
0x95
LBP_ERR_COMMAND_NOT_SUPPORT 0x96
typedef lbp_err (*callback)(int seg, int event);
typedef struct _scan_thread_parameters
{
callback cb;//call cb when any event changed for all
segments.
int period_100ms;//0 will not start the scan thread.
}__attribute__ ((packed)) scan_thread_parameters;
Summary of Contents for LAN Bypass
Page 1: ...User Manual Advantech Advanced LAN Bypass...
Page 4: ...Advanced LAN Bypass User Manual iv...
Page 10: ...Advanced LAN Bypass User Manual x...
Page 11: ...Chapter 1 1 ADVANCED LAN BYPASS...
Page 14: ...Advanced LAN Bypass User Manual 4...
Page 15: ...Chapter 2 2 OVERVIEW...
Page 26: ...Advanced LAN Bypass User Manual 16...
Page 27: ...Chapter 3 3 LIBLBPCU ADVANCED LAN BYPASS LIBRARY...
Page 51: ...Chapter 4 4 LBPCU...
Page 79: ...Appendix A A OS limitation...
Page 81: ...71 Advanced LAN Bypass User Manual Appendix A OS limitation...