30 #ifndef HU_VARADIISTVAN_XPLRA_XPLRA_H
31 #define HU_VARADIISTVAN_XPLRA_XPLRA_H
62 #define ERROR_PROTOCOL 2
65 #define ERROR_PROTOCOL_INVALID_COMMAND = 1
68 #define ERROR_PROTOCOL_UNKNOWN_DATAREF = 2
71 #define ERROR_PROTOCOL_INVALID_TYPE = 3
74 #define ERROR_PROTOCOL_INVALID_LENGTH = 4
77 #define ERROR_PROTOCOL_INVALID_OFFSET = 5
80 #define ERROR_PROTOCOL_INVALID_COUNT = 6
83 #define ERROR_PROTOCOL_INVALID_ID = 7
86 #define ERROR_PROTOCOL_INVALID_DURATION = 8
89 #define ERROR_PROTOCOL_OTHER = 255
92 #define ERROR_NOT_CONNECTED 3
95 #define ERROR_TYPE_MISMATCH 4
98 #define ERROR_INVALID_ID 5
101 #define ERROR_OTHER 255
106 #define HOTKEY_MODIFIER_SHIFT 0x01
109 #define HOTKEY_MODIFIER_CONTROL 0x02
117 #define INVALID_DATAREF_ID ((size_t)-1)
174 int* xplaneVersion,
int* xplmVersion,
201 int xplra_get_int(
int* value,
int connectionID,
const char* name);
236 int connectionID,
const char* name);
253 int connectionID,
const char* name);
270 int connectionID,
const char* name);
287 int connectionID,
const char* name);
304 int connectionID,
const char* name);
321 int connectionID,
const char* name);
330 int xplra_set_int(
int connectionID,
const char* name,
int value);
359 const float* values,
size_t length,
size_t offset);
370 const int32_t* values,
size_t length,
size_t offset);
381 const void* values,
size_t length,
size_t offset);
393 const char* value,
size_t length,
size_t offset);
454 size_t length,
size_t offset);
465 size_t length,
size_t offset);
476 size_t length,
size_t offset);
665 const float* value,
size_t length,
683 size_t length,
size_t offset,
684 int bufferID,
size_t datarefID);
715 const int32_t* value,
size_t length,
733 size_t length,
size_t offset,
734 int bufferID,
size_t datarefID);
765 const void* value,
size_t length,
783 size_t length,
size_t offset,
784 int bufferID,
size_t datarefID);
810 const char* value,
size_t offset);
852 const uint16_t* codes,
size_t length);
int xplra_connect_tcp_port(const char *address, unsigned short port)
int xplra_multi_finalize(int bufferID)
size_t xplra_multi_add_int_array(int bufferID, const char *name, size_t length, size_t offset)
int xplra_set_byte_array(int connectionID, const char *name, const void *values, size_t length, size_t offset)
int xplra_query_hotkeys(int connectionID, uint8_t *states, size_t length)
const int32_t * xplra_multi_get_int_array_ptr(int bufferID, size_t datarefID, size_t offset)
int32_t * xplra_get_int_array_new(size_t *length, size_t offset, int connectionID, const char *name)
size_t xplra_multi_add_float_array(int bufferID, const char *name, size_t length, size_t offset)
int xplra_set_double(int connectionID, const char *name, double value)
const float * xplra_multi_get_float_const_ptr(int bufferID, size_t datarefID)
int xplra_get_double(double *value, int connectionID, const char *name)
int xplra_disconnect(int connectionID)
int xplra_multi_unregister_safely(int bufferID)
int xplra_reconnect(int connectionID)
int xplra_register_hotkeys(int connectionID, const uint16_t *codes, size_t length)
int xplra_set_float(int connectionID, const char *name, float value)
int xplra_show_message(int connectionID, const char *message, float duration)
int xplra_set_string(int connectionID, const char *name, const char *value, size_t length, size_t offset)
ssize_t xplra_multi_set_float_array(int bufferID, size_t datarefID, const float *value, size_t length, size_t offset)
ssize_t xplra_multi_get_byte_array(void *value, size_t length, size_t offset, int bufferID, size_t datarefID)
uint8_t * xplra_get_byte_array_new(size_t *length, size_t offset, int connectionID, const char *name)
const char * xplra_multi_get_string_ptr(int bufferID, size_t datarefID, size_t offset)
void xplra_clear_last_error(int connectionID)
int xplra_get_int(int *value, int connectionID, const char *name)
ssize_t xplra_multi_set_string(int bufferID, size_t datarefID, const char *value, size_t offset)
int xplra_multi_execute(int bufferID)
int xplra_get_last_error(int connectionID, unsigned long *subCode)
size_t xplra_multi_add_int(int bufferID, const char *name)
int xplra_connect_tcp(const char *address)
ssize_t xplra_get_float_array(float *dest, size_t length, size_t offset, int connectionID, const char *name)
ssize_t xplra_get_byte_array(void *dest, size_t length, size_t offset, int connectionID, const char *name)
ssize_t xplra_multi_set_byte_array(int bufferID, size_t datarefID, const void *value, size_t length, size_t offset)
int xplra_multi_set_int(int bufferID, size_t datarefID, int value)
int xplra_multi_create_setter(int connectionID)
int32_t * xplra_multi_get_int_ptr(int bufferID, size_t datarefID)
int xplra_set_int_array(int connectionID, const char *name, const int32_t *values, size_t length, size_t offset)
int xplra_multi_set_double(int bufferID, size_t datarefID, double value)
int xplra_reload_plugins(int connectionID)
int xplra_multi_get_float(float *dest, int bufferID, size_t datarefID)
const uint8_t * xplra_multi_get_byte_array_ptr(int bufferID, size_t datarefID, size_t offset)
ssize_t xplra_multi_set_int_array(int bufferID, size_t datarefID, const int32_t *value, size_t length, size_t offset)
const char * xplra_get_last_error_string(int connectionID)
int xplra_destroy(int connectionID)
float * xplra_get_float_array_new(size_t *length, size_t offset, int connectionID, const char *name)
double * xplra_multi_get_double_ptr(int bufferID, size_t datarefID)
size_t xplra_multi_add_double(int bufferID, const char *name)
int xplra_get_float(float *value, int connectionID, const char *name)
const int32_t * xplra_multi_get_int_const_ptr(int bufferID, size_t datarefID)
ssize_t xplra_get_int_array(int32_t *dest, size_t length, size_t offset, int connectionID, const char *name)
ssize_t xplra_multi_get_float_array(float *value, size_t length, size_t offset, int bufferID, size_t datarefID)
int xplra_multi_get_int(int *dest, int bufferID, size_t datarefID)
int xplra_set_int(int connectionID, const char *name, int value)
int xplra_multi_create_getter(int connectionID)
int xplra_multi_set_float(int bufferID, size_t datarefID, float value)
size_t xplra_multi_add_float(int bufferID, const char *name)
int xplra_get_versions(int connectionID, int *xplaneVersion, int *xplmVersion, int *xplraVersion)
const double * xplra_multi_get_double_const_ptr(int bufferID, size_t datarefID)
float * xplra_multi_get_float_ptr(int bufferID, size_t datarefID)
int xplra_unregister_hotkeys(int connectionID)
int xplra_multi_get_double(double *dest, int bufferID, size_t datarefID)
int xplra_multi_unregister(int bufferID)
int xplra_multi_destroy_buffer(int connectionID, int bufferID)
int xplra_multi_register(int bufferID)
int xplra_save_situation(int connectionID, const char *path)
const float * xplra_multi_get_float_array_ptr(int bufferID, size_t datarefID, size_t offset)
int xplra_set_float_array(int connectionID, const char *name, const float *values, size_t length, size_t offset)
ssize_t xplra_multi_get_int_array(int32_t *value, size_t length, size_t offset, int bufferID, size_t datarefID)
size_t xplra_multi_add_byte_array(int bufferID, const char *name, size_t length, size_t offset)