Unit OP720MDLL

Uses
Classes, Interfaces, Objects and Records
Constants
Variables

Description

OP720/OP721/OP722 DLL Functions

Overview

Functions and Procedures

function OP720_ActiveModule(m: integer): integer; stdcall;
function OP720_CloseDriver: integer stdcall;
function OP720_GetActiveChannel(var channel: integer): integer; stdcall;
function OP720_GetDLLRev: integer; stdcall;
function OP720_GetDLLStatus: integer ; stdcall;
function OP720_GetModuleID(var id: integer): integer ; stdcall;
function OP720_GetNumChannels(var num: integer): integer; stdcall;
function OP720_GetUSBDeviceCount(var deviceCount: integer): integer; stdcall;
function OP720_GetUSBDeviceDescription(deviceNumber: integer; var deviceDescription: pansichar): integer ; stdcall;
function OP720_GetUSBSerialNumber(deviceNumber: integer; var serialNumber: pansichar): integer ; stdcall;
function OP720_OpenDriver(USBhandle: TFT_HANDLE): integer stdcall;
function OP720_OpenUSBDevice(deviceNumber: integer; var handle: TFT_HANDLE):integer stdcall;
function OP720_SetActiveChannel(ch: integer): integer; stdcall;
function OP720_SetCompoundChannel(sw: byte; ch: byte): integer; stdcall;

Types

TFT_HANDLE = Uint32;
TFT_HANDLE_PTR = PUint32;

Description

Functions and Procedures

function OP720_ActiveModule(m: integer): integer; stdcall;

Check if module is active and returns USB Handle for that module if it is.

Parameters
module:
module number
Returns

USB Handle: module has been initialized, 0: module has not been initialized

function OP720_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 OP720_OpenDriver.

Returns

1: OK, -1: fail

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

Get the current active channel.

This requires driver initialization with OP720_OpenDriver.

Parameters
channel:
active channel (by ref)
Returns

1: OK, -1: fail

function OP720_GetDLLRev: integer; stdcall;

Get the revision number of DLL

Returns

revision number

function OP720_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 OP720_GetModuleID(var id: integer): integer ; stdcall;

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

This requires driver initialization with OP720_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 OP720_GetNumChannels(var num: integer): integer; stdcall;

Get the number of channels.

This requires driver initialization with OP720_OpenDriver.

Parameters
num:
number of channels (by ref)
Returns

1: OK, -1: fail

function OP720_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 OP720_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 OP720_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 OP720_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 OP720_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 OP720_OpenDriver.

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

1: OK, -1: open device failed

function OP720_SetActiveChannel(ch: integer): integer; stdcall;

Set the current active channel.

This requires driver initialization with OP720_OpenDriver.

Parameters
channel:
active channel
Returns

1: OK, -1: fail

function OP720_SetCompoundChannel(sw: byte; ch: byte): integer; stdcall;

Select a switch bank and set the active channel for that bank. Used for OP721 and OP722 switches.

This requires driver initialization with OP720_OpenDriver.

Parameters
sw:
switch number
ch:
channel
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.