![]() |
![]()
| ![]() |
![]()
NAMElxi_discover - search for LXI devices on network SYNOPSIS#include <lxi.h> int lxi_discover(lxi_info_t *info, int timeout, lxi_discover_t type); DESCRIPTIONThe lxi_discover() function searches for LXI devices or services on the local network using VXI-11 or mDNS/DNS-SD respectively. Which discover type is used is defined as follows: typedef enum { During the discover operation events and results are returned by callbacks registered via the info structure, defined as follows: typedef struct { The broadcast callback is called whenever a new network interface is searched (DISCOVER_VXI11 only). The device callback is called whenever a new LXI device is found (DISCOVER_VXI11 only). The service callback is called whenever a new LXI service is found (DISCOVER_MDNS only). The timeout is in milliseconds. RETURN VALUEUpon successful completion lxi_discover() returns LXI_OK , or LXI_ERROR if an error occurred. EXAMPLEThe following example searches for LXI devices using VXI-11 and prints the ID and IP addresses of found devices: #include <stdio.h> #include <lxi.h> void broadcast(char *address, char *interface) { SEE ALSOlxi_discover_if(3) lxi_init(3) lxi_open(3), lxi_close(3) lxi_receive(3), lxi_disconnect(3),
|