RadarFX API Documentation
Home
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
include
radarFxServer
rfxCaptureProcess.h
Go to the documentation of this file.
1
/*********************************************************************************
2
** Copyright (c) 2019 MAK Technologies, Inc.
3
** All rights reserved.
4
*********************************************************************************/
5
6
#pragma once
7
8
#include <
radarFxServer/export.h
>
9
#include <
radarFxServer/rfxBaseProcess.h
>
10
11
#include <
radarFxShared/rfxImageMessage.h
>
12
13
#include <makArchives/DtObserverStateRecord.h>
14
15
#include <vrvUtil/DtWindowConfiguration.h>
16
17
namespace
makVrv
18
{
19
class
DtDe;
20
class
DtVideoStream;
21
class
DtObserver;
22
class
DtVideoFrameBuffer;
23
}
24
25
namespace
makRadarFx
26
{
29
class
DT_DLL_RFXSERVER
DtCaptureProcess
:
public
DtBaseProcess
30
{
31
protected
:
32
34
enum
ProcessStep
{
WAITING
, CONFIGURE_OBSERVER, CONFIGURE_VIEWPORT, WAIT_TERRAIN, FRAME_CAPTURE, WAIT_FRAME, FRAME_RECEIVED, END_REQUEST, END_ERROR};
35
36
public
:
38
DtCaptureProcess
(makVrv::DtDe& de,
DtImageRequest
* msg);
39
virtual
~
DtCaptureProcess
();
40
42
virtual
void
tick();
43
45
virtual
bool
isDone();
46
48
virtual
void
processFrame(makVrv::DtVideoFrameBuffer* frame) = 0;
49
50
protected
:
51
54
struct
DtObserverState
55
{
56
makArchives::DtObserverStateRecord
myObserverState
;
57
makVrv::DtWindowConfiguration
myWindowConfiguration
;
58
bool
myIsValid
;
59
};
60
62
struct
DtImageCaptureConfig
63
{
64
DtImageCaptureConfig
();
65
virtual
~
DtImageCaptureConfig
();
66
std::string
myRequestorId
;
67
int
myRequestId
;
68
69
bool
myUseObserverLoc
;
70
bool
myUseObserverOrientation
;
71
DtVector
myOwnshipLocation
;
72
DtTaitBryan
myOwnshipOrientation
;
73
74
DtVector
myTargetLocation
;
75
76
std::string
mySensorName
;
77
DtImageSize
myImageSize
;
78
DtImageFormat
myImageFormat
;
79
DtImageDataType
myImageDataType
;
80
DtImageRotation
myImageRotation
;
81
unsigned
int
myImageReturnMethod
;
82
std::string
myImageSavePath
;
83
std::string
myImageFilename
;
84
bool
mySingleChannelRaw
;
85
86
DtVector
myObserverOffsetLocation
;
87
DtTaitBryan
myObserverOffsetOrientation
;
88
bool
myRestoreState
;
89
};
90
91
protected
:
92
93
virtual
void
beginRequest();
94
virtual
void
configureViewport();
95
virtual
void
configureObserver();
96
virtual
void
waitTerrain();
97
virtual
void
installFrameCapture();
98
virtual
void
respondError(std::string errorMsg,
DtImageError
err) = 0;
99
virtual
void
endRequest();
100
101
virtual
void
restoreDisplay();
102
103
virtual
void
configureSensor(
const
std::string& sensorName) = 0;
104
106
virtual
std::string generateFilename(
const
std::string& path,
const
std::string& filename,
107
DtImageFormat
format);
108
109
110
protected
:
111
112
DtImageCaptureConfig
*
myCaptureConfig
;
113
114
ProcessStep
myProcessStep
;
115
116
makVrv::DtVideoStream*
myVideoStream
;
117
makVrv::DtObserver*
myObserver
;
118
DtObserverState
*
myOriginalState
;
119
120
double
myWaitTime
;
121
int
myWaitTerrainFrames
;
122
double
myLastTime
;
123
double
myTerrainTimeout
;
124
bool
myTerrainTimeoutFlag
;
125
int
myWaitFrameCount
;
126
};
127
}
Document ID: 1.0
Copyright © 2017 VT MAK Inc. All Rights Reserved (
www.mak.com
)