VR-Engage  2.3
Loading...
Searching...
No Matches
joystick.h
Go to the documentation of this file.
1/*********************************************************************************
2** Copyright (c) 2026 MAK Technologies, Inc.
3** All rights reserved.
4*********************************************************************************/
5
6/**
7* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8* !!!!!!!!!This is an auto-generated file. Any changes will be destroyed!!!!!!!!!!!
9* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10* Generated from: /home/data/exports/DEV-CAM-BML-305/nightly/3375/libsrc/framework/vreMessages/joystick.lua
11*/
12#pragma once
13
16#include <vreMessages/export.h>
17#include <vlpi/entityIdentifier.h>
18#include <string>
19
20namespace makVre
21{
22//! \brief Message type identifier for JoystickMessage.
23constexpr const char* JoystickMessageType = "system.input.joystick";
24
25/**
26 * \class JoystickMessage
27 * \brief Send from any VR-Engage thread to cause the DtVrfRemoteControlConnector to generate a VR-Forces joystick message.
28 *
29 * Message type: "system.input.joystick"
30 *
31 * \note This is an auto-generated class. Do not modify directly.
32 */
34{
35public:
36
37 //! \brief Data payload for JoystickMessage.
39 {
40 //! \brief Default constructor.
42
43 //! \name Data Members
44 //! \{
45
46 DtEntityIdentifier myEntityId;
47 std::string myFunctionGroup;
48 std::string myFunction;
49 double myValue;
51 //! \}
52
53 //! \name Operators
54 //! \{
55 bool operator==(const JoystickData& rhs) const;
56 bool operator!=(const JoystickData& rhs) const;
57 //! \}
58 };
59
60 //! \brief Destructor.
61 virtual ~JoystickMessage() override;
62
63 //! \name Static Creators
64 //! \{
65 //! \brief Create a new default instance.
66 //! \return A dynamically allocated default message. Caller takes ownership.
68
69 //! \brief Create a copy of the given message.
70 //! \param origMsg The message to copy. Must not be null.
71 //! \return A dynamically allocated copy. Caller takes ownership.
73
74 //! \brief Create a new message initialized with the given data.
75 //! \param data The data payload to initialize the message with.
76 //! \return A dynamically allocated message. Caller takes ownership.
78 //! \}
79
80 //! \name Type Identity
81 //! \{
82 //! \brief Get the message type string for this message class.
83 static const std::string& theType();
84
85 //! \brief Get the message identifier for this message class.
87
88 //! \brief Get the version number for this message class.
90
91 //! \brief Get the message type string for this instance.
92 virtual const std::string& type() const override;
93
94 //! \brief Get the message identifier for this instance.
95 virtual const makVre::DtVreMessageId& messageId() const override;
96 //! \}
97
98 //! \name Accessors
99 //! \{
100 virtual const DtEntityIdentifier& getEntityId() const;
101 virtual void setEntityId(const DtEntityIdentifier& val);
102
103 virtual const std::string& getFunctionGroup() const;
104 virtual void setFunctionGroup(const std::string& val);
105
106 virtual const std::string& getFunction() const;
107 virtual void setFunction(const std::string& val);
108
109 virtual double getValue() const;
110 virtual void setValue(double val);
111
112 virtual bool getRepeat() const;
113 virtual void setRepeat(bool val);
114 //! \}
115
116 //! \name Serialization
117 //! \{
118 //! \copydoc makVre::DtVreMessage::messageSize()
119 virtual int messageSize() const override;
120
121 //! \brief Decode a message from a byte buffer.
122 //! \param buffer The raw byte buffer to decode from.
123 //! \param length The length of the buffer in bytes.
124 //! \return A dynamically allocated decoded message. Caller takes ownership.
125 static makVre::DtVreMessage* decode(char* buffer, int length);
126
127 //! \brief Get a copy of the message data.
129
130 //! \brief Get a copy of the message data (const).
132 //! \}
133
134 //! \name Operators
135 //! \{
136 bool operator==(const JoystickMessage& rhs) const;
137 bool operator!=(const JoystickMessage& rhs) const;
138 //! \}
139
140protected:
142
143 //! \copydoc makVre::DtVreMessage::serialize()
144 virtual void serialize(DtStreamWriter& writer) const override;
145
146 //! \copydoc makVre::DtVreMessage::deserialize()
147 virtual void deserialize(DtStreamReader& reader) override;
148
149protected:
152
154};
155} // namespace makVre
156
Reader class for decoding values from a byte array.
Definition byteStream.h:43
Writer class for encoding values into a byte array.
Definition byteStream.h:166
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Message identifier class for the VREngage messaging system.
Definition vreMessageId.h:35
static const makVre::DtVreMessageId & theId()
Get the message identifier for this message class.
bool operator!=(const JoystickMessage &rhs) const
virtual const std::string & getFunction() const
virtual void serialize(DtStreamWriter &writer) const override
Serializes the message to a stream writer.
static makVre::DtVreMessageId theMessageId
Definition joystick.h:150
virtual void setRepeat(bool val)
static UInt64 theVersion
Definition joystick.h:151
virtual void setFunction(const std::string &val)
virtual double getValue() const
virtual void setValue(double val)
virtual void setFunctionGroup(const std::string &val)
bool operator==(const JoystickMessage &rhs) const
static JoystickMessage * createFrom(JoystickMessage *origMsg)
Create a copy of the given message.
virtual const DtEntityIdentifier & getEntityId() const
JoystickData getData()
Get a copy of the message data.
static makVre::DtVreMessage * decode(char *buffer, int length)
Decode a message from a byte buffer.
JoystickData getData() const
Get a copy of the message data (const).
virtual void deserialize(DtStreamReader &reader) override
Deserializes the message from a stream reader.
virtual ~JoystickMessage() override
Destructor.
virtual const makVre::DtVreMessageId & messageId() const override
Get the message identifier for this instance.
static JoystickMessage * createFromData(const JoystickData data)
Create a new message initialized with the given data.
virtual bool getRepeat() const
virtual const std::string & getFunctionGroup() const
virtual const std::string & type() const override
Get the message type string for this instance.
JoystickData myData
Definition joystick.h:153
static JoystickMessage * create()
Create a copy of the given message.
virtual void setEntityId(const DtEntityIdentifier &val)
virtual int messageSize() const override
Get a copy of the message data.
static const std::string & theType()
Get the message type string for this instance.
static UInt64 theVersionNumber()
Get the version number for this message class.
Defines export macros for the VREngage Messages library.
#define VREMESSAGES_DLL
Export/import macro for non-Windows platforms.
Definition export.h:39
!
Definition glsVreMessageUtil.h:50
constexpr const char * JoystickMessageType
Message type identifier for JoystickMessage.
Definition joystick.h:23
unsigned long long UInt64
Unsigned 64-bit integer type.
Definition utilFunctions.h:42
Data payload for JoystickMessage.
Definition joystick.h:39
std::string myFunctionGroup
Definition joystick.h:47
JoystickData()
Default constructor.
std::string myFunction
Definition joystick.h:48
bool operator==(const JoystickData &rhs) const
bool operator!=(const JoystickData &rhs) const
bool myRepeat
Definition joystick.h:50
double myValue
Definition joystick.h:49
DtEntityIdentifier myEntityId
Definition joystick.h:46
Defines the base class for all VREngage messages.
Defines message identifier class for the VREngage messaging system.