OP-SDKIntroduction Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers Examples
|
Unit OP710MDLL
Uses Classes, Interfaces, Objects and Records Constants Variables
Description
OP710 DLL Functions
Overview
Functions and Procedures
Types
Description
Functions and Procedures
function OP710_ActiveModule(module: 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 OP710_Backlight(state: integer): integer stdcall; |
Turn the front panel display backlight on or off.
This requires driver initialization with OP710_OpenDriver.
Parameters
- state:
- 0: OFF, 1: ON
Returns
1: OK, -1: fail |
function OP710_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 OP710_OpenDriver.
Returns
1: OK, -1: fail |
function OP710_ConvertPower(analog: integer; gain: integer; var power: double): integer stdcall; |
Convert a pair of raw ADC value and gain (from ReadAnalog) to power in dBm.
This requires driver initialization with OP710_OpenDriver.
Parameters
- analog:
- raw analog-to-digital converter value
- gain:
- raw gain value
- power:
- converted power (by ref)
Returns
1: OK, -1: fail |
function OP710_GetActiveChannel(var channel: integer): integer stdcall; |
Get the current active channel.
This requires driver initialization with OP710_OpenDriver.
Parameters
- channel:
- active channel (by ref)
Returns
1: OK, -1: fail |
function OP710_GetBulk(nData: integer; var buffer: TBuffer): integer; stdcall; |
Perform a fast, repeated, simultaneous power measurement from all channels. This measures the power 50 times per channel and puts the values as ADC and gain (2 bytes + 1 byte) pairs in a buffer. This allows for up to 80 samples/second sampling rate. The buffer must be allocated by the caller.
This requires driver initialization with OP710_OpenDriver.
Parameters
- nData:
- number of samples (deprecated)
- buffer:
- buffer of ADC and gain pairs (by ref)
Returns
1: OK, -1: fail |
function OP710_GetChannelBuffer(): integer stdcall; |
Measure power from all channels simultaneously.
This requires driver initialization with OP710_OpenDriver.
Returns
1: OK, -1: fail |
function OP710_GetDLLRev: integer stdcall; |
Get the revision number of DLL
Returns
revision number |
function OP710_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 OP710_GetFWRevision: integer stdcall; |
Get the device's firmware revision
Returns
firmware revision number |
function OP710_GetModuleID(var id: integer): integer stdcall; |
Get the Module ID (internal product code) of the device.
This requires driver initialization with 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 OP710_GetModuleNumber(var num: integer): integer; stdcall; |
Get the module number of currently selected module.
Parameters
- num:
- module number (by ref)
Returns
1: module has been initialized, -1: module has not been initialized |
function OP710_GetTemperature(var tempC: double; units: integer): integer stdcall; |
Get the temperature in the specified units.
This requires driver initialization with OP710_OpenDriver.
Parameters
- tempC:
- temperature value (by ref)
- units:
-
0 – raw digital value
1 – Celsius
2 – Fahrenheit
Returns
1: OK, -1: fail |
function OP710_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 OP710_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 OP710_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 OP710_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 OP710_GetWavelength(var wavelength: integer; var wIndex: integer; var count: integer): integer stdcall; |
Get the active channel's current wavelength information.
This requires driver initialization with OP710_OpenDriver.
Parameters
- wavelength:
- wavelength value in nanometers (by ref)
- wIndex:
- the index in the list of wavelengths (by ref)
- count:
- the number of available wavelengths (by ref)
Returns
1: OK, -1: fail |
function OP710_NextWavelength(var wavelength: integer; var wIndex: integer; var count: integer): integer stdcall; |
Set wavelenght to the next one the active channel's list of available measurement wavelength.
This requires driver initialization with OP710_OpenDriver.
Parameters
- wavelength:
- wavelength value in nanometers (by ref)
- wIndex:
- the index in the list of wavelengths (by ref)
- count:
- the number of available wavelengths (by ref)
Returns
1: OK, -1: fail |
function OP710_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 OP710_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 OP710_OpenDriver.
Parameters
- deviceNumber:
- USB device number
- handle:
- USB Handle (by ref)
Returns
1: OK, -1: open device failed |
function OP710_ReadAnalog(var analog:integer; var gain: integer; var mode: integer): integer stdcall; |
Read raw ADC values for current active OPM channel.
This requires driver initialization with OP710_OpenDriver.
Parameters
- analog:
- raw analog-to-digital converter value (by ref)
- gain:
- raw gain value (by ref)
- mode:
- power measurement mode (by ref)
Returns
1: OK, -1: fail |
function OP710_ReadChannelBuffer(channel: integer; var power: double): integer stdcall; |
Read the power measured by GetChannelBuffer for the specified channel. Must call GetChannelBuffer first.
This requires driver initialization with OP710_OpenDriver.
Parameters
- channel:
- channel to read
- power:
- power measurement (by ref)
Returns
1: OK, -1: fail |
function OP710_ReadChannelBufferRaw(channel: integer; var adc: word; var gain: byte): integer stdcall; |
Read the raw ADC power measured by GetChannelBuffer for the specified channel. Must call GetChannelBuffer first.
This requires driver initialization with OP710_OpenDriver.
Parameters
- channel:
- channel to read
- adc:
- raw ADC measurement (by ref)
- gain:
- raw gain measurement (by ref)
Returns
1: OK, -1: fail |
function OP710_ReadLoss(var loss: double): integer stdcall; |
Read power loss from active channel. Must use SetReference or ReferencePower to perform a reference beforehand.
This requires driver initialization with OP710_OpenDriver.
Parameters
- loss:
- power loss measurement (by ref)
Returns
1: OK, -1: fail |
function OP710_ReadPower(var power: double): integer stdcall; |
Read power from active channel.
This requires driver initialization with OP710_OpenDriver.
Parameters
- power:
- power measurement (by ref)
Returns
1: OK, -1: fail |
function OP710_ReferencePower(var refPower: double): integer stdcall; |
Perform internal power reference for active OPM channel.
This requires driver initialization with OP710_OpenDriver.
Parameters
- refPower:
- reference power in dBm (by ref)
Returns
1: OK, -1: fail |
function OP710_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 OP710_OpenDriver.
Parameters
- mode:
- 0: Remote Mode OFF, 1: Remote Mode ON
Returns
1: OK, -1: fail |
function OP710_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.
Parameters
- module:
- module number
Returns
1: module has been initialized, 0: module has not been initialized |
function OP710_SetAbsolute(): integer stdcall; |
Set active channel to absolute (dBm) measurement mode.
This requires driver initialization with OP710_OpenDriver.
Returns
1: OK, -1: fail |
function OP710_SetActiveChannel(channel: integer): integer stdcall; |
Set the current active channel.
This requires driver initialization with OP710_OpenDriver.
Parameters
- channel:
- active channel
Returns
1: OK, -1: fail |
function OP710_SetAutoRange(state: integer): integer stdcall; |
Set the Auto-Range on or off (Range-Hold).
This requires driver initialization with OP710_OpenDriver.
Parameters
- state:
- 0: Auto-Range OFF (Range-Hold), 1: Auto-Range ON
Returns
1: OK, -1: fail |
function OP710_SetBulkMode(mode: byte): integer; stdcall; |
|
function OP710_SetGain(gain: integer): integer stdcall; |
Set the current gain (must have Auto-Range set to off).
This requires driver initialization with OP710_OpenDriver.
Parameters
- gain:
- gain value from 0 to 7
Returns
1: OK, -1: fail |
function OP710_SetOPMMode(mode: integer): integer stdcall; |
Set power measurement mode, if supported.
This requires driver initialization with OP710_OpenDriver.
Parameters
- mode:
- 0: dBm mode, 1: Watt mode
Returns
1: OK, -1: fail |
function OP710_SetReference(): integer stdcall; |
Perform internal power reference then set active channel to relative (dB) measurement mode.
This requires driver initialization with OP710_OpenDriver.
Returns
1: OK, -1: fail |
function OP710_SetSamplingSpeed(speed: byte): integer; stdcall; |
Set the OPM Sampling Speed
This requires driver initialization with OP710_OpenDriver. Note that faster sampling speeds can result in less stable measurements.
Parameters
- speed:
- 0-9, 0 is fastest, 9 is slowest; each increment doubles the rate of the previous
Returns
1: OK, -1: fail |
function OP710_SetWavelength(wavelength: integer): integer stdcall; |
Set the active channel's measurement wavelength. This will attempt to find the closest match from the internally defined list of discrete wavelengths.
This requires driver initialization with OP710_OpenDriver.
Parameters
- wavelength:
- wavelength value in nanometers
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.
|