X-Plane Remote Access Plugin and Client Library
Public Member Functions | Static Public Member Functions | List of all members
xplra::GetByteArrayDataRefTask Class Reference

#include <GetDataRefTask.h>

Inheritance diagram for xplra::GetByteArrayDataRefTask:
xplra::GetArrayDataRefTask< unsigned char, GetByteArrayDataRefTask > xplra::GetDataRefTask xplra::DataRefTask xplra::Task

Public Member Functions

 GetByteArrayDataRefTask (const std::string &name, int maxBytes=-1, int offset=0)
 
 GetByteArrayDataRefTask (XPLMDataRef dataRef, int maxBytes=-1, int offset=0)
 
- Public Member Functions inherited from xplra::GetArrayDataRefTask< unsigned char, GetByteArrayDataRefTask >
virtual ~GetArrayDataRefTask ()
 
const unsigned char * getData () const
 
int getLength () const
 
- Public Member Functions inherited from xplra::GetDataRefTask
 GetDataRefTask (const std::string &name)
 
 GetDataRefTask (XPLMDataRef dataRef)
 
- Public Member Functions inherited from xplra::DataRefTask
bool isValid () const
 
const std::string & getName () const
 
XPLMDataRef getDataRef () const
 
- Public Member Functions inherited from xplra::Task
virtual ~Task ()
 

Static Public Member Functions

static int queryData (XPLMDataRef dataRef, void *dest, int offset, int count)
 
- Static Public Member Functions inherited from xplra::GetDataRefTask
static GetDataRefTaskcreate (uint8_t &result, hu::varadiistvan::scpl::io::DataStream &stream)
 

Additional Inherited Members

- Protected Member Functions inherited from xplra::GetArrayDataRefTask< unsigned char, GetByteArrayDataRefTask >
 GetArrayDataRefTask (const std::string &name, int maxCount=-1, int offset=0)
 
 GetArrayDataRefTask (XPLMDataRef dataRef, int maxCount=-1, int offset=0)
 
virtual void process ()
 
virtual void writeValue (hu::varadiistvan::scpl::io::DataStream &stream)
 
- Protected Member Functions inherited from xplra::DataRefTask
 DataRefTask (const std::string &name)
 
 DataRefTask (XPLMDataRef dataRef)
 
virtual void perform ()
 

Detailed Description

A dataref task which retrieves the value of a byte array.

Definition at line 393 of file GetDataRefTask.h.

Constructor & Destructor Documentation

◆ GetByteArrayDataRefTask() [1/2]

xplra::GetByteArrayDataRefTask::GetByteArrayDataRefTask ( const std::string &  name,
int  maxBytes = -1,
int  offset = 0 
)
inline

Construct the task for the dataref with the given name.

Parameters
namethe name of the dataref
maxBytesthe maximal number of bytes to retrieve. If <0, the function will perform an extra query to retrieve the size of the dataref's data, which it will store in the task, so later on it can be reused.
offsetthe offset from which to query the array

Definition at line 710 of file GetDataRefTask.h.

◆ GetByteArrayDataRefTask() [2/2]

xplra::GetByteArrayDataRefTask::GetByteArrayDataRefTask ( XPLMDataRef  dataRef,
int  maxBytes = -1,
int  offset = 0 
)
inline

Construct the task for the given dataref

Parameters
dataRefthe dataref
maxBytesthe maximal number of bytes to retrieve. If <0, the function will perform an extra query to retrieve the size of the dataref's data, which it will store in the task, so later on it can be reused.
offsetthe offset from which to query the array

Definition at line 720 of file GetDataRefTask.h.

Member Function Documentation

◆ queryData()

int xplra::GetByteArrayDataRefTask::queryData ( XPLMDataRef  dataRef,
void *  dest,
int  offset,
int  count 
)
inlinestatic

Get the data via XPLM

Definition at line 701 of file GetDataRefTask.h.


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