Unit OP750MDLL

Uses
Classes, Interfaces, Objects and Records
Constants
Variables

Description

OP750/OP715 DLL Functions

Overview

Functions and Procedures

function OP750_CloseDriver: integer stdcall;
function OP750_GetActiveChannel(var channel: integer): integer stdcall;
function OP750_GetDLLRev: integer stdcall;
function OP750_GetDLLStatus: integer stdcall;
function OP750_GetFWRevision: integer stdcall;
function OP750_GetModuleID: integer stdcall;
function OP750_GetTemperature(var tempC: real; units: integer): integer stdcall;
function OP750_GetUSBDeviceCount(var deviceCount: integer): integer stdcall;
function OP750_GetUSBDeviceDescription(deviceNumber: integer; var deviceDescription: pansichar): integer stdcall;
function OP750_GetUSBSerialNumber(deviceNumber: integer; var serialNumber: pansichar): integer stdcall;
function OP750_GetUSBStatus(var haveError: boolean):integer stdcall;
function OP750_OpenDriver(USBhandle: TFT_HANDLE): integer stdcall;
function OP750_OpenUSBDevice(deviceNumber: integer; var handle: TFT_HANDLE):integer stdcall;
function OP750_RemoteMode(mode: integer): integer; stdcall;
function OP750_SelectModule(module: integer): integer stdcall;
function OP750_SetActiveChannel(channel: integer): integer stdcall;
function OP750_SetSource(sourceID: integer; state: byte): integer stdcall;
function OP750_SetSourceModulation(sourceID: integer; mode: byte):integer stdcall;
function OP750_SetSourcePower(sourceID: integer; level: byte): integer stdcall;

Types

TFT_HANDLE = Uint32;
TFT_HANDLE_PTR = PUint32;

Description

Functions and Procedures

function OP750_CloseDriver: integer stdcall;

Close the driver, closing the connection and communication with the device. Device must be reinitialized after calling this.

This requires driver initialization with OP750_OpenDriver.

Returns

1: OK, -1: fail

function OP750_GetActiveChannel(var channel: integer): integer stdcall;

Get the current active channel.

This requires driver initialization with OP750_OpenDriver.

Parameters
channel:
active channel (by ref)
Returns

1: OK, -1: fail

function OP750_GetDLLRev: integer stdcall;

Get the revision number of DLL

Returns

revision number

function OP750_GetDLLStatus: integer stdcall;

Get the initialization status of the DLL and USB device

Returns

1: OK, -5: no USB device found, -4: communication error, -3: USB Read Error, -2: USB Write Error

function OP750_GetFWRevision: integer stdcall;

Get the device's firmware revision

Returns

firmware revision number

function OP750_GetModuleID: integer stdcall;

Get the Module ID (internal product code) of the device.

This requires driver initialization with OP750_OpenDriver.

Module IDs

  • 10 – OP250

  • 11 – OP510

  • 12 – OP710

  • 13 – OP831

  • 14 – OP930

  • 15 – OP750

  • 16 – OP815

  • 17 – OP1100

  • 18 – OP1021

  • 19 – OP1302

  • 20 – OP815D

  • 21 – OP720

  • 22 – OP850

  • 23 – OP280

  • 24 – OP715

  • 25 – OP712

  • 26 – OP931

  • 27 – OP931-FTTX

  • 28 – OP480

Parameters
id:
Module ID (by ref)
function OP750_GetTemperature(var tempC: real; units: integer): integer stdcall;

Get the temperature in the specified units.

This requires driver initialization with OP750_OpenDriver.

Parameters
tempC:
temperature value (by ref)
units:

  • 0 – raw digital value

  • 1 – Celsius

  • 2 – Fahrenheit

Returns

1: OK, -1: fail

function OP750_GetUSBDeviceCount(var deviceCount: integer): integer stdcall;

Get the number of connected compatible USB devices.

Parameters
devCount:
USB device count (by ref)
Returns

1: OK, -1: fail

function OP750_GetUSBDeviceDescription(deviceNumber: integer; var deviceDescription: pansichar): integer stdcall;

Get the USB Device Description (up to 16 characters) of the specified device. Caller must allocate memory for deviceDescription buffer (16 characters + 1 null-terminator).

Parameters
deviceNumber:
the USB device number
deviceDescription:
a pointer to a null-terminated character array (by ref)
Returns

1: OK, -1: fail

function OP750_GetUSBSerialNumber(deviceNumber: integer; var serialNumber: pansichar): integer stdcall;

