VR-Vantage
Loading...
Searching...
No Matches
rfxElevationMessage.h
Go to the documentation of this file.
1// ******************************************************************************
2// ** Copyright (c) 2016 MAK Technologies, Inc.
3// ** All rights reserved.
4// ******************************************************************************
5
6
10
11
12#pragma once
13
14#include "export.h"
15#include "rfxMessage.h"
16
17#include <matrix/vlVector.h>
18
19#include <string>
20
21namespace makRadarFx
22{
23
28{
29 public:
33
37 virtual void useObserverAsHost();
38
41 virtual void setOwnshipLocation(DtVector location);
42 virtual DtVector ownshipLocation();
43
46 virtual void setOwnshipEntityId(const std::string& name);
47 virtual std::string ownshipEntityId();
48
50 virtual bool isUsingObserverAsHost();
51 virtual bool isUsingEntityAsHost();
53
56 virtual void useObserverForTarget();
57
60 virtual void setTargetEntityId(const std::string& name);
61 virtual std::string targetEntityId();
62
65 virtual void setTargetLocation(DtVector location);
66 virtual DtVector targetLocation();
67
70 virtual bool isUsingEntityForTarget();
72
73
75 virtual int messageSize() const;
77 static DtBaseMessage* decode(unsigned char* buffer, int length);
79 virtual DtBaseMessage* clone();
80
81 protected:
82 virtual void serialize(DtStreamWriter& writer);
83 virtual void deserialize(DtStreamReader& reader);
84
91
92 std::string myOwnshipName;
93 std::string myTargetName;
96};
97
100{
101 public:
103
104
108
111 virtual void setElevation(float elevation);
112 virtual float elevation();
113
117
119 virtual int messageSize() const;
121 static DtBaseMessage* decode(unsigned char* buffer, int length);
124
125 protected:
126 virtual void serialize(DtStreamWriter& writer);
127 virtual void deserialize(DtStreamReader& reader);
128
131};
132}
133
DtBaseMessage(unsigned int messageType)
CTOR/DTOR.
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.
virtual bool isUsingObserverForTarget()
functions to determine how to place the target
virtual void useObserverForTarget()
calling this function causes the message to use the current observer's view to determine the target f...
virtual void useObserverAsHost()
calling this function causes the message to use the current observer's position and orientation for t...
virtual bool isUsingEntityAsHost()
virtual int messageSize() const
size of the message
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
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 myUseEntityAsTarget
Definition rfxElevationMessage.h:89
bool myUseObserverForTarget
Definition rfxElevationMessage.h:88
virtual void setTargetLocation(DtVector location)
this is the target that we would like to look at. Location format is latitude/longitude/altitude (in ...
std::string myTargetName
Definition rfxElevationMessage.h:93
std::string myOwnshipName
Definition rfxElevationMessage.h:92
bool myUseEntityAsHost
Definition rfxElevationMessage.h:86
virtual std::string targetEntityId()
virtual DtVector ownshipLocation()
virtual std::string ownshipEntityId()
bool myUseAbsoluteOwnship
Definition rfxElevationMessage.h:87
virtual bool isUsingEntityForTarget()
virtual void serialize(DtStreamWriter &writer)
virtual void deserialize(DtStreamReader &reader)
DtVector myOwnshipLocation
Definition rfxElevationMessage.h:94
virtual bool isUsingObserverAsHost()
functions to determine how to place the sensor
bool myUseAbsoluteTarget
Definition rfxElevationMessage.h:90
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...
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
DtVector myTargetLocation
Definition rfxElevationMessage.h:95
virtual DtVector targetLocation()
virtual bool isUsingLocationForTarget()
virtual bool isUsingAbsoluteLocation()
bool myUseObserverAsHost
Definition rfxElevationMessage.h:85
virtual int messageSize() const
size of the message
virtual void setElevation(float elevation)
The elevation at a given point. A value of NaN represents that the request could not be completed due...
virtual void serialize(DtStreamWriter &writer)
virtual DtElevationError error()
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
float myElevation
Definition rfxElevationMessage.h:129
DtElevationError
Definition rfxElevationMessage.h:102
@ ELEVATION_ERROR_OCCLUDED
Definition rfxElevationMessage.h:102
@ ELEVATION_ERROR_OTHER
Definition rfxElevationMessage.h:102
@ ELEVATION_NO_ERROR
Definition rfxElevationMessage.h:102
virtual void setError(DtElevationError error)
Error value if there is one.
DtElevationError myError
Definition rfxElevationMessage.h:130
virtual void deserialize(DtStreamReader &reader)
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
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
Defines the base class for all messages that can be sent between the server and the client.