![]() |
PulsarAPI
USB and TCP/IP control library for Pulsar 320E
|
This module contains external definitions for the High Level User Application Programming Interface DLL functions in the Pulsar320 and Pulsar320E projects. More...
Go to the source code of this file.
Classes | |
struct | API_CHAN_CONFIG_STRUCT_T |
Channel/output configuration struct. More... | |
Enumerations | |
enum | API_MODE_T { API_MODE_PULSED , API_MODE_REPEAT , API_MODE_TIMING_BYPASS , API_MODE_INTERNAL_TRIGGER , API_NUM_MODE } |
Define possible operating modes. More... | |
enum | API_CHAN_T { API_CHAN_1 = 1 , API_CHAN_2 } |
Define the drive channel identifiers used with the API interface. | |
enum | { API_TRIG_NONE , API_TRIG_1 , API_TRIG_2 } |
Define the trigger input identifiers used with the API interface. More... | |
enum | { API_POWER_TEST , API_RAM_TEST , API_FLASH_TEST , API_EXTIO_TEST , API_EEPROM_TEST , API_EXT_DAC_TEST , API_SCI_TEST , API_NUM_TESTS } |
Define identifiers for diagnostics tests. | |
Functions | |
UINT16_T | api_get_dll_version (void) |
Returns the current version number of this software. More... | |
UINT32_T | api_get_dll_full_version (void) |
Returns the full version number of this software. More... | |
ERRCODE_T | api_get_error_name (ERRCODE_T ecode, char *nameptr, UINT16_T namelen) |
Returns the name of the error associated with the code. More... | |
ERRCODE_T | api_get_error_text (ERRCODE_T ecode, char *textptr, UINT16_T textlen) |
Returns the text description of the error associated with the code. More... | |
ERRCODE_T | api_init (UINT8_T port, const INT8_T *product_name, const INT8_T *serial_num) |
Initializes the connection to a specific Pulsar. More... | |
ERRCODE_T | api_connect (UINT8_T port, const INT8_T *product_name, const INT8_T *ip_addr) |
Initializes the connection to a specific Pulsar. More... | |
ERRCODE_T | api_get_pulsar_version (UINT8_T port, INT8_T *fw_version, INT8_T *hw_version, INT8_T *serial_num) |
Reads firmware version, hardware version, and serial number Each string can be up to 32 characters long. More... | |
ERRCODE_T | api_get_pulsar_ipaddr (UINT8_T port, INT8_T *ip_addr, INT8_T *subnet, INT8_T *gateway, INT8_T *mac_addr) |
Reads iip configuration settings from the device Each string can be up to 32 characters long. More... | |
ERRCODE_T | api_get_status (UINT8_T port) |
Reads status information from the device. More... | |
ERRCODE_T | api_run_diags (UINT8_T port, UINT8_T test_num) |
Runs one or all of the built in diagnostics. More... | |
ERRCODE_T | api_get_channel_config (UINT8_T port, UINT8_T chan, UINT8_T type, API_CHAN_CONFIG_STRUCT_T *config_data) |
Gets the configuration data for one drive channel. More... | |
ERRCODE_T | api_set_channel_config (UINT8_T port, UINT8_T chan, UINT8_T type, API_CHAN_CONFIG_STRUCT_T *config_data) |
Sets the configuration data for one drive channel. More... | |
ERRCODE_T | api_set_channel_config_nochecks (UINT8_T port, UINT8_T chan, UINT8_T type, API_CHAN_CONFIG_STRUCT_T *config_data) |
Sets the configuration data for one drive channel. More... | |
ERRCODE_T | api_trigger (UINT8_T port, UINT8_T trig) |
Generates a software trigger on the selected trigger channel. More... | |
ERRCODE_T | api_calc_led_temp (UINT8_T port, UINT8_T ch, UINT32_T width, FLOAT32_T current, FLOAT32_T *temp) |
Calculates the expected LED junction temperature based on the information stored in the lighthead data structure and the width and current information passed. More... | |
ERRCODE_T | api_calc_max_width (UINT8_T port, UINT8_T ch, FLOAT32_T current, UINT32_T *width) |
Calculates the maximum pulse width for the selected channel based on the information stored in the lighthead data structure and the current information passed. More... | |
ERRCODE_T | api_calc_max_current (UINT8_T port, UINT8_T ch, UINT32_T width, FLOAT32_T *current) |
Calculates the maximum pulse current for the selected channel based on the information stored in the lighthead data structure and the width information passed. More... | |
ERRCODE_T | api_calc_supply_voltage (UINT8_T port, UINT8_T ch, UINT32_T width, FLOAT32_T current, FLOAT32_T *voltage) |
Calculates the required supply voltage for a given width and current. More... | |
ERRCODE_T | api_calc_max_freq (UINT8_T port, UINT8_T ch, UINT32_T width, FLOAT32_T current, UINT16_T *freq) |
Calculates the maximum frequency allowed for a given width and current. More... | |
ERRCODE_T | api_measure_drive_current (UINT8_T port, UINT8_T ch, FLOAT32_T *current) |
Measures the drive current of the selected drive channel. More... | |
ERRCODE_T | api_measure_voltage (UINT8_T port, UINT8_T id, FLOAT32_T *voltage) |
Measures the voltage of one of the signals monitored by the Pulsar. More... | |
ERRCODE_T | api_get_user_data (UINT8_T port, UINT16_T *rotary, UINT8_T *dip, UINT8_T *trigger, UINT8_T *connect, UINT8_T *supply, UINT8_T *expansion) |
Gathers various information about the operating state of the Pulsar. More... | |
ERRCODE_T | api_get_light_data (UINT8_T port, UINT8_T *sig_model, UINT8_T *sig1_id, char *sig2_pn, char *sig2_sn) |
Gathers information regarding the lighthead type. More... | |
ERRCODE_T | api_get_light_data2 (UINT8_T port, UINT8_T channel, char *sig2_pn) |
Get Signatech II lighthead part and serial number. More... | |
ERRCODE_T | api_set_stored_data (UINT8_T port, UINT8_T *data, UINT8_T len) |
Saves a block of Ai defined data to EEPROM. More... | |
ERRCODE_T | api_get_stored_data (UINT8_T port, UINT8_T *data, UINT8_T len) |
Reads a block of Ai defined data from EEPROM. More... | |
ERRCODE_T | api_shutdown (UINT8_T port) |
Shuts down the connection to a specific Pulsar. More... | |
ERRCODE_T | api_set_configuration (UINT8_T port, UINT8_T *slew_rate, UINT8_T *diff_trigger, UINT8_T limit48v, UINT8_T disable_prot) |
Set hardware configuration. More... | |
ERRCODE_T | api_get_configuration (UINT8_T port, UINT8_T *pslew_rate, UINT8_T *pdiff_trigger, UINT8_T *limit48v, UINT8_T *disable_prot) |
Get hardware configuration. More... | |
ERRCODE_T | api_set_pulsar_ipaddr (UINT8_T port, const char *ip_addr, const char *subnet, const char *gateway) |
Set Pulsar IP address. More... | |
ERRCODE_T | api_get_errors (UINT8_T port, INT16_T *err, UINT8_T *totalErrors) |
Reads the oldest posted error. More... | |
int | api_connected_device (UINT8_T port) |
Gets the type of device on the given port. More... | |
ERRCODE_T | api_get_mac (UINT8_T port, UINT8_T *mac) |
ERRCODE_T | api_set_mac (UINT8_T port, UINT8_T *mac) |
ERRCODE_T | api_get_manufacturing_mac (UINT8_T port, UINT8_T *mac) |
ERRCODE_T | api_get_pulsar_addrs (UINT32_T *addrs, UINT16_T max_addrs, UINT16_T *num_found) |
Find pulsar devices on all attached network adapters. More... | |
This module contains external definitions for the High Level User Application Programming Interface DLL functions in the Pulsar320 and Pulsar320E projects.
Contains confidential and proprietary information which may not be copied, disclosed or used by others except as expressly authorized in writing by Advanced Illumination.
External definitions for the High Level User Application Programming Interface
Written for:
Advanced Illumination, Inc.
440 State Garage Road
Rochester, VT 05767
http://advancedillumination.com
Contacts:
John Thrailkill
Phone: (802) 767-3830
FAX: (802) 767-3831
jthra ilki ll@ad vanc edill umin ation .com
Written by:
Rob Macklin
Microprocessor Designs, Inc.
65 Longmeadow Drive
PO Box 160
Shelburne, VT 05482
http://www.updesigns.com
anonymous enum |
enum API_MODE_T |
Define possible operating modes.
ERRCODE_T api_calc_led_temp | ( | UINT8_T | port, |
UINT8_T | ch, | ||
UINT32_T | width, | ||
FLOAT32_T | current, | ||
FLOAT32_T * | temp | ||
) |
Calculates the expected LED junction temperature based on the information stored in the lighthead data structure and the width and current information passed.
port | Identifier for device | |
ch | Channel to compute LED temperature | |
width | Pulse width in microseconds | |
current | Pulse current in amps | |
[out] | temp | Location to store calculated temperature |
ERRCODE_T api_calc_max_current | ( | UINT8_T | port, |
UINT8_T | ch, | ||
UINT32_T | width, | ||
FLOAT32_T * | current | ||
) |
Calculates the maximum pulse current for the selected channel based on the information stored in the lighthead data structure and the width information passed.
port | Identifier for device | |
ch | Channel to compute LED temperature | |
width | Pulse width in microseconds | |
[out] | current | Maximum pulse current in amps |
ERRCODE_T api_calc_max_freq | ( | UINT8_T | port, |
UINT8_T | ch, | ||
UINT32_T | width, | ||
FLOAT32_T | current, | ||
UINT16_T * | freq | ||
) |
Calculates the maximum frequency allowed for a given width and current.
This function computes maximum frequency based on the maximum power of the power supply and also from the LED cooling equations. The lower value is returned.
port | Identifier for device | |
ch | Channel to compute maximum frequency | |
width | Pulse width in microseconds | |
current | Pulse current in amps | |
[out] | freq | Location to store calculated frequency |
ERRCODE_T api_calc_max_width | ( | UINT8_T | port, |
UINT8_T | ch, | ||
FLOAT32_T | current, | ||
UINT32_T * | width | ||
) |
Calculates the maximum pulse width for the selected channel based on the information stored in the lighthead data structure and the current information passed.
port | Identifier for device | |
ch | Channel to compute LED temperature | |
current | Pulse current in amps | |
[out] | width | Maximum pulse width in microseconds |
ERRCODE_T api_calc_supply_voltage | ( | UINT8_T | port, |
UINT8_T | ch, | ||
UINT32_T | width, | ||
FLOAT32_T | current, | ||
FLOAT32_T * | voltage | ||
) |
Calculates the required supply voltage for a given width and current.
port | Identifier for device | |
ch | Channel to compute required supply voltage | |
width | Pulse width in microseconds | |
current | Pulse current in amps | |
[out] | voltage | Location to store calculated voltage |
ERRCODE_T api_connect | ( | UINT8_T | port, |
const INT8_T * | product_name, | ||
const INT8_T * | ip_addr | ||
) |
Initializes the connection to a specific Pulsar.
port | Identifier for device |
product_name | Name of USB device to open |
ip_addr | IP address of device to open |
int api_connected_device | ( | UINT8_T | port | ) |
Gets the type of device on the given port.
port | Communication port of the device |
ERRCODE_T api_get_channel_config | ( | UINT8_T | port, |
UINT8_T | chan, | ||
UINT8_T | type, | ||
API_CHAN_CONFIG_STRUCT_T * | config_data | ||
) |
Gets the configuration data for one drive channel.
port | Identifier for device | |
chan | Identifier for drive channel | |
type | Identifier for which data to get | |
[out] | config_data | Active channel configuration data |
ERRCODE_T api_get_configuration | ( | UINT8_T | port, |
UINT8_T * | pslew_rate, | ||
UINT8_T * | pdiff_trigger, | ||
UINT8_T * | limit48v, | ||
UINT8_T * | disable_prot | ||
) |
Get hardware configuration.
port | Communication port to use | |
[out] | slew_rate | Slew rate (array, one for each channel) |
[out] | diff_trigger | Differential trigger (0 or 1) (array, one for each channel) |
[out] | limit48v | Limit output to 48v |
[out] | disable_prot | Disable protection |
UINT32_T api_get_dll_full_version | ( | void | ) |
Returns the full version number of this software.
Each byte in the integer encodes a different part of the version number
UINT16_T api_get_dll_version | ( | void | ) |
Returns the current version number of this software.
Returns the name of the error associated with the code.
[in] | ecode | Code to be looked up |
[out] | nameptr | Location to place name string |
[in] | namelen | Maximum length of name string |
Returns the text description of the error associated with the code.
ecode | Code to be looked up | |
[out] | textptr | Location to place text description string |
textlen | Maximum length of text description string |
ERRCODE_T api_get_errors | ( | UINT8_T | port, |
INT16_T * | err, | ||
UINT8_T * | totalErrors | ||
) |
Reads the oldest posted error.
port | Communication port to use | |
[out] | err | The oldest posted error in the device |
[out] | totalErrors | The number of errors remaining to read |
ERRCODE_T api_get_light_data | ( | UINT8_T | port, |
UINT8_T * | sig_model, | ||
UINT8_T * | sig1_id, | ||
char * | sig2_pn, | ||
char * | sig2_sn | ||
) |
Gathers information regarding the lighthead type.
port | Identifier for device | |
[out] | sig_model | 1 - Signatech I, 2 - Signatech II, 0 - Unknown |
[out] | sig1_id | Set for Signatech I lightheads |
[out] | sig2_pn | Set to part number string for Signatech II |
[out] | sig2_sn | Set to serial number of Signatech 2 lighthead |
ERRCODE_T api_get_light_data2 | ( | UINT8_T | port, |
UINT8_T | channel, | ||
char * | sig2_pn | ||
) |
Get Signatech II lighthead part and serial number.
port | Identifier for device | |
channel | Output channel to read (only valid for Pulsar 320E) | |
[out] | sig2_pn | Part number of Signatech 2 lighthead |
ERRCODE_T api_get_pulsar_addrs | ( | UINT32_T * | addrs, |
UINT16_T | max_addrs, | ||
UINT16_T * | num_found | ||
) |
Find pulsar devices on all attached network adapters.
addrs | Array of UINT32_Ts to fill with found IP addresses (in network byte order). |
max_addrs | Maximum number of addresses to find (size of the array) |
num_found | Actual number of addresses found |
ERRCODE_T api_get_pulsar_ipaddr | ( | UINT8_T | port, |
INT8_T * | ip_addr, | ||
INT8_T * | subnet, | ||
INT8_T * | gateway, | ||
INT8_T * | mac_addr | ||
) |
Reads iip configuration settings from the device Each string can be up to 32 characters long.
Get Pulsar IP address.
[in] | port | Identifier for device |
[out] | ip_addr | IP Address |
[out] | subnet | Subnet Mask |
[out] | gateway | Gateway |
[out] | mac_addr | Hardware MAC address |
port | Communication port to use | |
[out] | ip_addr | IP address |
[out] | subnet | Subnet mask |
[out] | gateway | Gateway address |
[out] | mac_addr | MAC address |
ERRCODE_T api_get_pulsar_version | ( | UINT8_T | port, |
INT8_T * | fw_version, | ||
INT8_T * | hw_version, | ||
INT8_T * | serial_num | ||
) |
Reads firmware version, hardware version, and serial number Each string can be up to 32 characters long.
[in] | port | Identifier for device |
[out] | fw_version | Firmware version |
[out] | hw_version | Hardware version |
[out] | serial_num | Serial number |
ERRCODE_T api_get_status | ( | UINT8_T | port | ) |
Reads status information from the device.
port | Identifier for device |
ERRCODE_T api_get_stored_data | ( | UINT8_T | port, |
UINT8_T * | data, | ||
UINT8_T | len | ||
) |
Reads a block of Ai defined data from EEPROM.
port | Identifier for device | |
len | Length of data block to read | |
[out] | data | Pointer to data block to be written |
ERRCODE_T api_get_user_data | ( | UINT8_T | port, |
UINT16_T * | rotary, | ||
UINT8_T * | dip, | ||
UINT8_T * | trigger, | ||
UINT8_T * | connect, | ||
UINT8_T * | supply, | ||
UINT8_T * | expansion | ||
) |
Gathers various information about the operating state of the Pulsar.
port | Identifier for device | |
[out] | rotary | Value on rotary switches |
[out] | dip | Value on DIP switches |
[out] | trigger | State of trigger inputs |
[out] | connect | Communication connection status |
[out] | supply | Power supply status |
[out] | expansion | Expansion status |
ERRCODE_T api_init | ( | UINT8_T | port, |
const INT8_T * | product_name, | ||
const INT8_T * | serial_num | ||
) |
Initializes the connection to a specific Pulsar.
port | Identifier for device |
product_name | Name of USB device to open |
serial_num | Serial number of device to open (or NULL) |
ERRCODE_T api_measure_drive_current | ( | UINT8_T | port, |
UINT8_T | ch, | ||
FLOAT32_T * | current | ||
) |
Measures the drive current of the selected drive channel.
This function can be used in either pulse or continuous modes.
port | Identifier for device | |
ch | Channel to measure pulse current | |
[out] | current | Location to store measured pulse current |
ERRCODE_T api_measure_voltage | ( | UINT8_T | port, |
UINT8_T | id, | ||
FLOAT32_T * | voltage | ||
) |
Measures the voltage of one of the signals monitored by the Pulsar.
port | Identifier for device | |
id | Identifier for desired voltage to measure | |
[out] | voltage | Location to store measured voltage |
ERRCODE_T api_run_diags | ( | UINT8_T | port, |
UINT8_T | test_num | ||
) |
Runs one or all of the built in diagnostics.
port | Identifier for device |
test_num | Desired test number or FF for all |
ERRCODE_T api_set_channel_config | ( | UINT8_T | port, |
UINT8_T | chan, | ||
UINT8_T | type, | ||
API_CHAN_CONFIG_STRUCT_T * | config_data | ||
) |
Sets the configuration data for one drive channel.
port | Identifier for device |
chan | Identifier for drive channel |
type | Identifier for which data to get |
API_CHAN_CONFIG_STRUCT_T | * config_data New channel configuration data |
ERRCODE_T api_set_channel_config_nochecks | ( | UINT8_T | port, |
UINT8_T | chan, | ||
UINT8_T | type, | ||
API_CHAN_CONFIG_STRUCT_T * | config_data | ||
) |
Sets the configuration data for one drive channel.
port | Identifier for device |
chan | Identifier for drive channel |
type | Identifier for which data to get |
API_CHAN_CONFIG_STRUCT_T | * config_data New channel configuration data |
ERRCODE_T api_set_configuration | ( | UINT8_T | port, |
UINT8_T * | slew_rate, | ||
UINT8_T * | diff_trigger, | ||
UINT8_T | limit48v, | ||
UINT8_T | disable_prot | ||
) |
Set hardware configuration.
port | Communication port to use | |
[in] | slew_rate | Slew rate (array, one for each channel) |
[in] | diff_trigger | Differential trigger (0 or 1) (array, one for each channel) |
[in] | limit48v | Limit output to 48v |
[in] | disable_prot | Disable protection |
ERRCODE_T api_set_pulsar_ipaddr | ( | UINT8_T | port, |
const char * | ip_addr, | ||
const char * | subnet, | ||
const char * | gateway | ||
) |
Set Pulsar IP address.
port | Communication port to use | |
[in] | ip_addr | IP address |
[in] | subnet | Subnet mask |
[in] | gateway | Gateway address |
ERRCODE_T api_set_stored_data | ( | UINT8_T | port, |
UINT8_T * | data, | ||
UINT8_T | len | ||
) |
Saves a block of Ai defined data to EEPROM.
port | Identifier for device |
data | Pointer to data block to be written |
len | Length of data block to be written |
ERRCODE_T api_shutdown | ( | UINT8_T | port | ) |
Shuts down the connection to a specific Pulsar.
port | Communication port to use |
ERRCODE_T api_trigger | ( | UINT8_T | port, |
UINT8_T | trig | ||
) |
Generates a software trigger on the selected trigger channel.
port | Identifier for device |
trig | Trigger to activate |