Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

RNReplicaNet::DataBlock_Predict_Float Class Reference

#include <DataBlock_Predict_Float.h>

Inheritance diagram for RNReplicaNet::DataBlock_Predict_Float:

Inheritance graph
[legend]
Collaboration diagram for RNReplicaNet::DataBlock_Predict_Float:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DataBlock_Predict_Float ()
virtual ~DataBlock_Predict_Float ()
virtual void Poll (DataBlockReason *reason)
virtual void ParseMessage (MessageHelper *message)
virtual void GiveDeltaHint (void *pdata, int dataLen)
virtual void GiveDeltaHint (const float delta)
virtual void ContinuityBreak (unsigned char breakTypes)
bool IsAttached (void *data)
void RegisterInClassPointer (float *data)
void SetMinError (float minerror=0.1f)
void SetMaxError (float maxerror=1.0f)
void SetMinDistance (float distance=0.1f)
void SetMaxDistance (float distance=1.0f)
void SetInterpolationFilter (float interpolation=0.1f)
void SetQuadratic (void)
void SetLinear (void)

Static Public Member Functions

static DataBlock_Predict_FloatRegister (float *data)

Classes

struct  MasterData
struct  ReplicaData
struct  SessionBlock_Predict_Float

Detailed Description

This DataBlock derived class tries to perform data prediction on float variable types
This class operates on three levels.
1) It constantly checks the data value and notes down changes based on what it thinks are continuity changes using the extrapolation model for the master side.
2) Each {value,delta and time} update sent to a replica object is stored and using this information the extrapolation is checked against what the current value is doing. If the extrapolation is too far off based on the input tollerance values then the master copy of the extrapolation data is used to calculate a new more accurate prediction model.
3) The replica version of this class receives {value,delta and time} updates and extrapolates these.


Constructor & Destructor Documentation

RNReplicaNet::DataBlock_Predict_Float::DataBlock_Predict_Float  ) 
 

The ctor performs some basic initialisation

virtual RNReplicaNet::DataBlock_Predict_Float::~DataBlock_Predict_Float  )  [virtual]
 

The dtor makes sure everything is tidy


Member Function Documentation

virtual void RNReplicaNet::DataBlock_Predict_Float::ContinuityBreak unsigned char  breakTypes  )  [virtual]
 

This is used to set a continuity break for the data set and provides useful information to the extrapolation algorithm

Parameters:
breakTypes The break types to use for this break. For example : DataBlock::ContinuityBreakTypes::kSuddenChange | DataBlock::ContinuityBreakTypes::kTeleport

Reimplemented from RNReplicaNet::DataBlock.

virtual void RNReplicaNet::DataBlock_Predict_Float::GiveDeltaHint const float  delta  )  [virtual]
 

This is a feedback function that enables an application to give a delta hint to a DataBlock. This float type call maps to the opaque data type call

Parameters:
This delta hint is a float type

Reimplemented from RNReplicaNet::DataBlock.

virtual void RNReplicaNet::DataBlock_Predict_Float::GiveDeltaHint void *  pdata,
int  dataLen
[virtual]
 

This is a feedback function that enables an application to give a delta hint to a DataBlock

Parameters:
pdata the pointer to the data type to give a hint for
dataLem the length of the data type

Reimplemented from RNReplicaNet::DataBlock.

bool RNReplicaNet::DataBlock_Predict_Float::IsAttached void *  data  )  [virtual]
 

Given a data pointer this function identifies if this data block is attached to the pointer.

Returns:
returns true if the data pointer is attached to this data block.

Reimplemented from RNReplicaNet::DataBlock.

virtual void RNReplicaNet::DataBlock_Predict_Float::ParseMessage MessageHelper *  message  )  [virtual]
 

This parses a message for the derived class of this data block

Parameters:
message The current message buffer that contains the packet data

Reimplemented from RNReplicaNet::DataBlock.

virtual void RNReplicaNet::DataBlock_Predict_Float::Poll DataBlockReason reason  )  [virtual]
 

A poll function that is called by ReplicaNet to check for updates to this particular data block. If this virtual method is implemented by a derived class this base class method should be called before a data packet is created.

Parameters:
reason the reason code that is passed in to this class to enable a response to be calculated

Reimplemented from RNReplicaNet::DataBlock.

static DataBlock_Predict_Float* RNReplicaNet::DataBlock_Predict_Float::Register float *  data  )  [static]
 

This registers the memory area with this data block type and returns a new pointer

Parameters:
data the start of the memory to check
Returns:
Returns a pointer that can be used to attach to a ReplicaObject

void RNReplicaNet::DataBlock_Predict_Float::RegisterInClassPointer float *  data  )  [inline]
 

This registers the memory area with this data block type. This is used when the memory is in datablocks that are allocated as part of a bigger class.

Parameters:
data the start of the memory to check

void RNReplicaNet::DataBlock_Predict_Float::SetInterpolationFilter float  interpolation = 0.1f  ) 
 

This sets the interpolation filter factor to use when extrapolating this variable type
0 < interpolation <= 1.0f
1.0f Is very hard interpolation and 0.1f is very soft. 0.1f Is the default.

Parameters:
interpolation the interpolation to use

void RNReplicaNet::DataBlock_Predict_Float::SetLinear void   )  [inline]
 

For distance based interpolation this makes the calculation based on a linear formula. The default is linear.

void RNReplicaNet::DataBlock_Predict_Float::SetMaxDistance float  distance = 1.0f  ) 
 

Sets the maximum distance start point for the maximum error to take effect

Parameters:
the distance

void RNReplicaNet::DataBlock_Predict_Float::SetMaxError float  maxerror = 1.0f  ) 
 

This sets the maximum error that is tolerated for this variable type

Parameters:
maxerror the maximum error to tolerate

void RNReplicaNet::DataBlock_Predict_Float::SetMinDistance float  distance = 0.1f  ) 
 

Sets the minimum distance start point for the minimum error to take effect

Parameters:
the distance

void RNReplicaNet::DataBlock_Predict_Float::SetMinError float  minerror = 0.1f  ) 
 

This sets the minimum error that is tolerated for this variable type

Parameters:
minerror the minimum error to tolerate

void RNReplicaNet::DataBlock_Predict_Float::SetQuadratic void   )  [inline]
 

For distance based interpolation this makes the calculation based on a quadratic formula. The default is linear.


The documentation for this class was generated from the following file:
Generated on Sun Oct 30 01:11:58 2005 for ReplicaNet by  doxygen 1.4.1