nn::nex::DataSet::SetLocalCorrection Member Function

Syntax

void SetLocalCorrection(
     PHBDRVar_qInt32 & v,
     qReal dValue,
     qReal dRateOfChange,
     qReal dAcceleration,
     Time tTimestamp = GetTimestamp()
);

Parameters

Name Description
in v Specifies the variable in the dataset for which there are changes in the supplementation model. Specify using the MODEL macro.
in dValue Specifies the value of the variable at the current session time.
in dRateOfChange Specifies the rate of change in the variable at the current session time in units of milliseconds.
in dAcceleration Specifies the acceleration of the variable at the current session time in units of milliseconds squared.
in tTimestamp Specifies the current session time, specified as a default argument.

Return Values

None.

Description

Sets a new supplementation model for the duplica on the local station.

Note: This function is not provided by the DataSet class. The data definition language (DDL) compiler generates the code for this function only when the dataset in question is indicated as holding an extrapolation_filter property in the DDL declaration.

This function can execute only on an individual duplica. (To verify, use the DuplicatedObject::IsADuplica function.) This function can be used to temporarily correct inaccurate supplemental information. For example, if a ball in a game strikes a wall and bounces off, it may be rendered inside the wall due to inaccurate supplementation of the ball's position caused by network latency. The SetLocalCorrection function can be used to adjust the supplementation model to temporarily apply the effects of collision detection calculation on the individual duplica.

Ignoring update data from the duplication master, the function supplements the data required based on the local supplementation model until the next two update signals have been received from the duplication master. Once two updates from the duplication master have been received, system-based supplementation resumes.

This function may signal the following errors.

SYSTEMERROR_GEN_INVALID_OPERATION is signaled when supplementation is not enabled for this dataset.
SYSTEMERROR_OBJDUP_INVALID_ON_MASTER is signaled when this function is executed on the duplication master. (To verify, use the DuplicatedObject::IsADuplicationMaster function.)

See Also

IndicateContinuityBreak

Revision History

2012/01/27
Initial version.

CONFIDENTIAL