XPMP2
X-Plane multiplayer library 2 - using instancing
Public Member Functions | Public Attributes | List of all members
XPMP2::RemoteDataRefPackTy Struct Reference

Definition for how to map dataRef values to (u)int8, ie. to an integer range of 8 bits. More...

#include <XPMPRemote.h>

Public Member Functions

 RemoteDataRefPackTy (float _min, float _max)
 Constructor sets minimum value and range. More...
 
std::uint8_t pack (float f) const
 pack afloat value to integer More...
 
float unpack (std::uint8_t i) const
 unpack an integer value to float More...
 

Public Attributes

float minV = 0.0f
 minimum transferred value More...
 
float range = 0.0f
 range of transferred value = maxV - minV More...
 

Detailed Description

Definition for how to map dataRef values to (u)int8, ie. to an integer range of 8 bits.

Constructor & Destructor Documentation

◆ RemoteDataRefPackTy()

XPMP2::RemoteDataRefPackTy::RemoteDataRefPackTy ( float  _min,
float  _max 
)
inline

Constructor sets minimum value and range.

Member Function Documentation

◆ pack()

std::uint8_t XPMP2::RemoteDataRefPackTy::pack ( float  f) const
inline

pack afloat value to integer

◆ unpack()

float XPMP2::RemoteDataRefPackTy::unpack ( std::uint8_t  i) const
inline

unpack an integer value to float

Member Data Documentation

◆ minV

float XPMP2::RemoteDataRefPackTy::minV = 0.0f

minimum transferred value

◆ range

float XPMP2::RemoteDataRefPackTy::range = 0.0f

range of transferred value = maxV - minV


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