29 #ifndef HU_VARADIISTVAN_XPLRA_XPLANE_H
30 #define HU_VARADIISTVAN_XPLRA_XPLANE_H
33 #include "Exception.h"
35 #include <hu/varadiistvan/scpl/io/Waiter.h>
44 namespace hu {
namespace varadiistvan {
namespace scpl {
namespace io {
53 namespace hu {
namespace varadiistvan {
namespace xplra {
161 void getVersions(
int& xplaneVersion,
int& xplmVersion,
int& xplraVersion);
178 int getInt(const
char* name);
201 size_t length,
size_t offset = 0);
224 size_t getIntArray(const
char* name, int32_t* dest,
225 size_t length,
size_t offset = 0);
235 int32_t*
getIntArray(const
char* name,
size_t& length,
249 size_t length,
size_t offset = 0);
265 std::
string getString(const
char* name,
size_t offset = 0);
270 void setInt(const
char* name,
int value);
275 void setFloat(const
char* name,
float value);
280 void setDouble(const
char* name,
double value);
285 void setFloatArray(const
char* name, const
float* values,
size_t length,
291 void setIntArray(const
char* name, const int32_t* values,
size_t length,
297 void setByteArray(const
char* name, const uint8_t* values,
size_t length,
306 void setString(const
char* name, const
char* value,
size_t length,
312 void showMessage(const
char* message,
float duration);
340 void checkResult(uint8_t result,
bool hasParameter = false,
354 void getScalar(const
char* name, uint8_t type);
363 size_t getArray(const
char* name, uint8_t type,
364 ssize_t length,
size_t offset);
370 void setScalar(const
char* name, uint8_t type);
375 void setArray(const
char* name, uint8_t type,
size_t length,
381 template <class ClientSocket>
382 void connect(std::unique_ptr<ClientSocket> clientSocket);
void setArray(const char *name, uint8_t type, size_t length, size_t offset)
void registerHotkeys(const uint16_t *codes, size_t length)
std::set< MultiBuffer * > multiBuffers_t
int getInt(const char *name)
size_t getIntArray(const char *name, int32_t *dest, size_t length, size_t offset=0)
void getScalar(const char *name, uint8_t type)
size_t getByteArray(const char *name, uint8_t *dest, size_t length, size_t offset=0)
bool destroyMultiBuffer(MultiBuffer &buffer)
void setInt(const char *name, int value)
size_t getArray(const char *name, uint8_t type, ssize_t length, size_t offset)
float getFloat(const char *name)
void disconnect() noexcept
multiBuffers_t multiBuffers
void queryHotkeys(uint8_t *states, size_t length)
scpl::io::BufferedStream * socket
static const unsigned short defaultTCPPort
MultiGetter & createMultiGetter() noexcept
size_t getFloatArray(const char *name, float *dest, size_t length, size_t offset=0)
void showMessage(const char *message, float duration)
void setDouble(const char *name, double value)
void setFloatArray(const char *name, const float *values, size_t length, size_t offset=0)
scpl::io::DataStream * stream
void saveSituation(const char *path)
void setScalar(const char *name, uint8_t type)
void setIntArray(const char *name, const int32_t *values, size_t length, size_t offset=0)
void connectTCP(const std::string &address, unsigned short port=defaultTCPPort)
void checkResult(uint8_t result, bool hasParameter=false, long parameter=0)
void setString(const char *name, const char *value, size_t length, size_t offset=0)
void setByteArray(const char *name, const uint8_t *values, size_t length, size_t offset=0)
double getDouble(const char *name)
void getVersions(int &xplaneVersion, int &xplmVersion, int &xplraVersion)
bool isConnected() const noexcept
MultiSetter & createMultiSetter() noexcept
std::string getString(const char *name, size_t offset=0)
void setFloat(const char *name, float value)
Python client module for the X-Plane Remote Access plugin.