libacfutils
A general purpose library of utility functions designed to make it easier to develop addons for the X-Plane flight simulator.
Loading...
Searching...
No Matches
Data Fields
dr_t Struct Reference

#include <dr.h>

Data Fields

char name [128]
 
XPLMDataRef dr
 
XPLMDataTypeID type
 
bool_t writable
 
bool_t wide_type
 
void * value
 
ssize_t count
 
size_t stride
 
void(* read_cb )(dr_t *dr, void *value_out)
 
void(* write_cb )(dr_t *dr, void *value_in)
 
bool_t(* read_scalar_cb )(dr_t *dr, void *value_out)
 
bool_t(* write_scalar_cb )(dr_t *dr, void *value_in)
 
int(* read_array_cb )(dr_t *dr, void *values_out, int offset, int count)
 
void(* write_array_cb )(dr_t *dr, void *values_in, int offset, int count)
 
void * cb_userinfo
 

Detailed Description

This is the object representing a dataref. It is a convenience wrapper and a pointer to it is the first argument to all dr_* functions.

Definition at line 74 of file dr.h.

Field Documentation

◆ cb_userinfo

void* cb_userinfo
Deprecated:
Do not set this field. Use the dr_cfg_t structure's cb_userinfo field and dr_get_cb_userinfo() instead.

Definition at line 141 of file dr.h.

◆ count

ssize_t count

For array datarefs we expose, this denotes the number of elements in the array. For any other kind of dataref, this field is ignored. This shouldn't be manipulated from outside after creation.

Definition at line 96 of file dr.h.

◆ dr

XPLMDataRef dr

X-Plane dataref handle. Must NOT be altered after creation.

Definition at line 78 of file dr.h.

◆ name

char name[128]

The name of the dataref. Must NOT be altered after creation.

Definition at line 76 of file dr.h.

◆ read_array_cb

int(* read_array_cb) (dr_t *dr, void *values_out, int offset, int count)
Deprecated:
Do not set this field. Use the dr_cfg_t structure's read_array_cb field instead.

Definition at line 127 of file dr.h.

◆ read_cb

void(* read_cb) (dr_t *dr, void *value_out)
Deprecated:
Do not set this field. Use the dr_cfg_t structure's read_cb field instead.

Definition at line 103 of file dr.h.

◆ read_scalar_cb

bool_t(* read_scalar_cb) (dr_t *dr, void *value_out)
Deprecated:
Do not set this field. Use the dr_cfg_t structure's read_scalar_cb field instead.

Definition at line 115 of file dr.h.

◆ stride

size_t stride

Definition at line 97 of file dr.h.

◆ type

XPLMDataTypeID type

Type(s) of the dataref. Must NOT be altered after creation.

Definition at line 80 of file dr.h.

◆ value

void* value

For datarefs we expose, this points to the raw data, supplied in the dr_create_* call. For datarefs located using dr_find(), this field is ignored.

Definition at line 90 of file dr.h.

◆ wide_type

bool_t wide_type

Is it a 64-bit type? Must NOT be altered after creation.

Definition at line 84 of file dr.h.

◆ writable

bool_t writable

Is the dataref writable? Must NOT be altered after creation.

Definition at line 82 of file dr.h.

◆ write_array_cb

void(* write_array_cb) (dr_t *dr, void *values_in, int offset, int count)
Deprecated:
Do not set this field. Use the dr_cfg_t structure's write_array_cb field instead.

Definition at line 134 of file dr.h.

◆ write_cb

void(* write_cb) (dr_t *dr, void *value_in)
Deprecated:
Do not set this field. Use the dr_cfg_t structure's write_cb field instead.

Definition at line 109 of file dr.h.

◆ write_scalar_cb

bool_t(* write_scalar_cb) (dr_t *dr, void *value_in)
Deprecated:
Do not set this field. Use the dr_cfg_t structure's write_scalar_cb field instead.

Definition at line 121 of file dr.h.


The documentation for this struct was generated from the following file: