XPLMRegisterDataAccessor

XPLM_API XPLMDataRef XPLMRegisterDataAccessor(
                         const char *         inDataName,    
                         XPLMDataTypeID       inDataType,    
                         int                  inIsWritable,    
                         XPLMGetDatai_f       inReadInt,    
                         XPLMSetDatai_f       inWriteInt,    
                         XPLMGetDataf_f       inReadFloat,    
                         XPLMSetDataf_f       inWriteFloat,    
                         XPLMGetDatad_f       inReadDouble,    
                         XPLMSetDatad_f       inWriteDouble,    
                         XPLMGetDatavi_f      inReadIntArray,    
                         XPLMSetDatavi_f      inWriteIntArray,    
                         XPLMGetDatavf_f      inReadFloatArray,    
                         XPLMSetDatavf_f      inWriteFloatArray,    
                         XPLMGetDatab_f       inReadData,    
                         XPLMSetDatab_f       inWriteData,    
                         void *               inReadRefcon,    
                         void *               inWriteRefcon);    

This routine creates a new item of data that can be read and written. Pass in the data’s full name for searching, the type(s) of the data for accessing, and whether the data can be written to. For each data type you support, pass in a read accessor function and a write accessor function if necessary. Pass NULL for data types you do not support or write accessors if you are read-only.

You are returned a data ref for the new item of data created. You can use this data ref to unregister your data later or read or write from it.