User's Guide
II-VI Incorporated
375 Saxonburg Boulevard
Saxonburg, PA 16056
T. 724.352.4455 | F. 724.352.5284 | www.ii-vi.com
6 Supporting Features
6.1 LIBRARY TO INCLUDE IN C/C++ APPLICATIONS
Interface libraries are created for OTDR, OCM, SFP, OCC operations with underlying UART / I2C
communications. If user needs to create any new C/C++ applications to communicate with these
instruments, mentioned libraries can be linked.
6.1.1 OTDR Library Usage
1. User needs to include the header file of the library into the application. For OTDR, It will be
<otdr_interface.h> file.
2. After including the header file user needs to initialize the library by calling the
OtdrInterfaceInit() function. API returns 0 on success and error code on failure.
[Once Init is successful, multiple APIs can be called before deinit.]
3. Call the relevant API from following list in OTDR Interface Table to perform operation on OTDR
serial interface. This functions expects different arguments. otdr_interface.h describes all OTDR
functions operations, input & output parameters.
API returns 0 on success, -1 if OtdrInterfaceInit not performed / failed and relevant error code
on other failures.
4. De-initialize the library by calling the OtdrInterfaceDeInit(). API returns 0 on success and error
code on failure.
5. Link the library while compiling the application by “-lotdrinterface”.
OTDR Fast Scan Feature:
OTDR Emulator is developed in order to obtain fast response from OTDR. Limited commands are
supported currently, as mentioned in Table below. OTDR_EMU is initiated at init time.
Emulator can be started and stopped by following commands, in case required:
root@xmf-h:~# /etc/init.d/otdr_emu.sh start
root@xmf-h:~# /etc/init.d/otdr_emu.sh stop