GoPxL SDK

- Home
- Files
- Namespace

GoGdpMsg.h
Go to the documentation of this file.
1
9 #ifndef GO_PXL_SDK_GOGDPMSG_H
10 #define GO_PXL_SDK_GOGDPMSG_H
11
12 #include <GoApi/GoApi.h>
13 #include <kApi/Io/kSerializer.h>
14 #include <GoPxLSdk/GoGdpMsg/GoGdpMsgDef.h>
15 #include <GoPxLSdk/GoGdpMsg/GoGdpBoundingBox.h>
16 #include <GoPxLSdk/GoGdpMsg/GoGdpTransform.h>
17
18 namespace GoPxLSdk
19 {
20
21 struct CommonAttributes
22 {
23 k8u spaceType;
24 bool hasTransform;
25 GoGdpTransform transform;
26 bool hasBoundingBox;
27 GoGdpBoundingBox boundingBox;
28 k32u arrayedCount;
29 k32u arrayedIndex;
30 std::string dataSourceId;
31 std::string stampSourceId;
32 k64u dataSetId;
33 bool isLastMsg;
34 k16u gdpId;
35 };
36
37 class GoPxLSdkClass GoGdpMsg
38 {
39 public:
47 GoGdpMsg(MessageType type = MessageType::NULL_TYPE);
48
49 virtual ~GoGdpMsg() = default;
50
59 virtual void Deserialize(kSerializer serializer);
60
68 const MessageType Type() const;
69
79 const std::string& DataSourceId() const;
80
94 const std::string& StampSourceId() const;
95
107 const k8u SpaceType() const;
108
118 const bool HasTransform() const;
119
132 const GoGdpTransform& Transform() const;
133
144 const k32u ArrayedCount() const;
145
154 const k32u ArrayedIndex() const;
155
163 const bool HasBoundingBox() const;
164
174 const GoGdpBoundingBox& BoundingBox() const;
175
186 const k64u DataSetId() const;
187
195 const bool IsLastMsg() const;
196
205 const k16u GdpId() const;
206
207 private:
208 void ReadText(kSerializer serializer, k16u numCharsToRead, std::string& destString);
209
210 protected:
211 CommonAttributes attributes;
212 MessageType msgType;
213 };
214
215
216
217 }
218 #endif
219
GoGdpBoundingBox.h
GoPxLSdk::GoGdpBoundingBox
Definition: GoGdpBoundingBox.h:20
GoPxLSdk::CommonAttributes::stampSourceId
std::string stampSourceId
Definition: GoGdpMsg.h:31
GoPxLSdk::CommonAttributes::hasTransform
bool hasTransform
Definition: GoGdpMsg.h:24
GoPxLSdkClass
#define GoPxLSdkClass
Definition: Def.h:35
GoPxLSdk::GoGdpMsg::attributes
CommonAttributes attributes
Definition: GoGdpMsg.h:211
GoGdpTransform.h
GoGdpMsgDef.h
GoPxLSdk::CommonAttributes::isLastMsg
bool isLastMsg
Definition: GoGdpMsg.h:33
GoPxLSdk::CommonAttributes::boundingBox
GoGdpBoundingBox boundingBox
Definition: GoGdpMsg.h:27
GoPxLSdk::CommonAttributes::dataSetId
k64u dataSetId
Definition: GoGdpMsg.h:32
GoPxLSdk::CommonAttributes::arrayedIndex
k32u arrayedIndex
Definition: GoGdpMsg.h:29
GoPxLSdk::GoGdpTransform
Definition: GoGdpTransform.h:30
GoPxLSdk::MessageType
MessageType
List of enums representing types available to be serialized out through GDP This list is essentially ...
Definition: GoGdpMsgDef.h:27
GoPxLSdk::MessageType::NULL_TYPE
Signals to clients that data on a stream is invalidated.
GoPxLSdk::CommonAttributes
Definition: GoGdpMsg.h:21
GoPxLSdk::CommonAttributes::hasBoundingBox
bool hasBoundingBox
Definition: GoGdpMsg.h:26
GoPxLSdk::GoGdpMsg::msgType
MessageType msgType
Definition: GoGdpMsg.h:212
GoPxLSdk::CommonAttributes::transform
GoGdpTransform transform
Definition: GoGdpMsg.h:25
GoPxLSdk::CommonAttributes::spaceType
k8u spaceType
Definition: GoGdpMsg.h:23
GoPxLSdk::CommonAttributes::dataSourceId
std::string dataSourceId
Definition: GoGdpMsg.h:30
GoPxLSdk::CommonAttributes::arrayedCount
k32u arrayedCount
Definition: GoGdpMsg.h:28
GoPxLSdk
Definition: Def.h:46
GoPxLSdk::CommonAttributes::gdpId
k16u gdpId
Definition: GoGdpMsg.h:34
GoPxLSdk::GoGdpMsg
Definition: GoGdpMsg.h:37