Visioscan Set SDK Libraries 1.0.14
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
11using namespace std;
12
13class BASEDATARECORDER BaseDataRecorder abstract
14{
15public:
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;
26
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
88
94
100protected:
105 void SetTotalFrame(long pTotalFrame);
106
111 void SetCurrentFramePosition(long pCurrentFramePosition);
112private:
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
virtual void Record()=0
Start recording data.
~BaseDataRecorder()
Destructor.
virtual void Pause()=0
Pause the playback.
virtual void Stop()=0
Stops either playing or recording.
long GetCurrentFramePosition()
Returns the actual frame position in the record whilm being played.
virtual RawData WaitForRawData()=0
Wait for a data comming from the player.
virtual int GetStatus()=0
Returns the recorder's status (STOPPED, PLAYING, RECORDING)
int GetFrameRate()
Gets the current framerate (thread safe)
BaseDataRecorder()
Base constructor.
virtual void Play()=0
Plays a record from the file.
long GetTotalFrame()
Returns the total frames contained in the record.
void SetTotalFrame(long pTotalFrame)
Sets the total frame of the record.
virtual void ExportToCsv(string pPathToExport, MEASURMENT_UNIT pMeasurmentSystem)=0
Exports record file to CSV only if recorder is in STOP mode.
void SetFrameRate(int pFrameRate)
Sets the framerate (thread safe)
void SetCurrentFramePosition(long pCurrentFramePosition)
Sets the current frame being read.
virtual void FetchRecord(RawData data)=0
Records RawData in the file (internal usage only)
The base class encapsulating sensor's RAW data.
Definition RawData.h:14