VR-Vantage
Loading...
Searching...
No Matches
rfxMmwMessage.h
Go to the documentation of this file.
1// ******************************************************************************
2// ** Copyright (c) 2018 MAK Technologies, Inc.
3// ** All rights reserved.
4// ******************************************************************************
5
9
10#pragma once
11
12#include "export.h"
13#include "rfxMessage.h"
15#include <matrix/vlVector.h>
16#include <matrix/vlTaitBryan.h>
17
18#include <string>
19
20namespace makRadarFx
21{
22
25{
26 public:
29 virtual ~DtMmwRequest();
30
34 virtual void useObserverAsHost();
35
38 virtual void setOwnshipLocation(DtVector location);
39 virtual DtVector ownshipLocation();
40
43 virtual void setOwnshipEntityId(const std::string& name);
44 virtual std::string ownshipEntityId();
45
47 virtual bool isUsingObserverAsHost();
48 virtual bool isUsingEntityAsHost();
50
53 virtual void useObserverForTarget();
54
57 virtual void setTargetEntityId(const std::string& name);
58 virtual std::string targetEntityId();
59
62 virtual void setTargetLocation(DtVector location);
63 virtual DtVector targetLocation();
64
67 virtual bool isUsingEntityForTarget();
69
72 virtual void setRadarOffsetLocation(DtVector offset);
73 virtual DtVector radarOffsetLocation();
74
77 virtual void setRadarOffsetOrientation(DtTaitBryan offsetOrientation);
78 virtual DtTaitBryan radarOffsetOrientation();
79
81 virtual void setRadarSystemName(const std::string& name);
82 virtual std::string radarSystemName();
83
86 virtual bool isAgcPowerEnabled() const;
87
89 virtual void setPower(float power);
90 virtual float power();
91
93 virtual void setImageSize(const DtImageSize& size);
95
97 virtual void setImageFormat(DtImageFormat format);
99
103
105 virtual void setImageRotation(DtImageRotation rotate);
107
109 virtual void setImageReturnMethod(unsigned int returnFlags);
110 virtual unsigned int imageReturnMethod();
111
114 virtual void setImageSavePath(const std::string& filename);
115 virtual std::string imageSavePath();
116
121 virtual void setImageFilename(const std::string& filename);
122 virtual std::string imageFilename();
123
126 virtual void setRestoreState(bool restoreState);
127 virtual bool restoreState();
128
130 virtual void setEnableSky(bool enableSky);
131 virtual bool enableSky();
132
134 virtual int messageSize() const;
136 static DtBaseMessage* decode(unsigned char* buffer, int length);
139
140
141 protected:
142 virtual void serialize(DtStreamWriter& writer);
143 virtual void deserialize(DtStreamReader& reader);
144
145
154
155 std::string myOwnshipName;
156 std::string myTargetName;
159
162 std::string myRadarName;
163 float myPower;
168 unsigned int myReturnMethod;
169
171
172 std::string myImageSavePath;
173 std::string myImageFilename;
174
175};
176
177
180{
181 public:
184 virtual ~DtMmwResponse();
185
189
193
195 virtual void setReturnMethod(unsigned int method);
196 virtual unsigned int returnMethod();
197
199 virtual void setImageFormat(DtImageFormat format);
201
203 virtual void setImageSize(const DtImageSize& size);
205
209
211 virtual void setFilename(const std::string& filename);
212 virtual std::string filename();
213
215 virtual int dataLength();
216
218 virtual void setData(unsigned char* buffer, int length);
219 virtual unsigned char* data();
220
222 virtual int messageSize() const;
224 static DtBaseMessage* decode(unsigned char* buffer, int length);
227
228 protected:
229 virtual void serialize(DtStreamWriter& writer);
230 virtual void deserialize(DtStreamReader& reader);
231
235 unsigned int myReturnMethod;
238 std::string myFilename;
240 unsigned char* myData;
241};
242}
243
DtBaseMessage is the base class for all messages that can be sent between the server and the client.
Definition rfxMessage.h:26
DtImageRequest(unsigned int messageType)
CTOR/DTOR.
DtImageResponse(unsigned int messageType)
CTOR/DTOR.
virtual void setRadarOffsetLocation(DtVector offset)
the offset location of the sensor on the hosting entity. Only valid when a hosting entity is defined
virtual std::string imageSavePath()
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
virtual void setTargetEntityId(const std::string &name)
If the ownship is the target of the sensor, we can use its global simulation name to look it up.
bool myUseAbsoluteOwnship
Definition rfxMmwMessage.h:148
DtVector myOwnshipLocation
Definition rfxMmwMessage.h:157
virtual void setImageSavePath(const std::string &filename)
Requested path for image if it is to be saved by the server If the path does not exist,...
bool myUseObserverForTarget
Definition rfxMmwMessage.h:149
virtual int messageSize() const
size of the message
bool myUseEntityAsTarget
Definition rfxMmwMessage.h:150
DtImageSize myImageSize
Definition rfxMmwMessage.h:164
virtual void setImageRotation(DtImageRotation rotate)
Requested rotation of the image.
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
DtVector myRadarOffsetLocation
Definition rfxMmwMessage.h:160
virtual void setImageSize(const DtImageSize &size)
Requested image pixel size. This may not be the returned size due to image rotation.
bool myUseEntityAsHost
Definition rfxMmwMessage.h:147
virtual DtImageSize imageSize()
virtual std::string imageFilename()
unsigned int myReturnMethod
Definition rfxMmwMessage.h:168
virtual DtTaitBryan radarOffsetOrientation()
virtual bool isUsingEntityForTarget()
virtual void setRadarOffsetOrientation(DtTaitBryan offsetOrientation)
the offset orientation of the sensor from the hosting entite's orientation. Only valid when a hosting...
DtImageFormat myImageFormat
Definition rfxMmwMessage.h:165
virtual void setRadarSystemName(const std::string &name)
The name of the sensor system to use. This must match one of the sensors that the RadarFX server has ...
virtual void setRestoreState(bool restoreState)
Lets the server know that it should restore the display/window/observer state after an image capture ...
bool myIsAgcPowerEnabled
Definition rfxMmwMessage.h:153
virtual unsigned int imageReturnMethod()
virtual DtImageFormat imageFormat()
DtVector myTargetLocation
Definition rfxMmwMessage.h:158
DtImageRotation myImageRotation
Definition rfxMmwMessage.h:167
virtual bool isUsingObserverAsHost()
functions to determine how to place the sensor
virtual void setEnableSky(bool enableSky)
lets the server know if it should render the sky or not with this request.
virtual void setIsAgcPowerEnabled(bool isAgcPowerEnabled)
Whether or not to use AGC for Power.
float myPower
Definition rfxMmwMessage.h:163
bool myEnableSky
Definition rfxMmwMessage.h:152
std::string myImageFilename
Definition rfxMmwMessage.h:173
virtual std::string targetEntityId()
virtual void setOwnshipEntityId(const std::string &name)
If the ownship is hosted by the simulation system, we can use its global simulation name to look it u...
virtual void setOwnshipLocation(DtVector location)
if the ownship is not hosted in the simulation system, we can explicitly state where we want to perfo...
bool myUseObserverAsHost
Definition rfxMmwMessage.h:146
std::string myTargetName
Definition rfxMmwMessage.h:156
virtual DtImageRotation imageRotation()
virtual bool isUsingAbsoluteLocation()
virtual float power()
virtual DtVector ownshipLocation()
std::string myImageSavePath
Definition rfxMmwMessage.h:172
virtual void setImageFilename(const std::string &filename)
Requested filename for image if it is to be saved by the server If this is not set,...
virtual bool isUsingLocationForTarget()
bool myRestoreState
Definition rfxMmwMessage.h:170
virtual DtVector radarOffsetLocation()
virtual bool isUsingObserverForTarget()
functions to determine how to place the target
virtual DtVector targetLocation()
std::string myRadarName
Definition rfxMmwMessage.h:162
virtual void useObserverAsHost()
calling this function causes the message to use the current observer's position and orientation for t...
virtual bool isAgcPowerEnabled() const
virtual DtImageDataType imageDataType()
bool myUseAbsoluteTarget
Definition rfxMmwMessage.h:151
DtImageDataType myImageDataType
Definition rfxMmwMessage.h:166
virtual void setTargetLocation(DtVector location)
this is the target that we would like to look at. Location format is latitude/longitude/altitude (in ...
virtual bool isUsingEntityAsHost()
virtual std::string ownshipEntityId()
virtual void setPower(float power)
Radar system power setting in Watts.
virtual void serialize(DtStreamWriter &writer)
virtual void setImageDataType(DtImageDataType type)
Requested data type of the returned image data. Only available for RAW/NITF image types.
virtual std::string radarSystemName()
virtual bool restoreState()
virtual void useObserverForTarget()
calling this function causes the message to use the current observer's view to determine the target f...
virtual void setImageFormat(DtImageFormat format)
Requested format of the returned image data.
DtTaitBryan myRadarOffsetOrientation
Definition rfxMmwMessage.h:161
virtual void setImageReturnMethod(unsigned int returnFlags)
Bitfield for image data return types.
std::string myOwnshipName
Definition rfxMmwMessage.h:155
virtual void deserialize(DtStreamReader &reader)
virtual bool enableSky()
virtual void setImageDataType(DtImageDataType type)
Image data type Only available for RAW/NITF image types.
virtual void setReturnMethod(unsigned int method)
Image return method that is used.
DtImageWarning myWarning
Definition rfxMmwMessage.h:233
virtual DtImageFormat imageFormat()
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
virtual int dataLength()
Size of data for the returned image.
virtual DtImageError error()
virtual void setData(unsigned char *buffer, int length)
Image data returned by the server. This message class will manage this memory.
virtual void setError(DtImageError error)
Error value if there is one.
virtual std::string filename()
unsigned int myReturnMethod
Definition rfxMmwMessage.h:235
DtImageSize myImageSize
Definition rfxMmwMessage.h:234
virtual void setFilename(const std::string &filename)
filename of saved image if it was saved on the server
virtual void serialize(DtStreamWriter &writer)
std::string myFilename
Definition rfxMmwMessage.h:238
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
unsigned char * myData
Definition rfxMmwMessage.h:240
virtual int messageSize() const
size of the message
DtImageDataType myImageDataType
Definition rfxMmwMessage.h:237
DtImageError myError
Definition rfxMmwMessage.h:232
virtual DtImageDataType imageDataType()
virtual DtImageWarning warning()
virtual void setImageSize(const DtImageSize &size)
Size of the image returned by the server.
virtual void setImageFormat(DtImageFormat format)
Image return format.
DtImageFormat myImageFormat
Definition rfxMmwMessage.h:236
virtual unsigned char * data()
int myDataLength
Definition rfxMmwMessage.h:239
virtual DtImageSize imageSize()
virtual unsigned int returnMethod()
virtual void deserialize(DtStreamReader &reader)
virtual void setWarning(DtImageWarning error)
Warning value if there is one.
Instances of DtStreamReader decode values from a byte array this assumes the data in the byte stream ...
Definition byteStream.h:28
Instances of DtStreamWriter encode values into a byte array this writes the data to the stream in lit...
Definition byteStream.h:75
#define RFX_DLL_SHARED
Definition include/radarFxShared/export.h:15
Definition radarFxConnector.h:28
DtImageRotation
Definition rfxImageMessage.h:23
DtImageFormat
Definition rfxImageMessage.h:22
DtImageError
Definition rfxImageMessage.h:46
DtImageDataType
Definition rfxImageMessage.h:25
DtImageWarning
Definition rfxImageMessage.h:47
Defines the messages requesting and responding SAR images from the server.
Defines the base class for all messages that can be sent between the server and the client.
Definition rfxImageMessage.h:28