Get the USB Device Serial Number (8 characters) of the specified device. Caller must allocate memory for serialNumber buffer (8 characters + 1 null-terminator).

Parameters
deviceNumber:
the USB device number
serialNumber:
a pointer to a null-terminated character array (by ref)
Returns

1: OK, -1: fail

function OP750_GetUSBStatus(var haveError: boolean):integer stdcall;

Get the USB error flag of last operation as well as the error code.

Parameters
haveError:
error flag (by ref)
Returns

0: OK, 1: invalid handle, 2: device not found, 3: device not opened, 4: IO error

function OP750_OpenDriver(USBhandle: TFT_HANDLE): integer stdcall;

Initialize the device with the given USB Handle.

Parameters
USBHandle:
USB Handle for the device. Optionally, 0 can be used as a shortcut to open the first USB device detected.
Returns

1: OK, -5: no USB device found, -4: communication error, -3: USB Read Error, -2: USB Write Error

function OP750_OpenUSBDevice(deviceNumber: integer; var handle: TFT_HANDLE):integer stdcall;

Open the specified USB device and get a USB Handle. The device is specified by USB Device Number. The USB Handle is used with OP750_OpenDriver.

Parameters
deviceNumber:
USB device number
handle:
USB Handle (by ref)
Returns

1: OK, -1: open device failed

function OP750_RemoteMode(mode: integer): integer; stdcall;

Set Remote Mode. This will display a static logo and locks out user interaction from the front-panel.

This requires driver initialization with OP750_OpenDriver.

Parameters
mode:
0: Remote Mode OFF, 1: Remote Mode ON
Returns

1: OK, -1: fail

function OP750_SelectModule(module: integer): integer stdcall;

Select the specified module. All subsequent USB commands will be directed to the seleted module. The module number corresponds to the device number.

This requires driver initialization with OP750_OpenDriver.

Parameters
module:
module number
Returns

1: module has been initialized, 0: module has not been initialized

function OP750_SetActiveChannel(channel: integer): integer stdcall;

Set the current active channel.

This requires driver initialization with OP750_OpenDriver.

Parameters
channel:
active channel
Returns

1: OK, -1: fail

function OP750_SetSource(sourceID: integer; state: byte): integer stdcall;

Set the selected source's state. Each channel can have up to 4 wavelengths (Wave A, Wave B, Wave C, Wave D). Typical configuratons are Wave A = 1310 and Wave B = 1550 for SM, Wave A = 850 and Wave B = 1300 for MM, and Wave A = 1310, Wave B = 1550, Wave C = 1490, and Wave D = 1625 for FTTX.

This requires driver initialization with OP750_OpenDriver.

Parameters
sourceID:
0: Wave A, 1: Wave B, 2: Wave C, 3: Wave D
state:
0: OFF, 1: ON
Returns

1: OK, -1: fail

function OP750_SetSourceModulation(sourceID: integer; mode: byte):integer stdcall;

Set the selected source's modulation. Each channel can have up to 4 wavelengths (Wave A, Wave B, Wave C, Wave D). Typical configuratons are Wave A = 1310 and Wave B = 1550 for SM, Wave A = 850 and Wave B = 1300 for MM, and Wave A = 1310, Wave B = 1550, Wave C = 1490, and Wave D = 1625 for FTTX.

This requires driver initialization with OP750_OpenDriver.

Parameters
sourceID:
0: Wave A, 1: Wave B, 2: Wave C, 3: Wave D
mode:
0: CW, 1-3: Modulated at increasing, preset frequencies (check device specifications)
Returns

1: OK, -1: fail

function OP750_SetSourcePower(sourceID: integer; level: byte): integer stdcall;

Set the selected source's power. Each channel can have up to 4 wavelengths (Wave A, Wave B, Wave C, Wave D). Typical configuratons are Wave A = 1310 and Wave B = 1550 for SM, Wave A = 850 and Wave B = 1300 for MM, and Wave A = 1310, Wave B = 1550, Wave C = 1490, and Wave D = 1625 for FTTX.

This requires driver initialization with OP750_OpenDriver.

Parameters
sourceID:
0: Wave A, 1: Wave B, 2: Wave C, 3: Wave D
level:
power level from 0-255, 0 will turn the source off, 255 is max power
Returns

1: OK, -1: fail

Types

TFT_HANDLE = Uint32;

USB Handle Type. (Use Uint64 (64-bit unsigned int) for 64-bit version)

TFT_HANDLE_PTR = PUint32;

USB Handle Pointer Type. (Use PUint64 (64-bit unsigned integer pointer) for 64-bit version)


Generated by PasDoc 0.15.0.