21 #ifndef BTA_H_INCLUDED
22 #define BTA_H_INCLUDED
24 #if (defined(WIN32) || defined(WIN64)) && !defined(PLAT_WINDOWS) && !defined(PLAT_LINUX)
27 #if defined(linux) && !defined(PLAT_WINDOWS) && !defined(PLAT_LINUX)
33 # define BTA_CALLCONV __stdcall
35 # define DLLEXPORT __declspec(dllexport)
37 # define DLLEXPORT __declspec(dllimport)
39 #elif defined PLAT_LINUX
45 # error "Please define PLAT_WINDOWS or PLAT_LINUX in your makefile/project"
137 #define BTA_CONFIG_STRUCT_STRIDE 8
139 #define BTA_PRAGMA_ALIGN __declspec(align(BTA_CONFIG_STRUCT_STRIDE))
140 #elif defined PLAT_LINUX
141 #define BTA_PRAGMA_ALIGN __attribute__((aligned(BTA_CONFIG_STRUCT_STRIDE)))
168 BTA_PRAGMA_ALIGN uint8_t *
pon;
231 DLLEXPORT
BTA_Status BTA_CALLCONV
BTAgetVersion(uint32_t *verMaj, uint32_t *verMin, uint32_t *verNonFun, uint8_t *buildDateTime, uint32_t buildDateTimeLen, uint16_t *supportedDeviceTypes, uint32_t *supportedDeviceTypesLen);
BTA_Status BTAaddFilter(BTA_Handle handle, BTA_FltConfig *fltConfig, BTA_FltType fltType, BTA_FltHandle *fltHandle)
(The development of filter functionality is still in progress!) Instantiates the specified filter wih...
BTA_ConfigStructOrg * BTAgetConfigStructOrg(uint32_t *fieldCount, uint8_t *bytesPerField)
With this function a literal description of the config struct can be retrieved. In programming langua...
struct BTA_GrabbingConfig BTA_GrabbingConfig
Configuration structure to be passed with BTAstartDiscovery.
BTA_Status BTAgetVersion(uint32_t *verMaj, uint32_t *verMin, uint32_t *verNonFun, uint8_t *buildDateTime, uint32_t buildDateTimeLen, uint16_t *supportedDeviceTypes, uint32_t *supportedDeviceTypesLen)
For querying API version.
BTA_Frame holds all the data gathered from one frame (one or more channels)
Definition: bta_frame.h:152
BTA_Status BTAstartGrabbing(BTA_Handle handle, BTA_GrabbingConfig *config)
Issues the library to grab (or stop grabbing) all the frames and store them to the file provided in t...
uint8_t uartTransmitterAddress
The source address for UART communications.
Definition: bta.h:164
struct BTA_Config BTA_Config
Configuration structure to be passed with BTAopen.
uint8_t uartReceiverAddress
The target address for UART communications.
Definition: bta.h:165
Set > 0 in order to activate playback at recording rate times this factor. Set to 0 to pause playback...
Definition: bta.h:123
uint8_t BTAisRunning(BTA_Handle handle)
Queries whether the handle is open and background threads are running correctly.
FN_BTA_InfoEvent infoEvent
Callback function pointer to the function to be called upon an informative event (optional but handy ...
Definition: bta.h:177
BTA_Status BTAopen(BTA_Config *config, BTA_Handle *handle)
Establishes a connection to the device and returns a handle.
FN_BTA_InfoEventEx infoEventEx
Callback function pointer to the function to be called upon an informative event (optional but handy ...
Definition: bta.h:178
BTA_Status BTAflashRead(BTA_Handle handle, BTA_FlashUpdateConfig *flashUpdateConfig, FN_BTA_ProgressReport progressReport)
Allows reading large data from the device. This function handles the complete transfer of the file an...
BTA_Status BTAdeserializeFrame(BTA_Frame **frame, uint8_t *frameSerialized, uint32_t *frameSerializedLen)
Helper function to convert a serialized stream into a BTA_Frame structure; useful for replaying recor...
BTA_Status
Error code for error handling.
Definition: bta_status.h:25
BTA_Status BTAwriteRegister(BTA_Handle handle, uint32_t address, uint32_t *data, uint32_t *registerCount)
Writes registers to the device/SDK.
BTA_Status BTAflashUpdate(BTA_Handle handle, BTA_FlashUpdateConfig *flashUpdateConfig, FN_BTA_ProgressReport progressReport)
Allows sending large data to the device. Mainly this is used for sending calibration data and firmwar...
BTA_Status BTAserializeFrame(BTA_Frame *frame, uint8_t *frameSerialized, uint32_t *frameSerializedLen)
Helper function to convert a BTA_Frame structure into a serialized stream; useful for recording frame...
uint16_t tcpDataPort
The port for the TCP data interface (The port the device sends data to) (not supported yet) ...
Definition: bta.h:156
BTA_Status BTAfppnUpdate(BTA_Handle handle, const uint8_t *filename, FN_BTA_ProgressReport progressReport)
Convenience function for doing a firmware update. Uses BTAflashUpdate() internally.
BTA_Status BTAgetSerializedLength(BTA_Frame *frame, uint32_t *frameSerializedLen)
Helper function to calculate the length of a frame in serialized form; needed for BTAserializeFrame...
uint16_t udpControlPort
The port for the UDP control interface (outbound connection) (The port where the device awaits comman...
Definition: bta.h:150
BTA_Status BTAfirmwareUpdate(BTA_Handle handle, const uint8_t *filename, FN_BTA_ProgressReport progressReport)
Convenience function for doing a firmware update. Uses BTAflashUpdate() internally.
BTA_FrameMode frameMode
Frame mode to be set in SDK/device.
Definition: bta.h:175
BTA_Status BTAsetKeepAliveMsgInterval(BTA_Handle handle, float interval)
DEPRECATED Please use LibParam BTA_LibParamKeepAliveMsgInterval instead.
BTA_Status BTAgetFrameRate(BTA_Handle handle, float *frameRate)
Facilitates the retrieval of the current theoretical frame rate of the default capture sequence(s) ...
BTA_Status BTAgetXYZcoordinates(BTA_Frame *frame, void **xBuffer, void **yBuffer, void **zBuffer, BTA_DataFormat *dataFormat, BTA_Unit *unit, uint16_t *xRes, uint16_t *yRes)
Convenience function for extracting the 3D-coordinates from a provided frame. It simply returns the p...
BTA_Status BTAinitConfig(BTA_Config *config)
Fills the config structure with standard values.
BTA_Channel holds a two-dimensional array of data (A part of BTA_Frame)
Definition: bta_frame.h:136
This header file contains the status ID enum used as return value for most functions.
uint32_t uartBaudRate
The UART baud rate.
Definition: bta.h:160
BTA_Status BTAfreeDeviceInfo(BTA_DeviceInfo *deviceInfo)
For freeing the device information structure.
BTA_Status BTAwriteCurrentConfigToNvm(BTA_Handle handle)
Writes the current configuration (i.e. register values) to non-volatile memory.
BTA_Status BTAsendReset(BTA_Handle handle)
Initiates a reset of the device.
BTA_Status BTAcloneFrame(BTA_Frame *frameSrc, BTA_Frame **frameDst)
Helper function to clone/duplicate/deep-copy a BTA_Frame structure. If successful, BTAfreeFrame must be called on frameDst afterwards.
uint8_t udpControlInIpAddrLen
The length of udpControlInIpAddr buffer in [byte].
Definition: bta.h:152
uint16_t averageWindowLength
A filter type BTA_FltTypeAvgsequences is instantiated. averageWindowLength sets the amount of frames ...
Definition: bta.h:185
The interval in seconds. If no communication during this time, a keep alive is sent. (Supported only by Ethernet cameras).
Definition: bta.h:119
BTA_Status BTAgetMetadata(BTA_Channel *channel, uint32_t metadataId, void **metadata, uint32_t *metadataLen)
Convenience function for extracting metadata from a provided channel. It simply returns the pointer a...
uint16_t frameQueueLength
The library queues this amount of frames internally.
Definition: bta.h:183
BTA_Status BTAfpnUpdate(BTA_Handle handle, const uint8_t *filename, FN_BTA_ProgressReport progressReport)
Convenience function for doing a firmware update. Uses BTAflashUpdate() internally.
typedef void(1 *FN_BTA_InfoEvent)(BTA_Status status
Callback function to report on informative events. The implementation of this function in the applica...
This header file contains enums and structs dor the representation of a BTA_Frame.
uint32_t serialNumber
Serial number of device to be opened (0 == not specified)
Definition: bta.h:169
When full, the equeue function returns an error to the producer (do not use in BTAopen()!) ...
Definition: bta.h:109
This configuration structure contains all the data and parameters needed for a BTAflashUpdate.
Definition: bta_flash_update.h:58
BTA_Status BTAsetControlCrcEnabled(BTA_Handle handle, uint8_t enabled)
DEPRECATED Please use LibParam BTA_LibParamCrcControlEnabled instead.
BTA_DataFormat
Enumerator with data formats which allows the parsing of the data in BTA_Channel. The lowbyte stands ...
Definition: bta_frame.h:83
uint8_t * filename
The filename of the *.bltstream file. Where the grabbing process stores the stream. (ASCII coded)
Definition: bta.h:194
BTA_Status BTAinitDiscoveryConfig(BTA_DiscoveryConfig *config)
Fills the discovery config structure with standard values.
BTA_QueueMode frameQueueMode
The frame queue configuration parameter.
Definition: bta.h:184
Writeonly. Set the increment to which position to jump to in the bltstream file. If set...
Definition: bta.h:125
BTA_Status BTAwigglingUpdate(BTA_Handle handle, const uint8_t *filename, FN_BTA_ProgressReport progressReport)
Convenience function for doing a firmware update. Uses BTAflashUpdate() internally.
Get and set the index in the bltstream file. The first frame has index 0. If set, BTA_LibParamStreamA...
Definition: bta.h:124
BTA_DeviceType
All device types currently known to the SDK (Blt projects not included)
Definition: bta_discovery.h:25
void * BTA_Handle
The handle to hold the instance created by BTAopen.
Definition: bta.h:50
This header file contains enums and structs for flash update.
struct BTA_ConfigStructOrg BTA_ConfigStructOrg
This struct is used for the representation of the BTA_Config struct. Programming languages that don't...
BTA_Status BTAgetColors(BTA_Frame *frame, void **colorBuffer, BTA_DataFormat *dataFormat, BTA_Unit *unit, uint16_t *xRes, uint16_t *yRes)
Convenience function for extracting colors from a provided frame. It simply returns the pointer and c...
BTA_FrameMode
Enumerator with valid frame modes to be passed with BTAsetFrameMode.
Definition: bta_frame.h:29
BTA_Status BTArestoreDefaultConfig(BTA_Handle handle)
Erases the register settings previously stored with BTAwriteCurrentConfigToNvm (May require rebbot fo...
typedef int(1 *FN_BTA_ProgressReport)(BTA_Status status
Callback function to report status and progress during transfer and programming.
This structure is used to configure the process of device discovery.
Definition: bta_discovery.h:50
uint8_t * bltstreamFilename
Only for BtaStreamLib: Specify the file (containing the stream) to read from (ASCII coded) ...
Definition: bta.h:187
uint8_t * udpControlInIpAddr
The callback IP address for the UDP control interface (inbound connection) (The address the device sh...
Definition: bta.h:151
uint16_t udpDataPort
The port for the UDP data interface (The port the device is configured to stream to) ...
Definition: bta.h:147
This header file contains enums and structs regarding discovery functions and device identification...
BTA_Status BTAsetIntegrationTime(BTA_Handle handle, uint32_t integrationTime)
Facilitates setting the integration time for the default capture sequence(s)
uint16_t udpControlCallbackPort
The callback port for the UDP control interface (inbound connection) (The port the device should answ...
Definition: bta.h:153
BTA_Status BTAfreeFrame(BTA_Frame **frame)
Helper function to free a BTA_Frame structure.
BTA_Status BTAclose(BTA_Handle *handle)
Disconnects from the sensor and closes the handle.
When full, the queue remains unchanged.
Definition: bta.h:108
FN_BTA_FrameArrived frameArrived
Callback function pointer to the function to be called when a frame is ready (optional) (deprecated...
Definition: bta.h:180
uint8_t udpControlOutIpAddrLen
The length of udpControlOutIpAddr buffer in [byte].
Definition: bta.h:149
BTA_Status BTAsetModulationFrequency(BTA_Handle handle, uint32_t modulationFrequency)
Facilitates setting the modulation frequency for the default capture sequence(s)
uint8_t * pon
Product Order Number of device to be opened (0 == not specified) (ASCII coded)
Definition: bta.h:168
BTA_Status BTAgetLibParam(BTA_Handle handle, BTA_LibParam libParam, float *value)
Function for getting a parameter from the library.
uint8_t * zFactorsFileName
A filter of the type BTA_FltTypeMath (BTA_FltType) with math type BTA_FltMathTypeMultFM1 (BTA_FltMath...
Definition: bta.h:172
uint8_t verbosity
A value to tell the library when and when not to generate InfoEvents (0: Only critical events...
Definition: bta.h:179
BTA_Status BTAgetAmplitudes(BTA_Frame *frame, void **ampBuffer, BTA_DataFormat *dataFormat, BTA_Unit *unit, uint16_t *xRes, uint16_t *yRes)
Convenience function for extracting amplitudes from a provided frame. It simply returns the pointer a...
BTA_ConfigStructOrg btaConfigStructOrg[]
This struct contains information about the BTA_Config struct.
BTA_Status BTAstartDiscovery(BTA_DiscoveryConfig *discoveryConfig, FN_BTA_DeviceFound deviceFound, FN_BTA_InfoEvent infoEvent, BTA_Handle *handle)
Starts the discovery of devices. If possible, broadcast messages are transmitted otherwise all possib...
Set > 0 in order to pause internal capture thread. It saves CPU and/or bandwith, depending on the imp...
Definition: bta.h:131
BTA_Unit
Enumerator with units which allows the interpretation of the data in a channel.
Definition: bta_frame.h:109
BTA_Status BTAsetGlobalOffset(BTA_Handle handle, float globalOffset)
Function for setting the distance offset being applied to all pixels equally. It is, for all current devices, valid for the currently set modulation frequency. It can only be set for predefined modulation frequencies (see device’s SUM).
uint8_t * calibFileName
Name of the lens calibration file to be loaded into SDK (ASCII coded). It is supported by P100 based ...
Definition: bta.h:171
Set > 0 in order to activate CRC sums for the control connection. (Supported only by Ethernet cameras...
Definition: bta.h:120
Configuration structure to be passed with BTAopen.
Definition: bta.h:144
BTA_Status BTAstatusToString(BTA_Status status, char *statusString, uint16_t statusStringLen)
A convenience function to convert a BTA_Status into a string.
BTA_Status BTAgetFlags(BTA_Frame *frame, void **flagBuffer, BTA_DataFormat *dataFormat, BTA_Unit *unit, uint16_t *xRes, uint16_t *yRes)
Convenience function for extracting flags from a provided frame. It simply returns the pointer and co...
This header file contains the configuration structs for filters.
uint8_t * wigglingFileName
No longer supported, please use BTAwigglingUpdate()
Definition: bta.h:173
Configuration structure to be passed with BTAstartDiscovery.
Definition: bta.h:193
BTA_Status BTAstopDiscovery(BTA_Handle *handle)
Stops the discovery of devices.
Before an overflow, the oldest item in the queue is removed.
Definition: bta.h:107
BTA_Status BTAgetDistances(BTA_Frame *frame, void **distBuffer, BTA_DataFormat *dataFormat, BTA_Unit *unit, uint16_t *xRes, uint16_t *yRes)
Convenience function for extracting distances from a provided frame. It simply returns the pointer an...
BTA_Status BTAreadRegister(BTA_Handle handle, uint32_t address, uint32_t *data, uint32_t *registerCount)
Reads registers from the device/SDK.
char * variableName
The name of the field in the BTA_Config.
Definition: bta.h:202
BTA_Status BTAsetFrameRate(BTA_Handle handle, float frameRate)
Facilitates setting the frame rate for the default capture sequence.
uint8_t * udpControlOutIpAddr
The IP address for the UDP control interface (outbound connection) (The IP address of the camera devi...
Definition: bta.h:148
This struct is used for the representation of the BTA_Config struct. Programming languages that don't...
Definition: bta.h:201
No queueing.
Definition: bta.h:106
BTA_Status BTAgetFrame(BTA_Handle handle, BTA_Frame **frame, uint32_t timeout)
Actively requests a frame. The device-specific library implementation defines if. ...
uint8_t pointer
1 –> field is a pointer, 0 –> field is not a pointer
Definition: bta.h:203
BTA_QueueMode
Enumerator with queuing modes.
Definition: bta.h:105
uint8_t uartStopBits
0: None, 1: One, 2: Two, 3: 1.5 stop bits
Definition: bta.h:162
uint8_t uartDataBits
The number of UART data bits used.
Definition: bta.h:161
BTA_Status BTAremoveFilter(BTA_Handle handle, BTA_FltHandle fltHandle)
(The development of filter functionality is still in progress!) Removes the last filter added ...
uint8_t * tcpDeviceIpAddr
The IP address for the TCP data and control interface (The device's IP address)
Definition: bta.h:154
BTA_Status BTAinitGrabbingConfig(BTA_GrabbingConfig *config)
Fills the grab config structure with standard values.
BTA_Status BTAgetModulationFrequency(BTA_Handle handle, uint32_t *modulationFrequency)
Facilitates the retrieval of the current theoretical frame rate of the default capture sequence(s) ...
BTA_Status BTAeventIdToString(BTA_EventId eventId, char *eventIdString, uint16_t eventIdStringLen)
Deprecated. Use BTAstatusToString.
BTA_Status BTAsetFrameMode(BTA_Handle handle, BTA_FrameMode frameMode)
Allows to set a BTA_FrameMode which defines the data delivered by the sensor. The device and/or the S...
BTA_Status BTAgetGlobalOffset(BTA_Handle handle, float *globalOffset)
Function for getting the distance offset being applied to all pixels equally. It is, for all current devices, valid for the currently set modulation frequency. When changing the modulation frequency, the global offset changes.
uint8_t tcpDeviceIpAddrLen
The length of tcpDeviceIpAddr buffer in [byte].
Definition: bta.h:155
This structure holds information about the device.
Definition: bta_discovery.h:70
BTA_Status BTAgetIntegrationTime(BTA_Handle handle, uint32_t *integrationTime)
Facilitates the retrieval of the current integration time of the default capture sequence(s) ...
FN_BTA_FrameArrivedEx frameArrivedEx
Callback function pointer to the function to be called when a frame is ready (optional) ...
Definition: bta.h:181
uint16_t tcpControlPort
The port for the TCP control interface (The port the device awaits commands at)
Definition: bta.h:157
BTA_LibParam
Enumerator with runtime configuration parameters for the library. The behaviour of the library can be...
Definition: bta.h:118
BTA_FltType
This enum defines which filter is to be instantiated.
Definition: bta_filters.h:31
uint8_t BTAisConnected(BTA_Handle handle)
Queries whether the library has a valid connection to the sensor.
uint8_t uartParity
0: None, 1: Odd, 2: Even, 3: Mark, 4: Space Parity
Definition: bta.h:163
Readonly. Contains the total amount of frames loaded from bltstream file.
Definition: bta.h:122
BTA_DeviceType deviceType
The device type, when not left 0 implies the type of connection to use (Ethernet, USB (P100)...
Definition: bta.h:167
uint8_t * uartPortName
The port name of the UART to use (ASCII coded)
Definition: bta.h:159
const uint32_t btaConfigStructOrgLen
The size of the struct containing information about the BTA_Config struct.
BTA_Status BTAgetDeviceInfo(BTA_Handle handle, BTA_DeviceInfo **deviceInfo)
For querying information about the device. If successful, BTAfreeDeviceInfo must be called afterwards...
BTA_Status BTAsetLibParam(BTA_Handle handle, BTA_LibParam libParam, float value)
Function for setting a parameter for the library. Library parameters do not directly affect the camer...
uint8_t udpDataIpAddrLen
The length of udpDataIpAddr buffer in [byte].
Definition: bta.h:146
uint8_t * udpDataIpAddr
The IP address for the UDP data interface (The address the device is configured to stream to) ...
Definition: bta.h:145