Loading...
Searching...
No Matches
pstsdk_c.h File Reference
`#include <stdbool.h>`
`#include <stddef.h>`
Include dependency graph for pstsdk_c.h:

Go to the source code of this file.

## Data Structures
struct | PstImage
| Images retrieved from the tracker. More...
struct | PstTarget
| Tracking target information. More...
struct | PstTargetStatus
| Tracking target status. More...
struct | PstPoint
| Estimated 3D marker location. More...
struct | PstTargetPose
| Estimated tracking target pose. More...
struct | PstTargetMarker
| 3D marker positions of a single marker of a tracking Target. More...
struct | PstTargetMarkers
| Collection struct for PstTargetMarker. More...
struct | PstTrackerData
| Tracking information retrieved from tracker. More...
struct | PstTracker
| Main PST SDK struct for tracker communication. More...
struct | PstCameraURLs
| Struct to request urls for calibration information. More...
struct | PstCameraInfo
| Information for a single camera of the connected PST Tracker. More...

## Macros
#define | PST_C_EXPORT

## Enumerations
enum | EPstErrorStatus { PST_ERROR_STATUS_OK = 0 , PST_ERROR_STATUS_TRACKER_ERROR = 1 , PST_ERROR_STATUS_NOT_INITIALIZED_ERROR = 2 , PST_ERROR_STATUS_NOT_SUPPORTED_ERROR = 3 , PST_ERROR_STATUS_OUT_OF_RANGE_ERROR = 4 , PST_ERROR_STATUS_NOT_FOUND_ERROR = 5 , PST_ERROR_STATUS_HTTP_ERROR = 6 , PST_ERROR_STATUS_FAILED_TO_ALLOCATE_MEMORY_ERROR = 7 , PST_ERROR_STATUS_NULLPTR_ERROR = 8 , PST_ERROR_STATUS_IMAGE_RETRIEVAL_FAILED_ERROR = 9 , PST_ERROR_STATUS_INVALID_DATA_ERROR = 10 , PST_ERROR_STATUS_ALREADY_EXISTS_ERROR = 11 , PST_ERROR_STATUS_JSON_PARSING_ERROR = 12 }
| Tracker error messages enum class. More...
enum | EPstStatusMessage { PST_STATUSMESSAGE_OK = 0 , PST_STATUSMESSAGE_NOT_INITIALIZED = 1 , PST_STATUSMESSAGE_DISCONNECTED = 2 , PST_STATUSMESSAGE_ERR_GENERAL = 3 , PST_STATUSMESSAGE_ERR_TIMEOUT = 4 , PST_STATUSMESSAGE_ERR_NOCAMS_FOUND = 5 , PST_STATUSMESSAGE_ERR_NOTENOUGHTCAMS_FOUND = 6 , PST_STATUSMESSAGE_ERR_INITERROR = 7 , PST_STATUSMESSAGE_ERR_CANNOT_START_CAMS = 8 , PST_STATUSMESSAGE_ERR_CANNOT_SETUP_CAMS = 9 , PST_STATUSMESSAGE_ERR_NULL_TRACKER_HANDLE = 10 , PST_STATUSMESSAGE_ERR_UNKNOWN_STATUS = 11 }
| Tracker status messages enum class. More...
enum | EPstTrackerMode { PST_MODE_LOWPOWER = 0 , PST_MODE_SETUP = 1 , PST_MODE_TRACKING = 2 , PST_MODE_TRAINING = 3 , PST_MODE_DISCONNECT = 4 , PST_MODE_RECONNECT = 5 , PST_MODE_ERROR = 6 , PST_MODE_UNKNOWN = 7 }
| Tracker mode enum class. More...
enum | EPstTrackingRegion { OPTIMAL = 0 , FULL = 1 }
| Region of the tracking working space in which markers are reported. More...

