PST SDK  5.2.0.0-0eac0f6
pstsdk_cpp.h
Go to the documentation of this file.
1 // Copyright PS-Tech B.V. All Rights Reserved.
2 
3 #pragma once
4 
5 #include "PstBase.h"
6 #include "PstString.h"
7 #include "PstVector.h"
8 #include "PstArray.h"
9 #include "PstTypes.h"
10 
11 namespace PSTech
12 {
13 namespace pstsdk
14 {
34  class Listener
35  {
36  public:
46  virtual void OnTrackerData(TrackerData& data) { }
47  virtual ~Listener() { }
48  };
49 
58 
66  PST_EXPORT const char* GetSdkVersion();
67 
75  {
76  public:
97  Tracker(const Utils::PstString& path = "", const Utils::PstString& config_file = "server.cfg",
98  const Utils::PstString& db_file = "models.db", const Utils::PstString& grabber_name = "default");
99  ~Tracker();
100 
111  Utils::PstVector<Utils::PstString> GetUncalibratedCameraUrls(bool silent = false);
112 
122  Utils::PstString GetVersionInfo() const;
123 
132  Utils::PstString GetConfigPath() const;
133 
134 
146  void AddTrackerListener(Listener* listener);
147 
158  void RemoveTrackerListener(Listener* listener);
159 
167  void Start();
168 
177  void Pause();
178 
190  static void Shutdown();
191 
203  StatusMessage Systemcheck() const;
204 
205 
218  void SetFramerate(double fps);
219 
230  double GetFramerate() const;
231 
245  Utils::PstVector<float> GetSupportedFramerates() const;
246 
261  void SetExposure(double time);
262 
272  double GetExposure() const;
273 
290  void GetExposureRange(double& min, double& max) const;
291 
308  void EnableFiltering();
309 
318  void DisableFiltering();
319 
331  void SetPositionFilter(double value);
332 
344  void SetOrientationFilter(double value);
345 
360  void EnableTremorFilter();
361 
370  void DisableTremorFilter();
371 
372 
385  void EnableImageTransfer();
386 
395  void DisableImageTransfer();
396 
410  bool GetImage(Image& image) const;
411 
412 
425  TargetStatuses GetTargetList() const;
426 
439  Target GetTargetInfo(const Utils::PstString& name) const;
440 
455  void SetTargetStatus(const Utils::PstString& name, bool active);
456 
471  bool GetTargetStatus(const Utils::PstString& name) const;
472 
487  MarkerList GetTargetMarkers(const Utils::PstString& name) const;
488 
501  void SetTargetId(const Utils::PstString& name, int id);
502 
519  void SetReference(const Utils::PstArray<float, 16>& reference, bool relative = false);
520 
531  void SetDefaultReference();
532 
546  Utils::PstArray<float, 16> GetReference() const;
547 
573  static void EnableSharedMemory();
574 
582  static void DisableSharedMemory();
583 
604  static void EnableRestServer(const Utils::PstString& server_address, const Utils::PstString& server_port, int eventStream_retry_timeout_ms = 3000);
605 
614  static void DisableRestServer();
615  };
617 }
618 }
PSTech::pstsdk::Tracker
Main PST SDK class implementing tracker communication.
Definition: pstsdk_cpp.h:74
PSTech::pstsdk::Listener::OnTrackerData
virtual void OnTrackerData(TrackerData &data)
Callback function receiving tracking information from the tracker.
Definition: pstsdk_cpp.h:46
PSTech::Utils::PstVector
Basic vector class, cloning std::vector<T>.
Definition: PstVector.h:29
PstArray.h
PSTech::Utils::PstArray< float, 16 >
PstTypes.h
PSTech::pstsdk::TrackerData
Tracking information retrieved from tracker.
Definition: PstTypes.h:154
PSTech::pstsdk::Listener
Abstract listener class for receiving tracking information.
Definition: pstsdk_cpp.h:34
PstBase.h
PST_EXPORT
#define PST_EXPORT
Definition: PstBase.h:12
PstString.h
PSTech::pstsdk::EnableLogging
void EnableLogging()
Write plug-in status information to the standard C output stream stderr.
PSTech::pstsdk::GetSdkVersion
const char * GetSdkVersion()
Retrieve the SDK version string.
PSTech::pstsdk::StatusMessage
StatusMessage
Tracker status messages enum class.
Definition: PstTypes.h:169
PSTech::pstsdk::Image
Images retrieved from the tracker.
Definition: PstTypes.h:27
PSTech::pstsdk::Target
Tracking target information.
Definition: PstTypes.h:41
PSTech::Utils::PstString
Definition: PstString.h:17
PSTech
Definition: PstArray.h:10
PstVector.h
PSTech::pstsdk::Listener::~Listener
virtual ~Listener()
Definition: pstsdk_cpp.h:47