| Visioscan Set SDK Libraries 1.3.5 Visioscan Set SDK Help documentation file for C++ and C++/CLI |

Loading...
Searching...
No Matches
BaseDataRecorder.h
1#pragma once
2#include <string>
3#include "RawData.h"
4#include "Utility.h"
5
6#ifdef STARFLEETTOOLBOX_EXPORTS
7#define BASEDATARECORDER __declspec(dllexport)
8#else
9#define BASEDATARECORDER __declspec(dllimport)
10#endif
11 using namespace std;
12
13 class BASEDATARECORDER BaseDataRecorder abstract
14{
15 public:
16 static const int STOPPED = 0;
17 static const int PLAYING = 1;
18 static const int RECORDING = 2;
19 static const int FAILED_START_RECORDING = 3;
20 static const int FAILED_INITIALIZE = 4;
21 static const int PAUSED = 5;
25 BaseDataRecorder();
26
30 ~BaseDataRecorder();
31
36 virtual int GetStatus() = 0;
37
41 virtual void Play() = 0;
42
46 virtual void Pause() = 0;
47
51 virtual void Stop() = 0;
52
56 virtual void Record() = 0;
57
62 virtual void ExportToCsv(string pPathToExport, MEASURMENT_UNIT pMeasurmentSystem) = 0;
63
68 virtual void FetchRecord(RawData data) = 0;
69
70
75 virtual RawData WaitForRawData() = 0;
76
81 void SetFrameRate(int pFrameRate);
82
87 int GetFrameRate();
88
93 long GetTotalFrame();
94
99 long GetCurrentFramePosition();
100 protected:
105 void SetTotalFrame(long pTotalFrame);
106
111 void SetCurrentFramePosition(long pCurrentFramePosition);
112 private:
113 int _frameRate = 24;
114 void* _mutexFrameRate; // protects the framerate data from concurent changes
115
116 void* _mutexFramePosition;
117 void* _mutexTotalFrame;
118 long _currentFrame;
119 long _totalFrame;
120};
121
abstract::Record
virtual void Record()=0
Start recording data.
abstract::~BaseDataRecorder
~BaseDataRecorder()
Destructor.
abstract::Pause
virtual void Pause()=0
Pause the playback.
abstract::Stop
virtual void Stop()=0
Stops either playing or recording.
abstract::GetCurrentFramePosition
long GetCurrentFramePosition()
Returns the actual frame position in the record whilm being played.
abstract::WaitForRawData
virtual RawData WaitForRawData()=0
Wait for a data comming from the player.
abstract::GetStatus
virtual int GetStatus()=0
Returns the recorder's status (STOPPED, PLAYING, RECORDING)
abstract::GetFrameRate
int GetFrameRate()
Gets the current framerate (thread safe)
abstract::BaseDataRecorder
BaseDataRecorder()
Base constructor.
abstract::Play
virtual void Play()=0
Plays a record from the file.
abstract::GetTotalFrame
long GetTotalFrame()
Returns the total frames contained in the record.
abstract::SetTotalFrame
void SetTotalFrame(long pTotalFrame)
Sets the total frame of the record.
abstract::ExportToCsv
virtual void ExportToCsv(string pPathToExport, MEASURMENT_UNIT pMeasurmentSystem)=0
Exports record file to CSV only if recorder is in STOP mode.
abstract::SetFrameRate
void SetFrameRate(int pFrameRate)
Sets the framerate (thread safe)
abstract::SetCurrentFramePosition
void SetCurrentFramePosition(long pCurrentFramePosition)
Sets the current frame being read.
abstract::FetchRecord
virtual void FetchRecord(RawData data)=0
Records RawData in the file (internal usage only)
RawData
The base class encapsulating sensor's RAW data.
Definition RawData.h:14