## Functions
EPstErrorStatus | pst_alloc_and_get_last_error_message (char **cstring)
| This function returns the last error message that was recorded by the system.
EPstErrorStatus | pst_tracker_init (PstTracker *ctracker)
| This function initializes the tracker object.
EPstErrorStatus | pst_tracker_init1 (PstTracker *ctracker, const char path[])
| This function initializes the tracker object.
EPstErrorStatus | pst_tracker_init2 (PstTracker *ctracker, const char path[], const char config_file[])
| This function initializes the tracker object.
EPstErrorStatus | pst_tracker_init3 (PstTracker *ctracker, const char path[], const char config_file[], const char db_file[])
| This function initializes the tracker object.
EPstErrorStatus | pst_tracker_init4 (PstTracker *ctracker, const char path[], const char config_file[], const char db_file[], const char grabber_name[])
| This function initializes the tracker object.
void | pst_tracker_destroy (PstTracker *ctracker)
EPstErrorStatus | pst_tracker_load_calibration_from_local_path (PstTracker *ctracker, const char path[])
| Load calibration information from a given path.
EPstErrorStatus | pst_tracker_get_connected_camera_urls (const PstTracker *ctracker, bool silent, PstCameraURLs *urls)
| Get URLs of the calibration information for the connected PST Tracker.
EPstErrorStatus | pst_tracker_get_uncalibrated_camera_urls (const PstTracker *ctracker, bool silent, PstCameraURLs *urls)
| Check if cameras of the connected PST Tracker are calibrated.
EPstErrorStatus | pst_tracker_alloc_and_get_version_info (const PstTracker *ctracker, char **version_string)
| Get version information of the SDK.
EPstErrorStatus | pst_tracker_alloc_and_get_config_path (const PstTracker *ctracker, char **config_path)
| Get the path to the current configuration directory.
EPstErrorStatus | pst_tracker_get_single_measurement (const PstTracker *ctracker, PstTrackerData *cdata)
| Retrieve the latest PstTrackerData available from the connected PstTracker.
EPstErrorStatus | pst_tracker_add_tracker_data_callback (PstTracker *ctracker, void(*on_tracker_data)(const PstTrackerData *, EPstErrorStatus))
| Add a callback function for tracker data.
EPstErrorStatus | pst_tracker_add_tracker_mode_callback (PstTracker *ctracker, void(*on_tracker_mode)(EPstTrackerMode))
| Add a callback function for mode changes.
EPstErrorStatus | pst_tracker_add_tracker_callbacks (PstTracker *ctracker, void(*on_tracker_data)(const PstTrackerData *, EPstErrorStatus), void(*on_tracker_mode)(EPstTrackerMode))
| Add callback functions for tracker data and mode changes.
EPstErrorStatus | pst_tracker_remove_tracker_data_callback (PstTracker *ctracker, void(*on_tracker_data)(const PstTrackerData *, EPstErrorStatus))
| Remove a callback function for tracker data.
EPstErrorStatus | pst_tracker_remove_tracker_mode_callback (PstTracker *ctracker, void(*on_tracker_mode)(EPstTrackerMode))
| Remove a callback function for mode changes.
EPstErrorStatus | pst_tracker_remove_tracker_callbacks (PstTracker *ctracker, void(*on_tracker_data)(const PstTrackerData *, EPstErrorStatus), void(*on_tracker_mode)(EPstTrackerMode))
| Remove callback functions for tracker data and mode changes.
EPstErrorStatus | pst_tracker_start (PstTracker *ctracker)
| Start tracking.
EPstErrorStatus | pst_tracker_pause (PstTracker *ctracker)
| Pause tracking.
EPstStatusMessage | pst_tracker_system_check (const PstTracker *ctracker)
| Check if the tracker is running correctly.
EPstErrorStatus | pst_tracker_set_framerate (PstTracker *ctracker, double fps)
| Set tracker frame rate.
EPstErrorStatus | pst_tracker_get_framerate (const PstTracker *ctracker, double *fps)
| Get current frame rate.
EPstErrorStatus | pst_tracker_alloc_and_get_supported_framerates (const PstTracker *ctracker, float **framerates, size_t *number_of_framerates)
| Get an array of available frame rates.
EPstErrorStatus | pst_tracker_set_exposure (PstTracker *ctracker, double time)
| Set the exposure time.
EPstErrorStatus | pst_tracker_get_exposure (const PstTracker *ctracker, double *exposure)
| Get the current exposure time.
EPstErrorStatus | pst_tracker_get_exposure_range (const PstTracker *ctracker, double *min, double *max)
| Get the allowed exposure range.
EPstErrorStatus | pst_tracker_enable_filtering (PstTracker *ctracker)
| Enable filtering of the tracking results.
EPstErrorStatus | pst_tracker_disable_filtering (PstTracker *ctracker)
| Disable filtering of the tracking results.
EPstErrorStatus | pst_tracker_set_position_filter (PstTracker *ctracker, double value)
| Set the strength of the position filter.
EPstErrorStatus | pst_tracker_set_orientation_filter (PstTracker *ctracker, double value)
| Set the strength of the orientation filter.
EPstErrorStatus | pst_tracker_enable_tremor_filter (PstTracker *ctracker)
| Enable the tremor filter.
EPstErrorStatus | pst_tracker_disable_tremor_filter (PstTracker *ctracker)
| Disable the tremor filter.
EPstErrorStatus | pst_tracker_enable_image_transfer (PstTracker *ctracker)
| Enable image transfer from the PST Tracker.
EPstErrorStatus | pst_tracker_disable_image_transfer (PstTracker *ctracker)
| Disable image transfer from the PST Tracker.
EPstErrorStatus | pst_tracker_get_pst_image (const PstTracker *ctracker, PstImage *image)
| Retrieve images from the connected PST Tracker.
EPstErrorStatus | pst_tracker_alloc_and_get_target_list (const PstTracker *ctracker, PstTargetStatus **statuses, size_t *number_of_statuses)
| Get TargetStatuses object containing all tracking targets and their status.
EPstErrorStatus | pst_tracker_get_target_info (const PstTracker *ctracker, const char *name, PstTarget *target)
| Get basic tracking target information.
EPstErrorStatus | pst_tracker_set_target_status (PstTracker *ctracker, const char *name, bool set_active)
| Set status of a single tracking Target.
EPstErrorStatus | pst_tracker_get_target_status (const PstTracker *ctracker, const char *name, bool *status)
| Get status of a single tracking Target.
EPstErrorStatus | pst_tracker_get_target_markers (const PstTracker *ctracker, const char *name, PstTargetMarkers *marker_list)
| Get 3D marker positions of stored tracking target.
EPstErrorStatus | pst_tracker_set_target_id (PstTracker *ctracker, const char *name, int id)
| Set the id of the tracking target.
EPstErrorStatus | pst_tracker_set_reference (PstTracker *ctracker, const float creference[16], bool relative)
| Set the reference system in which tracking results are reported.
EPstErrorStatus | pst_tracker_set_default_reference (PstTracker *ctracker)
| Reset the reference system to the default reference system.
EPstErrorStatus | pst_tracker_get_reference (const PstTracker *ctracker, float creference[16])
| Gets the transformation matrix for the current reference system.
EPstErrorStatus | pst_tracker_alloc_and_get_connected_camera_info (const PstTracker *ctracker, bool silent, PstCameraInfo **c_camera_info, size_t *number_of_cameras)
| Retrieve camera information for connected PST Trackers.
EPstErrorStatus | pst_sdk_enable_shared_memory ()
| Enable shared memory communication layer.
void | pst_sdk_disable_shared_memory ()
| Disable shared memory communication layer.
EPstErrorStatus | pst_sdk_enable_rest_server (const char *server_address, const char *server_port, int event_stream_retry_timeout)
| Enable a REST Server using the HTTP protocol on a local area network.
void | pst_sdk_disable_rest_server ()
| Disable the REST server communication layer.
EPstErrorStatus | pst_tracker_remove_target_model (PstTracker *ctracker, const char *model_name)
| Remove a tracking target model from the target model database.
void | pst_camera_urls_init (PstCameraURLs *urls)
void | pst_camera_urls_destroy (PstCameraURLs *urls)
void | pst_trackerdata_init (PstTrackerData *cdata)
void | pst_trackerdata_destroy (PstTrackerData *cdata)
void | pst_image_init (PstImage *image)
void | pst_image_destroy (PstImage *image)
void | pst_target_markers_init (PstTargetMarkers *marker_list)
void | pst_target_markers_destroy (PstTargetMarkers *marker_list)
const char * | pst_sdk_get_version ()
| Retrieve the SDK version string.
void | pst_sdk_enable_logging ()
| Write plug-in status information to the standard C output stream stderr.
void | pst_sdk_shutdown ()
| Shutdown the tracking system, stopping tracking.
void | pst_free (void *data)
| Free data allocated by the PST SDK.
EPstErrorStatus | pst_tracker_import_json_model (PstTracker *ctracker, const char *json_model)
| Import a tracking target model into the target model database.
EPstErrorStatus | pst_tracker_export_json_model (const PstTracker *ctracker, const char *model_name, char **model_string)
| Export a tracking target model as a JSON-formatted string.
EPstErrorStatus | pst_tracker_set_marker_detection_region (PstTracker *ctracker, EPstTrackingRegion detection_region)
| Sets the region of the tracking working space where markers are reported.
EPstErrorStatus | pst_tracker_get_marker_detection_region (const PstTracker *ctracker, EPstTrackingRegion *detection_region)
| Gets the region of the tracking working space where markers are reported.
EPstErrorStatus | pst_tracker_supports_detection_region_pruning (const PstTracker *ctracker, bool *supported)
| Check if the connected PST tracker supports pruning markers by tracking region.

## Macro Definition Documentation

## ◆ PST_C_EXPORT

#define PST_C_EXPORT