VR-Vantage
Loading...
Searching...
No Matches
rfxIsarMessage.h
Go to the documentation of this file.
1// ******************************************************************************
2// ** Copyright (c) 2020 MAK Technologies, Inc.
3// ** All rights reserved.
4// ******************************************************************************
5
9
10#pragma once
11
12#include "export.h"
13#include "rfxMessage.h"
15
16#include <matrix/vlVector.h>
17#include <matrix/vlTaitBryan.h>
18
19#include <string>
20
21namespace makRadarFx
22{
23
26{
27 public:
30 virtual ~DtIsarRequest();
31
35 virtual void useObserverAsHost();
36
39 virtual void setOwnshipLocation(DtVector location);
40 virtual DtVector ownshipLocation();
41
44 virtual void setOwnshipEntityId(const std::string& name);
45 virtual std::string ownshipEntityId();
46
48 virtual bool isUsingObserverAsHost();
49 virtual bool isUsingEntityAsHost();
51
54 virtual void useObserverForTarget();
55
58 virtual void setTargetEntityId(const std::string& name);
59 virtual std::string targetEntityId();
60
63 virtual void setTargetLocation(DtVector location);
64 virtual DtVector targetLocation();
65
68 virtual bool isUsingEntityForTarget();
70
73 virtual void setRadarOffsetLocation(DtVector offset);
74 virtual DtVector radarOffsetLocation();
75
78 virtual void setRadarOffsetOrientation(DtTaitBryan offsetOrientation);
79 virtual DtTaitBryan radarOffsetOrientation();
80
82 virtual void setRadarSystemName(const std::string& name);
83 virtual std::string radarSystemName();
84
87 virtual bool isAgcPowerEnabled() const;
88
90 virtual void setPower(float power);
91 virtual float power();
92
94 virtual void setImageSize(const DtImageSize& size);
96
100
102 virtual void setImageFormat(DtImageFormat format);
104
106 virtual void setImageReturnMethod(unsigned int returnFlags);
107 virtual unsigned int imageReturnMethod();
108
111 virtual void setImageSavePath(const std::string& filename);
112 virtual std::string imageSavePath();
113
118 virtual void setImageFilename(const std::string& filename);
119 virtual std::string imageFilename();
120
122 virtual int numRequestedImages();
123 virtual void setNumRequestedImages(int numImages);
124
126 virtual float viewMagnification();
127 virtual void setViewMagnification(float zoom);
128
130 virtual double integrationTime();
131 virtual void setIntegrationTime(double time);
132
133
135 virtual int messageSize() const;
137 static DtBaseMessage* decode(unsigned char* buffer, int length);
140
141 protected:
142 virtual void serialize(DtStreamWriter& writer);
143 virtual void deserialize(DtStreamReader& reader);
144
145
153
154 std::string myOwnshipName;
155 std::string myTargetName;
158
161 std::string myRadarName;
162 float myPower;
166 unsigned int myReturnMethod;
167 std::string myImageSavePath;
168 std::string myImageFilename;
171
173
174
175};
176
177
180{
181 public:
182
186
190
194
196 virtual void setReturnMethod(unsigned int method);
197 virtual unsigned int returnMethod();
198
200 virtual void setImageFormat(DtImageFormat format);
202
204 virtual void setImageSize(const DtImageSize& size);
206
210
212 virtual void setFilename(const std::string& filename);
213 virtual std::string filename();
214
216 virtual int dataLength();
217
219 virtual void setData(unsigned char* buffer, int length);
220 virtual unsigned char* data();
221
223 virtual void setImageIndex(int index);
224 virtual int imageIndex();
225
227 virtual void setOwnshipLocation(DtVector location);
228 virtual DtVector ownshipLocation();
229
231 virtual void setOwnshipOrientation(DtTaitBryan orientation);
232 virtual DtTaitBryan ownshipOrientation();
233
235 virtual void setSystemTime(double time);
236 virtual double systemTime();
237
239 virtual void setCenterPosition(double lat, double lon, double alt);
240 virtual void getCenterPosition(double& lat, double& lon, double& alt);
241
243 virtual void setSensorViewDirection(double azimuth, double elevation);
244 virtual void getSensorViewDirection(double& azimuth, double& elevation);
245
247 virtual int messageSize() const;
249 static DtBaseMessage* decode(unsigned char* buffer, int length);
252
253 protected:
254 virtual void serialize(DtStreamWriter& writer);
255 virtual void deserialize(DtStreamReader& reader);
256
260 unsigned int myReturnMethod;
263 std::string myFilename;
265 unsigned char* myData;
275};
276}
277
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 std::string imageFilename()
std::string myRadarName
Definition rfxIsarMessage.h:161
bool myUseAbsoluteTarget
Definition rfxIsarMessage.h:151
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
virtual bool isAgcPowerEnabled() const
virtual void setIsAgcPowerEnabled(bool isAgcPowerEnabled)
Whether or not to use AGC for Power.
float myViewMagnification
Definition rfxIsarMessage.h:170
DtTaitBryan myRadarOffsetOrientation
Definition rfxIsarMessage.h:160
virtual DtVector targetLocation()
virtual void setImageSize(const DtImageSize &size)
Requested image pixel size. This may not be the returned size due to image rotation.
DtVector myOwnshipLocation
Definition rfxIsarMessage.h:156
virtual void setOwnshipLocation(DtVector location)
if the ownship is not hosted in the simulation system, we can explicitly state where we want to perfo...
virtual std::string targetEntityId()
virtual void useObserverAsHost()
calling this function causes the message to use the current observer's position and orientation for t...
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,...
DtVector myTargetLocation
Definition rfxIsarMessage.h:157
virtual bool isUsingAbsoluteLocation()
virtual void setImageReturnMethod(unsigned int returnFlags)
Bitfield for image data return types.
virtual bool isUsingEntityAsHost()
bool myUseObserverAsHost
Definition rfxIsarMessage.h:146
virtual void deserialize(DtStreamReader &reader)
virtual float viewMagnification()
accessors for the view magnification to use for this request
std::string myOwnshipName
Definition rfxIsarMessage.h:154
virtual DtTaitBryan radarOffsetOrientation()
virtual std::string imageSavePath()
unsigned int myReturnMethod
Definition rfxIsarMessage.h:166
virtual DtVector ownshipLocation()
virtual void setTargetLocation(DtVector location)
this is the target that we would like to look at. Location format is latitude/longitude/altitude (in ...
virtual DtImageSize imageSize()
virtual bool isUsingLocationForTarget()
virtual bool isUsingEntityForTarget()
bool myUseAbsoluteOwnship
Definition rfxIsarMessage.h:148
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 void setIntegrationTime(double time)
int myNumRequestedImages
Definition rfxIsarMessage.h:169
bool myIsAgcPowerEnabled
Definition rfxIsarMessage.h:152
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 myUseEntityAsHost
Definition rfxIsarMessage.h:147
DtImageFormat myImageFormat
Definition rfxIsarMessage.h:164
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 ...
double myIntegrationTime
Definition rfxIsarMessage.h:172
virtual DtImageDataType imageDataType()
std::string myImageFilename
Definition rfxIsarMessage.h:168
virtual int messageSize() const
size of the message
virtual double integrationTime()
accessors for the integratino time to use for this request.
virtual void setRadarOffsetOrientation(DtTaitBryan offsetOrientation)
the offset orientation of the sensor from the hosting entite's orientation. Only valid when a hosting...
bool myUseObserverForTarget
Definition rfxIsarMessage.h:149
virtual bool isUsingObserverAsHost()
functions to determine how to place the sensor
DtVector myRadarOffsetLocation
Definition rfxIsarMessage.h:159
virtual void setNumRequestedImages(int numImages)
virtual DtImageFormat imageFormat()
virtual DtVector radarOffsetLocation()
virtual std::string radarSystemName()
virtual std::string ownshipEntityId()
float myPower
Definition rfxIsarMessage.h:162
std::string myTargetName
Definition rfxIsarMessage.h:155
virtual void setRadarOffsetLocation(DtVector offset)
the offset location of the sensor on the hosting entity. Only valid when a hosting entity is defined
virtual unsigned int imageReturnMethod()
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
virtual bool isUsingObserverForTarget()
functions to determine how to place the target
virtual void setImageDataType(DtImageDataType type)
Requested data type of the returned image data. Only available for RAW/NITF image types.
DtImageSize myImageSize
Definition rfxIsarMessage.h:163
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...
DtImageDataType myImageDataType
Definition rfxIsarMessage.h:165
virtual int numRequestedImages()
accessors for the number of images/responses to generate
virtual void setViewMagnification(float zoom)
std::string myImageSavePath
Definition rfxIsarMessage.h:167
virtual void useObserverForTarget()
calling this function causes the message to use the current observer's view to determine the target f...
bool myUseEntityAsTarget
Definition rfxIsarMessage.h:150
virtual void serialize(DtStreamWriter &writer)
virtual void setPower(float power)
Radar system power setting in Watts.
virtual void setImageFormat(DtImageFormat format)
Requested format of the returned image data.
DtTaitBryan myOwnshipOrientation
Definition rfxIsarMessage.h:268
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
DtImageError myError
Definition rfxIsarMessage.h:257
virtual DtImageFormat imageFormat()
int myImageIndex
Definition rfxIsarMessage.h:266
virtual DtImageError error()
virtual void getCenterPosition(double &lat, double &lon, double &alt)
virtual void setOwnshipLocation(DtVector location)
ownship location at the time of the request being processed
virtual int dataLength()
Size of data for the returned image.
virtual DtVector ownshipLocation()
virtual void setImageSize(const DtImageSize &size)
Size of the image returned by the server.
virtual void setOwnshipOrientation(DtTaitBryan orientation)
ownship orientation at the time of the request being processed
double myCenterAlt
Definition rfxIsarMessage.h:272
DtImageWarning myWarning
Definition rfxIsarMessage.h:258
virtual unsigned int returnMethod()
virtual void setImageDataType(DtImageDataType type)
Image data type Only available for RAW/NITF image types.
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
virtual unsigned char * data()
DtImageDataType myImageDataType
Definition rfxIsarMessage.h:262
DtVector myOwnshipLocation
Definition rfxIsarMessage.h:267
virtual void setSensorViewDirection(double azimuth, double elevation)
the sensor view direction is azimuth from north and elevation from level in Radians.
DtImageSize myImageSize
Definition rfxIsarMessage.h:259
virtual void setSystemTime(double time)
UTC time of the request being processed.
double mySensorDirectionElevation
Definition rfxIsarMessage.h:274
virtual void setImageIndex(int index)
0 starting index for this image response
virtual void serialize(DtStreamWriter &writer)
virtual void setWarning(DtImageWarning error)
Warning value if there is one.
virtual void getSensorViewDirection(double &azimuth, double &elevation)
virtual int messageSize() const
size of the message
int myDataLength
Definition rfxIsarMessage.h:264
virtual void setReturnMethod(unsigned int method)
Image return method that is used.
double myCenterLat
Definition rfxIsarMessage.h:270
virtual void setCenterPosition(double lat, double lon, double alt)
the center hit point of the view vector for this response
double mySensorDirectionAzimuth
Definition rfxIsarMessage.h:273
virtual void deserialize(DtStreamReader &reader)
double myCenterLon
Definition rfxIsarMessage.h:271
unsigned int myReturnMethod
Definition rfxIsarMessage.h:260
unsigned char * myData
Definition rfxIsarMessage.h:265
virtual void setData(unsigned char *buffer, int length)
Image data returned by the server. This message class will manage this memory.
virtual DtTaitBryan ownshipOrientation()
virtual void setError(DtImageError error)
Error value if there is one.
virtual DtImageDataType imageDataType()
double mySystemTime
Definition rfxIsarMessage.h:269
virtual DtImageSize imageSize()
virtual DtImageWarning warning()
std::string myFilename
Definition rfxIsarMessage.h:263
virtual double systemTime()
DtImageFormat myImageFormat
Definition rfxIsarMessage.h:261
virtual void setFilename(const std::string &filename)
filename of saved image if it was saved on the server
virtual std::string filename()
virtual void setImageFormat(DtImageFormat format)
Image return format.
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
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